- Timestamp:
- Jun 5, 2008, 5:16:44 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branch_20080511/ppSim/src/ppSimPhotomFiles.c
r17901 r17958 2 2 3 3 // define the needed / desired I/O files 4 bool ppSimPhotomFiles (pmConfig *config, pmFPAfile * input) {4 bool ppSimPhotomFiles (pmConfig *config, pmFPAfile *fakeFile, pmFPAfile *forceFile) { 5 5 6 6 bool status = false; … … 13 13 int DX = psMetadataLookupS32 (&status, recipe, "BACKGROUND.XBIN"); 14 14 int DY = psMetadataLookupS32 (&status, recipe, "BACKGROUND.YBIN"); 15 pmFPAfile *output = pmFPAfileDefineFromFile (config, input, DX, DY, "PSPHOT.BACKMDL");15 pmFPAfile *output = pmFPAfileDefineFromFile (config, fakeFile, DX, DY, "PSPHOT.BACKMDL"); 16 16 if (!output) { 17 17 psError(PSPHOT_ERR_CONFIG, false, "Cannot find a rule for PSPHOT.BACKMDL"); … … 24 24 int DX = psMetadataLookupS32 (&status, recipe, "BACKGROUND.XBIN"); 25 25 int DY = psMetadataLookupS32 (&status, recipe, "BACKGROUND.YBIN"); 26 pmFPAfile *output = pmFPAfileDefineFromFile (config, input, DX, DY, "PSPHOT.BACKMDL.STDEV");26 pmFPAfile *output = pmFPAfileDefineFromFile (config, fakeFile, DX, DY, "PSPHOT.BACKMDL.STDEV"); 27 27 if (!output) { 28 28 psError(PSPHOT_ERR_CONFIG, false, "Cannot find a rule for PSPHOT.BACKMDL.STDEV"); … … 33 33 // optionally save the full background image 34 34 if (psMetadataLookupBool(NULL, recipe, "SAVE.BACKGND")) { 35 pmFPAfile *output = pmFPAfileDefineFromFile (config, input, 1, 1, "PSPHOT.BACKGND");35 pmFPAfile *output = pmFPAfileDefineFromFile (config, fakeFile, 1, 1, "PSPHOT.BACKGND"); 36 36 if (!output) { 37 37 psError(PSPHOT_ERR_CONFIG, false, "Cannot find a rule for PSPHOT.BACKGND"); … … 42 42 // optionally save the background-subtracted image 43 43 if (psMetadataLookupBool(NULL, recipe, "SAVE.BACKSUB")) { 44 pmFPAfile *output = pmFPAfileDefineFromFile (config, input, 1, 1, "PSPHOT.BACKSUB");44 pmFPAfile *output = pmFPAfileDefineFromFile (config, fakeFile, 1, 1, "PSPHOT.BACKSUB"); 45 45 if (!output) { 46 46 psError(PSPHOT_ERR_CONFIG, false, "Cannot find a rule for PSPHOT.BACKSUB"); … … 57 57 } 58 58 59 // the fake sources are carried on the input->fpa structures60 pmFPAfile *outsources = pmFPAfileDefineOutput FromFile (config, input, "PPSIM.FAKE.SOURCES");59 // the fake sources are carried on the fakeFile->fpa structures (PPSIM.FAKE.CHIP) 60 pmFPAfile *outsources = pmFPAfileDefineOutput (config, fakeFile->fpa, "PPSIM.FAKE.SOURCES"); 61 61 if (!outsources) { 62 62 psError(PSPHOT_ERR_CONFIG, false, "Cannot find a rule for PPSIM.FAKE.SOURCES"); … … 65 65 outsources->save = true; 66 66 67 // the forced sources are carried on the forceFile->fpa structures (PPSIM.FORCE.CHIP) 68 pmFPAfile *outforced = pmFPAfileDefineOutput (config, forceFile->fpa, "PPSIM.FORCE.SOURCES"); 69 if (!outforced) { 70 psError(PSPHOT_ERR_CONFIG, false, "Cannot find a rule for PPSIM.FORCE.SOURCES"); 71 return false; 72 } 73 outforced->save = true; 74 67 75 // we bind the psffile to the chip-mosaicked image so we have a reference to the image 68 pmFPAfile *psffile = pmFPAfileBindFromArgs(&status, input, config, "PSPHOT.PSF.LOAD", "PSPHOT.PSF");76 pmFPAfile *psffile = pmFPAfileBindFromArgs(&status, fakeFile, config, "PSPHOT.PSF.LOAD", "PSPHOT.PSF"); 69 77 if (!psffile) { 70 78 psError(PSPHOT_ERR_CONFIG, false, "Failed to find/build PSPHOT.PSF.LOAD");
Note:
See TracChangeset
for help on using the changeset viewer.
