IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 5, 2008, 11:20:38 AM (18 years ago)
Author:
Paul Price
Message:

Only create output PSF for ppStack when photometry isn't being
performed. When it is, the file already exists.
PSFs aren't optional.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppStack/src/ppStackCamera.c

    r16829 r16831  
    7272{
    7373    bool haveWeights = false;           // Do we have weight maps?
    74     bool havePSFs = false;              // Do we have PSFs?
    7574
    7675    psMetadata *inputs = psMetadataLookupMetadata(NULL, config->arguments, "INPUTS"); // The inputs info
     
    168167        }
    169168
    170         // Optionally add the psf file
    171         if (psf && strlen(psf) > 0) {
    172             havePSFs = true;
     169        // Add the psf file
     170        if (!psf || strlen(psf) == 0) {
     171            psError(PS_ERR_UNEXPECTED_NULL, true, "Unable to find PSF %d", i);
     172            return false;
     173        } else {
    173174            psArray *psfFiles = psArrayAlloc(1); // Array of filenames for this FPA
    174175            psfFiles->data[0] = psMemIncrRefCounter(psf);
     
    315316
    316317
    317     // Output PSF
    318     if (havePSFs) {
    319         pmFPAfile *outPSF = pmFPAfileDefineOutput(config, output->fpa, "PSPHOT.PSF.SAVE");
    320         if (!outPSF) {
    321             psError(PS_ERR_IO, false, _("Unable to generate output file from PSPHOT.PSF.SAVE"));
    322             return false;
    323         }
    324         if (outPSF->type != PM_FPA_FILE_PSF) {
    325             psError(PS_ERR_IO, true, "PSPHOT.PSF.SAVE is not of type PSF");
    326             return false;
    327         }
    328         outPSF->save = true;
    329     }
    330 
    331     // Sources for use as stamps
    332     bool status = false;                // Found the file?
    333     pmFPAfile *sources = pmFPAfileDefineFromArgs(&status, config, "PPSTACK.SOURCES", "PPSTACK.SOURCES");
    334     if (!status) {
    335         psError(PS_ERR_IO, false, "Failed to load file definition PPSTACK.SOURCES");
    336         return false;
    337     }
    338     if (sources && sources->type != PM_FPA_FILE_CMF) {
    339         psError(PS_ERR_IO, true, "PPSTACK.SOURCES is not of type CMF");
    340         return false;
    341     }
    342 
    343318    // For photometry, we operate on the chip-mosaicked image
    344319    // we create a copy of the mosaicked image for psphot so we can write out a clean image
     
    360335            return false;
    361336        }
     337    } else {
     338        // Output PSF --- only required if photometry is not being performed
     339        pmFPAfile *outPSF = pmFPAfileDefineOutput(config, output->fpa, "PSPHOT.PSF.SAVE");
     340        if (!outPSF) {
     341            psError(PS_ERR_IO, false, _("Unable to generate output file from PSPHOT.PSF.SAVE"));
     342            return false;
     343        }
     344        if (outPSF->type != PM_FPA_FILE_PSF) {
     345            psError(PS_ERR_IO, true, "PSPHOT.PSF.SAVE is not of type PSF");
     346            return false;
     347        }
     348        outPSF->save = true;
     349    }
     350
     351    // Sources for use as stamps
     352    bool status = false;                // Found the file?
     353    pmFPAfile *sources = pmFPAfileDefineFromArgs(&status, config, "PPSTACK.SOURCES", "PPSTACK.SOURCES");
     354    if (!status) {
     355        psError(PS_ERR_IO, false, "Failed to load file definition PPSTACK.SOURCES");
     356        return false;
     357    }
     358    if (sources && sources->type != PM_FPA_FILE_CMF) {
     359        psError(PS_ERR_IO, true, "PPSTACK.SOURCES is not of type CMF");
     360        return false;
    362361    }
    363362
Note: See TracChangeset for help on using the changeset viewer.