Changeset 23719 for branches/pap/ppSub/src/ppSubLoop.c
- Timestamp:
- Apr 6, 2009, 6:52:51 PM (17 years ago)
- Location:
- branches/pap/ppSub/src
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ppSubLoop.c (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/pap/ppSub/src
- Property svn:ignore
-
old new 10 10 stamp-h1 11 11 ppSubKernel 12 ppSubErrorCodes.h 13 ppSubErrorCodes.c
-
- Property svn:ignore
-
branches/pap/ppSub/src/ppSubLoop.c
r23711 r23719 17 17 #include <pslib.h> 18 18 #include <psmodules.h> 19 #include <ppStats.h>20 19 21 20 #include "ppSub.h" … … 70 69 } 71 70 72 if (!ppSubDefineOutput("PPSUB.OUTPUT", config , data, view)) {71 if (!ppSubDefineOutput("PPSUB.OUTPUT", config)) { 73 72 psError(PS_ERR_UNKNOWN, false, "Unable to define output."); 74 73 return false; 75 74 } 76 75 77 if (!data->quality && !ppSubMakePSF( "PPSUB.OUTPUT", "PPSUB.INVERSE", config, data, view)) {76 if (!data->quality && !ppSubMakePSF(config, data)) { 78 77 psError(PS_ERR_UNKNOWN, false, "Unable to generate PSF."); 79 78 return false; 80 79 } 81 80 82 if (!ppSubReadoutSubtract( "PPSUB.OUTPUT", config, view)) {81 if (!ppSubReadoutSubtract(config)) { 83 82 psError(PS_ERR_UNKNOWN, false, "Unable to subtract images."); 84 83 return false; … … 86 85 87 86 // Close convolved files 88 if (!ppSubFilesIterateUp(config, PPSUB_FILES_ CONV)) {87 if (!ppSubFilesIterateUp(config, PPSUB_FILES_PSF | PPSUB_FILES_CONV)) { 89 88 psError(PPSUB_ERR_IO, false, "Unable to close input files."); 90 89 return false; … … 92 91 93 92 // Higher order background subtraction using psphot 94 if (!ppSubBackground(config , view)) {93 if (!ppSubBackground(config)) { 95 94 psError(PS_ERR_UNKNOWN, false, "Unable to subtract background."); 96 95 return false; 97 96 } 98 97 99 if (!data->quality && ppSubReadoutPhotometry("PPSUB.OUTPUT", PPSUB_FILES_PHOT_SUB, config, data, view)) { 98 if (!ppSubFilesIterateDown(config, PPSUB_FILES_PHOT_SUB)) { 99 psError(PPSUB_ERR_IO, false, "Unable to set up photometry files."); 100 return false; 101 } 102 103 if (!data->quality && !ppSubReadoutPhotometry("PPSUB.OUTPUT", config, data)) { 100 104 psError(PS_ERR_UNKNOWN, false, "Unable to perform photometry."); 101 105 return false; 102 106 } 103 107 108 if (!ppSubFilesIterateUp(config, PPSUB_FILES_PHOT_SUB)) { 109 psError(PPSUB_ERR_IO, false, "Unable to set up photometry files."); 110 return false; 111 } 112 104 113 // Perform statistics on the cell 105 if (!ppSubReadoutStats(config, data , view)) {114 if (!ppSubReadoutStats(config, data)) { 106 115 psError(PS_ERR_UNKNOWN, false, "Unable to collect statistics"); 107 116 return false; 108 117 } 109 118 110 if (!ppSubReadoutJpeg( "PPSUB.OUTPUT", config, data, view)) {119 if (!ppSubReadoutJpeg(config)) { 111 120 psError(PS_ERR_UNKNOWN, false, "Unable to update."); 112 121 return false; … … 120 129 } 121 130 122 if (data->inverse && !ppSubDefineOutput("PPSUB.INVERSE", config , data, view)) {131 if (data->inverse && !ppSubDefineOutput("PPSUB.INVERSE", config)) { 123 132 psError(PS_ERR_UNKNOWN, false, "Unable to define inverse."); 124 133 return false; 125 134 } 126 135 127 if (!ppSubReadoutInverse( "PPSUB.INVERSE", "PPSUB.OUTPUT", config, view)) {136 if (!ppSubReadoutInverse(config)) { 128 137 psError(PS_ERR_UNKNOWN, false, "Unable to invert images."); 129 138 return false; … … 136 145 } 137 146 138 if (!data->quality && data->!ppSubReadoutPhotometry("PPSUB.INVERSE", PPSUB_FILES_PHOT_INV, 139 config, data, view)) { 147 if (!ppSubFilesIterateDown(config, PPSUB_FILES_PHOT_INV)) { 148 psError(PPSUB_ERR_IO, false, "Unable to set up inverse files."); 149 return false; 150 } 151 152 if (!data->quality && !ppSubReadoutPhotometry("PPSUB.INVERSE", config, data)) { 140 153 psError(PS_ERR_UNKNOWN, false, "Unable to perform photometry."); 141 154 return false; … … 143 156 144 157 // Close inverse subtraction files 145 if (!ppSubFilesIterateUp(config, PPSUB_FILES_INV )) {158 if (!ppSubFilesIterateUp(config, PPSUB_FILES_INV | PPSUB_FILES_PHOT_INV)) { 146 159 psError(PPSUB_ERR_IO, false, "Unable to close subtraction files."); 147 160 return false; … … 155 168 } 156 169 157 psFree(view); 158 159 psString dump_file = psMetadataLookupStr(&mdok, config->arguments, "-dumpconfig"); 170 psString dump_file = psMetadataLookupStr(NULL, config->arguments, "-dumpconfig"); 160 171 if (dump_file) { 161 172 pmFPAfile *input = psMetadataLookupPtr(NULL, config->files, "PPSUB.INPUT"); // Input file … … 164 175 165 176 return true; 166 167 ERROR:168 return false;169 177 }
Note:
See TracChangeset
for help on using the changeset viewer.
