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/detrend/pmDetrendDB.c

    r11508 r11876  
    2424
    2525    psFree (options->camera);
     26    psFree (options->filter);
     27    psFree (options->dettype);
     28    psFree (options->version);
    2629
    2730    return;
     
    4144
    4245    // these other options depend on the type of detrend data
    43     options->filter = NULL;  //
    44     options->exptime = -1.0; // the undefined value (safe since exptime >= 0)
    45     options->airmass = -1.0; // the undefined value (safe since airmass >= 1)
     46    options->filter   = NULL;
     47    options->version  = NULL;
     48    options->dettype  = NULL;
     49    options->exptime  = 0.0;
     50    options->airmass  = 0.0;
     51    options->dettemp  = 0.0;
     52    options->twilight = 0.0;
     53
     54    options->exptimeSet  = false; // not selected
     55    options->airmassSet  = false; // not selected
     56    options->dettempSet  = false; // not selected
     57    options->twilightSet = false; // not selected
    4658
    4759    return options;
     
    105117    psString line = NULL;
    106118    char *time = psTimeToISO (&options->time);
    107     char *type = pmDetrendTypeToString (options->type);
     119
     120    char *type = NULL;
     121    if (options->dettype) {
     122        type = psMemIncrRefCounter (options->dettype);
     123    } else {
     124        type = pmDetrendTypeToString (options->type);
     125    }
    108126    unsigned int nFail;
    109127
     
    114132        psStringAppend(&line, " -filter %s", options->filter);
    115133    }
    116     if (options->exptime > -1.0) {
     134    if (options->version) {
     135        psStringAppend(&line, " -version %s", options->version);
     136    }
     137    if (options->exptimeSet) {
    117138        psStringAppend(&line, " -exp_time %f", options->exptime);
    118139    }
    119     if (options->airmass > -1.0) {
     140    if (options->airmassSet) {
    120141        psStringAppend(&line, " -airmass %f", options->airmass);
     142    }
     143    if (options->dettempSet) {
     144        psStringAppend(&line, " -airmass %f", options->dettemp);
     145    }
     146    if (options->twilightSet) {
     147        psStringAppend(&line, " -airmass %f", options->twilight);
    121148    }
    122149
Note: See TracChangeset for help on using the changeset viewer.