IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 25710


Ignore:
Timestamp:
Oct 1, 2009, 9:32:14 AM (17 years ago)
Author:
bills
Message:

Put the RA and DEC of the center of the stamp into the header

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pstamp/src/ppstampMakeStamp.c

    r25701 r25710  
    4848}
    4949
    50 static bool copyMetadata(pmFPAfile *output, pmFPAfile *input, pmChip *inChip, ppstampOptions *options)
     50static bool copyMetadata(pmFPAfile *output, pmFPAfile *input, pmChip *inChip, ppstampOptions *options, pmAstromObj *center)
    5151{
    5252    pmChip    *outChip;
     
    109109    }
    110110
     111    psMetadataAddF64(outHDU->header, PS_LIST_TAIL, "RA_DEG", PS_META_REPLACE, "Right Ascension of stamp center", RAD_TO_DEG(center->sky->r));
     112    psMetadataAddF64(outHDU->header, PS_LIST_TAIL, "DEC_DEG", PS_META_REPLACE, "Declination of stamp center", RAD_TO_DEG(center->sky->d));
     113
    111114    ppstampVersionMetadata(outHDU->header, options);
    112115
     
    194197
    195198static int makeStamp(pmConfig *config, ppstampOptions *options, pmFPAfile *input,
    196                 pmChip *inChip, pmFPAview *view)
     199                pmChip *inChip, pmFPAview *view, pmAstromObj *center)
    197200{
    198201    int status = false;
     
    301304
    302305    if (status) {
    303         status = copyMetadata(output, input, inChip, options);
     306        status = copyMetadata(output, input, inChip, options, center);
    304307    }
    305308    return status ? PS_EXIT_SUCCESS : PS_EXIT_UNKNOWN_ERROR;
     
    376379{
    377380    pmAstromObj *pt = pmAstromObjAlloc();
    378 
    379     if (!options->roip.celestialCenter) {
    380         // Center was specified in chip coordinates, transform to the sky and the TP
    381         chipToSky(center, fpa, chip);
    382     }
    383381
    384382    // calculate the four corners of the bounding box in sky coordinates, translate them to
     
    486484            center->chip->yErr = 0;
    487485            onChip = true;
     486            chipToSky(center, input->fpa, chip);
    488487        }
    489488    }
     
    589588        case PPSTAMP_ON:
    590589        case PPSTAMP_PARTIALLY_ON:
    591             returnval = makeStamp(config, options, input, chip, view);
     590            returnval = makeStamp(config, options, input, chip, view, center);
    592591            allDone = true;
    593592            foundOverlap = true;
Note: See TracChangeset for help on using the changeset viewer.