IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 24, 2017, 4:34:57 PM (9 years ago)
Author:
watersc1
Message:

Fixed the unused/untested psastroLoadGhosts function so it actually compiles.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/czw_branch/20170908/psastro/src/psastroLoadGhosts.c

    r40179 r40181  
    267267    pmCell *cell = NULL;
    268268    pmReadout *readout = NULL;
    269     float zeropt, exptime, MAX_MAG;
     269    //    float zeropt, exptime, MAX_MAG;
     270    float MAX_MAG;
    270271    psMetadata *ghostModel = NULL;
    271272    psVector *C_terms;
     
    305306
    306307    char *filter = psMetadataLookupStr (&status, fpa->concepts, "FPA.FILTERID");
    307     psMetadataItem *item = psMetadataLookup(glintItem->data.md, "GLINT.FILTER.TERM");
     308    psMetadataItem *item = psMetadataLookup(ghostModel, "GHOST.MODEL.HSC");
    308309    if (!item) {
    309       psLogMsg ("psastro", PS_LOG_INFO, "GLINT.FILTER.TERM data missing");
     310      psLogMsg ("psastro", PS_LOG_INFO, "GHOST.MODEL.HSC data missing");
    310311      return false;
    311312    }
    312313    if (item->type != PS_DATA_METADATA_MULTI) {
    313       psLogMsg ("psastro", PS_LOG_INFO, "GLINT.FILTER.TERM not multi");
     314      psLogMsg ("psastro", PS_LOG_INFO, "GHOST.MODEL.HSC not multi");
    314315      return false;
    315316    }
     
    318319    while ((refItem = psListGetAndIncrement(iter))) {
    319320      if (refItem->type != PS_DATA_METADATA) {
    320         psLogMsg ("psastro", PS_LOG_INFO, "GLINT.FILTER.TERM entry not metadata");
     321        psLogMsg ("psastro", PS_LOG_INFO, "GHOST.MODEL.HSC entry not metadata");
    321322        return false;
    322323      }
     
    369370                    pmAstromObj *ref = refstars->data[i];
    370371                    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);
    372373                    if (ref->Mag > MAX_MAG) continue;
    373374                   
    374375                    psastroGhost *ghost = psastroGhostAlloc ();
    375376
    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);
    378379                    double star_radius_deg = R_TPA * glintPixelScale;
    379380                    if (star_radius_deg > 0.5) { continue; }
     
    418419                              ghost->FP->x,ghost->FP->y,
    419420                              ghost->chip->x,ghost->chip->y,psMetadataLookupStr(NULL,ghostChip->concepts,"CHIP.NAME"),
    420                               rSrc,
     421                              C,
    421422                              ghost->inner.major,ghost->inner.minor,ghost->inner.theta,
    422423                              ghost->outer.major,ghost->outer.minor,ghost->outer.theta);
Note: See TracChangeset for help on using the changeset viewer.