IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 1, 2006, 10:16:15 AM (20 years ago)
Author:
Paul Price
Message:

Working version for flat-fielding. Need to add extenal scale/zero input, mask saturated pixels, test on dark, bias, fringe.

File:
1 edited

Legend:

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

    r7073 r7260  
    137137    OPTION_PARSE(options->combine->fracLow,  recipe, "FRACLOW",   F32 );
    138138    OPTION_PARSE(options->combine->nKeep,    recipe, "NKEEP",     S32 );
    139     OPTION_PARSE(options->combine->maskVal,  recipe, "MASKVAL",   U8 );
     139    OPTION_PARSE(options->combine->maskVal,  recipe, "MASKVAL",   S32 );
    140140    options->combine->combine = parseStat(recipe, "COMBINE");
    141141    options->background       = parseStat(recipe, "BACKGROUND");
     
    145145    // Set options based on the type of calibration frame
    146146    const char *type = psMetadataLookupStr(NULL, config->arguments, "-type"); // The type of calibration frame
    147     if (strcasecmp(type, "BIAS") == 0) {
     147    if (strlen(type) > 0) {
     148        if (strcasecmp(type, "BIAS") == 0) {
     149            options->zero = false;
     150            options->scale = false;
     151            options->exptime = false;
     152        } else if (strcasecmp(type, "DARK") == 0) {
     153            options->zero = false;
     154            options->scale = false;
     155            options->exptime = true;
     156        } else if (strcasecmp(type, "FLAT") == 0) {
     157            options->zero = false;
     158            options->scale = true;
     159            options->exptime = false;
     160        } else if (strcasecmp(type, "FRINGE") == 0) {
     161            options->zero = true;
     162            options->scale = true;
     163            options->exptime = false;
     164        } else {
     165            psLogMsg(__func__, PS_LOG_WARN, "Unrecognised image type: %s --- assuming BIAS.\n", type);
     166            options->zero = false;
     167            options->scale = false;
     168            options->exptime = false;
     169        }
     170    } else {
     171        psLogMsg(__func__, PS_LOG_WARN, "No calibration type specified; assuming BIAS.\n");
    148172        options->zero = false;
    149173        options->scale = false;
    150174        options->exptime = false;
    151     } else if (strcasecmp(type, "DARK") == 0) {
    152         options->zero = false;
    153         options->scale = false;
    154         options->exptime = true;
    155     } else if (strcasecmp(type, "FLAT") == 0) {
    156         options->zero = false;
    157         options->scale = true;
    158         options->exptime = false;
    159     } else if (strcasecmp(type, "FRINGE") == 0) {
    160         options->zero = true;
    161         options->scale = true;
    162         options->exptime = false;
    163     } else {
    164         psLogMsg(__func__, PS_LOG_WARN, "Unrecognised image type: %s --- ignored.\n", type);
    165175    }
    166176
     177
     178#if 0
    167179    // Or you can set them individually
    168180    OPTION_PARSE(options->zero,    config->arguments, "-zero",    Bool);
    169181    OPTION_PARSE(options->scale,   config->arguments, "-scale",   Bool);
    170182    OPTION_PARSE(options->exptime, config->arguments, "-exptime", Bool);
     183#endif
    171184
    172185    // Number of on/off images
Note: See TracChangeset for help on using the changeset viewer.