Changeset 18011 for trunk/ppSim/src/ppSim.h
- Timestamp:
- Jun 8, 2008, 4:03:31 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/ppSim/src/ppSim.h (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppSim/src/ppSim.h
r17557 r18011 13 13 #include <psmodules.h> 14 14 #include <psastro.h> 15 #include <psphot.h> 15 16 16 17 #define PPSIM_RECIPE "PPSIM" 17 #define OUTPUT_FILE "PPSIM.OUTPUT"18 // #define OUTPUT_FILE "PPSIM.OUTPUT" 18 19 19 20 // Compare a value with minimum and maximum values, replacing where required. 20 #define COMPARE(VALUE,MIN,MAX) { \21 if (VALUE < MIN) { MIN = VALUE; } \22 if (VALUE > MAX) { MAX = VALUE; } \21 #define COMPARE(VALUE,MIN,MAX) { \ 22 if (VALUE < MIN) { MIN = VALUE; } \ 23 if (VALUE > MAX) { MAX = VALUE; } \ 23 24 } 24 25 … … 70 71 71 72 /// Parse command-line arguments 72 void ppSimArguments(int argc, char *argv[], ///< Command-line arguments73 bool ppSimArguments(int argc, char **argv, ///< Command-line arguments 73 74 pmConfig *config ///< Configuration 74 );75 ); 75 76 76 77 /// Create output file … … 78 79 /// Returns a borrowed pointer to the FPA file. 79 80 pmFPAfile *ppSimCreate(pmConfig *config ///< Configuration 80 );81 ); 81 82 82 83 // Return bounds of a chip, based on the concepts 83 84 psRegion *ppSimChipBounds(const pmChip *chip, // Chip for which to determine size 84 85 pmFPAview *view // View for chip 85 );86 ); 86 87 87 88 // Return bounds of an FPA, based on the concepts 88 89 psRegion *ppSimFPABounds(const pmFPA *fpa // FPA for which to determine size 89 );90 ); 90 91 91 92 /// Loop over the output file, generating simulated data 92 93 bool ppSimLoop(pmConfig *config ///< Configuration 93 );94 ); 94 95 95 96 psVector *ppSimMakeBiassec (pmCell *cell, pmConfig *config); 96 psVector *ppSimMakeBias ( pmReadout *readout, pmConfig *config, const psRandom *rng) ;97 psVector *ppSimMakeBias (bool *status, pmReadout *readout, pmConfig *config, const psRandom *rng) ; 97 98 bool ppSimMakeDark (pmReadout *readout, pmConfig *config); 98 99 bool ppSimMakeSky (pmReadout *readout, psImage *expCorr, ppSimType type, pmConfig *config); 100 101 bool ppSimLoadSpots (pmFPA *fpa, pmConfig *config); 99 102 100 103 bool ppSimLoadStars (psArray *stars, pmFPA *fpa, pmConfig *config); … … 127 130 bool ppSimInsertGalaxies (pmReadout *readout, psImage *expCorr, psArray *galaxies, pmConfig *config); 128 131 132 bool ppSimMosaicChip(pmConfig *config, const psMaskType blankMask, const pmFPAview *view, 133 const char *outFile, const char *inFile); 134 135 bool ppSimPhotom (pmConfig *config, pmFPAview *view); 136 137 129 138 /// Add bad pixels to an image 130 139 bool ppSimBadPixels(pmReadout *readout, ///< Readout for which to generate bad pixels … … 139 148 float ppSimMagToFlux (float mag, float zp); 140 149 150 float ppSimArgToRecipeF32(bool *status, 151 psMetadata *options, // Target to which to add value 152 const char *recipeName, // Name for value in the recipe 153 psMetadata *arguments, // Command-line arguments 154 const char *argName // Argument name in the command-line arguments 155 ); 156 157 int ppSimArgToRecipeS32(bool *status, 158 psMetadata *options, // Target to which to add value 159 const char *recipeName, // Name for value in the recipe 160 psMetadata *arguments, // Command-line arguments 161 const char *argName // Argument name in the command-line arguments 162 ); 163 164 char *ppSimArgToRecipeStr(bool *status, 165 psMetadata *options, // Target to which to add value 166 const char *recipeName, // Name for value in the recipe 167 psMetadata *arguments, // Command-line arguments 168 const char *argName // Argument name in the command-line arguments 169 ); 170 171 bool ppSimArgToRecipeBool(bool *status, 172 psMetadata *options, // Target to which to add value 173 const char *recipeName, // Name for value in the recipe 174 psMetadata *arguments, // Command-line arguments 175 const char *argName // Argument name in the command-line arguments 176 ); 177 178 ppSimType ppSimTypeFromString (char *typeStr); 179 char *ppSimTypeToString (ppSimType type); 180 181 float ppSimGetZeroPoint (psMetadata *recipe, char *filter); 182 183 bool ppSimMergeReadouts (pmConfig *config, pmFPAview *view); 184 185 double ppSimRandomGaussian (const psRandom *rnd, double mean, double sigma); 186 double ppSimRandomGaussianNorm (const psRandom *rnd); 187 void ppSimRandomGaussianFree(); 188 189 bool ppSimPhotomFiles (pmConfig *config, pmFPAfile *fakeFile, pmFPAfile *forceFile); 190 191 bool ppSimPhotomReadoutFake(pmConfig *config, const pmFPAview *view); 192 bool ppSimPhotomReadoutForce(pmConfig *config, const pmFPAview *view); 193 194 psArray *ppSimLoadForceSources(pmConfig *config, const pmFPAview *view); 195 bool ppSimDetections (psImage *significance, psMetadata *recipe, psArray *sources); 196 psArray *ppSimMergeSources (psArray *in1, psArray *in2); 197 198 psArray *ppSimSelectSources (pmConfig *config, const pmFPAview *view, const char *filename); 199 bool ppSimDefinePixels (psArray *sources, pmReadout *readout, psMetadata *recipe); 200 141 201 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
