IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 15476


Ignore:
Timestamp:
Nov 6, 2007, 12:21:51 PM (19 years ago)
Author:
Paul Price
Message:

Adding mask types. Default action when it couldn't determine the mask type was to assume bias; changed this so that it throws an error.

Location:
trunk/ppMerge/src
Files:
2 edited

Legend:

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

    r13873 r15476  
    3535    // Construct camera in preparation for reading
    3636    pmConfig *config = ppMergeConfig(argc, argv);
     37    if (!config) {
     38        psErrorStackPrint(stderr, "Unable to get configuration.");
     39        exit(EXIT_FAILURE);
     40    }
    3741
    3842    // Set various tasks (define optional operations)
    3943    ppMergeOptions *options = ppMergeOptionsParse(config);
     44    if (!options) {
     45        psErrorStackPrint(stderr, "Unable to parse options.");
     46        exit(EXIT_FAILURE);
     47    }
    4048
    4149    // Check the inputs
    4250    ppMergeData *data = ppMergeCheckInputs(options, config);
    4351    if (!data) {
    44         psError(PS_ERR_IO, false, "Not enough valid input files.\n");
     52        psErrorStackPrint(stderr, "Not enough valid input files.");
    4553        exit(EXIT_FAILURE);
    4654    }
  • trunk/ppMerge/src/ppMergeOptions.c

    r14356 r15476  
    215215            options->shutter = true;
    216216            options->mask = false;
    217         } else if (strcasecmp(type, "MASK") == 0) {
     217        } else if (strcasecmp(type, "MASK") == 0 ||
     218                   strcasecmp(type, "DARKMASK") == 0 ||
     219                   strcasecmp(type, "FLATMASK") == 0) {
    218220            options->zero = false;
    219221            options->scale = false;
     
    223225            options->mask = true;
    224226        } else {
    225             psLogMsg(__func__, PS_LOG_WARN, "Unrecognised image type: %s --- assuming BIAS.\n", type);
    226             options->zero = false;
    227             options->scale = false;
    228             options->darktime = false;
    229             options->fringe = false;
    230             options->shutter = false;
    231             options->mask = false;
     227            psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Unrecognised image type: %s", type);
     228            psFree(options);
     229            return NULL;
    232230        }
    233231    } else {
    234         psLogMsg(__func__, PS_LOG_WARN, "No calibration type specified; assuming BIAS.\n");
    235         options->zero = false;
    236         options->scale = false;
    237         options->darktime = false;
    238         options->fringe = false;
    239         options->shutter = false;
    240         options->mask = false;
     232        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "No image type specified.");
     233        psFree(options);
     234        return NULL;
    241235    }
    242236
Note: See TracChangeset for help on using the changeset viewer.