IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 5, 2006, 3:29:58 PM (20 years ago)
Author:
Paul Price
Message:

Adding shutter correctins.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppMerge/src/ppMergeOptions.c

    r8847 r9325  
    3535    options->scale = false;
    3636    options->exptime = false;
     37    options->shutter = false;
    3738    options->sample = 1;
    38     options->background = PS_STAT_SAMPLE_MEDIAN;
     39    options->mean = PS_STAT_SAMPLE_MEDIAN;
     40    options->stdev = PS_STAT_SAMPLE_STDEV;
     41    options->shutterSize = 10;
    3942    options->onOff = 0;
    4043    options->combine = pmCombineParamsAlloc(PS_STAT_SAMPLE_MEAN);
     
    7275        return 0;
    7376    }
    74     if (strcasecmp(stat, "MEAN") == 0 || strcasecmp(stat, "SAMPLE_MEAN") == 0) {
    75         return PS_STAT_SAMPLE_MEAN;
    76     }
    77     if (strcasecmp(stat, "MEDIAN") == 0 || strcasecmp(stat, "SAMPLE_MEDIAN") == 0) {
    78         return PS_STAT_SAMPLE_MEDIAN;
    79     }
    80     if (strcasecmp(stat, "ROBUST") == 0 || strcasecmp(stat, "ROBUST_MEDIAN") == 0) {
    81         return PS_STAT_ROBUST_MEDIAN;
    82     }
    83     if (strcasecmp(stat, "FITTED") == 0 || strcasecmp(stat, "FITTED_MEAN") == 0) {
    84         return PS_STAT_FITTED_MEAN;
    85     }
    86     if (strcasecmp(stat, "CLIPPED") == 0 || strcasecmp(stat, "CLIPPED_MEAN") == 0) {
    87         return PS_STAT_CLIPPED_MEAN;
    88     }
    89 
    90     psError(PS_ERR_IO, true, "Unable to interpret statistic: %s\n", name);
    91     return 0;
     77    return psStatsOptionFromString(stat);
    9278}
    9379
     
    143129    OPTION_PARSE(options->combine->nKeep,    recipe, "NKEEP",     S32 );
    144130    OPTION_PARSE(options->combine->maskVal,  recipe, "MASKVAL",   S32 );
     131    OPTION_PARSE(options->shutterSize,       recipe, "SHUTTERSIZE", S32 );
    145132    options->combine->combine = parseStat(recipe, "COMBINE");
    146     options->background       = parseStat(recipe, "BACKGROUND");
     133    options->mean             = parseStat(recipe, "MEAN");
     134    options->stdev            = parseStat(recipe, "STDEV");
    147135
    148136    // Now the command-line options.  These are parameters that depend on what type of frame is being combined
     
    155143            options->scale = false;
    156144            options->exptime = false;
     145            options->shutter = false;
    157146        } else if (strcasecmp(type, "DARK") == 0) {
    158147            options->zero = false;
    159148            options->scale = false;
    160149            options->exptime = true;
     150            options->shutter = false;
    161151        } else if (strcasecmp(type, "FLAT") == 0) {
    162152            options->zero = false;
    163153            options->scale = true;
    164154            options->exptime = false;
     155            options->shutter = false;
    165156        } else if (strcasecmp(type, "FRINGE") == 0) {
    166157            options->zero = true;
    167158            options->scale = true;
    168159            options->exptime = false;
     160            options->shutter = false;
     161        } else if (strcasecmp(type, "SHUTTER") == 0) {
     162            options->zero = false;
     163            options->scale = false;
     164            options->exptime = false;
     165            options->shutter = true;
    169166        } else {
    170167            psLogMsg(__func__, PS_LOG_WARN, "Unrecognised image type: %s --- assuming BIAS.\n", type);
     
    172169            options->scale = false;
    173170            options->exptime = false;
     171            options->shutter = false;
    174172        }
    175173    } else {
Note: See TracChangeset for help on using the changeset viewer.