Changeset 30151
- Timestamp:
- Dec 24, 2010, 3:02:58 PM (15 years ago)
- Location:
- branches/eam_branches/ipp-20101205/ppSim/src
- Files:
-
- 7 deleted
- 3 edited
-
Makefile.am (modified) (2 diffs)
-
ppSimCreate.c (modified) (1 diff)
-
ppSimLoadForceSources.c (deleted)
-
ppSimLoadSpots.c (deleted)
-
ppSimLoop.c (modified) (3 diffs)
-
ppSimPhotom.c (deleted)
-
ppSimPhotomFiles.c (deleted)
-
ppSimPhotomReadout.c (deleted)
-
ppSimPhotomReadoutFake.c (deleted)
-
ppSimPhotomReadoutForce.c (deleted)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20101205/ppSim/src/Makefile.am
r28125 r30151 47 47 ppSimUtils.c \ 48 48 ppSimLoop.c \ 49 ppSimLoadSpots.c \50 ppSimPhotom.c \51 ppSimPhotomFiles.c \52 ppSimLoadForceSources.c \53 49 ppSimMergeReadouts.c \ 54 50 ppSimDetections.c \ … … 59 55 ppSimBadCTE.c \ 60 56 ppSimVersion.c 61 62 # these functions have been broken by the API change in psphot (Jan 2010)63 # ppSimPhotomReadoutFake.c64 # ppSimPhotomReadoutForce.c65 57 66 58 ppSimSequence_CPPFLAGS = $(PSLIB_CFLAGS) $(PSMODULE_CFLAGS) $(PSASTRO_CFLAGS) $(ppSim_CFLAGS) -
branches/eam_branches/ipp-20101205/ppSim/src/ppSimCreate.c
r29125 r30151 132 132 bool doPhotom = psMetadataLookupBool(&status, recipe, "PHOTOM"); // Density of fakes 133 133 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 } 195 149 } 196 150 -
branches/eam_branches/ipp-20101205/ppSim/src/ppSimLoop.c
r28125 r30151 42 42 if (type == PPSIM_TYPE_OBJECT) { 43 43 // 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"); 45 45 46 46 // Load catalogue stars … … 58 58 59 59 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 pmFPAfiles62 // at the correct times. ppSim operates on PPSIM.OUTPUT and PPSIM.SOURCES63 60 64 61 // load any needed files (eg, input image, PSF) … … 209 206 210 207 // 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"); 212 209 213 210 if (!pmFPAfileIOChecks(config, view, PM_FPA_AFTER)) {
Note:
See TracChangeset
for help on using the changeset viewer.
