IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 30, 2011, 9:42:02 AM (15 years ago)
Author:
eugene
Message:

merging changes from trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20110213/psModules/src/detrend/pmDetrendDB.c

    r29833 r31091  
    77#include <pslib.h>
    88
     9#include "pmErrorCodes.h"
    910#include "pmConfig.h"
    1011#include "pmConfigCommand.h"
     
    120121    PS_ASSERT_PTR_NON_NULL(config, NULL);
    121122
     123    psIOBuffer *buffer = NULL;
     124    psPipe *pipe = NULL;
     125    psMetadata *answer = NULL;
     126
    122127    int status, exit_status;
    123128    psString line = NULL;
     
    137142    psFree (realCamera);
    138143
     144    // require a filter for certain types of detrends:
     145    if ((options->type == PM_DETREND_TYPE_FLAT) && !options->filter) {
     146        psError (PM_ERR_CONFIG, false, "requesting a FLAT-class of detrend without a filter");
     147        goto failure;
     148    }
     149    if ((options->type == PM_DETREND_TYPE_FLATCORR) && !options->filter) {
     150        psError (PM_ERR_CONFIG, false, "requesting a FLATCORR-class of detrend without a filter");
     151        goto failure;
     152    }
     153    if ((options->type == PM_DETREND_TYPE_FRINGE) && !options->filter) {
     154        psError (PM_ERR_CONFIG, false, "requesting a FRINGE-class of detrend without a filter");
     155        goto failure;
     156    }
     157
     158    // add the restrictions
    139159    if (options->filter) {
    140160        psStringAppend(&line, " -filter %s", options->filter);
     
    155175        psStringAppend(&line, " -airmass %f", options->twilight);
    156176    }
    157 
    158     psIOBuffer *buffer = NULL;
    159     psPipe *pipe = NULL;
    160     psMetadata *answer = NULL;
    161177
    162178    if (!pmConfigDatabaseCommand(&line, config)) {
Note: See TracChangeset for help on using the changeset viewer.