- Timestamp:
- Oct 24, 2017, 4:34:57 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/czw_branch/20170908/psastro/src/psastroLoadGhosts.c
r40179 r40181 267 267 pmCell *cell = NULL; 268 268 pmReadout *readout = NULL; 269 float zeropt, exptime, MAX_MAG; 269 // float zeropt, exptime, MAX_MAG; 270 float MAX_MAG; 270 271 psMetadata *ghostModel = NULL; 271 272 psVector *C_terms; … … 305 306 306 307 char *filter = psMetadataLookupStr (&status, fpa->concepts, "FPA.FILTERID"); 307 psMetadataItem *item = psMetadataLookup(g lintItem->data.md, "GLINT.FILTER.TERM");308 psMetadataItem *item = psMetadataLookup(ghostModel, "GHOST.MODEL.HSC"); 308 309 if (!item) { 309 psLogMsg ("psastro", PS_LOG_INFO, "G LINT.FILTER.TERMdata missing");310 psLogMsg ("psastro", PS_LOG_INFO, "GHOST.MODEL.HSC data missing"); 310 311 return false; 311 312 } 312 313 if (item->type != PS_DATA_METADATA_MULTI) { 313 psLogMsg ("psastro", PS_LOG_INFO, "G LINT.FILTER.TERMnot multi");314 psLogMsg ("psastro", PS_LOG_INFO, "GHOST.MODEL.HSC not multi"); 314 315 return false; 315 316 } … … 318 319 while ((refItem = psListGetAndIncrement(iter))) { 319 320 if (refItem->type != PS_DATA_METADATA) { 320 psLogMsg ("psastro", PS_LOG_INFO, "G LINT.FILTER.TERMentry not metadata");321 psLogMsg ("psastro", PS_LOG_INFO, "GHOST.MODEL.HSC entry not metadata"); 321 322 return false; 322 323 } … … 369 370 pmAstromObj *ref = refstars->data[i]; 370 371 psTrace("psastro.ghost",5,"Begin ghost %d/%ld: MAX_MAG: %g; ref_mag: %g @ (%.10g,%.10g) TPA: (%f %f)", 371 i,refstars->n,MAX_MAG,ref->Mag,ref->sky->r * 180 / M_PI,ref->sky->d * 180.0 / M_PI,ref->TP->x,ref-> RP->y);372 i,refstars->n,MAX_MAG,ref->Mag,ref->sky->r * 180 / M_PI,ref->sky->d * 180.0 / M_PI,ref->TP->x,ref->TP->y); 372 373 if (ref->Mag > MAX_MAG) continue; 373 374 374 375 psastroGhost *ghost = psastroGhostAlloc (); 375 376 376 double R_TPA = sqrt(pow( star->TP->y,2) + pow(star->TP->x,2));377 double theta0 = atan2( star->TP->y,star->TP->x);377 double R_TPA = sqrt(pow(ref->TP->y,2) + pow(ref->TP->x,2)); 378 double theta0 = atan2(ref->TP->y,ref->TP->x); 378 379 double star_radius_deg = R_TPA * glintPixelScale; 379 380 if (star_radius_deg > 0.5) { continue; } … … 418 419 ghost->FP->x,ghost->FP->y, 419 420 ghost->chip->x,ghost->chip->y,psMetadataLookupStr(NULL,ghostChip->concepts,"CHIP.NAME"), 420 rSrc,421 C, 421 422 ghost->inner.major,ghost->inner.minor,ghost->inner.theta, 422 423 ghost->outer.major,ghost->outer.minor,ghost->outer.theta);
Note:
See TracChangeset
for help on using the changeset viewer.
