Changeset 34468 for branches/eam_branches/ipp-20120905
- Timestamp:
- Sep 25, 2012, 10:07:49 AM (14 years ago)
- Location:
- branches/eam_branches/ipp-20120905/Ohana/src
- Files:
-
- 15 edited
- 3 copied
-
addstar/src/ReadStarsFITS.c (modified) (4 diffs)
-
getstar/src/MatchImages.c (modified) (1 diff)
-
getstar/src/args.c (modified) (2 diffs)
-
getstar/src/select_by_region.c (modified) (3 diffs)
-
libohana/include/ohana.h (modified) (1 diff)
-
libohana/src/string.c (modified) (1 diff)
-
opihi/cmd.astro (modified) (1 prop)
-
opihi/cmd.data/read_vectors.c (modified) (5 diffs)
-
opihi/cmd.data/reindex.c (modified) (5 diffs)
-
opihi/cmd.data/subset.c (modified) (1 diff)
-
opihi/dvo/Makefile (modified) (1 diff)
-
opihi/dvo/avmatch.c (modified) (1 diff)
-
opihi/dvo/init.c (modified) (2 diffs)
-
opihi/dvo/mmatch.c (copied) (copied from trunk/Ohana/src/opihi/dvo/mmatch.c )
-
opihi/dvo/test (copied) (copied from trunk/Ohana/src/opihi/dvo/test )
-
opihi/dvo/test/mmatch.sh (copied) (copied from trunk/Ohana/src/opihi/dvo/test/mmatch.sh )
-
relastro/src/UpdateObjects.c (modified) (1 diff)
-
relphot/src/StarOps.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20120905/Ohana/src/addstar/src/ReadStarsFITS.c
r34426 r34468 606 606 stars[i].measure.psfChisq = ps1data[i].psfChisq; 607 607 stars[i].measure.psfQF = ps1data[i].psfQF; 608 stars[i].measure.psfQFperf = ps1data[i].psfQFpe f;608 stars[i].measure.psfQFperf = ps1data[i].psfQFperf; 609 609 stars[i].measure.psfNdof = ps1data[i].psfNdof; 610 610 stars[i].measure.psfNpix = ps1data[i].psfNpix; … … 687 687 stars[i].measure.psfChisq = ps1data[i].psfChisq; 688 688 stars[i].measure.psfQF = ps1data[i].psfQF; 689 stars[i].measure.psfQFperf = ps1data[i].psfQFpef; 689 stars[i].measure.psfQFperf = ps1data[i].psfQFperf; 690 690 691 stars[i].measure.psfNdof = ps1data[i].psfNdof; 691 692 stars[i].measure.psfNpix = ps1data[i].psfNpix; … … 773 774 stars[i].measure.psfChisq = ps1data[i].psfChisq; 774 775 stars[i].measure.psfQF = ps1data[i].psfQF; 775 stars[i].measure.psfQFperf = ps1data[i].psfQFpef; 776 stars[i].measure.psfQFperf = ps1data[i].psfQFperf; 777 776 778 stars[i].measure.psfNdof = ps1data[i].psfNdof; 777 779 stars[i].measure.psfNpix = ps1data[i].psfNpix; … … 930 932 stars[i].measure.psfChisq = ps1data[i].psfChisq; 931 933 stars[i].measure.psfQF = ps1data[i].psfQF; 932 stars[i].measure.psfQFperf = ps1data[i].psfQFpef; 934 stars[i].measure.psfQFperf = ps1data[i].psfQFperf; 935 933 936 stars[i].measure.psfNdof = ps1data[i].psfNdof; 934 937 stars[i].measure.psfNpix = ps1data[i].psfNpix; -
branches/eam_branches/ipp-20120905/Ohana/src/getstar/src/MatchImages.c
r28241 r34468 43 43 tcoords.pc1_1 = tcoords.pc2_2 = 1.0; 44 44 tcoords.pc1_2 = tcoords.pc2_1 = 0.0; 45 tcoords.Npolyterms = 1; 45 46 strcpy (tcoords.ctype, "RA---TAN"); 46 47 } -
branches/eam_branches/ipp-20120905/Ohana/src/getstar/src/args.c
r20985 r34468 40 40 41 41 MagLimitUse = FALSE; 42 MagLimitValue = 100; 42 43 if ((N = get_argument (argc, argv, "-maglim"))) { 43 44 MagLimitUse = TRUE; … … 60 61 61 62 MinMagUse = FALSE; 63 MinMagValue = -100; 62 64 if ((N = get_argument (argc, argv, "-minmag"))) { 63 65 MinMagUse = TRUE; -
branches/eam_branches/ipp-20120905/Ohana/src/getstar/src/select_by_region.c
r34088 r34468 82 82 } 83 83 if (isnan(mag)) continue; 84 if (mag < MinMagValue) continue; 85 if (mag > MagLimitValue) continue; 84 86 85 87 bin = (mag - MagMin) / dMag; … … 118 120 if (D > region[0].Dmax) continue; 119 121 120 if (MagLimitUse) { 122 // If either magnitude limit was specfied it a apply both. 123 // If one of the limits is not used it is initialized to an unphysical value so test will succeed 124 if (MagLimitUse || MinMagUse) { 121 125 mag = NAN; 122 126 if (needMeas) { … … 132 136 } 133 137 if (isnan(mag) || (mag > MagLimitValue)) continue; 138 if (isnan(mag) || (mag < MinMagValue)) continue; 134 139 } 135 140 -
branches/eam_branches/ipp-20120905/Ohana/src/libohana/include/ohana.h
r34260 r34468 256 256 int iparse PROTO((int *X, int NX, char *line)); 257 257 int iparse_csv PROTO((int *X, int NX, char *line)); 258 int charparse_csv PROTO((char *X, int NX, char *line)); 259 int charparse PROTO((char *X, int NX, char *line)); 258 260 int tparse PROTO((time_t *X, int NX, char *line)); 259 261 int tparse_csv PROTO((time_t *X, int NX, char *line)); -
branches/eam_branches/ipp-20120905/Ohana/src/libohana/src/string.c
r33963 r34468 267 267 } 268 268 269 int charparse (char *X, int NX, char *line) { 270 271 int i; 272 char *word; 273 274 word = line; 275 for (i = 0; i < NX - 1; i++) 276 word = _parse_nextword (word); 277 278 *X = word[0]; 279 return (1); 280 } 281 282 int charparse_csv (char *X, int NX, char *line) { 283 284 int i; 285 char *word; 286 287 word = line; 288 for (i = 0; i < NX - 1; i++) 289 word = _parse_nextword_csv (word); 290 291 if (word[0] == '"') word[0] = word[1]; 292 if (word[0] == ',') { 293 *X = 0; 294 return 1; 295 } 296 297 *X = word[0]; 298 return (1); 299 } 300 269 301 int tparse (time_t *X, int NX, char *line) { 270 302 -
branches/eam_branches/ipp-20120905/Ohana/src/opihi/cmd.astro
- Property svn:mergeinfo changed
/trunk/Ohana/src/opihi/cmd.astro merged: 34429
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20120905/Ohana/src/opihi/cmd.data/read_vectors.c
r33662 r34468 22 22 23 23 // vector types 24 enum {COLTYPE_NONE, COLTYPE_FLT, COLTYPE_INT, COLTYPE_TIME };24 enum {COLTYPE_NONE, COLTYPE_FLT, COLTYPE_INT, COLTYPE_TIME, COLTYPE_CHAR}; 25 25 26 26 int read_vectors (int argc, char **argv) { … … 101 101 if (!strcasecmp(ptr, "float")) { coltype[i] = COLTYPE_FLT; } 102 102 if (!strcasecmp(ptr, "int")) { coltype[i] = COLTYPE_INT; } 103 if (!strcasecmp(ptr, "char")) { coltype[i] = COLTYPE_CHAR; } 103 104 if (!strcasecmp(ptr, "time")) { coltype[i] = COLTYPE_TIME; } 104 105 if (!coltype[i]) goto bad_colname; … … 143 144 NELEM = 1000; 144 145 for (i = 0; i < Nvec; i++) { 145 if ( coltype[i] == COLTYPE_INT) {146 if ((coltype[i] == COLTYPE_INT) || (coltype[i] == COLTYPE_CHAR)) { 146 147 ResetVector (vec[i], OPIHI_INT, NELEM); 147 148 } else { … … 195 196 for (i = 0; i < Nvec; i++) { 196 197 int ivalue; 198 char cvalue; 197 199 double dvalue; 198 200 time_t tvalue; … … 203 205 readStatus = IsCSV ? iparse_csv (&ivalue, col[i], c0) : iparse (&ivalue, col[i], c0); 204 206 vec[i][0].elements.Int[Nelem] = readStatus ? ivalue : 0; 207 break; 208 case COLTYPE_CHAR: 209 readStatus = IsCSV ? charparse_csv (&cvalue, col[i], c0) : charparse (&cvalue, col[i], c0); 210 vec[i][0].elements.Int[Nelem] = readStatus ? cvalue : 0; 205 211 break; 206 212 case COLTYPE_FLT: -
branches/eam_branches/ipp-20120905/Ohana/src/opihi/cmd.data/reindex.c
r33662 r34468 5 5 int reindex (int argc, char **argv) { 6 6 7 int i, N pts, Nmax;7 int i, Nmax, N; 8 8 Vector *ivec, *ovec, *xvec; 9 9 10 10 ivec = ovec = xvec = NULL; 11 Npts = 0; 11 int Npts = 0; 12 13 int KEEP_UNMATCH = FALSE; 14 if ((N = get_argument (argc, argv, "-keep-unmatched"))) { 15 remove_argument (N, &argc, argv); 16 KEEP_UNMATCH = TRUE; 17 } 12 18 13 19 if (argc != 6) goto usage; … … 22 28 23 29 // ovec matches ivec in type and xvec in size (xvec need not have all ivec elements, and may have duplicates 30 int NPTS = xvec[0].Nelements; 24 31 ResetVector (ovec, ivec->type, xvec[0].Nelements); 25 32 … … 31 38 opihi_int *vx = xvec[0].elements.Int; 32 39 for (Npts = i = 0; i < xvec[0].Nelements; i++, vx++) { 33 if (*vx == -1) continue; 34 if (*vx < 0) ESCAPE("unexpected value in index: %d (%d)\n", *vx, i); 40 if (Npts >= NPTS) { 41 NPTS += 2000; 42 REALLOCATE (ovec[0].elements.Flt, opihi_flt, NPTS); 43 } 44 if (*vx < 0) { 45 if (KEEP_UNMATCH) { 46 ovec[0].elements.Flt[Npts] = NAN; 47 Npts++; 48 } 49 continue; 50 } 35 51 if (*vx > Nmax) ESCAPE("unexpected value in index: %d (%d)\n", *vx, i); 36 52 ovec[0].elements.Flt[Npts] = vi[*vx]; … … 42 58 opihi_int *vx = xvec[0].elements.Int; 43 59 for (Npts = i = 0; i < xvec[0].Nelements; i++, vx++) { 44 if (*vx == -1) continue; 45 if (*vx < 0) ESCAPE("unexpected value in index: %d (%d)\n", *vx, i); 60 if (Npts >= NPTS) { 61 NPTS += 2000; 62 REALLOCATE (ovec[0].elements.Int, opihi_int, NPTS); 63 } 64 if (*vx < 0) { 65 if (KEEP_UNMATCH) { 66 ovec[0].elements.Flt[Npts] = -1; 67 Npts++; 68 } 69 continue; 70 } 46 71 if (*vx > Nmax) ESCAPE("unexpected value in index: %d (%d)\n", *vx, i); 47 72 ovec[0].elements.Int[Npts] = vi[*vx]; … … 60 85 usage: 61 86 gprint (GP_ERR, "USAGE: reindex (out) = (in) using (index)\n"); 62 gprint (GP_ERR, " creates a new vectors (out) from (in) based on sequence in (index)\n"); 87 gprint (GP_ERR, " Creates a new vector (out) from (in) based on sequence in (index)\n"); 88 gprint (GP_ERR, " output[i] = input[index[i]]\n"); 89 gprint (GP_ERR, " If -keep-unmatched is provided, elements of index with negative values will be set to NaN / -1,\n"); 90 gprint (GP_ERR, " otherwise they will be skipped in the output.\n"); 91 gprint (GP_ERR, " The output vector has the type of the input vector and the length of the index (if -keep-unmatched).\n"); 92 gprint (GP_ERR, " The index vector may have duplicates\n"); 63 93 return (FALSE); 64 94 } -
branches/eam_branches/ipp-20120905/Ohana/src/opihi/cmd.data/subset.c
r30610 r34468 13 13 Npts = 0; 14 14 15 if (argc < 6) { 16 gprint (GP_ERR, "SYNTAX: subset vec = vec [if/where] (logic expression)\n"); 17 return (FALSE); 18 } 19 15 20 valid = TRUE; 16 valid &= (argc >= 6);17 21 valid &= !strcmp(argv[2], "="); 18 22 valid &= !strcmp(argv[4], "if") || !strcmp (argv[4], "where"); -
branches/eam_branches/ipp-20120905/Ohana/src/opihi/dvo/Makefile
r33662 r34468 67 67 $(SRC)/lightcurve.$(ARCH).o \ 68 68 $(SRC)/mextract.$(ARCH).o \ 69 $(SRC)/mmatch.$(ARCH).o \ 69 70 $(SRC)/mmextract.$(ARCH).o \ 70 71 $(SRC)/objectcoverage.$(ARCH).o \ -
branches/eam_branches/ipp-20120905/Ohana/src/opihi/dvo/avmatch.c
r34405 r34468 203 203 Npts = j; 204 204 205 if (Ncat == -1) continue; 206 if (Ncat == -2) continue; 205 if (Ncat == -1) continue; // this point is not in this catalog file 206 if (Ncat == -2) continue; // no matches to this point 207 207 208 208 m = catalog.average[Ncat].measureOffset; -
branches/eam_branches/ipp-20120905/Ohana/src/opihi/dvo/init.c
r33662 r34468 42 42 int lightcurve PROTO((int, char **)); 43 43 int mextract PROTO((int, char **)); 44 int mmatch PROTO((int, char **)); 44 45 int mmextract PROTO((int, char **)); 45 46 int objectcoverage PROTO((int, char **)); … … 97 98 {1, "lightcurve", lightcurve, "extract lightcurve for a star"}, 98 99 {1, "mextract", mextract, "extract measure data values"}, 100 {1, "mmatch", mmatch, "extract measure data values matched to RA,DEC points"}, 99 101 {1, "mmextract", mmextract, "extract joined measurements"}, 100 102 {1, "objectcoverage", objectcoverage, "plot catalog boundaries"}, -
branches/eam_branches/ipp-20120905/Ohana/src/relastro/src/UpdateObjects.c
r34423 r34468 113 113 } 114 114 115 // outlier rejection115 // outlier rejection 116 116 if (FlagOutlier && (measure[k].dbFlags & ID_MEAS_POOR_ASTROM)) { 117 117 measure[k].dbFlags &= ~ID_MEAS_USED_OBJ; -
branches/eam_branches/ipp-20120905/Ohana/src/relphot/src/StarOps.c
r34427 r34468 651 651 652 652 // get the zero point for the selected image 653 float zp = Mcal + Mmos + Mgrid + PhotZeroPoint (&catalog[Nc].measure[m], &catalog[Nc].average[j], &catalog[Nc].secfilt[j*Nsecfilt]);653 float zp = PhotZeroPoint (&catalog[Nc].measure[m], &catalog[Nc].average[j], &catalog[Nc].secfilt[j*Nsecfilt]) - (Mcal + Mmos + Mgrid); 654 654 655 655 // flux_cgs : erg sec^1 cm^-2 Hz^-1
Note:
See TracChangeset
for help on using the changeset viewer.
