IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 27, 2009, 11:23:22 AM (17 years ago)
Author:
Paul Price
Message:

Allow simple writing of convolved images. Increasing size of stamp regions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppSub/src/ppSubCamera.c

    r23753 r24261  
    163163
    164164
     165    // Now that the camera has been determined, we can read the recipe
     166    psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPSUB_RECIPE); // Recipe for ppSim
     167    if (!recipe) {
     168        psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to find recipe %s", PPSUB_RECIPE);
     169        return false;
     170    }
     171    if (psMetadataLookupBool(NULL, config->arguments, "-photometry")) {
     172        psMetadataAddBool(recipe, PS_LIST_TAIL, "PHOTOMETRY", PS_META_REPLACE,
     173                          "Perform photometry?", true);
     174    }
     175    if (psMetadataLookupBool(NULL, config->arguments, "-inverse")) {
     176        psMetadataAddBool(recipe, PS_LIST_TAIL, "INVERSE", PS_META_REPLACE,
     177                          "Generate inverse subtractions?", true);
     178    }
     179
     180    data->inverse = psMetadataLookupBool(NULL, recipe, "INVERSE");
     181    data->photometry = psMetadataLookupBool(NULL, recipe, "PHOTOMETRY");
     182
     183    bool mdok;                          // Status of MD lookup
     184    bool saveConv = psMetadataLookupBool(&mdok, recipe, "SAVE.CONVOLVED"); // Save convolved images?
     185
    165186    // Convolved input image
    166187    pmFPAfile *inConvImage = defineOutputFile(config, input, true, "PPSUB.INPUT.CONV", PM_FPA_FILE_IMAGE);
     
    171192        return false;
    172193    }
     194    if (saveConv) {
     195        inConvImage->save = true;
     196        inConvMask->save = true;
     197    }
    173198    if (inVar) {
    174199        pmFPAfile *inConvVar = defineOutputFile(config, inConvImage, false, "PPSUB.INPUT.CONV.VARIANCE",
     
    177202            psError(PS_ERR_UNKNOWN, false, "Unable to define output files");
    178203            return false;
     204        }
     205        if (saveConv) {
     206            inConvVar->save = true;
    179207        }
    180208    }
     
    188216        return false;
    189217    }
     218    if (saveConv) {
     219        refConvImage->save = true;
     220        refConvMask->save = true;
     221    }
    190222    if (refVar) {
    191223        pmFPAfile *refConvVar = defineOutputFile(config, refConvImage, false, "PPSUB.REF.CONV.VARIANCE",
     
    195227            return false;
    196228        }
    197     }
    198 
    199 
    200     // Now that the camera has been determined, we can read the recipe
    201     psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPSUB_RECIPE); // Recipe for ppSim
    202     if (!recipe) {
    203         psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to find recipe %s", PPSUB_RECIPE);
    204         return false;
    205     }
    206     if (psMetadataLookupBool(NULL, config->arguments, "-photometry")) {
    207         psMetadataAddBool(recipe, PS_LIST_TAIL, "PHOTOMETRY", PS_META_REPLACE,
    208                           "Perform photometry?", true);
    209     }
    210     if (psMetadataLookupBool(NULL, config->arguments, "-inverse")) {
    211         psMetadataAddBool(recipe, PS_LIST_TAIL, "INVERSE", PS_META_REPLACE,
    212                           "Generate inverse subtractions?", true);
    213     }
    214 
    215     data->inverse = psMetadataLookupBool(NULL, recipe, "INVERSE");
    216     data->photometry = psMetadataLookupBool(NULL, recipe, "PHOTOMETRY");
    217 
     229        if (saveConv) {
     230            refConvVar->save = true;
     231        }
     232    }
    218233
    219234    // Output image
Note: See TracChangeset for help on using the changeset viewer.