IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 3, 2010, 5:38:55 PM (16 years ago)
Author:
Paul Price
Message:

In the process of reworking ppMops to conform to new interface format, which is SMF-like.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ppTranslate/src/ppMops.h

    r28027 r28209  
    77#define IN_EXTNAME "SkyChip.psf"        // Extension name for data in input
    88#define OBSERVATORY_CODE "F51"          // IAU Observatory Code
    9 #define OUT_EXTNAME "MOPS_TRANSIENT_DETECTIONS" // Extension name for data in output
    10 #define SOURCE_MASK (PM_SOURCE_MODE_FAIL | PM_SOURCE_MODE_BADPSF | PM_SOURCE_MODE_SATURATED | \
    11                      PM_SOURCE_MODE_CR_LIMIT | PM_SOURCE_MODE_SKY_FAILURE) // Flags to exclude
    129
    1310// Configuration data
     
    2724} ppMopsArguments;
    2825
    29 #if 0
    30 TTYPE19 = 'PSF_CHISQ'          / label for field  19
    31 TFORM19 = '1E      '           / data format of field: 4-byte REAL
    32 TTYPE20 = 'CR_NSIGMA'          / label for field  20
    33 TFORM20 = '1E      '           / data format of field: 4-byte REAL
    34 TTYPE21 = 'EXT_NSIGMA'         / label for field  21
    35 TFORM21 = '1E      '           / data format of field: 4-byte REAL
    36 TTYPE22 = 'PSF_MAJOR'          / label for field  22
    37 TFORM22 = '1E      '           / data format of field: 4-byte REAL
    38 TTYPE23 = 'PSF_MINOR'          / label for field  23
    39 TFORM23 = '1E      '           / data format of field: 4-byte REAL
    40 TTYPE24 = 'PSF_THETA'          / label for field  24
    41 TFORM24 = '1E      '           / data format of field: 4-byte REAL
    42 TTYPE25 = 'PSF_QF  '           / label for field  25
    43 TFORM25 = '1E      '           / data format of field: 4-byte REAL
    44 TTYPE26 = 'PSF_NDOF'           / label for field  26
    45 TFORM26 = '1J      '           / data format of field: 4-byte INTEGER
    46 TTYPE27 = 'PSF_NPIX'           / label for field  27
    47 TFORM27 = '1J      '           / data format of field: 4-byte INTEGER
    48 TTYPE28 = 'MOMENTS_XX'         / label for field  28
    49 TFORM28 = '1E      '           / data format of field: 4-byte REAL
    50 TTYPE29 = 'MOMENTS_XY'         / label for field  29
    51 TFORM29 = '1E      '           / data format of field: 4-byte REAL
    52 TTYPE30 = 'MOMENTS_YY'         / label for field  30
    53 TFORM30 = '1E      '           / data format of field: 4-byte REAL
    54 #endif
    55 
    5626/// Parse arguments
    5727ppMopsArguments *ppMopsArgumentsParse(int argc, char *argv[]);
    5828
    5929typedef struct {
     30    psMetadata *header;                 // FITS header
    6031    psString raBoresight, decBoresight; // RA,Dec of telescope boresight
    6132    psString filter;                    // Filter for exposure
     
    6435    double posangle;                    // Position angle
    6536    double alt, az;                     // Telescope altitude and azimuth
    66     double mjd;                         // Modified Julian Date
     37    double mjd;                         // Modified Julian Date of exposure mid-point
    6738    float seeing;                       // Seeing of exposure
     39    int naxis1, naxis2;                 // Size of image
    6840    long num;                           // Number of detections
     41    psMetadata *table;                  // Columns of data
    6942    psVector *x, *y;                    // Image coordinates
    7043    psVector *ra, *dec;                 // Sky coordinates
    71     psVector *raErr, *decErr;           // Error in sky coordinates
    72     psVector *mag, *magErr;             // Magnitude and associated error
    73     psVector *chi2, *dof;               // Chi^2 from fitting, with associated degrees of freedom
    74     psVector *cr, *extended;            // Measures of CR-ness and extendedness
    75     psVector *psfMajor, *psfMinor, *psfTheta; // PSF major and minor axes, and position angle
    76     psVector *quality, *numPix;               // PSF quality factor and number of pixels
    77     psVector *xxMoment, *xyMoment, *yyMoment; // Moments
    78     psVector *flags;                    // psphot flags
    79     psVector *diffSkyfileId;            // Identifier for source image
    80     psVector *naxis1, *naxis2;          // Size of image
    81     psVector *mask;                     // Mask for detections
    82     psVector *nPos;                     // Number of positive pixels
    83     psVector *fPos;                     // Fraction of positive flux
    84     psVector *nRatioBad;                // Fraction of positive pixels to negative
    85     psVector *nRatioMask;               // Fraction of positive pixels to masked
    86     psVector *nRatioAll;                // Fraction of positive pixels to all
    8744} ppMopsDetections;
    8845
    89 
    90 ppMopsDetections *ppMopsDetectionsAlloc(long num);
    91 
    92 /// Copy a detection
    93 bool ppMopsDetectionsCopySingle(ppMopsDetections *target, const ppMopsDetections *source, long index);
    94 
    95 /// Purge the detections list of masked detections
    96 bool ppMopsDetectionsPurge(ppMopsDetections *detections);
    97 
     46// Allocator
     47ppMopsDetections *ppMopsDetectionsAlloc(void);
    9848
    9949/// Read detections
    10050psArray *ppMopsRead(const ppMopsArguments *args);
    10151
    102 /// Merge detections
    103 ppMopsDetections *ppMopsMerge(const psArray *detections);
     52/// Purge duplicate detections
     53ppMopsDetections *ppMopsPurgeDuplicates(const psArray *detections);
    10454
    10555/// Write detections
    106 bool ppMopsWrite(const ppMopsDetections *detections, const ppMopsArguments *args);
     56bool ppMopsWrite(const psArray *detections, const ppMopsArguments *args);
    10757
    10858#endif
Note: See TracChangeset for help on using the changeset viewer.