IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 11, 2009, 10:54:22 AM (17 years ago)
Author:
Paul Price
Message:

Adding functionality of reading input files from the configuration dump. This is principally used for ensuring we apply the same detrend images with ppImage that we used originally. Applying this framework to ppImage. Will soon apply to other products. Reworked the pmFPAfileDefineFrom* functions to use common code; I think it still works.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/detrend/pmDetrendDB.c

    r20401 r23268  
    2020
    2121//
    22 static void pmDetrendSelectOptionsFree (pmDetrendSelectOptions *options)
    23 {
    24 
    25     if (!options)
     22static void pmDetrendSelectOptionsFree(pmDetrendSelectOptions *options)
     23{
     24
     25    if (!options) {
    2626        return;
    27 
    28     psFree (options->camera);
    29     psFree (options->filter);
    30     psFree (options->dettype);
    31     psFree (options->version);
     27    }
     28
     29    psFree(options->camera);
     30    psFree(options->filter);
     31    psFree(options->dettype);
     32    psFree(options->version);
    3233
    3334    return;
     
    3738pmDetrendSelectOptions *pmDetrendSelectOptionsAlloc(const char *camera, psTime time, pmDetrendType type)
    3839{
    39 
    4040    pmDetrendSelectOptions *options = psAlloc(sizeof(pmDetrendSelectOptions));
    4141    psMemSetDeallocator(options, (psFreeFunc) pmDetrendSelectOptionsFree);
     
    6363}
    6464
    65 static void pmDetrendSelectResultsFree (pmDetrendSelectResults *results)
    66 {
    67 
    68     if (!results)
     65static void pmDetrendSelectResultsFree(pmDetrendSelectResults *results)
     66{
     67
     68    if (!results) {
    6969        return;
    70 
    71     psFree (results->detID);
     70    }
     71
     72    psFree(results->detID);
    7273    psFree(results->level);
    7374
     
    7576}
    7677
    77 pmDetrendSelectResults *pmDetrendSelectResultsAlloc ()
     78pmDetrendSelectResults *pmDetrendSelectResultsAlloc(void)
    7879{
    7980
     
    8788}
    8889
    89 psString pmDetrendTypeToString (pmDetrendType type)
    90 {
    91 
    92     # define DETREND_STRING_CASE(TTT) \
    93 case PM_DETREND_TYPE_##TTT: \
    94     return psStringCopy (#TTT);
     90psString pmDetrendTypeToString(pmDetrendType type)
     91{
     92
     93#define DETREND_STRING_CASE(TYPE) \
     94  case PM_DETREND_TYPE_##TYPE: \
     95    return psStringCopy(#TYPE);
    9596
    9697    switch (type) {
    97         DETREND_STRING_CASE (MASK);
    98         DETREND_STRING_CASE (BIAS);
    99         DETREND_STRING_CASE (DARK);
    100         DETREND_STRING_CASE (FLAT);
    101         DETREND_STRING_CASE (FLATCORR);
    102         DETREND_STRING_CASE (SHUTTER);
    103         DETREND_STRING_CASE (FRINGE);
    104         DETREND_STRING_CASE (ASTROM);
     98        DETREND_STRING_CASE(NONE);
     99        DETREND_STRING_CASE(MASK);
     100        DETREND_STRING_CASE(BIAS);
     101        DETREND_STRING_CASE(DARK);
     102        DETREND_STRING_CASE(FLAT);
     103        DETREND_STRING_CASE(FLATCORR);
     104        DETREND_STRING_CASE(SHUTTER);
     105        DETREND_STRING_CASE(FRINGE);
     106        DETREND_STRING_CASE(ASTROM);
    105107    default:
    106108        return NULL;
     
    111113// detselect -camera (camera) -time (time) -type (type) [others]
    112114// returns: (type) (class) (exp_flag) DONE
    113 pmDetrendSelectResults *pmDetrendSelect (const pmDetrendSelectOptions *options,
    114         const pmConfig *config)
     115pmDetrendSelectResults *pmDetrendSelect(const pmDetrendSelectOptions *options, const pmConfig *config)
    115116{
    116117    PS_ASSERT_PTR_NON_NULL(options, NULL);
Note: See TracChangeset for help on using the changeset viewer.