Changeset 35538
- Timestamp:
- May 9, 2013, 6:22:55 AM (13 years ago)
- Location:
- branches/eam_branches/ipp-20130419/pswarp
- Files:
-
- 2 edited
-
doc/notes.20130406.txt (modified) (1 diff)
-
src/pswarpParseCamera.c (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20130419/pswarp/doc/notes.20130406.txt
r35512 r35538 1 2 20130406 1 3 2 4 examining pswarp to handle inverse transformations or more general transformations: -
branches/eam_branches/ipp-20130419/pswarp/src/pswarpParseCamera.c
r35535 r35538 64 64 } 65 65 66 // use the skycell camera or the input camera? 67 bool useInputCamera = !strcmp (skycell->cameraName, "SIMPLE"); 68 66 69 // The output skycell 67 pmFPAfile *output = pmFPAfileDefineOutputForFormat(config, NULL, "PSWARP.OUTPUT", skycell->cameraName, skycell->formatName); 70 pmFPAfile *output = useInputCamera ? 71 pmFPAfileDefineSkycell(config, NULL, "PSWARP.OUTPUT") : 72 pmFPAfileDefineOutputForFormat(config, NULL, "PSWARP.OUTPUT", skycell->cameraName, skycell->formatName); 68 73 if (!output) { 69 74 psError(psErrorCodeLast(), false, "Failed to build FPA from PSWARP.OUTPUT"); … … 72 77 output->save = true; 73 78 74 pmFPAfile *outMask = pmFPAfileDefineOutputForFormat(config, output->fpa, "PSWARP.OUTPUT.MASK", skycell->cameraName, skycell->formatName); 79 pmFPAfile *outMask = useInputCamera ? 80 pmFPAfileDefineSkycell(config, output->fpa, "PSWARP.OUTPUT.MASK"): 81 pmFPAfileDefineOutputForFormat(config, output->fpa, "PSWARP.OUTPUT.MASK", skycell->cameraName, skycell->formatName); 75 82 if (!outMask) { 76 83 psError(psErrorCodeLast(), false, "Failed to build FPA from PSWARP.OUTPUT.MASK"); … … 81 88 // only create an output variance in we supply an input variance 82 89 if (foundVariance) { 83 pmFPAfile *outVariance = pmFPAfileDefineOutputForFormat(config, output->fpa, "PSWARP.OUTPUT.VARIANCE", skycell->cameraName, skycell->formatName); 90 pmFPAfile *outVariance = useInputCamera ? 91 pmFPAfileDefineSkycell(config, output->fpa, "PSWARP.OUTPUT.VARIANCE"): 92 pmFPAfileDefineOutputForFormat(config, output->fpa, "PSWARP.OUTPUT.VARIANCE", skycell->cameraName, skycell->formatName); 84 93 if (!outVariance) { 85 94 psError(psErrorCodeLast(), false, "Failed to build FPA from PSWARP.OUTPUT.VARIANCE"); … … 91 100 // XXX we assume input sources come from the input astrom description, but this need not be true (we could define an input sources file) 92 101 if (foundAstrom && psMetadataLookupBool(&status, recipe, "SOURCES")) { 93 pmFPAfile *outSources = pmFPAfileDefineOutputForFormat(config, output->fpa, "PSWARP.OUTPUT.SOURCES", skycell->cameraName, skycell->formatName); 102 pmFPAfile *outSources = useInputCamera ? 103 pmFPAfileDefineSkycell(config, output->fpa, "PSWARP.OUTPUT.SOURCES"): 104 pmFPAfileDefineOutputForFormat(config, output->fpa, "PSWARP.OUTPUT.SOURCES", skycell->cameraName, skycell->formatName); 94 105 if (!outSources) { 95 106 psError(psErrorCodeLast(), false, "Failed to build FPA from PSWARP.OUTPUT.SOURCES"); … … 102 113 if (foundBackground && psMetadataLookupBool(&status, recipe, "BACKGROUND.MODEL")) { 103 114 // pmFPAfile *outBackground = pmFPAfileDefineSkycell(config, NULL, "PSWARP.OUTPUT.BKGMODEL"); 104 pmFPAfile *outBackground = pmFPAfileDefineOutputForFormat(config, NULL, "PSWARP.OUTPUT.BKGMODEL", skycell->cameraName, skycell->formatName); 115 pmFPAfile *outBackground = useInputCamera ? 116 pmFPAfileDefineSkycell(config, NULL, "PSWARP.OUTPUT.BKGMODEL"): 117 pmFPAfileDefineOutputForFormat(config, NULL, "PSWARP.OUTPUT.BKGMODEL", skycell->cameraName, skycell->formatName); 105 118 outBackground->xBin = psMetadataLookupS32(&status, recipe, "BKG.XGRID"); 106 119 outBackground->yBin = psMetadataLookupS32(&status, recipe, "BKG.YGRID"); … … 115 128 if (psMetadataLookupBool(&status, recipe, "PSF")) { 116 129 // This file, PSPHOT.INPUT, is just used as a carrier; output files (eg, PSPHOT.RESID) are defined by psphotDefineFiles 117 pmFPAfile *psphotInput = pmFPAfileDefineOutputForFormat(config, NULL, "PSPHOT.INPUT", skycell->cameraName, skycell->formatName); 130 pmFPAfile *psphotInput = useInputCamera ? 131 pmFPAfileDefineSkycell(config, NULL, "PSPHOT.INPUT"): 132 pmFPAfileDefineOutputForFormat(config, NULL, "PSPHOT.INPUT", skycell->cameraName, skycell->formatName); 118 133 if (!psphotInput) { 119 134 psError(psErrorCodeLast(), false, _("Unable to generate output file from PSPHOT.INPUT")); … … 131 146 132 147 // pmFPAfile *psphotInSources = pmFPAfileDefineSkycell(config, output->fpa, "PSPHOT.INPUT.CMF"); 133 pmFPAfile *psphotInSources = pmFPAfileDefineOutputForFormat(config, output->fpa, "PSPHOT.INPUT.CMF", skycell->cameraName, skycell->formatName); 148 pmFPAfile *psphotInSources = useInputCamera ? 149 pmFPAfileDefineSkycell(config, output->fpa, "PSPHOT.INPUT.CMF"): 150 pmFPAfileDefineOutputForFormat(config, output->fpa, "PSPHOT.INPUT.CMF", skycell->cameraName, skycell->formatName); 134 151 if (!psphotInSources) { 135 152 psError(psErrorCodeLast(), false, _("Unable to generate output file from PSPHOT.INPUT.CMF"));
Note:
See TracChangeset
for help on using the changeset viewer.
