IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 18, 2007, 11:03:20 AM (19 years ago)
Author:
magnier
Message:

adding version, exptime, twilight, dettemp to detrend options; adding bools to track selections

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/camera/pmFPAfileDefine.c

    r11801 r11876  
    784784    // added if specified for the particular detrend type by the DETREND.CONSTRAINTS
    785785    // note that the filter-dependent choices are set for ppImage in ppImageParseCamera
     786    // XXX make all of the detrend constraints explicit in DETREND.CONSTRAINTS?
    786787
    787788    // Get the time from FPA.TIME
     
    793794
    794795    // add additional constraints based on the type defined in the PPIMAGE recipe
    795     // use PPIMAGE or DETREND or ???
     796    // XXX use PPIMAGE or DETREND for the recipe name?
    796797    psMetadata *recipe  = psMetadataLookupPtr (&status, config->recipes, "PPIMAGE");
    797798    if (!status)
     
    819820        char *concept = item->data.V;
    820821
     822        // these items refer to the corresponding values for the input image
     823        // (ie, -filter input:filter or -exptime input:exptime)
    821824        if (!strcasecmp (option, "filter")) {
    822825            options->filter = psMetadataLookupPtr (&status, input->concepts, concept);
     826            psMemIncrRefCounter (options->filter);
    823827            if (!status)
    824828                psAbort("failed to find filter (concept %s)", concept);
     
    827831        if (!strcasecmp (option, "exptime")) {
    828832            options->exptime = psMetadataLookupF32 (&status, input->concepts, concept);
     833            options->exptimeSet = true;
    829834            if (!status)
    830835                psAbort("exptime not found (concept %s)", concept);
     
    832837        if (!strcasecmp (option, "airmass")) {
    833838            options->airmass = psMetadataLookupF32 (&status, input->concepts, concept);
     839            options->airmassSet = true;
    834840            if (!status)
    835841                psAbort("airmass not found (concept %s)", concept);
    836842        }
    837         # if (0)
    838             if (!strcasecmp (option, "dettemp")) {
    839                 options->dettemp = psMetadataLookupF32 (&status, input->concepts, concept);
    840                 if (!status)
    841                     psAbort("dettemp not found (concept %s)", concept);
    842             }
    843         if (!strcasecmp (option, "version")) {
    844             // version is applied as a literal string
    845             options->version = psMetadataLookupF32 (&status, input->concepts, concept);
    846             if (!status)
    847                 psAbort("version not found (concept %s)", concept);
    848         }
     843        if (!strcasecmp (option, "dettemp")) {
     844            options->dettemp = psMetadataLookupF32 (&status, input->concepts, concept);
     845            options->dettempSet = true;
     846            if (!status)
     847                psAbort("dettemp not found (concept %s)", concept);
     848        }
    849849        if (!strcasecmp (option, "twilight")) {
    850             // XXX determine the twilight time based on concept defining the time-of-day
    851             // XXX need to include twilight time somehow (uses lookup based on a time value)
    852850            options->twilight = psMetadataLookupF32 (&status, input->concepts, concept);
     851            options->twilightSet = true;
    853852            if (!status)
    854853                psAbort("twilight not found (concept %s)", concept);
    855854        }
    856         # endif
    857 
     855
     856        // the version is applied literally
     857        if (!strcasecmp (option, "version")) {
     858            options->version = psMemIncrRefCounter (concept);
     859        }
     860        // we can override the detrend database dettype if desired
     861        // ie, use DOMEFLAT for type FLAT
     862        // the dettype string is applied literally
     863        if (!strcasecmp (option, "dettype")) {
     864            options->dettype = psMemIncrRefCounter (concept);
     865        }
    858866    }
    859867    psFree(iter);
Note: See TracChangeset for help on using the changeset viewer.