IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 40349


Ignore:
Timestamp:
Feb 26, 2018, 4:04:36 PM (8 years ago)
Author:
mhuber
Message:

merge missing REFCAT keywords for warps+diffs

Location:
tags/ipp-20170121
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • tags/ipp-20170121/ppSub/src/ppSubDefineOutput.c

    r37966 r40349  
    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}
  • tags/ipp-20170121/pswarp/src/pswarpLoop.c

    r36835 r40349  
    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
  • tags/ipp-20170121/pswarp/src/pswarpLoopBackground.c

    r35683 r40349  
    6262    pmFPAfileActivate(config->files, true, "PSWARP.BKGMODEL");
    6363
     64    psString refcat = NULL;
    6465    // loop over this section once per input group
    6566    for (int i = 0; i < nInputs; i++) {
     
    134135                    }
    135136
     137                    if (astrom != input) {
     138                      pmReadout *astromRO = pmFPAviewThisReadout(view, astrom->fpa); // Readout for astrometry
     139                      if (!refcat) {
     140                        refcat = psMetadataLookupStr(NULL, astromRO->parent->parent->hdu->header, "PSREFCAT");
     141
     142                        psMetadataAddStr(output->fpa->analysis, PS_LIST_TAIL, "REFERENCE_CATALOG", PS_META_REPLACE, "Reference catalog used for calibration.", refcat);
     143                      }
     144                    }
     145                   
    136146                    // re-normalize the BKGMODEL pixels by modified astrometry
    137147                    for (int x = 0; x < readout->image->numCols; x++) {
  • tags/ipp-20170121/pswarp/src/pswarpUpdateMetadata.c

    r36835 r40349  
    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.