IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 3, 2007, 10:01:23 AM (19 years ago)
Author:
eugene
Message:

consolidating includes in ppImage.h; adding ppImageMetadataStats and ppImagePixelStats

File:
1 edited

Legend:

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

    r13970 r14000  
    1414#include "psphot.h"
    1515#include "psastro.h"
    16 #include "ppImageOptions.h"
     16#include "ppStats.h"
    1717
    1818#define RECIPE_NAME "PPIMAGE"           // Name of the recipe to use
    1919#define TIMERNAME "ppImage"             // Name of timer
     20
     21// Options for ppImage processing
     22typedef struct {
     23    bool doMask;                        // Mask bad pixels
     24    psMaskType maskValue;               // apply this bit-mask to choose masked bits
     25    psMaskType satMask;                 // Mask value to give saturated pixels
     26    psMaskType badMask;                 // Mask value to give bad pixels
     27    psMaskType flatMask;                // Mask value to give bad flat pixels
     28    psMaskType blankMask;               // Mask value to give blank pixels
     29
     30    bool doBias;                        // Bias subtraction
     31    bool doDark;                        // Dark subtraction
     32    bool doShutter;                     // Shutter correction
     33    bool doFlat;                        // Flat-field normalisation
     34    bool doFringe;                      // Fringe subtraction
     35    bool doPhotom;                      // Source identification and photometry
     36    bool doAstromChip;                  // per-chip Astrometry
     37    bool doAstromMosaic;                // full-mosaic Astrometry
     38    bool doAddstar;                     // add results to object database?
     39
     40    bool doOverscan;                    // Overscan subtraction
     41    pmOverscanOptions *overscan;        // Overscan options
     42
     43    bool doNonLin;                      // Non-linearity correction
     44    psDataType nonLinearType;
     45    psMetadataItem *nonLinearData;
     46    void *nonLinearSource;
     47
     48    bool doStats;
     49
     50    bool BaseFITS;
     51    bool ChipFITS;
     52    bool FPA1FITS;
     53    bool FPA2FITS;
     54
     55    bool Bin1FITS;
     56    bool Bin1JPEG;
     57    int xBin1, yBin1;
     58
     59    bool Bin2FITS;
     60    bool Bin2JPEG;
     61    int xBin2, yBin2;
     62
     63    float fringeRej;                    // Fringe rejection limit
     64    int fringeIter;                     // Fringe iterations
     65    float fringeKeep;                   // Fringe keep fraction
     66} ppImageOptions;
     67
     68// Cells to be used in the detrend
     69typedef struct {
     70    pmCell *input;                      // The input cell, to be operated upon
     71    pmCell *mask;                       // The bad pixel mask
     72    pmCell *bias;                       // The bias correction
     73    pmCell *dark;                       // The dark correction
     74    pmCell *flat;                       // The flat-field correction
     75} ppImageDetrend;
     76
     77ppImageOptions *ppImageOptionsAlloc(void);
     78
     79// Determine the processing options
     80ppImageOptions *ppImageOptionsParse(pmConfig *config);
    2081
    2182// Get the configuration
     
    3596
    3697bool ppImageDetrendBias(pmReadout *inputReadout, pmReadout *bias, pmReadout *dark, ppImageOptions *options);
    37 bool ppImageDetrendMask(pmReadout *input, pmReadout *mask);
    3898
    3999bool ppImageDetrendNonLinear(pmReadout *input, ppImageOptions *options);
    40100bool ppImageDetrendNonLinearLookup(pmReadout *input, psMetadataItem *dataItem);
    41101bool ppImageDetrendNonLinearPolynomial(pmReadout *input, psMetadataItem *dataItem);
     102
     103bool ppImageDetrendCell(ppImageDetrend *detrend, ppImageOptions *options, pmConfig *config);
     104bool ppImageDetrendBias(pmReadout *inputReadout, pmReadout *bias, pmReadout *dark, ppImageOptions *options);
     105pmReadout* ppImageDetrendSelectFirst(pmCell *cell, char *name, bool doThis);
    42106
    43107bool ppImageRebinChip (pmConfig *config, pmFPAview *view, char *outName);
     
    69133
    70134// write stats to output file
    71 bool ppImageStatsOutput (pmConfig *config, pmFPA *fpa, const ppImageOptions *options);
     135bool ppImageStatsOutput (pmConfig *config, const ppImageOptions *options);
     136
     137
     138// Measure fringes
     139bool ppImageDetrendFringeMeasure(pmReadout *readout, // Readout to measure
     140                                 pmCell *fringe, // Fringe cell (each readout is a different component)
     141                                 const bool isResidual,
     142                                 const ppImageOptions *options // Options
     143    );
     144
     145// Solve the fringe system
     146bool ppImageDetrendFringeSolve(pmChip *scienceChip, // Chip with science
     147                               const pmChip *refChip, // Chip with reference fringes
     148                               const bool isResidual,
     149                               const ppImageOptions *options // Options
     150    );
     151
     152// Generate fringe frame
     153bool ppImageDetrendFringeGenerate(pmCell *science, // Science cell
     154                                  pmCell *fringes, // Fringe cell, one readout per fringe component
     155                                  const ppImageOptions *options // Options
     156    );
     157
     158
     159bool ppImageDetrendFringeApply (pmConfig *config, // config
     160                                pmChip *chip, // science chip
     161                                const pmFPAview *inputView, // current view
     162                                const ppImageOptions *options // options
     163    );
     164
     165/// Return short version information
     166psString ppImageVersion(void);
     167
     168/// Return long version information
     169psString ppImageVersionLong(void);
     170
     171/// Update the metadata with version information for all dependencies
     172void ppImageVersionMetadata(psMetadata *metadata ///< Metadata to update with version information
     173    );
     174
     175
     176// calculate stats, including MD5
     177bool ppImagePixelStats (pmConfig *config, const ppImageOptions *options, const pmFPAview *inputView);
     178
     179// calculate stats from headers and concepts
     180bool ppImageMetadataStats (pmConfig *config, const ppImageOptions *options);
     181
     182void ppImageFileCheck (pmConfig *config);
    72183
    73184#endif
Note: See TracChangeset for help on using the changeset viewer.