Changeset 35734
- Timestamp:
- Jul 2, 2013, 9:09:29 AM (13 years ago)
- Location:
- branches/eam_branches/ipp-20130509/Ohana/src/relphot
- Files:
-
- 5 edited
-
include/relphot.h (modified) (3 diffs)
-
src/ImageSubset.c (modified) (7 diffs)
-
src/args.c (modified) (2 diffs)
-
src/reload_catalogs.c (modified) (1 diff)
-
src/setMrelFinal.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20130509/Ohana/src/relphot/include/relphot.h
r35604 r35734 17 17 # define GRID_V2 18 18 # define NO_IMAGE -100 19 20 # define ID_SECF_STACK_PRIMARY 0x00004000 19 21 20 22 // choose off_t or int depending on full-scale relphot analysis resources … … 114 116 unsigned int photom_map_id; 115 117 unsigned int flags; 118 int projID; 119 int skycellID; 120 unsigned int tzero; 116 121 unsigned int tzero; 117 122 unsigned char trate; … … 149 154 char *IMAGES; 150 155 char *BCATALOG; 156 char *BOUNDARY_TREE; 151 157 ModeType MODE; 152 158 -
branches/eam_branches/ipp-20130509/Ohana/src/relphot/src/ImageSubset.c
r35104 r35734 63 63 GET_COLUMN (map, "PHOTOM_MAP", int); 64 64 GET_COLUMN (flags, "FLAGS", int); 65 GET_COLUMN (projID, "PROJ_ID", int); 66 GET_COLUMN (skycellID, "SKYCELL_ID", int); 65 67 GET_COLUMN (tzero, "TZERO", int); 66 68 GET_COLUMN (trate, "TRATE", short); … … 76 78 image[i].photom_map_id = map[i]; 77 79 image[i].flags = flags[i]; 80 image[i].projID = projID[i]; 81 image[i].skycellID = skycellID[i]; 78 82 image[i].tzero = tzero[i]; 79 83 image[i].trate = trate[i]; … … 87 91 free (map); 88 92 free (flags); 93 free (projID); 94 free (skycellID); 89 95 free (tzero); 90 96 free (trate); … … 124 130 gfits_define_bintable_column (&theader, "J", "FLAGS", "flags", NULL, 1.0, 1.0*0x8000); 125 131 132 gfits_define_bintable_column (&theader, "J", "PROJ_ID", "ID", NULL, 1.0, 0.0); 133 gfits_define_bintable_column (&theader, "J", "SKYCELL_ID", "ID", NULL, 1.0, 0.0); 134 126 135 gfits_define_bintable_column (&theader, "J", "TZERO", "exposure start", NULL, 1.0, 1.0*0x8000); 127 136 gfits_define_bintable_column (&theader, "I", "TRATE", "tti rate", NULL, 1.0, 0.0); … … 134 143 float *Mcal, *dMcal; 135 144 unsigned int *imageID, *map, *flags, *tzero; 145 int *projID, *skycellID; 136 146 unsigned short *trate; 137 147 short *ucdist; 138 148 139 149 // create intermediate storage arrays 140 ALLOCATE (Mcal, float, Nimage); 141 ALLOCATE (dMcal, float, Nimage); 142 ALLOCATE (imageID, unsigned int, Nimage); 143 ALLOCATE (map, unsigned int, Nimage); 144 ALLOCATE (flags, unsigned int, Nimage); 145 ALLOCATE (tzero, unsigned int, Nimage); 146 ALLOCATE (trate, unsigned short, Nimage); 147 ALLOCATE (ucdist, short, Nimage); 150 ALLOCATE (Mcal, float, Nimage); 151 ALLOCATE (dMcal, float, Nimage); 152 ALLOCATE (imageID, unsigned int, Nimage); 153 ALLOCATE (map, unsigned int, Nimage); 154 ALLOCATE (flags, unsigned int, Nimage); 155 ALLOCATE (projID, int, Nimage); 156 ALLOCATE (skycellID, int, Nimage); 157 ALLOCATE (tzero, unsigned int, Nimage); 158 ALLOCATE (trate, unsigned short, Nimage); 159 ALLOCATE (ucdist, short, Nimage); 148 160 149 161 // assign the storage arrays … … 157 169 trate[i] = image[i].trate; 158 170 ucdist[i] = image[i].ubercalDist; 171 172 projID[i] = -1; 173 skycellID[i] = -1; 174 if (!strncmp (image[i].name, "RINGS.V3.skycell", strlen("RINGS.V3.skycell"))) { 175 projID[i] = atoi(&image[i].name[18]); 176 skycellID[i] = atoi(&image[i].name[23]); 177 } 159 178 } 160 179 161 180 // add the columns to the output array 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); 181 gfits_set_bintable_column (&theader, &ftable, "MCAL", Mcal, Nimage); 182 gfits_set_bintable_column (&theader, &ftable, "MCAL_ERR", dMcal, Nimage); 183 gfits_set_bintable_column (&theader, &ftable, "IMAGE_ID", imageID, Nimage); 184 gfits_set_bintable_column (&theader, &ftable, "PHOTOM_MAP", map, Nimage); 185 gfits_set_bintable_column (&theader, &ftable, "FLAGS", flags, Nimage); 186 gfits_set_bintable_column (&theader, &ftable, "PROJ_ID", projID, Nimage); 187 gfits_set_bintable_column (&theader, &ftable, "SKYCELL_ID", skycellID, Nimage); 188 gfits_set_bintable_column (&theader, &ftable, "TZERO", tzero, Nimage); 189 gfits_set_bintable_column (&theader, &ftable, "TRATE", trate, Nimage); 190 gfits_set_bintable_column (&theader, &ftable, "UBERCAL_DIST", ucdist, Nimage); 170 191 171 192 free (Mcal); … … 174 195 free (map); 175 196 free (flags); 197 free (projID); 198 free (skycellID); 176 199 free (tzero); 177 200 free (trate); -
branches/eam_branches/ipp-20130509/Ohana/src/relphot/src/args.c
r35728 r35734 211 211 } 212 212 213 BOUNDARY_TREE = NULL; 213 214 if ((N = get_argument (argc, argv, "-boundary-tree"))) { 214 215 remove_argument (N, &argc, argv); 215 load_tree (argv[N]); 216 BOUNDARY_TREE = strcreate(argv[N]); 217 load_tree (BOUNDARY_TREE); 216 218 remove_argument (N, &argc, argv); 217 219 } … … 409 411 remove_argument (N, &argc, argv); 410 412 strcpy (STATMODE, argv[N]); 413 remove_argument (N, &argc, argv); 414 } 415 416 BOUNDARY_TREE = NULL; 417 if ((N = get_argument (argc, argv, "-boundary-tree"))) { 418 remove_argument (N, &argc, argv); 419 BOUNDARY_TREE = strcreate(argv[N]); 420 load_tree (BOUNDARY_TREE); 411 421 remove_argument (N, &argc, argv); 412 422 } -
branches/eam_branches/ipp-20130509/Ohana/src/relphot/src/reload_catalogs.c
r35104 r35734 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 (BOUNDARY_TREE) { snprintf (tmpline, 1024, "%s -boundary-tree %s", command, BOUNDARY_TREE); strcpy (command, tmpline); } 189 190 if (SET_MREL_VERSION != 1) { snprintf (tmpline, 1024, "%s -set-mrel-version %d", command, SET_MREL_VERSION); strcpy (command, tmpline); } 190 191 if (AreaSelect) { snprintf (tmpline, 1024, "%s -area %f %f %f %f", command, AreaXmin, AreaXmax, AreaYmin, AreaYmax); strcpy (command, tmpline); } -
branches/eam_branches/ipp-20130509/Ohana/src/relphot/src/setMrelFinal.c
r34749 r35734 16 16 // flags used by the photometry analysis (excluding UBERCAL) 17 17 unsigned int PHOTOM_FLAGS = 18 ID_MEAS_NOCAL | // detection ignored for this analysis (photcode, time range) 19 ID_MEAS_POOR_PHOTOM | // detection is photometry outlier 20 ID_MEAS_SKIP_PHOTOM | // detection was ignored for photometry measurement 21 ID_MEAS_AREA; // detetion was outside acceptable area of device 22 18 ID_MEAS_NOCAL | // detection ignored for this analysis (photcode, time range) 19 ID_MEAS_POOR_PHOTOM | // detection is photometry outlier 20 ID_MEAS_SKIP_PHOTOM | // detection was ignored for photometry measurement 21 ID_MEAS_AREA | // detetion was outside acceptable area of device 22 ID_MEAS_SYNTH_MAG | // magnitude is synthetic 23 ID_MEAS_STACK_PRIMARY | // this stack measurement is in the primary skycell 24 ID_MEAS_STACK_PHOT_SRC; // this measurement supplied the stack photometry 25 26 // ID_MEAS_PHOTOM_UBERCAL -- externally-supplied zero point from ubercal analysis 27 // this is set by 'setphot', do not reset here 28 23 29 // flags used by the photometry analysis (excluding UBERCAL) 24 30 // unsigned int secfiltFlags =
Note:
See TracChangeset
for help on using the changeset viewer.
