IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 7, 2009, 4:50:25 PM (17 years ago)
Author:
Paul Price
Message:

Merging branches/pap from r23739 onto trunk. No conflicts, ppSub builds fine.

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/ppSub

  • trunk/ppSub/src

    • Property svn:ignore
      •  

        old new  
        1010stamp-h1
        1111ppSubKernel
         12ppSubErrorCodes.h
         13ppSubErrorCodes.c
  • trunk/ppSub/src/ppSub.h

    r23688 r23740  
    1414#define PP_SUB_H
    1515
     16#include <stdio.h>
    1617#include <pslib.h>
    1718#include <psmodules.h>
     19
     20#include "ppSubErrorCodes.h"
    1821
    1922/// @addtogroup ppSub
     
    2427// Output files, for activation/deactivation
    2528typedef enum {
    26     PPSUB_FILES_IMAGE = 0x01,           // Image files
    27     PPSUB_FILES_PHOT  = 0x02,           // Photometry files
    28     PPSUB_FILES_ALL   = 0xFF,           // All files
     29    PPSUB_FILES_INPUT    = 0x01,        // Input files
     30    PPSUB_FILES_CONV     = 0x02,        // Convolved files (output)
     31    PPSUB_FILES_SUB      = 0x04,        // Subtracted files (output)
     32    PPSUB_FILES_INV      = 0x08,        // Inverse subtracted files (output)
     33    PPSUB_FILES_PSF      = 0x10,        // PSF files (output)
     34    PPSUB_FILES_PHOT_SUB = 0x20,        // Subtraction photometry files (output)
     35    PPSUB_FILES_PHOT_INV = 0x40,        // Inverse subtraction photometry files (output)
     36    PPSUB_FILES_PHOT     = 0x80,        // General photometry files (internal)
     37    PPSUB_FILES_ALL      = 0xFF,        // All files
    2938} ppSubFiles;
    3039
    3140/// Data for processing
    3241typedef struct {
    33     psErrorCode quality;                /// Quality code; 0 for no problem
    34     psMetadata *stats;                  /// Statistics
     42    psErrorCode quality;                // Quality code; 0 for no problem
     43    bool photometry;                    // Perform photometry?
     44    bool inverse;                       // Output inverse subtraction as well?
     45    psString stamps;                    // Stamps file
     46    pmPSF *psf;                         // Point Spread Function
     47    FILE *statsFile;                    // Statistics file
     48    psMetadata *stats;                  // Statistics
    3549} ppSubData;
    3650
     
    3953
    4054/// Setup the arguments parsing
    41 bool ppSubArgumentsSetup(int argc, char *argv[], ///< Command-line arguments
    42                          pmConfig *config    ///< Configuration
    43     );
    44 
    45 /// Parse the arguments
    46 bool ppSubArgumentsParse(pmConfig *config ///< Configuration
     55bool ppSubArguments(int argc, char *argv[], ///< Command-line arguments
     56                    pmConfig *config, ///< Configuration
     57                    ppSubData *data ///< Processing data
    4758    );
    4859
    4960/// Parse the camera input
    50 bool ppSubCamera(pmConfig *config       ///< Configuration
     61bool ppSubCamera(pmConfig *config,      ///< Configuration
     62                 ppSubData *data        ///< Processing data
    5163    );
    5264
    5365/// Loop over the FPA hierarchy
    54 bool ppSubLoop(pmConfig *config         ///< Configuration
     66bool ppSubLoop(pmConfig *config,        ///< Configuration
     67               ppSubData *data          ///< Processing data
    5568    );
    5669
    5770/// Perform PSF-matched image subtraction on the readout
    5871bool ppSubReadout(pmConfig *config,     ///< Configuration
    59                   ppSubData *data,      ///< Processing data
    60                   const pmFPAview *view ///< View of readout to subtract
     72                  ppSubData *data       ///< Processing data
    6173    );
    6274
    6375/// Generate (if needed) and set or update the masks for input and reference images
    64 bool ppSubSetMasks(pmConfig *config,     ///< Configuration
    65                    const pmFPAview *view ///< View of active readout
     76bool ppSubSetMasks(pmConfig *config     ///< Configuration
    6677    );
    6778
    6879/// Generate the PSF-matching kernel and convolve the images as needed.  Most of this function involves
    6980/// looking up the parameters in the recipe and supplying them to the function pmSubtractionMatch()
    70 bool ppSubMatchPSFs(pmConfig *config,    ///< Configuration
    71                     ppSubData *data,    ///< Processing data
    72                     const pmFPAview *view ///< View of active readout
     81bool ppSubMatchPSFs(pmConfig *config,   ///< Configuration
     82                    ppSubData *data     ///< Processing data
    7383    );
    7484
    7585/// Generate the output readout and pass the kernel info to the header
    76 bool ppSubDefineOutput(pmConfig *config, ///< Configuration
    77                        const pmFPAview *view ///< View of active readout
     86bool ppSubDefineOutput(const char *name,///< Name of output to define
     87                       pmConfig *config ///< Configuration
    7888    );
    7989
    8090/// Photometry stage 1: measure the PSF from the minuend image
    81 bool ppSubMakePSF(pmConfig *config,       ///< Configuration
    82                   ppSubData *data,    ///< Processing data
    83                   const pmFPAview *view ///< View of active readout
     91bool ppSubMakePSF(pmConfig *config,     ///< Configuration
     92                  ppSubData *data       ///< Processing data
    8493    );
    8594
    8695/// Perform the actual image subtraction, update output concepts
    87 bool ppSubReadoutSubtract(pmConfig *config,       ///< Configuration
    88                           const pmFPAview *view ///< View of active readout
     96bool ppSubReadoutSubtract(pmConfig *config ///< Configuration
    8997    );
    9098
    9199
    92100/// Photometry stage 2: find and measure sources on the subtracted image
    93 bool ppSubReadoutPhotometry(pmConfig *config,     ///< Configuration
    94                             ppSubData *data,    ///< Processing data
    95                             const pmFPAview *view ///< View of active readout
     101bool ppSubReadoutPhotometry(const char *name, ///< Name of file to photometer
     102                            pmConfig *config, ///< Configuration
     103                            ppSubData *data ///< Processing data
    96104    );
    97105
    98106/// Renormalize, update headers and generate JPEGs
    99107bool ppSubReadoutUpdate(pmConfig *config, ///< Configuration
    100                         ppSubData *data,    ///< Processing data
    101                         const pmFPAview *view ///< View of active readout
     108                        ppSubData *data ///< Processing data
    102109    );
    103110
    104111/// Higher-order background subtraction
    105 bool ppSubBackground(pmConfig *config,  ///< Configuration
    106                      const pmFPAview *view ///< View to readout
     112bool ppSubBackground(pmConfig *config   ///< Configuration
    107113    );
    108114
     
    121127    );
    122128
     129
     130/// Activate or deactivate files
     131void ppSubFilesActivate(pmConfig *config, // Configuration
     132                        ppSubFiles files, // File to activate/deactivate
     133                        bool state      // Activation state
     134    );
     135
     136/// Generate a view suitable for a readout
     137///
     138/// Assumes we're working with skycells
     139pmFPAview *ppSubViewReadout(void);
     140
     141/// Iterate down the FPA hierarchy, opening files
     142bool ppSubFilesIterateDown(pmConfig *config, // Configuration
     143                           ppSubFiles files // Files to open
     144    );
     145
     146/// Iterate up the FPA hierarchy, closing files
     147bool ppSubFilesIterateUp(pmConfig *config, // Configuration
     148                         ppSubFiles files // Files to open
     149    );
     150
     151/// Collect statistics
     152bool ppSubReadoutStats(pmConfig *config,// Configuration
     153                       ppSubData *data  // Processing data
     154    );
     155
     156/// Generate JPEG images
     157bool ppSubReadoutJpeg(pmConfig *config  // Configuration
     158    );
     159
     160/// Generate inverse subtraction
     161bool ppSubReadoutInverse(pmConfig *config // Configuration
     162    );
     163
     164
    123165// Copy every instance of a single keyword from one metadata to another
    124166bool psMetadataCopySingle(psMetadata *target, psMetadata *source, const char *name);
Note: See TracChangeset for help on using the changeset viewer.