Changeset 24400 for trunk/Ohana
- Timestamp:
- Jun 14, 2009, 2:15:25 PM (17 years ago)
- Location:
- trunk/Ohana/src
- Files:
-
- 2 added
- 6 edited
-
addstar/include/addstar.h (modified) (1 diff)
-
addstar/src/ReadStarsFITS.c (modified) (3 diffs)
-
libautocode/Makefile.Targets (modified) (2 diffs)
-
libautocode/def/cmf-ps1-v1.d (modified) (2 diffs)
-
libautocode/def/cmf-ps1-v2.d (added)
-
libdvo/Makefile (modified) (1 diff)
-
libdvo/include/dvo.h (modified) (1 diff)
-
libdvo/src/cmf-ps1-v1-alt.c (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/addstar/include/addstar.h
r21508 r24400 263 263 Stars *Convert_PS1_DEV_1 PROTO((FTable *table, int *nstars)); 264 264 Stars *Convert_PS1_V1 PROTO((FTable *table, int *nstars)); 265 Stars *Convert_PS1_V1_Alt PROTO((FTable *table, int *nstars)); 266 Stars *Convert_PS1_V2 PROTO((FTable *table, int *nstars)); 265 267 266 268 int InitStar PROTO((Stars *star)); -
trunk/Ohana/src/addstar/src/ReadStarsFITS.c
r21508 r24400 43 43 stars = Convert_PS1_V1 (&table, &Nstars); 44 44 } 45 if (!strcmp (type, "PS1_V2")) { 46 stars = Convert_PS1_V2 (&table, &Nstars); 47 } 45 48 if (stars == NULL) { 46 49 fprintf (stderr, "ERROR: invalid table type %s\n", type); … … 188 191 Stars *stars; 189 192 CMF_PS1_V1 *ps1data; 193 194 // CMF_PS1_V1 was modified 2009.05.26 (r24251) to use doubles for ra & dec. this was a 195 // mistake in two ways: a few format should have been defined (eg, CMF_PS1_V2), and the 196 // layout used did not have clean byte-boundaries for the corresponding structure. The 197 // former means we have two varieties of CMF_PS1_V1 out there; the latter means that the 198 // autocode tools do not work to read in the new version, even if we recognize it. Here we 199 // test for the existence of the broken version (table[0].headers[0].Naxis[0] == 136), and 200 // call a special conversion function if it is found. 201 202 if (table[0].header[0].Naxis[0] == 136) { 203 stars = Convert_PS1_V1_Alt (table, nstars); 204 return (stars); 205 } 190 206 191 207 ps1data = gfits_table_get_CMF_PS1_V1 (table, &Nstars, NULL); … … 244 260 return (stars); 245 261 } 262 263 Stars *Convert_PS1_V1_Alt (FTable *table, int *nstars) { 264 265 int i, Nstars; 266 double ZeroPt; 267 Stars *stars; 268 CMF_PS1_V2 *ps1data; 269 270 // CMF_PS1_V1 was modified 2009.05.26 (r24251) to use doubles for ra & dec. this was a 271 // mistake in two ways: a few format should have been defined (eg, CMF_PS1_V2), and the 272 // layout used did not have clean byte-boundaries for the corresponding structure. The 273 // former means we have two varieties of CMF_PS1_V1 out there; the latter means that the 274 // autocode tools do not work to read in the new version, even if we recognize it. Here we 275 // test for the existence of the broken version (table[0].headers[0].Naxis[0] == 136), and 276 // call a special conversion function if it is found. 277 278 ps1data = gfits_table_get_CMF_PS1_V1_Alt (table, &Nstars, NULL); 279 ZeroPt = GetZeroPoint(); 280 281 ALLOCATE (stars, Stars, Nstars); 282 for (i = 0; i < Nstars; i++) { 283 InitStar (&stars[i]); 284 stars[i].measure.Xccd = ps1data[i].X; 285 stars[i].measure.Yccd = ps1data[i].Y; 286 stars[i].measure.dXccd = ShortPixels(ps1data[i].dX); 287 stars[i].measure.dYccd = ShortPixels(ps1data[i].dY); 288 289 stars[i].measure.posangle = ShortDegree(ps1data[i].posangle); 290 stars[i].measure.pltscale = ps1data[i].pltscale; 291 292 if ((ps1data[i].M >= 0.0) || isnan(ps1data[i].M)) { 293 stars[i].measure.M = NAN; 294 } else { 295 stars[i].measure.M = ps1data[i].M + ZeroPt; 296 } 297 stars[i].measure.dM = ps1data[i].dM; 298 stars[i].measure.dMcal = ps1data[i].dMcal; 299 stars[i].measure.Map = ps1data[i].Map + ZeroPt; 300 301 stars[i].measure.Sky = ps1data[i].sky; 302 stars[i].measure.dSky = ps1data[i].dSky; 303 304 stars[i].measure.psfChisq = ps1data[i].psfChisq; 305 stars[i].measure.psfQual = ps1data[i].psfQual; 306 stars[i].measure.psfNdof = ps1data[i].psfNdof; 307 stars[i].measure.psfNpix = ps1data[i].psfNpix; 308 stars[i].measure.crNsigma = ps1data[i].crNsigma; 309 stars[i].measure.extNsigma = ps1data[i].extNsigma; 310 311 stars[i].measure.FWx = ShortPixels(ps1data[i].fx); 312 stars[i].measure.FWy = ShortPixels(ps1data[i].fy); 313 stars[i].measure.theta = ShortDegree(ps1data[i].df); 314 315 stars[i].measure.Mxx = ShortPixels(ps1data[i].Mxx); 316 stars[i].measure.Mxy = ShortPixels(ps1data[i].Mxy); 317 stars[i].measure.Myy = ShortPixels(ps1data[i].Myy); 318 319 stars[i].measure.photFlags = ps1data[i].flags; 320 321 // this is may optionally be replaced by the internal sequence (see FilterStars.c) 322 stars[i].measure.detID = ps1data[i].detID; 323 324 // the Average fields and the following Measure fields are set in FilterStars after 325 // the image metadata is in hand: dR, dD, Mcal, dt, airmass, az, t, imageID, extID, 326 // averef is set in find_matches, dbFlags is zero on ingest. 327 328 // the following fields are currently not being set anywhere: t_msec 329 } 330 *nstars = Nstars; 331 return (stars); 332 } 333 334 Stars *Convert_PS1_V2 (FTable *table, int *nstars) { 335 336 int i, Nstars; 337 double ZeroPt; 338 Stars *stars; 339 CMF_PS1_V2 *ps1data; 340 341 ps1data = gfits_table_get_CMF_PS1_V2 (table, &Nstars, NULL); 342 ZeroPt = GetZeroPoint(); 343 344 ALLOCATE (stars, Stars, Nstars); 345 for (i = 0; i < Nstars; i++) { 346 InitStar (&stars[i]); 347 stars[i].measure.Xccd = ps1data[i].X; 348 stars[i].measure.Yccd = ps1data[i].Y; 349 stars[i].measure.dXccd = ShortPixels(ps1data[i].dX); 350 stars[i].measure.dYccd = ShortPixels(ps1data[i].dY); 351 352 stars[i].measure.posangle = ShortDegree(ps1data[i].posangle); 353 stars[i].measure.pltscale = ps1data[i].pltscale; 354 355 if ((ps1data[i].M >= 0.0) || isnan(ps1data[i].M)) { 356 stars[i].measure.M = NAN; 357 } else { 358 stars[i].measure.M = ps1data[i].M + ZeroPt; 359 } 360 stars[i].measure.dM = ps1data[i].dM; 361 stars[i].measure.dMcal = ps1data[i].dMcal; 362 stars[i].measure.Map = ps1data[i].Map + ZeroPt; 363 364 stars[i].measure.Sky = ps1data[i].sky; 365 stars[i].measure.dSky = ps1data[i].dSky; 366 367 stars[i].measure.psfChisq = ps1data[i].psfChisq; 368 stars[i].measure.psfQual = ps1data[i].psfQual; 369 stars[i].measure.psfNdof = ps1data[i].psfNdof; 370 stars[i].measure.psfNpix = ps1data[i].psfNpix; 371 stars[i].measure.crNsigma = ps1data[i].crNsigma; 372 stars[i].measure.extNsigma = ps1data[i].extNsigma; 373 374 stars[i].measure.FWx = ShortPixels(ps1data[i].fx); 375 stars[i].measure.FWy = ShortPixels(ps1data[i].fy); 376 stars[i].measure.theta = ShortDegree(ps1data[i].df); 377 378 stars[i].measure.Mxx = ShortPixels(ps1data[i].Mxx); 379 stars[i].measure.Mxy = ShortPixels(ps1data[i].Mxy); 380 stars[i].measure.Myy = ShortPixels(ps1data[i].Myy); 381 382 stars[i].measure.photFlags = ps1data[i].flags; 383 384 // this is may optionally be replaced by the internal sequence (see FilterStars.c) 385 stars[i].measure.detID = ps1data[i].detID; 386 387 // the Average fields and the following Measure fields are set in FilterStars after 388 // the image metadata is in hand: dR, dD, Mcal, dt, airmass, az, t, imageID, extID, 389 // averef is set in find_matches, dbFlags is zero on ingest. 390 391 // the following fields are currently not being set anywhere: t_msec 392 } 393 *nstars = Nstars; 394 return (stars); 395 } -
trunk/Ohana/src/libautocode/Makefile.Targets
r21508 r24400 48 48 $(ASRC)/cmf-ps1-dev-1.$(ARCH).o \ 49 49 $(ASRC)/cmf-ps1-v1.$(ARCH).o \ 50 $(ASRC)/cmf-ps1-v2.$(ARCH).o \ 50 51 $(ASRC)/cmf-smpdata.$(ARCH).o \ 51 52 $(ASRC)/getstar-ps1-dev-0.$(ARCH).o \ … … 107 108 $(AINC)/cmf-ps1-dev-1.h \ 108 109 $(AINC)/cmf-ps1-v1.h \ 110 $(AINC)/cmf-ps1-v2.h \ 109 111 $(AINC)/cmf-smpdata.h \ 110 112 $(AINC)/getstar-ps1-dev-0.h \ -
trunk/Ohana/src/libautocode/def/cmf-ps1-v1.d
r24399 r24400 3 3 EXTNAME CMF_PS1_V1 4 4 TYPE BINTABLE 5 SIZE 1 365 SIZE 128 6 6 7 7 # elements of data structure / FITS table … … 11 11 FIELD dX, X_PSF_SIG, float, x coord error, pixels 12 12 FIELD dY, Y_PSF_SIG, float, y coord error, pixels 13 FIELD RA, RA_PSF, double,PSF RA coord, degrees14 FIELD DEC, DEC_PSF, double,PSF DEC coord, degrees13 FIELD RA, RA_PSF, float, PSF RA coord, degrees 14 FIELD DEC, DEC_PSF, float, PSF DEC coord, degrees 15 15 FIELD posangle, POSANGLE, float, Posangle at source, degrees 16 16 FIELD pltscale, PLTSCALE, float, Plate Scale at source, arcsec/pixel -
trunk/Ohana/src/libdvo/Makefile
r24399 r24400 69 69 $(SRC)/skyregion_io.$(ARCH).o \ 70 70 $(SRC)/skyregion_gsc.$(ARCH).o \ 71 $(SRC)/skyregion_ops.$(ARCH).o 71 $(SRC)/skyregion_ops.$(ARCH).o \ 72 $(SRC)/cmf-ps1-v1-alt.$(ARCH).o 72 73 73 74 # $(SRC)/dvo_convert_panstarrs.$(ARCH).o \ -
trunk/Ohana/src/libdvo/include/dvo.h
r24308 r24400 184 184 SkyRegion **regions; 185 185 } SkyList; 186 187 // special-case function: 188 CMF_PS1_V2 *gfits_table_get_CMF_PS1_V1_Alt (FTable *ftable, int *Ndata, int *swapped); 186 189 187 190 # if (0)
Note:
See TracChangeset
for help on using the changeset viewer.
