IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 30151


Ignore:
Timestamp:
Dec 24, 2010, 3:02:58 PM (15 years ago)
Author:
eugene
Message:

deprecate in-line photometry from ppSim

Location:
branches/eam_branches/ipp-20101205/ppSim/src
Files:
7 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20101205/ppSim/src/Makefile.am

    r28125 r30151  
    4747        ppSimUtils.c              \
    4848        ppSimLoop.c               \
    49         ppSimLoadSpots.c          \
    50         ppSimPhotom.c             \
    51         ppSimPhotomFiles.c        \
    52         ppSimLoadForceSources.c   \
    5349        ppSimMergeReadouts.c      \
    5450        ppSimDetections.c         \
     
    5955        ppSimBadCTE.c             \
    6056        ppSimVersion.c
    61 
    62 # these functions have been broken by the API change in psphot (Jan 2010)
    63 #       ppSimPhotomReadoutFake.c 
    64 #       ppSimPhotomReadoutForce.c
    6557
    6658ppSimSequence_CPPFLAGS = $(PSLIB_CFLAGS) $(PSMODULE_CFLAGS) $(PSASTRO_CFLAGS) $(ppSim_CFLAGS)
  • branches/eam_branches/ipp-20101205/ppSim/src/ppSimCreate.c

    r29125 r30151  
    132132    bool doPhotom = psMetadataLookupBool(&status, recipe, "PHOTOM"); // Density of fakes
    133133    if (doPhotom) {
    134 
    135         // XXX at the moment, we can perform photometry on the fake sources and the forced
    136         // photometry positions, but not one or the other.  Also, we only support photometry in
    137         // the context of an image previously analysed by psphot.  Add support for:
    138         // * photometry of a pure fake image (requires peak detection and psf creation)
    139         // * photometry of forced source positions without fake image (this might work, it just
    140         // requires not generating any fake features).
    141 
    142         if (!input) {
    143             psError(PS_ERR_UNKNOWN, false, "input image not found; currently required for photometry");
    144             return NULL;
    145         }
    146 
    147         // we need a chip image if we perform photometry (is it necessary to build it if we don't use it?)
    148         pmFPAfile *fakeImage = pmFPAfileDefineChipMosaic(config, output->fpa, "PPSIM.FAKE.CHIP");
    149         if (!fakeImage) {
    150             psError(PS_ERR_IO, false, _("Unable to generate new file from PPSIM.FAKE.CHIP"));
    151             psFree(fpa);
    152             return NULL;
    153         }
    154         if (fakeImage->type != PM_FPA_FILE_IMAGE) {
    155             psError(PS_ERR_IO, true, "PPSIM.FAKE.CHIP is not of type IMAGE");
    156             psFree(fpa);
    157             return NULL;
    158         }
    159 
    160         // we need a chip image if we perform photometry (is it necessary to build it if we don't use it?)
    161         pmFPAfile *forceImage = NULL;
    162         if (input) {
    163             forceImage = pmFPAfileDefineChipMosaic(config, input->fpa, "PPSIM.FORCE.CHIP");
    164             if (!forceImage) {
    165                 psError(PS_ERR_IO, false, _("Unable to generate new file from PPSIM.FORCE.CHIP"));
    166                 psFree(fpa);
    167                 return NULL;
    168             }
    169             if (forceImage->type != PM_FPA_FILE_IMAGE) {
    170                 psError(PS_ERR_IO, true, "PPSIM.FORCE.CHIP is not of type IMAGE");
    171                 psFree(fpa);
    172                 return NULL;
    173             }
    174         }
    175 
    176         // define associated psphot input/output files
    177         if (!ppSimPhotomFiles (config, fakeImage, forceImage)) {
    178             psError(PSPHOT_ERR_CONFIG, false, "Trouble defining the additional input/output files for psphot");
    179             psFree(fpa);
    180             return NULL;
    181         }
    182     } else {
    183         // have we supplied a psf model?  this happens in ppSimPhotomFiles if we request a photometry
    184         // analysis.  however, even if we do not, a psf model may be used to generate the fake
    185         // sources.
    186         if (psMetadataLookupPtr(NULL, config->arguments, "PSPHOT.PSF")) {
    187             // tie the psf file to the chipMosaic
    188             pmFPAfileBindFromArgs(&status, output, config, "PSPHOT.PSF.LOAD", "PSPHOT.PSF");
    189             if (!status) {
    190                 psError(PS_ERR_UNKNOWN, false, "Failed to find/build PSPHOT.PSF.LOAD");
    191                 psFree(fpa);
    192                 return NULL;
    193             }
    194         }
     134        psError(PS_ERR_UNKNOWN, false, "in-line photometry in ppSim had been deprecated");
     135        return NULL;
     136    }
     137
     138    // have we supplied a psf model?  this happens in ppSimPhotomFiles if we request a photometry
     139    // analysis.  however, even if we do not, a psf model may be used to generate the fake
     140    // sources.
     141    if (psMetadataLookupPtr(NULL, config->arguments, "PSPHOT.PSF")) {
     142        // tie the psf file to the chipMosaic
     143        pmFPAfileBindFromArgs(&status, output, config, "PSPHOT.PSF.LOAD", "PSPHOT.PSF");
     144        if (!status) {
     145            psError(PS_ERR_UNKNOWN, false, "Failed to find/build PSPHOT.PSF.LOAD");
     146            psFree(fpa);
     147            return NULL;
     148        }
    195149    }
    196150
  • branches/eam_branches/ipp-20101205/ppSim/src/ppSimLoop.c

    r28125 r30151  
    4242    if (type == PPSIM_TYPE_OBJECT) {
    4343        // Load forced-photometry positions (these are placed on fpa->analysis for use in ppSimPhotomReadout)
    44         if (!ppSimLoadSpots (fpa, config)) ESCAPE (PS_ERR_UNKNOWN, "failed to load forced-photometry spots");
     44        // if (!ppSimLoadSpots (fpa, config)) ESCAPE (PS_ERR_UNKNOWN, "failed to load forced-photometry spots");
    4545
    4646        // Load catalogue stars
     
    5858
    5959    pmFPAview *view = pmFPAviewAlloc(0);// View for iterating over FPA
    60 
    61     // XXX if we include the psphot analysis, we will need to activate the correct pmFPAfiles
    62     // at the correct times.  ppSim operates on PPSIM.OUTPUT and PPSIM.SOURCES
    6360
    6461    // load any needed files (eg, input image, PSF)
     
    209206
    210207        // we perform photometry on the readouts of this chip in the output
    211         if (!ppSimPhotom (config, view)) ESCAPE (PS_ERR_UNKNOWN, "problem performing photometry");
     208        // if (!ppSimPhotom (config, view)) ESCAPE (PS_ERR_UNKNOWN, "problem performing photometry");
    212209
    213210        if (!pmFPAfileIOChecks(config, view, PM_FPA_AFTER)) {
Note: See TracChangeset for help on using the changeset viewer.