IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 42270


Ignore:
Timestamp:
Aug 26, 2022, 9:56:48 AM (4 years ago)
Author:
eugene
Message:

add an log message to note that the KH correction is being applied; convert endtime string to same time type as exposure time; add config option to apply proper motion correction

Location:
tags/ipp-ops-20220705-ippref/psastro/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • tags/ipp-ops-20220705-ippref/psastro/src/psastroConvert.c

    r41895 r42270  
    509509  float myPltScale = fabs(pltScale[chipID]);
    510510
     511  psLogMsg ("psastro.correctKH", PS_LOG_INFO, "applying KH correction to %s (%d)\n", chipName, chipID);
     512
    511513  // apply the correction to the detections
    512514  for (int i = 0; i < inStars->n; i++) {
  • tags/ipp-ops-20220705-ippref/psastro/src/psastroDefineFiles.c

    r36837 r42270  
    6161            return false;
    6262        }
    63         psTime *endtime = psTimeFromString (KHendDate, PS_TIME_TAI);
     63        // psTime *endtime = psTimeFromString (KHendDate, PS_TIME_TAI);
     64        // 'endtime' and 'time' must be in the same units
     65        psTime *endtime = psTimeFromString (KHendDate, time->type);
    6466        if (!endtime) {
    6567            psError (PM_ERR_CONFIG, false, "KH.CORRECT.APPLY requested, KH.CORRECT.ENDDATE has an invalid date/time");
  • tags/ipp-ops-20220705-ippref/psastro/src/psastroLoadRefstars.c

    r39926 r42270  
    139139    psStringAppend (&getstarCommand, " -region %f %f %f %f -o %s", RAmin, DECmin, RAmax, DECmax, tempFile);
    140140    psTrace ("psastro", 3, "%s\n", getstarCommand);
     141
     142    // add the MJD for the exposure EPOCH
     143    bool ProperMotionApply = psMetadataLookupF32 (&status, recipe, "DVO.GETSTAR.PM.APPLY");
     144    if (ProperMotionApply) {
     145      pmFPAfile *input = psMetadataLookupPtr (NULL, config->files, source); // we've already done this before
     146      myAssert (input, "oops");
     147
     148      psTime *time = psMetadataLookupPtr(NULL, input->fpa->concepts, "FPA.TIME");
     149      if (time->sec == 0 && time->nsec == 0) {
     150        psError (PM_ERR_CONFIG, false, "Exposure EPOCH proper motion correction requested, but date/time of exposure not found");
     151        return false;
     152      }
     153      psF64 EpochMJD = psTimeToMJD(time);
     154      psStringAppend (&getstarCommand, " -epoch-mjd %lf", EpochMJD);
     155    }
    141156
    142157    psLogMsg("psastro", PS_LOG_INFO, "getstar command: %s", getstarCommand);
Note: See TracChangeset for help on using the changeset viewer.