- Timestamp:
- Apr 20, 2016, 3:53:27 PM (10 years ago)
- File:
-
- 1 edited
-
trunk/Ohana/src/dvopsps/src/DetectionOps.c (modified) (16 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/dvopsps/src/DetectionOps.c
r37246 r39547 57 57 GET_COLUMN(decErr , "decErr", float); 58 58 GET_COLUMN(zp , "zp", float); 59 GET_COLUMN(zpFactor , "zpFactor", float); 59 60 GET_COLUMN(telluricExt , "telluricExt", float); 60 61 GET_COLUMN(airmass , "airmass", float); … … 67 68 GET_COLUMN(dMap , "dMap", float); 68 69 GET_COLUMN(flags , "flags", int); 70 GET_COLUMN(objflags , "objflags", int); 69 71 gfits_free_header (&theader); 70 72 gfits_free_table (&ftable); … … 83 85 detections[i].decErr = decErr[i]; 84 86 detections[i].zp = zp[i]; 87 detections[i].zpFactor = zpFactor[i]; 85 88 detections[i].telluricExt = telluricExt[i]; 86 89 detections[i].airmass = airmass[i]; … … 93 96 detections[i].dMap = dMap[i]; 94 97 detections[i].flags = flags[i]; 98 detections[i].objflags = objflags[i]; 95 99 } 96 100 fprintf (stderr, "loaded data for %lld detections\n", (long long) Nrow); … … 107 111 free (decErr ); 108 112 free (zp ); 113 free (zpFactor ); 109 114 free (telluricExt); 110 115 free (airmass ); … … 117 122 free (dMap ); 118 123 free (flags ); 124 free (objflags ); 119 125 120 126 gfits_free_header (&header); … … 175 181 gfits_define_bintable_column (&theader, "E", "decErr", NULL, NULL, 1.0, 0.0); 176 182 gfits_define_bintable_column (&theader, "E", "zp", NULL, NULL, 1.0, 0.0); 183 gfits_define_bintable_column (&theader, "E", "zpFactor", NULL, NULL, 1.0, 0.0); 177 184 gfits_define_bintable_column (&theader, "E", "telluricExt", NULL, NULL, 1.0, 0.0); 178 185 gfits_define_bintable_column (&theader, "E", "airmass", NULL, NULL, 1.0, 0.0); … … 185 192 gfits_define_bintable_column (&theader, "E", "dMap", NULL, NULL, 1.0, 0.0); 186 193 gfits_define_bintable_column (&theader, "J", "flags", NULL, NULL, 1.0, FT_BZERO_INT32); 194 gfits_define_bintable_column (&theader, "J", "objflags", NULL, NULL, 1.0, FT_BZERO_INT32); 187 195 188 196 // generate the output array that carries the data … … 201 209 float *decErr ; ALLOCATE (decErr , float, Ndetections); 202 210 float *zp ; ALLOCATE (zp , float, Ndetections); 211 float *zpFactor ; ALLOCATE (zpFactor , float, Ndetections); 203 212 float *telluricExt ; ALLOCATE (telluricExt , float, Ndetections); 204 213 float *airmass ; ALLOCATE (airmass , float, Ndetections); … … 211 220 float *dMap ; ALLOCATE (dMap , float, Ndetections); 212 221 uint32_t *flags ; ALLOCATE (flags , uint32_t, Ndetections); 222 uint32_t *objflags ; ALLOCATE (objflags , uint32_t, Ndetections); 213 223 214 224 // assign the storage arrays … … 225 235 decErr[i] = detections[i].decErr ; 226 236 zp[i] = detections[i].zp ; 237 zpFactor[i] = detections[i].zpFactor ; 227 238 telluricExt[i] = detections[i].telluricExt ; 228 239 airmass[i] = detections[i].airmass ; … … 235 246 dMap[i] = detections[i].dMap ; 236 247 flags[i] = detections[i].flags ; 248 objflags[i] = detections[i].objflags ; 237 249 } 238 250 … … 249 261 gfits_set_bintable_column (&theader, &ftable, "decErr", decErr , Ndetections); 250 262 gfits_set_bintable_column (&theader, &ftable, "zp", zp , Ndetections); 263 gfits_set_bintable_column (&theader, &ftable, "zpFactor", zpFactor , Ndetections); 251 264 gfits_set_bintable_column (&theader, &ftable, "telluricExt", telluricExt , Ndetections); 252 265 gfits_set_bintable_column (&theader, &ftable, "airmass", airmass , Ndetections); … … 259 272 gfits_set_bintable_column (&theader, &ftable, "dMap", dMap , Ndetections); 260 273 gfits_set_bintable_column (&theader, &ftable, "flags", flags , Ndetections); 274 gfits_set_bintable_column (&theader, &ftable, "objflags", objflags , Ndetections); 261 275 262 276 free (objID ); … … 271 285 free (decErr ); 272 286 free (zp ); 287 free (zpFactor ); 273 288 free (telluricExt ); 274 289 free (airmass ); … … 281 296 free (dMap ); 282 297 free (flags ); 298 free (objflags ); 283 299 284 300 gfits_fwrite_Theader (f, &theader);
Note:
See TracChangeset
for help on using the changeset viewer.
