- Timestamp:
- Feb 9, 2010, 8:24:35 PM (16 years ago)
- Location:
- branches/eam_branches/20091201/ppViz
- Files:
-
- 3 copied
-
. (copied) (copied from trunk/ppViz ) (1 prop)
-
src/ppVizPattern (copied) (copied from trunk/ppViz/src/ppVizPSF )
-
src/ppVizPattern/ppVizPatternCamera.c (copied) (copied from trunk/ppViz/src/ppVizPSF/ppVizPSFCamera.c ) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/20091201/ppViz
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/eam_branches/20091113/ppViz 26119-26255 /branches/pap/ppViz 26320
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
branches/eam_branches/20091201/ppViz/src/ppVizPattern/ppVizPatternCamera.c
r26827 r26837 7 7 #include <psmodules.h> 8 8 9 #include "ppVizP SF.h"9 #include "ppVizPattern.h" 10 10 11 11 /// Add a single filename to the arguments as an array, so that it can be used with pmFPAfileBindFromArgs, etc … … 27 27 28 28 29 bool ppVizP SFCamera(ppVizPSFData *data // Run-time data29 bool ppVizPatternCamera(ppVizPatternData *data // Run-time data 30 30 ) 31 31 { 32 32 bool status; // Status of file definition 33 33 34 fileArguments("PSF", data->psfName, "Input PSF", data->config); 35 pmFPAfile *psf = pmFPAfileDefineFromArgs(&status, data->config, "PSPHOT.PSF.LOAD", "PSF"); // File 36 if (!status || !psf) { 37 psError(PS_ERR_IO, false, "Failed to build file from PSPHOT.LOAD.PSF"); 34 fileArguments("PATTERN", data->patternName, "Input pattern", data->config); 35 pmFPAfile *input = pmFPAfileDefineFromArgs(&status, data->config, "PPVIZPATTERN.INPUT", 36 "PATTERN"); // File 37 if (!status || !input) { 38 psError(PS_ERR_IO, false, "Failed to build file from PPVIZPATTERN.INPUT"); 38 39 return false; 39 40 } 40 41 41 if (data->sourcesName) { 42 fileArguments("SOURCES", data->sourcesName, "Input sources", data->config); 43 pmFPAfile *srcs = pmFPAfileBindFromArgs(&status, psf, data->config, 44 "PSPHOT.INPUT.CMF", "SOURCES"); // File 45 if (!status || !srcs) { 46 psError(PS_ERR_IO, false, "Failed to build file from PSPHOT.INPUT.CMF"); 47 return false; 48 } 49 } 50 51 pmFPAfile *output = pmFPAfileDefineOutput(data->config, psf->fpa, "PPVIZPSF.OUTPUT"); 42 pmFPAfile *output = pmFPAfileDefineOutput(data->config, input->fpa, "PPVIZPATTERN.OUTPUT"); 52 43 if (!output) { 53 44 psError(psErrorCodeLast(), false, "Unable to define output."); … … 56 47 output->save = true; 57 48 49 #if 0 58 50 // Now the camera has been determined, we can read the recipe 59 psMetadata *recipe = psMetadataLookupMetadata(NULL, data->config->recipes, PPVIZP SF_RECIPE); // Recipe51 psMetadata *recipe = psMetadataLookupMetadata(NULL, data->config->recipes, PPVIZPATTERN_RECIPE); // Recipe 60 52 if (!recipe) { 61 psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to find recipe %s", PPVIZP SF_RECIPE);53 psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to find recipe %s", PPVIZPATTERN_RECIPE); 62 54 return false; 63 55 } 64 65 data->minFlux = psMetadataLookupF32(NULL, recipe, "MINFLUX"); // Minimum flux 66 if (!isfinite(data->minFlux) || data->minFlux <= 0) { 67 psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Unable to find legitimate value for MINFLUX"); 68 return false; 69 } 70 71 if (!data->sourcesName) { 72 data->size = psMetadataLookupS32(NULL, recipe, "SIZE"); // Size of PSF 73 if (data->size <= 0) { 74 psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Unable to find legitimate value for SIZE"); 75 return false; 76 } 77 } 56 #endif 78 57 79 58 return true;
Note:
See TracChangeset
for help on using the changeset viewer.
