Changeset 35104
- Timestamp:
- Feb 6, 2013, 3:25:35 PM (13 years ago)
- Location:
- trunk/Ohana/src/relphot
- Files:
-
- 8 edited
-
include/relphot.h (modified) (1 diff)
-
src/ImageOps.c (modified) (2 diffs)
-
src/ImageSubset.c (modified) (8 diffs)
-
src/StarOps.c (modified) (1 diff)
-
src/args.c (modified) (1 diff)
-
src/reload_catalogs.c (modified) (1 diff)
-
src/relphot_objects.c (modified) (1 diff)
-
src/setMrelCatalog.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/relphot/include/relphot.h
r34844 r35104 107 107 unsigned int tzero; 108 108 unsigned char trate; 109 short ubercalDist; 109 110 } ImageSubset; 110 111 -
trunk/Ohana/src/relphot/src/ImageOps.c
r34844 r35104 96 96 image[i].tzero = input[i].tzero ; 97 97 image[i].trate = input[i].trate ; 98 image[i].ubercalDist = input[i].ubercalDist ; 98 99 } 99 100 LineNumber = line_number; … … 128 129 subset[i].tzero = image[i].tzero ; 129 130 subset[i].trate = image[i].trate ; 131 subset[i].ubercalDist = image[i].ubercalDist ; 130 132 } 131 133 return subset; -
trunk/Ohana/src/relphot/src/ImageSubset.c
r33963 r35104 65 65 GET_COLUMN (tzero, "TZERO", int); 66 66 GET_COLUMN (trate, "TRATE", short); 67 GET_COLUMN (ucdist, "UBERCAL_DIST", short); 67 68 68 69 // XXX free the fits table data here … … 77 78 image[i].tzero = tzero[i]; 78 79 image[i].trate = trate[i]; 80 image[i].ubercalDist = ucdist[i]; 79 81 } 80 82 fprintf (stderr, "loaded data for %lld images\n", (long long) Nrow); … … 87 89 free (tzero); 88 90 free (trate); 91 free (ucdist); 89 92 90 93 *nimage = Nrow; … … 124 127 gfits_define_bintable_column (&theader, "I", "TRATE", "tti rate", NULL, 1.0, 0.0); 125 128 129 gfits_define_bintable_column (&theader, "I", "UBERCAL_DIST", "ubercal distance", NULL, 1.0, 1.0*0x80); 130 126 131 // generate the output array that carries the data 127 132 gfits_create_table (&theader, &ftable); … … 130 135 unsigned int *imageID, *map, *flags, *tzero; 131 136 unsigned short *trate; 137 short *ucdist; 132 138 133 139 // create intermediate storage arrays … … 139 145 ALLOCATE (tzero, unsigned int, Nimage); 140 146 ALLOCATE (trate, unsigned short, Nimage); 147 ALLOCATE (ucdist, short, Nimage); 141 148 142 149 // assign the storage arrays … … 149 156 tzero[i] = image[i].tzero; 150 157 trate[i] = image[i].trate; 158 ucdist[i] = image[i].ubercalDist; 151 159 } 152 160 153 161 // add the columns to the output array 154 gfits_set_bintable_column (&theader, &ftable, "MCAL", Mcal, Nimage); 155 gfits_set_bintable_column (&theader, &ftable, "MCAL_ERR", dMcal, Nimage); 156 gfits_set_bintable_column (&theader, &ftable, "IMAGE_ID", imageID, Nimage); 157 gfits_set_bintable_column (&theader, &ftable, "PHOTOM_MAP", map, Nimage); 158 gfits_set_bintable_column (&theader, &ftable, "FLAGS", flags, Nimage); 159 gfits_set_bintable_column (&theader, &ftable, "TZERO", tzero, Nimage); 160 gfits_set_bintable_column (&theader, &ftable, "TRATE", trate, Nimage); 162 gfits_set_bintable_column (&theader, &ftable, "MCAL", Mcal, Nimage); 163 gfits_set_bintable_column (&theader, &ftable, "MCAL_ERR", dMcal, Nimage); 164 gfits_set_bintable_column (&theader, &ftable, "IMAGE_ID", imageID, Nimage); 165 gfits_set_bintable_column (&theader, &ftable, "PHOTOM_MAP", map, Nimage); 166 gfits_set_bintable_column (&theader, &ftable, "FLAGS", flags, Nimage); 167 gfits_set_bintable_column (&theader, &ftable, "TZERO", tzero, Nimage); 168 gfits_set_bintable_column (&theader, &ftable, "TRATE", trate, Nimage); 169 gfits_set_bintable_column (&theader, &ftable, "UBERCAL_DIST", ucdist, Nimage); 161 170 162 171 free (Mcal); … … 167 176 free (tzero); 168 177 free (trate); 178 free (ucdist); 169 179 170 180 FILE *f = fopen (filename, "w"); -
trunk/Ohana/src/relphot/src/StarOps.c
r34844 r35104 451 451 } 452 452 453 // skip some absurd values NAN, < 0.0, > 30.0 453 454 Msys = PhotSysTiny (&catalog[Nc].measureT[m], &catalog[Nc].averageT[j], &catalog[Nc].secfilt[j*Nsecfilt]); 454 455 if (isnan(Msys)) SKIP_THIS_MEAS(Nsys); 456 if (Msys < 0.0) SKIP_THIS_MEAS(Nsys); 457 if (Msys > 30.0) SKIP_THIS_MEAS(Nsys); 455 458 456 459 int myUbercalDist = getUbercalDist(m,Nc); -
trunk/Ohana/src/relphot/src/args.c
r34889 r35104 90 90 // XXX for the moment, make this selection manual. it needs to be automatic 91 91 // based on the state of the SkyTable 92 HOST_ID = 0; 92 93 PARALLEL = FALSE; 93 94 if ((N = get_argument (argc, argv, "-parallel"))) { -
trunk/Ohana/src/relphot/src/reload_catalogs.c
r34642 r35104 187 187 if (!KEEP_UBERCAL) { snprintf (tmpline, 1024, "%s -reset-ubercal", command); strcpy (command, tmpline); } 188 188 if (UPDATE_CATFORMAT) { snprintf (tmpline, 1024, "%s -update-catformat %s", command, UPDATE_CATFORMAT); strcpy (command, tmpline); } 189 if (SET_MREL_VERSION != 1) { snprintf (tmpline, 1024, "%s -set-mrel-version %d", command, SET_MREL_VERSION); strcpy (command, tmpline); } 189 190 if (AreaSelect) { snprintf (tmpline, 1024, "%s -area %f %f %f %f", command, AreaXmin, AreaXmax, AreaYmin, AreaYmax); strcpy (command, tmpline); } 190 191 if (TimeSelect) { -
trunk/Ohana/src/relphot/src/relphot_objects.c
r34642 r35104 165 165 if (UPDATE) { snprintf (tmpline, 1024, "%s -update", command); strcpy (command, tmpline); } 166 166 if (!KEEP_UBERCAL) { snprintf (tmpline, 1024, "%s -reset-ubercal", command); strcpy (command, tmpline); } 167 if (SET_MREL_VERSION != 1) { snprintf (tmpline, 1024, "%s -set-mrel-version %d", command, SET_MREL_VERSION); strcpy (command, tmpline); } 167 168 168 169 fprintf (stderr, "command: %s\n", command); -
trunk/Ohana/src/relphot/src/setMrelCatalog.c
r34878 r35104 150 150 } 151 151 152 // skip some absurd values NAN, < 0.0, > 30.0 152 153 Msys = PhotSysTiny (&measureT[k], &averageT[0], &secfilt[0]); 153 154 if (isnan(Msys)) SKIP_THIS_MEAS(Nsys); 155 if (Msys < 0.0) SKIP_THIS_MEAS(Nsys); 156 if (Msys > 30.0) SKIP_THIS_MEAS(Nsys); 154 157 155 158 int myUbercalDist = getUbercalDist(meas, cat);
Note:
See TracChangeset
for help on using the changeset viewer.
