IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 13562


Ignore:
Timestamp:
May 30, 2007, 3:24:59 PM (19 years ago)
Author:
eugene
Message:

fixed errors with pmImageDefineFile for DetDB queries

Location:
trunk/ppImage/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppImage/src/ppFocusParseCamera.c

    r13528 r13562  
    2525    // not all input or output images are used in a given recipe
    2626    if (options->doBias) {
    27         if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.BIAS", "BIAS", PM_FPA_FILE_IMAGE)) {
     27        if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.BIAS", "BIAS", PM_FPA_FILE_IMAGE, PM_DETREND_TYPE_BIAS)) {
    2828            psError (PS_ERR_IO, false, "Can't find a bias image source");
    2929            return NULL;
     
    3131    }
    3232    if (options->doDark) {
    33         if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.DARK", "DARK", PM_FPA_FILE_IMAGE)) {
     33        if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.DARK", "DARK", PM_FPA_FILE_IMAGE, PM_DETREND_TYPE_DARK)) {
    3434            psError (PS_ERR_IO, false, "Can't find a dark image source");
    3535            return NULL;
     
    3737    }
    3838    if (options->doMask) {
    39         if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.MASK", "MASK", PM_FPA_FILE_MASK)) {
     39        if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.MASK", "MASK", PM_FPA_FILE_MASK, PM_DETREND_TYPE_MASK)) {
    4040            psError (PS_ERR_IO, false, "Can't find a mask image source");
    4141            return NULL;
     
    4343    }
    4444    if (options->doFlat) {
    45         if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.FLAT", "FLAT", PM_FPA_FILE_IMAGE)) {
     45        if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.FLAT", "FLAT", PM_FPA_FILE_IMAGE, PM_DETREND_TYPE_FLAT)) {
    4646            psError (PS_ERR_IO, false, "Can't find a shutter image source");
    4747            return NULL;
  • trunk/ppImage/src/ppImage.h

    r13528 r13562  
    6161void ppFocusDropCamera (pmConfig *config);
    6262
    63 bool ppImageDefineFile (pmConfig *config, pmFPA *input, char *filerule, char *argname, pmFPAfileType type);
     63bool ppImageDefineFile (pmConfig *config, pmFPA *input, char *filerule, char *argname, pmFPAfileType fileType, pmDetrendType detrendType);
    6464
    6565#endif
  • trunk/ppImage/src/ppImageDefineFile.c

    r13531 r13562  
    55# include "ppImage.h"
    66
    7 bool ppImageDefineFile (pmConfig *config, pmFPA *input, char *filerule, char *argname, pmFPAfileType type) {
     7bool ppImageDefineFile (pmConfig *config, pmFPA *input, char *filerule, char *argname, pmFPAfileType fileType, pmDetrendType detrendType) {
    88
    99    bool status;
     
    1717    }
    1818    if (file) {
    19         if (file->type != type) {
    20             psError(PS_ERR_IO, true, "%s is not of type %s", filerule, pmFPAfileStringFromType (type));
     19        if (file->type != fileType) {
     20            psError(PS_ERR_IO, true, "%s is not of type %s", filerule, pmFPAfileStringFromType (fileType));
    2121            return false;
    2222        }
     
    3131    }
    3232    if (file) {
    33         if (file->type != type) {
    34             psError(PS_ERR_IO, true, "%s is not of type %s", filerule, pmFPAfileStringFromType (type));
     33        if (file->type != fileType) {
     34            psError(PS_ERR_IO, true, "%s is not of type %s", filerule, pmFPAfileStringFromType (fileType));
    3535            return false;
    3636        }
     
    3939
    4040    // look for the file to be loaded from the detrend database
    41     pmFPAfileDefineFromDetDB (&status, config, filerule, input, type);
     41    file = pmFPAfileDefineFromDetDB (&status, config, filerule, input, detrendType);
    4242    if (!status) {
    43         psError (PS_ERR_UNKNOWN, false, "failed to load find definition");
     43        psError (PS_ERR_UNKNOWN, false, "failed to load file definition");
    4444        return false;
    4545    }
    4646    if (file) {
    47         if (file->type != type) {
    48             psError(PS_ERR_IO, true, "%s is not of type %s", filerule, pmFPAfileStringFromType (type));
     47        if (file->type != fileType) {
     48            psError(PS_ERR_IO, true, "%s is not of type %s", filerule, pmFPAfileStringFromType (fileType));
    4949            return false;
    5050        }
  • trunk/ppImage/src/ppImageParseCamera.c

    r13528 r13562  
    5252    // not all input or output images are used in a given recipe
    5353    if (options->doBias) {
    54         if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.BIAS", "BIAS", PM_FPA_FILE_IMAGE)) {
     54        if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.BIAS", "BIAS", PM_FPA_FILE_IMAGE, PM_DETREND_TYPE_BIAS)) {
    5555            psError (PS_ERR_IO, false, "Can't find a bias image source");
    5656            psFree (options);
     
    5959    }
    6060    if (options->doDark) {
    61         if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.DARK", "DARK", PM_FPA_FILE_IMAGE)) {
     61        if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.DARK", "DARK", PM_FPA_FILE_IMAGE, PM_DETREND_TYPE_DARK)) {
    6262            psError (PS_ERR_IO, false, "Can't find a dark image source");
    6363            psFree (options);
     
    6666    }
    6767    if (options->doMask) {
    68         if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.MASK", "MASK", PM_FPA_FILE_MASK)) {
     68        if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.MASK", "MASK", PM_FPA_FILE_MASK, PM_DETREND_TYPE_MASK)) {
    6969            psError (PS_ERR_IO, false, "Can't find a mask image source");
    7070            psFree (options);
     
    7373    }
    7474    if (options->doShutter) {
    75         if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.SHUTTER", "SHUTTER", PM_FPA_FILE_IMAGE)) {
     75        if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.SHUTTER", "SHUTTER", PM_FPA_FILE_IMAGE, PM_DETREND_TYPE_SHUTTER)) {
    7676            psError (PS_ERR_IO, false, "Can't find a flat image source");
    7777            psFree (options);
     
    8181
    8282    if (options->doFlat) {
    83         if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.FLAT", "FLAT", PM_FPA_FILE_IMAGE)) {
     83        if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.FLAT", "FLAT", PM_FPA_FILE_IMAGE, PM_DETREND_TYPE_FLAT)) {
    8484            psError (PS_ERR_IO, false, "Can't find a shutter image source");
    8585            psFree (options);
     
    136136skip_fringe:
    137137    if (options->doFringe) {
    138         if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.FRINGE", "FRINGE", PM_FPA_FILE_FRINGE)) {
     138        if (!ppImageDefineFile (config, input->fpa, "PPIMAGE.FRINGE", "FRINGE", PM_FPA_FILE_FRINGE, PM_DETREND_TYPE_FRINGE_IMAGE)) {
    139139            psError (PS_ERR_IO, false, "Can't find a fringe image source");
    140140            return NULL;
Note: See TracChangeset for help on using the changeset viewer.