IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 8, 2008, 4:03:31 PM (18 years ago)
Author:
eugene
Message:

update from changes on eam_branch_20080511 : adding photometry of fake sources, force photometry; major cleanups

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppSim/src/ppSim.h

    r17557 r18011  
    1313#include <psmodules.h>
    1414#include <psastro.h>
     15#include <psphot.h>
    1516
    1617#define PPSIM_RECIPE "PPSIM"
    17 #define OUTPUT_FILE "PPSIM.OUTPUT"
     18// #define OUTPUT_FILE "PPSIM.OUTPUT"
    1819
    1920// 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; }       \
    2324    }
    2425
     
    7071
    7172/// Parse command-line arguments
    72 void ppSimArguments(int argc, char *argv[], ///< Command-line arguments
     73bool ppSimArguments(int argc, char **argv, ///< Command-line arguments
    7374                    pmConfig *config ///< Configuration
    74                     );
     75    );
    7576
    7677/// Create output file
     
    7879/// Returns a borrowed pointer to the FPA file.
    7980pmFPAfile *ppSimCreate(pmConfig *config ///< Configuration
    80                        );
     81    );
    8182
    8283// Return bounds of a chip, based on the concepts
    8384psRegion *ppSimChipBounds(const pmChip *chip, // Chip for which to determine size
    8485                          pmFPAview *view // View for chip
    85                           );
     86    );
    8687
    8788// Return bounds of an FPA, based on the concepts
    8889psRegion *ppSimFPABounds(const pmFPA *fpa       // FPA for which to determine size
    89                          );
     90    );
    9091
    9192/// Loop over the output file, generating simulated data
    9293bool ppSimLoop(pmConfig *config ///< Configuration
    93                  );
     94    );
    9495
    9596psVector *ppSimMakeBiassec (pmCell *cell, pmConfig *config);
    96 psVector *ppSimMakeBias (pmReadout *readout, pmConfig *config, const psRandom *rng) ;
     97psVector *ppSimMakeBias (bool *status, pmReadout *readout, pmConfig *config, const psRandom *rng) ;
    9798bool ppSimMakeDark (pmReadout *readout, pmConfig *config);
    9899bool ppSimMakeSky (pmReadout *readout, psImage *expCorr, ppSimType type, pmConfig *config);
     100
     101bool ppSimLoadSpots (pmFPA *fpa, pmConfig *config);
    99102
    100103bool ppSimLoadStars (psArray *stars, pmFPA *fpa, pmConfig *config);
     
    127130bool ppSimInsertGalaxies (pmReadout *readout, psImage *expCorr, psArray *galaxies, pmConfig *config);
    128131
     132bool ppSimMosaicChip(pmConfig *config, const psMaskType blankMask, const pmFPAview *view,
     133                     const char *outFile, const char *inFile);
     134
     135bool ppSimPhotom (pmConfig *config, pmFPAview *view);
     136
     137
    129138/// Add bad pixels to an image
    130139bool ppSimBadPixels(pmReadout *readout, ///< Readout for which to generate bad pixels
     
    139148float ppSimMagToFlux (float mag, float zp);
    140149
     150float 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
     157int 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
     164char *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
     171bool 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
     178ppSimType ppSimTypeFromString (char *typeStr);
     179char *ppSimTypeToString (ppSimType type);
     180
     181float ppSimGetZeroPoint (psMetadata *recipe, char *filter);
     182
     183bool ppSimMergeReadouts (pmConfig *config, pmFPAview *view);
     184
     185double ppSimRandomGaussian (const psRandom *rnd, double mean, double sigma);
     186double ppSimRandomGaussianNorm (const psRandom *rnd);
     187void ppSimRandomGaussianFree();
     188
     189bool ppSimPhotomFiles (pmConfig *config, pmFPAfile *fakeFile, pmFPAfile *forceFile);
     190
     191bool ppSimPhotomReadoutFake(pmConfig *config, const pmFPAview *view);
     192bool ppSimPhotomReadoutForce(pmConfig *config, const pmFPAview *view);
     193
     194psArray *ppSimLoadForceSources(pmConfig *config, const pmFPAview *view);
     195bool ppSimDetections (psImage *significance, psMetadata *recipe, psArray *sources);
     196psArray *ppSimMergeSources (psArray *in1, psArray *in2);
     197
     198psArray *ppSimSelectSources (pmConfig *config, const pmFPAview *view, const char *filename);
     199bool ppSimDefinePixels (psArray *sources, pmReadout *readout, psMetadata *recipe);
     200
    141201#endif
Note: See TracChangeset for help on using the changeset viewer.