IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 3666 for trunk/stac/src/stac.h


Ignore:
Timestamp:
Apr 5, 2005, 11:51:26 AM (21 years ago)
Author:
Paul Price
Message:

Removing stac-specific configuration out of functions so that I can use them in other programs. Program appears to work as it did before.

File:
1 edited

Legend:

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

    r3660 r3666  
    1313/************************************************************************************************************/
    1414
    15 // stacConfig.c
    16 
    17 // Configuration options
    18 typedef struct {
    19     int verbose;                        // Verbosity level
    20     float gain, readnoise;              // Gain and readnoise for detectors
    21     psArray *inputs;                    // Input file names
    22     const char *output;                 // Output file name
    23     bool saveShifts;                    // Save shifted images?
    24     const char *starFile;               // File with star coordinates
    25     const char *starMapFile;            // File with map for stars
    26     int outnx, outny;                   // Size of output image
    27     float xOffset, yOffset;             // Offset to get lower-left corner at 0,0
    28     psVector *saturated;                // Saturation level for each image
    29     psVector *bad;                      // Bad level for each image
    30     float reject;                       // Rejection level
    31     float frac;                         // Fraction of input pixel that must be masked before the pixel is
    32                                         // considered bad
    33     float grad;                         // Multiplier of the gradient
    34     int nReject;                        // Number of rejection iterations
    35     float xMapDiff, yMapDiff;           // Difference between pure map and output image coordinates
    36     float aper;                         // Aperture size (pixels)
    37 } stacConfig;
    38 
    39 // Allocator
    40 stacConfig *stacConfigAlloc(void);
    41 // Deallocator
    42 void stacConfigFree(stacConfig *config);
    43 
    44 // Help message
    45 void help(const char *name);
    46 
    47 // Parse the command line and return config
    48 stacConfig *stacParseConfig(int argc,   // Number of command-line arguments
    49                             char **argv // Command-line arguments
    50     );
    51 
    52 
    53 /************************************************************************************************************/
    54 
    5515// stacRead.c
    5616
    5717// Read the input files and return an array of images
    58 psArray *stacReadImages(stacConfig *config);
     18psArray *stacReadImages(psArray *filenames // The file names of the images
     19    );
    5920
    6021// Read a file of coordinates (x,y)
     
    6526
    6627// Read the map files and return an array of transformations
    67 psArray *stacReadMaps(stacConfig *config);
     28psArray *stacReadMaps(psArray *filenames // The file names of the images whose maps are to be read
     29    );
    6830
    6931/************************************************************************************************************/
     
    7335// Calculate the error images
    7436psArray *stacErrorImages(psArray *inputs, // Array of input images
    75                          stacConfig *config // Configuration details
     37                         float gain,    // Gain, in e/ADU
     38                         float rn       // Read noise, in e
    7639    );
    7740
     
    9053                   const psVector *scales, // Relative scales
    9154                   const psVector *offsets, // Relative offsets
    92                    const stacConfig *config // Configuration
     55                   int outnx, int outny // Size of output images
    9356    );
    9457
     
    13396                 int nReject,           // Number of rejection iterations
    13497                 psImage *region,       // Region to combine
    135                  stacConfig *config     // Configuration
     98                 psVector *saturated,   // Saturation limits for each image
     99                 psVector *bad,         // Bad pixel limits for each image
     100                 float reject           // Rejection (k-sigma)
    136101    );
    137102
     
    142107// Invert an array of maps
    143108psArray *stacInvertMaps(const psArray *maps, // Array of maps to invert
    144                         const stacConfig *config // Configuration
    145     );
    146 
     109                        int outnx, int outny // Size of output image
     110    );
    147111
    148112/************************************************************************************************************/
     
    161125                       psArray *maps,   // Maps from input to transformed image
    162126                       psArray *inverseMaps, // Maps from transformed to input image
    163                        stacConfig *config // Configuration
     127                       float frac,      // Fraction of pixel rejected before looking more carefully
     128                       float grad,      // Gradient limit for rejection
     129                       psArray *names   // Names of original images (only for writing out when TESTING)
    164130    );
    165131
     
    186152
    187153// Calculate the size of the output image
    188 bool stacSize(stacConfig *config,       // Configuration, containing the output size
     154bool stacSize(int *outnx, int *outny,   // Size of output image (returned)
     155              float *xMapDiff, float *yMapDiff, // Difference applied to maps
    189156              const psArray *images,    // Input images
    190157              psArray *maps             // Transformation maps
    191158    );
    192 
    193159
    194160/************************************************************************************************************/
     
    206172                psVector **offsetsPtr,  // Offsets to return
    207173                const psArray *images,  // Images on which to measure the scales and offsets
    208                 const stacConfig *config // Configuration
     174                const char *starFile,   // File containing coordinates to photometer
     175                const char *starMapFile, // Map for coodinates to the common output frame
     176                float xMapDiff, float yMapDiff, // Difference from the map to apply (due to size difference)
     177                float aper              // Aperture to use for photometry (radius)
    209178    );
    210179
     
    224193
    225194// Write maps out
    226 bool stacWriteMaps(const psArray *maps, // Maps to write
    227                    const stacConfig *config // Configuration
     195bool stacWriteMap(const char *mapName,  // Filename to write to
     196                  psPlaneTransform *map // Map to write
    228197    );
    229198
Note: See TracChangeset for help on using the changeset viewer.