IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 14212


Ignore:
Timestamp:
Jul 13, 2007, 5:42:11 PM (19 years ago)
Author:
eugene
Message:

pmFPAfile.save is false by default

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/psastro/src/psastroDefineFiles.c

    r12806 r14212  
    44
    55    // these calls bind the I/O handle to the specified fpa
    6     if (!pmFPAfileDefineOutput (config, input->fpa, "PSASTRO.OUTPUT")) {
     6    pmFPAfile *output = NULL;
     7
     8    output = pmFPAfileDefineOutput (config, input->fpa, "PSASTRO.OUTPUT");
     9    if (!output) {
    710        psError(PSASTRO_ERR_CONFIG, false, "Failed to build FPA from PSASTRO.INPUT");
    811        return false;
    912    }
     13    output->save = true;
    1014
    1115# if (0)
  • trunk/psphot/src/psphotDefineFiles.c

    r13528 r14212  
    1616
    1717    // the output sources are carried on the input->fpa structures
    18     if (!pmFPAfileDefineOutput (config, input->fpa, "PSPHOT.OUTPUT")) {
     18    pmFPAfile *outsources = pmFPAfileDefineOutput (config, input->fpa, "PSPHOT.OUTPUT");
     19    if (!outsources) {
    1920        psError(PSPHOT_ERR_CONFIG, false, "Cannot find a rule for PSPHOT.OUTPUT");
    2021        return false;
    2122    }
     23    outsources->save = true;
    2224
    2325    // if we are choosing not to save the output detections, mark this file inactive so it will
     
    2527    if (!psMetadataLookupBool (NULL, recipe, "SAVE.OUTPUT")) {
    2628        pmFPAfileActivate (config->files, false, "PSPHOT.OUTPUT");
     29        outsources->save = false;
    2730    }
    2831
    2932    // optionally save the residual image
    3033    if (psMetadataLookupBool(NULL, recipe, "SAVE.RESID")) {
    31         if (!pmFPAfileDefineOutput (config, input->fpa, "PSPHOT.RESID")) {
     34        pmFPAfile *output = pmFPAfileDefineOutput (config, input->fpa, "PSPHOT.RESID");
     35        if (!output) {
    3236            psError(PSPHOT_ERR_CONFIG, false, "Cannot find a rule for PSPHOT.RESID");
    3337            return false;
    3438        }
     39        output->save = true;
    3540    }
    3641    // optionally save the background model (small FITS image)
     
    3843        int DX = psMetadataLookupS32 (&status, recipe, "BACKGROUND.XBIN");
    3944        int DY = psMetadataLookupS32 (&status, recipe, "BACKGROUND.YBIN");
    40         if (!pmFPAfileDefineFromFPA (config, input->fpa, DX, DY, "PSPHOT.BACKMDL")) {
     45        pmFPAfile *output = pmFPAfileDefineFromFPA (config, input->fpa, DX, DY, "PSPHOT.BACKMDL");
     46        if (!output) {
    4147            psError(PSPHOT_ERR_CONFIG, false, "Cannot find a rule for PSPHOT.BACKMDL");
    4248            return false;
    4349        }
     50        output->save = true;
    4451    }
    4552    // optionally save the background model's standard deviation (small FITS image)
     
    4754        int DX = psMetadataLookupS32 (&status, recipe, "BACKGROUND.XBIN");
    4855        int DY = psMetadataLookupS32 (&status, recipe, "BACKGROUND.YBIN");
    49         if (!pmFPAfileDefineFromFPA (config, input->fpa, DX, DY, "PSPHOT.BACKMDL.STDEV")) {
     56        pmFPAfile *output = pmFPAfileDefineFromFPA (config, input->fpa, DX, DY, "PSPHOT.BACKMDL.STDEV");
     57        if (!output) {
    5058            psError(PSPHOT_ERR_CONFIG, false, "Cannot find a rule for PSPHOT.BACKMDL.STDEV");
    5159            return false;
    5260        }
     61        output->save = true;
    5362    }
    5463    // optionally save the full background image
    5564    if (psMetadataLookupBool(NULL, recipe, "SAVE.BACKGND")) {
    56         if (!pmFPAfileDefineFromFPA (config, input->fpa,  1,  1, "PSPHOT.BACKGND")) {
     65        pmFPAfile *output = pmFPAfileDefineFromFPA (config, input->fpa,  1,  1, "PSPHOT.BACKGND");
     66        if (!output) {
    5767            psError(PSPHOT_ERR_CONFIG, false, "Cannot find a rule for PSPHOT.BACKGND");
    5868            return false;
    5969        }
     70        output->save = true;
    6071    }
    6172    // optionally save the background-subtracted image
    6273    if (psMetadataLookupBool(NULL, recipe, "SAVE.BACKSUB")) {
    63         if (!pmFPAfileDefineFromFPA (config, input->fpa,  1,  1, "PSPHOT.BACKSUB")) {
     74        pmFPAfile *output = pmFPAfileDefineFromFPA (config, input->fpa,  1,  1, "PSPHOT.BACKSUB");
     75        if (!output) {
    6476            psError(PSPHOT_ERR_CONFIG, false, "Cannot find a rule for PSPHOT.");
    6577            return false;
    6678        }
     79        output->save = true;
    6780    }
    6881    // optionally save the PSF Model
    6982    if (psMetadataLookupBool(NULL, recipe, "SAVE.PSF")) {
    70         if (!pmFPAfileDefineOutput (config, input->fpa, "PSPHOT.PSF.SAVE")) {
     83        pmFPAfile *output = pmFPAfileDefineOutput (config, input->fpa, "PSPHOT.PSF.SAVE");
     84        if (!output) {
    7185            psError(PSPHOT_ERR_CONFIG, false, "Cannot find a rule for PSPHOT.PSF.SAVE");
    7286            return false;
    7387        }
     88        output->save = true;
    7489    }
    7590
     
    7792    // allow specific plots only
    7893    if (psMetadataLookupBool(NULL, recipe, "SAVE.PLOTS")) {
    79         if (!pmFPAfileDefineOutput (config, input->fpa, "SOURCE.PLOT.MOMENTS")) {
     94        pmFPAfile *output = NULL;
     95        output = pmFPAfileDefineOutput (config, input->fpa, "SOURCE.PLOT.MOMENTS");
     96        if (!output) {
    8097            psError(PSPHOT_ERR_CONFIG, false, "Cannot find a rule for SOURCE.PLOT.MOMENTS");
    8198            return false;
    8299        }
    83         if (!pmFPAfileDefineOutput (config, input->fpa, "SOURCE.PLOT.PSFMODEL")) {
     100        output->save = true;
     101        output = pmFPAfileDefineOutput (config, input->fpa, "SOURCE.PLOT.PSFMODEL");
     102        if (!output) {
    84103            psError(PSPHOT_ERR_CONFIG, false, "Cannot find a rule for SOURCE.PLOT.PSFMODEL");
    85104            return false;
    86105        }
    87         if (!pmFPAfileDefineOutput (config, input->fpa, "SOURCE.PLOT.APRESID")) {
     106        output->save = true;
     107        output = pmFPAfileDefineOutput (config, input->fpa, "SOURCE.PLOT.APRESID");
     108        if (!output) {
    88109            psError(PSPHOT_ERR_CONFIG, false, "Cannot find a rule for SOURCE.PLOT.APRESID");
    89110            return false;
    90111        }
     112        output->save = true;
    91113    }
    92114
Note: See TracChangeset for help on using the changeset viewer.