IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 18112


Ignore:
Timestamp:
Jun 12, 2008, 5:24:03 PM (18 years ago)
Author:
eugene
Message:

added FLAT_PREMASK and DARK_PREMASK to detrend types

File:
1 edited

Legend:

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

    r18060 r18112  
    185185    const char *typeStr = psMetadataLookupStr(NULL, arguments, "-type"); // Type of calibration
    186186    if (strlen(typeStr) <= 0) {
    187         psError(PS_ERR_UNKNOWN, false, "No -type specified.");
    188         goto ERROR;
     187      psError(PS_ERR_UNKNOWN, false, "No -type specified.");
     188      goto ERROR;
    189189    }
    190190    ppMergeType type = PPMERGE_TYPE_UNKNOWN; // Enumerated type for frame type
    191191    if (strcasecmp(typeStr, "BIAS") == 0) {
    192         type = PPMERGE_TYPE_BIAS;
    193     } else if (strcasecmp(typeStr, "DARK") == 0) {
    194         type = PPMERGE_TYPE_DARK;
    195     } else if (strcasecmp(typeStr, "FLAT") == 0 || strcasecmp(typeStr, "SKYFLAT") == 0 ||
    196                strcasecmp(typeStr, "DOMEFLAT") == 0) {
    197         type = PPMERGE_TYPE_FLAT;
    198     } else if (strcasecmp(typeStr, "FRINGE") == 0) {
    199         type = PPMERGE_TYPE_FRINGE;
    200     } else if (strcasecmp(typeStr, "SHUTTER") == 0) {
    201         type = PPMERGE_TYPE_SHUTTER;
    202     } else if (strcasecmp(typeStr, "MASK") == 0 ||
    203                strcasecmp(typeStr, "DARKMASK") == 0 ||
    204                strcasecmp(typeStr, "FLATMASK") == 0) {
    205         type = PPMERGE_TYPE_MASK;
    206     } else {
    207         psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Unrecognised image type: %s", typeStr);
    208         goto ERROR;
    209     }
     192      type = PPMERGE_TYPE_BIAS;
     193      goto VALID;
     194    }
     195    if (strcasecmp(typeStr, "DARK") == 0 ||
     196        strcasecmp(typeStr, "DARK_PREMASK") == 0) {
     197      type = PPMERGE_TYPE_DARK;
     198      goto VALID;
     199    }
     200    if (strcasecmp(typeStr, "FLAT") == 0 ||
     201        strcasecmp(typeStr, "DOMEFLAT") == 0 ||
     202        strcasecmp(typeStr, "SKYFLAT") == 0 ||
     203        strcasecmp(typeStr, "FLAT_PREMASK") == 0 ||
     204        strcasecmp(typeStr, "SKYFLAT_PREMASK") == 0 ||
     205        strcasecmp(typeStr, "DOMEFLAT_PREMASK") == 0) {
     206      type = PPMERGE_TYPE_FLAT;
     207      goto VALID;
     208    }
     209    if (strcasecmp(typeStr, "FRINGE") == 0) {
     210      type = PPMERGE_TYPE_FRINGE;
     211      goto VALID;
     212    }
     213    if (strcasecmp(typeStr, "SHUTTER") == 0) {
     214      type = PPMERGE_TYPE_SHUTTER;
     215      goto VALID;
     216    }
     217    if (strcasecmp(typeStr, "MASK") == 0 ||
     218        strcasecmp(typeStr, "DARKMASK") == 0 ||
     219        strcasecmp(typeStr, "FLATMASK") == 0) {
     220      type = PPMERGE_TYPE_MASK;
     221      goto VALID;
     222    }
     223    psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Unrecognised image type: %s", typeStr);
     224    goto ERROR;
     225
     226 VALID:
    210227    psMetadataAddS32(config->arguments, PS_LIST_TAIL, "TYPE", 0, "Type of calibration frame", type);
    211228
Note: See TracChangeset for help on using the changeset viewer.