IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 6, 2009, 6:52:51 PM (17 years ago)
Author:
Paul Price
Message:

Making ppSub inverse mode work. Seems to work now --- produces the correct output files for inverse mode on and off, photometry on and off.

Location:
branches/pap/ppSub/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/pap/ppSub/src

    • Property svn:ignore
      •  

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

    r23711 r23719  
    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
     
    2831    PPSUB_FILES_SUB      = 0x04,        // Subtracted files (output)
    2932    PPSUB_FILES_INV      = 0x08,        // Inverse subtracted files (output)
    30     PPSUB_FILES_PHOT     = 0x10,        // psphot photometry files
     33    PPSUB_FILES_PSF      = 0x10,        // PSF files (output)
    3134    PPSUB_FILES_PHOT_SUB = 0x20,        // Subtraction photometry files (output)
    3235    PPSUB_FILES_PHOT_INV = 0x40,        // Inverse subtraction photometry files (output)
     36    PPSUB_FILES_PHOT     = 0x80,        // General photometry files (internal)
    3337    PPSUB_FILES_ALL      = 0xFF,        // All files
    3438} ppSubFiles;
     
    3943    bool photometry;                    // Perform photometry?
    4044    bool inverse;                       // Output inverse subtraction as well?
    41     const char *statsFile;              // Statistics file
     45    psString stamps;                    // Stamps file
     46    pmPSF *psf;                         // Point Spread Function
     47    FILE *statsFile;                    // Statistics file
    4248    psMetadata *stats;                  // Statistics
    4349} ppSubData;
     
    4753
    4854/// Setup the arguments parsing
    49 bool ppSubArgumentsSetup(int argc, char *argv[], ///< Command-line arguments
    50                          pmConfig *config    ///< Configuration
    51     );
    52 
    53 /// Parse the arguments
    54 bool ppSubArgumentsParse(pmConfig *config ///< Configuration
     55bool ppSubArguments(int argc, char *argv[], ///< Command-line arguments
     56                    pmConfig *config, ///< Configuration
     57                    ppSubData *data ///< Processing data
    5558    );
    5659
    5760/// Parse the camera input
    58 bool ppSubCamera(pmConfig *config       ///< Configuration
     61bool ppSubCamera(pmConfig *config,      ///< Configuration
     62                 ppSubData *data        ///< Processing data
    5963    );
    6064
    6165/// Loop over the FPA hierarchy
    62 bool ppSubLoop(pmConfig *config         ///< Configuration
     66bool ppSubLoop(pmConfig *config,        ///< Configuration
     67               ppSubData *data          ///< Processing data
    6368    );
    6469
    6570/// Perform PSF-matched image subtraction on the readout
    6671bool ppSubReadout(pmConfig *config,     ///< Configuration
    67                   ppSubData *data,      ///< Processing data
    68                   const pmFPAview *view ///< View of readout to subtract
     72                  ppSubData *data       ///< Processing data
    6973    );
    7074
    7175/// Generate (if needed) and set or update the masks for input and reference images
    72 bool ppSubSetMasks(pmConfig *config,     ///< Configuration
    73                    const pmFPAview *view ///< View of active readout
     76bool ppSubSetMasks(pmConfig *config     ///< Configuration
    7477    );
    7578
    7679/// Generate the PSF-matching kernel and convolve the images as needed.  Most of this function involves
    7780/// looking up the parameters in the recipe and supplying them to the function pmSubtractionMatch()
    78 bool ppSubMatchPSFs(pmConfig *config,    ///< Configuration
    79                     ppSubData *data,    ///< Processing data
    80                     const pmFPAview *view ///< View of active readout
     81bool ppSubMatchPSFs(pmConfig *config,   ///< Configuration
     82                    ppSubData *data     ///< Processing data
    8183    );
    8284
    8385/// Generate the output readout and pass the kernel info to the header
    84 bool ppSubDefineOutput(pmConfig *config, ///< Configuration
    85                        const pmFPAview *view ///< View of active readout
     86bool ppSubDefineOutput(const char *name,///< Name of output to define
     87                       pmConfig *config ///< Configuration
    8688    );
    8789
    8890/// Photometry stage 1: measure the PSF from the minuend image
    89 bool ppSubMakePSF(pmConfig *config,       ///< Configuration
    90                   ppSubData *data,    ///< Processing data
    91                   const pmFPAview *view ///< View of active readout
     91bool ppSubMakePSF(pmConfig *config,     ///< Configuration
     92                  ppSubData *data       ///< Processing data
    9293    );
    9394
    9495/// Perform the actual image subtraction, update output concepts
    95 bool ppSubReadoutSubtract(pmConfig *config,       ///< Configuration
    96                           const pmFPAview *view ///< View of active readout
     96bool ppSubReadoutSubtract(pmConfig *config ///< Configuration
    9797    );
    9898
    9999
    100100/// Photometry stage 2: find and measure sources on the subtracted image
    101 bool ppSubReadoutPhotometry(pmConfig *config,     ///< Configuration
    102                             ppSubData *data,    ///< Processing data
    103                             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
    104104    );
    105105
    106106/// Renormalize, update headers and generate JPEGs
    107107bool ppSubReadoutUpdate(pmConfig *config, ///< Configuration
    108                         ppSubData *data,    ///< Processing data
    109                         const pmFPAview *view ///< View of active readout
     108                        ppSubData *data ///< Processing data
    110109    );
    111110
    112111/// Higher-order background subtraction
    113 bool ppSubBackground(pmConfig *config,  ///< Configuration
    114                      const pmFPAview *view ///< View to readout
     112bool ppSubBackground(pmConfig *config   ///< Configuration
    115113    );
    116114
     
    129127    );
    130128
     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
    131165// Copy every instance of a single keyword from one metadata to another
    132166bool psMetadataCopySingle(psMetadata *target, psMetadata *source, const char *name);
Note: See TracChangeset for help on using the changeset viewer.