Changeset 21516
- Timestamp:
- Feb 16, 2009, 12:30:50 PM (17 years ago)
- Location:
- trunk/psModules/src/objects
- Files:
-
- 1 added
- 7 edited
-
Makefile.am (modified) (1 diff)
-
pmModel.h (modified) (2 diffs)
-
pmSource.h (modified) (5 diffs)
-
pmSourceIO.c (modified) (5 diffs)
-
pmSourceIO.h (modified) (4 diffs)
-
pmSourceIO_CMF_PS1_V1.c (added)
-
pmSourceIO_PS1_CAL_0.c (modified) (2 diffs)
-
pmSourceIO_PS1_DEV_1.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/objects/Makefile.am
r20946 r21516 36 36 pmSourceIO_PS1_DEV_1.c \ 37 37 pmSourceIO_PS1_CAL_0.c \ 38 pmSourceIO_CMF_PS1_V1.c \ 38 39 pmSourcePlots.c \ 39 40 pmSourcePlotPSFModel.c \ -
trunk/psModules/src/objects/pmModel.h
r21183 r21516 5 5 * @author EAM, IfA 6 6 * 7 * @version $Revision: 1.1 8$ $Name: not supported by cvs2svn $8 * @date $Date: 2009-0 1-27 06:39:38$7 * @version $Revision: 1.19 $ $Name: not supported by cvs2svn $ 8 * @date $Date: 2009-02-16 22:30:50 $ 9 9 * 10 10 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 92 92 float mag; ///< integrated model magnitude 93 93 float magErr; ///< integrated model magnitude error 94 int nPix; ///< number of pixels used for fit 94 95 int nDOF; ///< number of degrees of freedom 95 96 int nIter; ///< number of iterations to reach min -
trunk/psModules/src/objects/pmSource.h
r21363 r21516 3 3 * @author EAM, IfA; GLG, MHPCC 4 4 * 5 * @version $Revision: 1.2 8$ $Name: not supported by cvs2svn $6 * @date $Date: 2009-02- 06 02:31:25$5 * @version $Revision: 1.29 $ $Name: not supported by cvs2svn $ 6 * @date $Date: 2009-02-16 22:30:50 $ 7 7 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii 8 8 */ … … 35 35 } pmSourceType; 36 36 37 // bit flags to distinguish analysis results 37 38 typedef enum { 38 PM_SOURCE_MODE_DEFAULT = 0x0000, ///< 39 PM_SOURCE_MODE_PSFMODEL = 0x0001, ///< Source fitted with a psf model (linear or non-linear) 40 PM_SOURCE_MODE_EXTMODEL = 0x0002, ///< Source fitted with an extended-source model 41 PM_SOURCE_MODE_FITTED = 0x0004, ///< Source fitted with non-linear model (PSF or EXT; good or bad) 42 PM_SOURCE_MODE_FAIL = 0x0008, ///< Fit (non-linear) failed (non-converge, off-edge, run to zero) 43 PM_SOURCE_MODE_POOR = 0x0010, ///< Fit succeeds, but low-SN, high-Chisq, or large (for PSF -- drop?) 44 PM_SOURCE_MODE_PAIR = 0x0020, ///< Source fitted with a double psf 45 PM_SOURCE_MODE_PSFSTAR = 0x0040, ///< Source used to define PSF model 46 PM_SOURCE_MODE_SATSTAR = 0x0080, ///< Source model peak is above saturation 47 PM_SOURCE_MODE_BLEND = 0x0100, ///< Source is a blend with other sourcers 48 PM_SOURCE_MODE_EXTERNAL = 0x0200, ///< Source based on supplied input position 49 PM_SOURCE_MODE_BADPSF = 0x0400, ///< Failed to get good estimate of object's PSF 50 PM_SOURCE_MODE_DEFECT = 0x0800, ///< Source is thought to be a defect 51 PM_SOURCE_MODE_SATURATED = 0x1000, ///< Source is thought to be saturated pixels (bleed trail) 52 PM_SOURCE_MODE_CR_LIMIT = 0x2000, ///< Source has crNsigma above limit 53 PM_SOURCE_MODE_EXT_LIMIT = 0x4000, ///< Source has extNsigma above limit 54 PM_SOURCE_MODE_SUBTRACTED = 0x8000, ///< XXX this flag is actually only used internally (move) 39 PM_SOURCE_MODE_DEFAULT = 0x00000000, ///< Initial value: resets all bits 40 PM_SOURCE_MODE_PSFMODEL = 0x00000001, ///< Source fitted with a psf model (linear or non-linear) 41 PM_SOURCE_MODE_EXTMODEL = 0x00000002, ///< Source fitted with an extended-source model 42 PM_SOURCE_MODE_FITTED = 0x00000004, ///< Source fitted with non-linear model (PSF or EXT; good or bad) 43 PM_SOURCE_MODE_FAIL = 0x00000008, ///< Fit (non-linear) failed (non-converge, off-edge, run to zero) 44 PM_SOURCE_MODE_POOR = 0x00000010, ///< Fit succeeds, but low-SN, high-Chisq, or large (for PSF -- drop?) 45 PM_SOURCE_MODE_PAIR = 0x00000020, ///< Source fitted with a double psf 46 PM_SOURCE_MODE_PSFSTAR = 0x00000040, ///< Source used to define PSF model 47 PM_SOURCE_MODE_SATSTAR = 0x00000080, ///< Source model peak is above saturation 48 PM_SOURCE_MODE_BLEND = 0x00000100, ///< Source is a blend with other sourcers 49 PM_SOURCE_MODE_EXTERNAL = 0x00000200, ///< Source based on supplied input position 50 PM_SOURCE_MODE_BADPSF = 0x00000400, ///< Failed to get good estimate of object's PSF 51 PM_SOURCE_MODE_DEFECT = 0x00000800, ///< Source is thought to be a defect 52 PM_SOURCE_MODE_SATURATED = 0x00001000, ///< Source is thought to be saturated pixels (bleed trail) 53 PM_SOURCE_MODE_CR_LIMIT = 0x00002000, ///< Source has crNsigma above limit 54 PM_SOURCE_MODE_EXT_LIMIT = 0x00004000, ///< Source has extNsigma above limit 55 PM_SOURCE_MODE_MOMENTS_FAILURE = 0x00008000, ///< could not measure the moments 56 PM_SOURCE_MODE_SKY_FAILURE = 0x00010000, ///< could not measure the local sky 57 PM_SOURCE_MODE_SKYVAR_FAILURE = 0x00020000, ///< could not measure the local sky variance 58 PM_SOURCE_MODE_BELOW_MOMENTS_SN = 0x00040000, ///< moments not measured due to low S/N 59 PM_SOURCE_MODE_BIG_RADIUS = 0x00100000, ///< poor moments for small radius, try large radius 60 PM_SOURCE_MODE_AP_MAGS = 0x00200000, ///< source has an aperture magnitude 61 PM_SOURCE_MODE_BLEND_FIT = 0x00400000, ///< source was fitted as a blend 62 PM_SOURCE_MODE_EXTENDED_FIT = 0x00800000, ///< full extended fit was used 63 PM_SOURCE_MODE_EXTENDED_STATS = 0x01000000, ///< extended aperture stats calculated 64 PM_SOURCE_MODE_LINEAR_FIT = 0x02000000, ///< source fitted with the linear fit 65 PM_SOURCE_MODE_NONLINEAR_FIT = 0x04000000, ///< source fitted with the non-linear fit 66 PM_SOURCE_MODE_RADIAL_FLUX = 0x08000000, ///< radial flux measurements calculated 67 PM_SOURCE_MODE_SIZE_SKIPPED = 0x10000000, ///< size could not be determined 55 68 } pmSourceMode; 69 70 typedef enum { 71 PM_SOURCE_TMPF_MODEL_GUESS = 0x0001, 72 PM_SOURCE_TMPF_SUBTRACTED = 0x0002, 73 } pmSourceTmpF; 56 74 57 75 /** pmSource data structure … … 68 86 */ 69 87 struct pmSource { 70 const int id; ///< Unique ID for object 71 int seq; ///< ID for output (generated on write )88 const int id; ///< Unique ID for object (generated on alloc) 89 int seq; ///< ID for output (generated on write OR set on read) 72 90 pmPeak *peak; ///< Description of peak pixel. 73 91 psImage *pixels; ///< Rectangular region including object pixels. … … 83 101 pmSourceType type; ///< Best identification of object. 84 102 pmSourceMode mode; ///< analysis flags set for object. 103 pmSourceTmpF tmpFlags; ///< internal-only flags 85 104 psArray *blends; ///< collection of sources thought to be confused with object 86 105 float psfMag; ///< calculated from flux in modelPSF … … 240 259 bool pmSourceCachePSF (pmSource *source, psImageMaskType maskVal); 241 260 242 int pmSourceSortBySN (const void **a, const void **b); 243 int pmSourceSortByY (const void **a, const void **b); 261 int pmSourceSortBySN (const void **a, const void **b); 262 int pmSourceSortByY (const void **a, const void **b); 263 int pmSourceSortBySeq (const void **a, const void **b); 244 264 245 265 pmSourceMode pmSourceModeFromString (const char *name); -
trunk/psModules/src/objects/pmSourceIO.c
r20937 r21516 3 3 * @author EAM, IfA 4 4 * 5 * @version $Revision: 1. 69$ $Name: not supported by cvs2svn $6 * @date $Date: 200 8-12-08 02:51:14$5 * @version $Revision: 1.70 $ $Name: not supported by cvs2svn $ 6 * @date $Date: 2009-02-16 22:30:50 $ 7 7 * 8 8 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 488 488 } 489 489 if (!strcmp (exttype, "PS1_DEV_1")) { 490 status = pmSourcesWrite_PS1_DEV_1 (file->fits, sources, file->header, outhead, dataname , xsrcname);490 status = pmSourcesWrite_PS1_DEV_1 (file->fits, sources, file->header, outhead, dataname); 491 491 } 492 492 if (!strcmp (exttype, "PS1_CAL_0")) { 493 status = pmSourcesWrite_PS1_CAL_0 (file->fits, readout, sources, file->header, outhead, dataname, xsrcname); 493 status = pmSourcesWrite_PS1_CAL_0 (file->fits, readout, sources, file->header, outhead, dataname); 494 } 495 if (!strcmp (exttype, "PS1_V1")) { 496 status = pmSourcesWrite_CMF_PS1_V1 (file->fits, readout, sources, file->header, outhead, dataname); 494 497 } 495 498 if (xsrcname) { … … 500 503 status = pmSourcesWrite_PS1_CAL_0_XSRC (file->fits, readout, sources, file->header, xsrcname, recipe); 501 504 } 505 if (!strcmp (exttype, "PS1_V1")) { 506 status = pmSourcesWrite_CMF_PS1_V1_XSRC (file->fits, sources, xsrcname, recipe); 507 } 502 508 } 503 509 if (xfitname) { … … 507 513 if (!strcmp (exttype, "PS1_CAL_0")) { 508 514 status = pmSourcesWrite_PS1_CAL_0_XFIT (file->fits, readout, sources, file->header, xfitname); 515 } 516 if (!strcmp (exttype, "PS1_V1")) { 517 status = pmSourcesWrite_CMF_PS1_V1_XFIT (file->fits, sources, xfitname); 509 518 } 510 519 } … … 929 938 sources = pmSourcesRead_PS1_DEV_1 (file->fits, hdu->header); 930 939 } 931 if (!strcmp (exttype, "PS1_ CAL_)")) {932 sources = pmSourcesRead_ PS1_CAL_0(file->fits, hdu->header);940 if (!strcmp (exttype, "PS1_V1")) { 941 sources = pmSourcesRead_CMF_PS1_V1 (file->fits, hdu->header); 933 942 } 934 943 } -
trunk/psModules/src/objects/pmSourceIO.h
r20741 r21516 4 4 * @author EAM, IfA; GLG, MHPCC 5 5 * 6 * @version $Revision: 1. 19$ $Name: not supported by cvs2svn $7 * @date $Date: 200 8-11-14 02:11:45$6 * @version $Revision: 1.20 $ $Name: not supported by cvs2svn $ 7 * @date $Date: 2009-02-16 22:30:50 $ 8 8 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii 9 9 * … … 26 26 bool pmSourcesWrite_SMPDATA (psFits *fits, psArray *sources, psMetadata *imageHeader, psMetadata *tableHeader, char *extname); 27 27 bool pmSourcesWrite_PS1_DEV_0 (psFits *fits, psArray *sources, psMetadata *imageHeader, psMetadata *tableHeader, char *extname); 28 bool pmSourcesWrite_PS1_DEV_1 (psFits *fits, psArray *sources, psMetadata *imageHeader, psMetadata *tableHeader, char *extname, char *xsrcname); 28 29 bool pmSourcesWrite_PS1_DEV_1 (psFits *fits, psArray *sources, psMetadata *imageHeader, psMetadata *tableHeader, char *extname); 29 30 bool pmSourcesWrite_PS1_DEV_1_XSRC (psFits *fits, psArray *sources, char *extname, psMetadata *recipe); 30 31 bool pmSourcesWrite_PS1_DEV_1_XFIT (psFits *fits, psArray *sources, char *extname); 31 32 32 bool pmSourcesWrite_PS1_CAL_0 (psFits *fits, pmReadout *readout, psArray *sources, psMetadata *imageHeader, psMetadata *tableHeader, char *extname , char *xsrcname);33 bool pmSourcesWrite_PS1_CAL_0 (psFits *fits, pmReadout *readout, psArray *sources, psMetadata *imageHeader, psMetadata *tableHeader, char *extname); 33 34 bool pmSourcesWrite_PS1_CAL_0_XSRC (psFits *fits, pmReadout *readout, psArray *sources, psMetadata *imageHeader, char *extname, psMetadata *recipe); 34 35 bool pmSourcesWrite_PS1_CAL_0_XFIT (psFits *fits, pmReadout *readout, psArray *sources, psMetadata *imageHeader, char *extname); 36 37 bool pmSourcesWrite_CMF_PS1_V1 (psFits *fits, pmReadout *readout, psArray *sources, psMetadata *imageHeader, psMetadata *tableHeader, char *extname); 38 bool pmSourcesWrite_CMF_PS1_V1_XSRC (psFits *fits, psArray *sources, char *extname, psMetadata *recipe); 39 bool pmSourcesWrite_CMF_PS1_V1_XFIT (psFits *fits, psArray *sources, char *extname); 35 40 36 41 bool pmSource_CMF_WritePHU (const pmFPAview *view, pmFPAfile *file, pmConfig *config); … … 42 47 psArray *pmSourcesRead_PS1_DEV_1 (psFits *fits, psMetadata *header); 43 48 psArray *pmSourcesRead_PS1_CAL_0 (psFits *fits, psMetadata *header); 49 psArray *pmSourcesRead_CMF_PS1_V1 (psFits *fits, psMetadata *header); 44 50 45 51 bool pmSourcesWritePSFs (psArray *sources, char *filename); … … 67 73 bool pmReadoutCheckDataStatusForSources (const pmReadout *readout); 68 74 75 bool pmSourceLocalAstrometry (psSphere *ptSky, float *posAngle, float *pltScale, pmChip *chip, float xPos, float yPos); 76 69 77 /// @} 70 78 # endif /* PM_SOURCE_IO_H */ -
trunk/psModules/src/objects/pmSourceIO_PS1_CAL_0.c
r20937 r21516 3 3 * @author EAM, IfA 4 4 * 5 * @version $Revision: 1. 2$ $Name: not supported by cvs2svn $6 * @date $Date: 200 8-12-08 02:51:14$5 * @version $Revision: 1.3 $ $Name: not supported by cvs2svn $ 6 * @date $Date: 2009-02-16 22:30:50 $ 7 7 * 8 8 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 49 49 // XXX how do I generate the source tables which I need to send to PSPS? 50 50 51 bool pmSourcesWrite_PS1_CAL_0 (psFits *fits, pmReadout *readout, psArray *sources, psMetadata *imageHeader,52 psMetadata *tableHeader, char *extname, char *xsrcname)51 bool pmSourcesWrite_PS1_CAL_0 (psFits *fits, pmReadout *readout, psArray *sources, 52 psMetadata *imageHeader, psMetadata *tableHeader, char *extname) 53 53 { 54 54 PS_ASSERT_PTR_NON_NULL(fits, false); -
trunk/psModules/src/objects/pmSourceIO_PS1_DEV_1.c
r20937 r21516 3 3 * @author EAM, IfA 4 4 * 5 * @version $Revision: 1.1 4$ $Name: not supported by cvs2svn $6 * @date $Date: 200 8-12-08 02:51:14$5 * @version $Revision: 1.15 $ $Name: not supported by cvs2svn $ 6 * @date $Date: 2009-02-16 22:30:50 $ 7 7 * 8 8 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 49 49 // XXX how do I generate the source tables which I need to send to PSPS? 50 50 51 bool pmSourcesWrite_PS1_DEV_1 (psFits *fits, psArray *sources, psMetadata *imageHeader,52 psMetadata *tableHeader, char *extname, char *xsrcname)51 bool pmSourcesWrite_PS1_DEV_1 (psFits *fits, psArray *sources, 52 psMetadata *imageHeader, psMetadata *tableHeader, char *extname) 53 53 { 54 54 PS_ASSERT_PTR_NON_NULL(fits, false);
Note:
See TracChangeset
for help on using the changeset viewer.
