IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 30, 2006, 6:00:06 PM (20 years ago)
Author:
Paul Price
Message:

Rearranging header files

File:
1 edited

Legend:

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

    r6125 r6260  
    22#define PP_IMAGE_H
    33
    4 #include <stdio.h>
     4#include "pslib.h"
     5#include "pmFPA.h"
     6#include "ppConfig.h"
     7#include "ppFile.h"
     8#include "ppImageData.h"
     9#include "ppImageOptions.h"
     10
     11
     12#if 0
    513#include <strings.h>
    6 
    7 #include "pslib.h"
    8 
    914#include "psAdditionals.h"
    10 
    1115#include "pmFPA.h"
    1216#include "pmFPAConstruct.h"
     
    1519#include "pmReadout.h"
    1620#include "pmConfig.h"
    17 
    1821#include "pmFlatField.h"
    1922#include "pmMaskBadPixels.h"
    2023#include "pmNonLinear.h"
     24#include "pmChipMosaic.h"
    2125#include "pmSubtractBias.h"
    22 #include "pmChipMosaic.h"
    23 //#include "pmFPAMorph.h"
    24 #include "pmSubtractBias.h"
     26#endif
     27
    2528
    2629#define RECIPE "PHASE2"                 // Name of the recipe to use
    2730#define TIMERNAME "ppImage"             // Name of timer
    2831
    29 // How much of the FPA to load at a time
    30 typedef enum {
    31     PP_LOAD_NONE,                       // Don't load anything
    32     PP_LOAD_FPA,                        // Load the entire FPA at once
    33     PP_LOAD_CHIP,                       // Load by chip
    34     PP_LOAD_CELL,                       // Load by cell
    35 } ppImageLoadDepth;
    36 
    37 // Configuration data
    38 typedef struct {
    39     psMetadata *site;                   // The site configuration
    40     psMetadata *camera;                 // The camera configuration
    41     psMetadata *recipe;                 // The recipe (i.e., specific setups)
    42     psMetadata *arguments;              // The command-line arguments
    43     psDB       *database;               // Database handle
    44 } ppConfig;
    45 
    46 // Options
    47 typedef struct {
    48     bool doMask;                        // Mask bad pixels
    49     bool doBias;                        // Bias subtraction
    50     bool doDark;                        // Dark subtraction
    51     bool doFlat;                        // Flat-field normalisation
    52     bool doFringe;                      // Fringe subtraction
    53     bool doSource;                      // Source identification and photometry
    54     bool doAstrom;                      // Astrometry
    55     bool doOverscan;                    // Overscan subtraction
    56     pmOverscanOptions *overscan;        // Overscan options
    57     bool doNonLin;                      // Non-linearity correction
    58     psDataType nonLinearType;
    59     psMetadataItem *nonLinearData;
    60     void *nonLinearSource;
    61     ppImageLoadDepth imageLoadDepth;    // How much of the FPA to load at once
    62 } ppOptions;
    63 
    64 // A file to process
    65 typedef struct {
    66     char *filename;                     // File name
    67     psFits *fits;                       // The FITS file handle
    68     psMetadata *phu;                    // The FITS header
    69     pmFPA *fpa;                         // The FPA, with pixels and extensions
    70 } ppFile;
    71 
    72 // The data to be processed
    73 typedef struct {
    74     ppFile *input;                      // The input, to be operated upon
    75     ppFile *mask;                       // The bad pixel mask image
    76     ppFile *bias;                       // The bias correction image
    77     ppFile *dark;                       // The dark correction image
    78     ppFile *flat;                       // The flat-field correction image
    79     ppFile *fringe;                     // The fringe correction image
    80     psFits *output;                     // The output file
    81 #if 0
    82     ppFile *process;                    // A dummy file pointing out what needs to be processed
    83 #endif
    84 } ppData;
    85 
    86 // Cells to be used in the detrend
    87 typedef struct {
    88     pmCell *input;                      // The input cell, to be operated upon
    89     pmCell *mask;                       // The bad pixel mask
    90     pmCell *bias;                       // The bias correction
    91     pmCell *dark;                       // The dark correction
    92     pmCell *flat;                       // The flat-field correction
    93 } ppDetrend;
    94 
    95 
    96 // Allocators
    97 ppFile *ppFileAlloc(void);
    98 
    99 
    100 
    101 // Parse the site configuration (and camera and recipe if specified); read the command-line arguments
    102 bool ppImageConfig(ppConfig *config,   // The configuration(output)
    103                    int argc, char **argv // Command-line arguments
    104                    );
     32// Get the configuration
     33bool ppImageConfig(ppConfig *config, int argc, char **argv);
    10534
    10635// Determine what type of camera, and initialise
    107 bool ppImageParseCamera(ppData *data,   // The data to be processed
     36bool ppImageParseCamera(ppImageData *data,   // The data to be processed
    10837                        ppConfig *config // Configuration
    10938                        );
    11039
    111 // Determine the procession options
    112 bool ppImageOptions(ppData *data,       // The data to be processed
    113                     ppOptions *options, // Processing options
    114                     ppConfig *config    // Configuration
    115                     );
    11640
    117 
    118 // Loop over the
    119 bool ppImageLoop(ppData *data, ppOptions *options, ppConfig *config);
     41// Loop over the input
     42bool ppImageLoop(ppImageData *data, ppImageOptions *options, ppConfig *config);
    12043
    12144// Load the pixels for the given file
     
    12649                       );
    12750
    128 bool ppImageParseDetrend(ppData *data, ppOptions *options, ppConfig *config);
     51bool ppImageParseDetrend(ppImageData *data, ppImageOptions *options, ppConfig *config);
    12952
    13053bool ppReadoutWeights(pmReadout *readout);
    13154
    132 bool ppDetrendCell(ppDetrend *detrend, ppOptions *options, ppConfig *config);
    133 
    134 bool ppDetrendMask(pmCell *cell, pmReadout *input, pmReadout *mask);
    135 bool ppDetrendNonLinear(pmCell *cell, pmReadout *input, ppOptions *options);
    136 bool ppDetrendNonLinearLookup(pmReadout *input, psMetadataItem *dataItem);
    137 bool ppDetrendNonLinearPolynomial(pmReadout *input, psMetadataItem *dataItem);
    138 bool ppDetrendBias(pmReadout *inputReadout, pmReadout *bias, pmReadout *dark, ppOptions *options);
    13955#if 0
    140 pmReadout* ppDetrendPedestal(pmReadout *pedestal, pmCell *input, pmReadout *bias, pmReadout *dark, float darkTime, ppOptions *options);
    141 #endif
    142 pmReadout* ppDetrendSelectFirst(pmCell *cell, char *name, bool doThis);
    143 
    144 #if 0
     56// These functions are not implemented, or not needed
     57pmReadout* ppDetrendPedestal(pmReadout *pedestal, pmCell *input, pmReadout *bias, pmReadout *dark, float darkTime, ppImageOptions *options);
     58bool ppImageOutput(ppImageData *data, ppConfig *config);
     59bool ppImagePhot(ppImageData *data, ppImageOptions *options, ppConfig *config);
    14560bool ppFileOpen(ppFile *fpa, psMetadata *camera, char *name, bool doThis);
    14661#endif
    14762
    148 bool ppImageOutput(ppData *data, ppConfig *config);
    149 bool ppImagePhot(ppData *data, ppOptions *options, ppConfig *config);
    150 
    15163#endif // Pau.
Note: See TracChangeset for help on using the changeset viewer.