IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 40344


Ignore:
Timestamp:
Feb 8, 2018, 2:53:29 PM (8 years ago)
Author:
watersc1
Message:

Modification to pswarp and ppSub to propagate the PSREFCAT keyword from the camera stage SMF.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppSub/src/ppSubDefineOutput.c

    r37966 r40344  
    198198    psMetadataAddStr(tgtHeader, PS_LIST_TAIL, keyword, PS_META_REPLACE, "input image", string);
    199199  }
     200
     201  // Copy PSREFCAT from the source to the target as well
     202  snprintf(keyword, 80, "PSREFCAT");
     203  char *string = psMetadataLookupStr(&status, srcHeader, keyword);
     204  if (status) {
     205    psMetadataAddStr(tgtHeader, PS_LIST_TAIL, keyword, PS_META_REPLACE, "input image reference catalog", string);
     206  }
     207 
    200208  return true;
    201209}
  • trunk/pswarp/src/pswarpLoop.c

    r36835 r40344  
    5858    }
    5959
     60    psString refcat = NULL;
    6061    // loop over this section once per input group
    6162    for (int i = 0; i < nInputs; i++) {
     
    121122                            psMetadataAddPtr(readout->analysis, PS_LIST_TAIL, "PSPHOT.DETECTIONS", PS_DATA_ARRAY, "Sources from input astrometry", detections);
    122123                        }
     124
     125                        // Determine the reference catalog used
     126                        if (!refcat) {
     127                          refcat = psMetadataLookupStr(NULL, astromRO->parent->parent->hdu->header, "PSREFCAT");
     128                          psMetadataAddStr(output->fpa->analysis, PS_LIST_TAIL, "REFERENCE_CATALOG", PS_META_REPLACE, "Reference catalog used for calibration.", refcat);
     129                        }
     130
     131                       
    123132                    }
    124133
  • trunk/pswarp/src/pswarpUpdateMetadata.c

    r36835 r40344  
    2020    bool bilevelAstrometry = psMetadataLookupBool (NULL, skycell->analysis, "ASTROMETRY.BILEVEL");
    2121
     22    psString refcat = psMetadataLookupStr (NULL, output->analysis, "REFERENCE_CATALOG");
    2223    pmChip *chip;
    2324    while ((chip = pmFPAviewNextChip (view, output, 1)) != NULL) {
     
    165166    }
    166167
     168    if (refcat) {
     169      psMetadataAddStr(output->hdu->header, PS_LIST_TAIL, "PSREFCAT", PS_META_REPLACE, "Reference catalog used for calibration", refcat);
     170    }
     171   
    167172    // apply the bilevel astrometry elements to the target
    168173    if (bilevelAstrometry) {
Note: See TracChangeset for help on using the changeset viewer.