Changeset 29541
- Timestamp:
- Oct 25, 2010, 12:50:58 PM (16 years ago)
- Location:
- trunk/Ohana/src/addstar
- Files:
-
- 3 edited
-
include/addstar.h (modified) (1 diff)
-
src/MatchHeaders.c (modified) (1 diff)
-
src/ReadStarsFITS.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Ohana/src/addstar/include/addstar.h
r29132 r29541 256 256 Stars *Convert_PS1_V1_Alt PROTO((FTable *table, unsigned int *nstars)); 257 257 Stars *Convert_PS1_V2 PROTO((FTable *table, unsigned int *nstars)); 258 Stars *Convert_PS1_V3 PROTO((FTable *table, unsigned int *nstars)); 258 259 259 260 int InitStar PROTO((Stars *star)); -
trunk/Ohana/src/addstar/src/MatchHeaders.c
r27435 r29541 57 57 if (!strcmp (exttype, "PS1_V1")) goto keep; 58 58 if (!strcmp (exttype, "PS1_V2")) goto keep; 59 if (!strcmp (exttype, "PS1_V3")) goto keep; 59 60 continue; 60 61 -
trunk/Ohana/src/addstar/src/ReadStarsFITS.c
r29001 r29541 47 47 stars = Convert_PS1_V2 (&table, &Nstars); 48 48 } 49 if (!strcmp (type, "PS1_V3")) { 50 stars = Convert_PS1_V3 (&table, &Nstars); 51 } 49 52 if (stars == NULL) { 50 53 fprintf (stderr, "ERROR: invalid table type %s\n", type); … … 426 429 return (stars); 427 430 } 431 432 Stars *Convert_PS1_V3 (FTable *table, unsigned int *nstars) { 433 434 off_t Nstars; 435 unsigned int i; 436 double ZeroPt; 437 Stars *stars; 438 CMF_PS1_V3 *ps1data; 439 440 ps1data = gfits_table_get_CMF_PS1_V3 (table, &Nstars, NULL); 441 if (!ps1data) { 442 fprintf (stderr, "skipping inconsistent entry\n"); 443 return (NULL); 444 } 445 ZeroPt = GetZeroPoint(); 446 447 ALLOCATE (stars, Stars, Nstars); 448 for (i = 0; i < Nstars; i++) { 449 InitStar (&stars[i]); 450 stars[i].measure.Xccd = ps1data[i].X; 451 stars[i].measure.Yccd = ps1data[i].Y; 452 stars[i].measure.dXccd = ShortPixels(ps1data[i].dX); 453 stars[i].measure.dYccd = ShortPixels(ps1data[i].dY); 454 455 stars[i].measure.posangle = ShortDegree(ps1data[i].posangle); 456 stars[i].measure.pltscale = ps1data[i].pltscale; 457 458 if ((ps1data[i].M >= 0.0) || isnan(ps1data[i].M)) { 459 stars[i].measure.M = NAN; 460 } else { 461 stars[i].measure.M = ps1data[i].M + ZeroPt; 462 } 463 stars[i].measure.dM = ps1data[i].dM; 464 stars[i].measure.dMcal = ps1data[i].dMcal; 465 stars[i].measure.Map = ps1data[i].Map + ZeroPt; 466 467 stars[i].measure.Sky = ps1data[i].sky; 468 stars[i].measure.dSky = ps1data[i].dSky; 469 470 stars[i].measure.psfChisq = ps1data[i].psfChisq; 471 stars[i].measure.psfQual = ps1data[i].psfQual; 472 stars[i].measure.psfNdof = ps1data[i].psfNdof; 473 stars[i].measure.psfNpix = ps1data[i].psfNpix; 474 stars[i].measure.crNsigma = ps1data[i].crNsigma; 475 stars[i].measure.extNsigma = ps1data[i].extNsigma; 476 477 stars[i].measure.FWx = ShortPixels(ps1data[i].fx); 478 stars[i].measure.FWy = ShortPixels(ps1data[i].fy); 479 stars[i].measure.theta = ShortDegree(ps1data[i].df); 480 481 stars[i].measure.Mxx = ShortPixels(ps1data[i].Mxx); 482 stars[i].measure.Mxy = ShortPixels(ps1data[i].Mxy); 483 stars[i].measure.Myy = ShortPixels(ps1data[i].Myy); 484 485 stars[i].measure.photFlags = ps1data[i].flags; 486 487 // this is may optionally be replaced by the internal sequence (see FilterStars.c) 488 stars[i].measure.detID = ps1data[i].detID; 489 490 // the Average fields and the following Measure fields are set in FilterStars after 491 // the image metadata is in hand: dR, dD, Mcal, dt, airmass, az, t, imageID, extID, 492 // averef is set in find_matches, dbFlags is zero on ingest. 493 494 // the following fields are currently not being set anywhere: t_msec 495 } 496 *nstars = Nstars; 497 return (stars); 498 }
Note:
See TracChangeset
for help on using the changeset viewer.
