Changeset 15398
- Timestamp:
- Oct 28, 2007, 3:37:48 PM (19 years ago)
- Location:
- branches/eam_branch_20071023/psModules/src
- Files:
-
- 3 added
- 12 edited
-
astrom/Makefile.am (modified) (2 diffs)
-
astrom/pmAstrometryTable.c (modified) (4 diffs)
-
astrom/pmAstrometryTable.h (added)
-
camera/pmFPAfile.h (modified) (2 diffs)
-
camera/pmFPAfileIO.c (modified) (1 diff)
-
detrend/pmDetrendDB.c (modified) (1 diff)
-
detrend/pmDetrendDB.h (modified) (2 diffs)
-
objects/Makefile.am (modified) (2 diffs)
-
objects/pmModel.c (modified) (2 diffs)
-
objects/pmSource.h (modified) (3 diffs)
-
objects/pmSourceExtendedPars.c (added)
-
objects/pmSourceExtendedPars.h (added)
-
objects/pmSourceIO.c (modified) (3 diffs)
-
objects/pmSourceIO.h (modified) (2 diffs)
-
objects/pmSourceIO_PS1_DEV_1.c (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branch_20071023/psModules/src/astrom/Makefile.am
r12519 r15398 8 8 pmAstrometryDistortion.c \ 9 9 pmAstrometryUtils.c \ 10 pmAstrometryTable.c \ 10 11 pmAstrometryWCS.c 11 12 … … 15 16 pmAstrometryDistortion.h \ 16 17 pmAstrometryUtils.h \ 18 pmAstrometryTable.h \ 17 19 pmAstrometryWCS.h 18 20 -
branches/eam_branch_20071023/psModules/src/astrom/pmAstrometryTable.c
r15357 r15398 1 1 /** @file pmAstrometryObjects.c 2 *3 * @brief This file defines the basic types for matching objects4 * based on their astrometry.5 *6 * @ingroup AstroImage7 *8 * @author EAM, IfA9 *10 * @version $Revision: 1.1 $ $Name: not supported by cvs2svn $11 * @date $Date: 2007-10-23 20:52:42$12 *13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii14 */2 * 3 * @brief This file defines the basic types for matching objects 4 * based on their astrometry. 5 * 6 * @ingroup AstroImage 7 * 8 * @author EAM, IfA 9 * 10 * @version $Revision: 1.1.2.1 $ $Name: not supported by cvs2svn $ 11 * @date $Date: 2007-10-29 01:37:48 $ 12 * 13 * Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii 14 */ 15 15 16 16 #ifdef HAVE_CONFIG_H … … 29 29 #include <pslib.h> 30 30 31 #include "pmConfig.h" 32 #include "pmDetrendDB.h" 31 33 #include "pmHDU.h" 32 34 #include "pmFPA.h" 33 #include "pmAstrometryObjects.h" 35 #include "pmFPALevel.h" 36 #include "pmFPAview.h" 37 #include "pmFPAfile.h" 38 #include "pmAstrometryTable.h" 39 34 40 35 41 /********************* CheckDataStatus functions *****************************/ … … 179 185 bool pmAstromWriteChip (pmChip *chip, const pmFPAview *view, pmFPAfile *file, const pmConfig *config) 180 186 { 181 // define the EXTNAME values used for the table data, and residual image segments 182 { 183 // lookup the EXTNAME values used for table data and image header segments 184 char *rule = NULL; 185 186 // Menu of EXTNAME rules 187 psMetadata *menu = psMetadataLookupMetadata(&status, file->camera, "EXTNAME.RULES"); 188 if (!menu) { 189 psError(PS_ERR_UNKNOWN, true, "missing EXTNAME.RULES in camera.config"); 190 return false; 191 } 192 193 // EXTNAME for image header 194 rule = psMetadataLookupStr(&status, menu, "ASTROMETRY"); 195 if (!rule) { 196 psError(PS_ERR_UNKNOWN, false, "missing entry for ASTROMETRY in EXTNAME.RULES in camera.config"); 197 return false; 198 } 199 extname = pmFPAfileNameFromRule (rule, file, view); 200 } 187 bool status; 188 // *** define the EXTNAME values used for the table data, and residual image segments *** 189 190 // lookup the EXTNAME values used for table data and image header segments 191 char *rule = NULL; 192 193 // Menu of EXTNAME rules 194 psMetadata *menu = psMetadataLookupMetadata(&status, file->camera, "EXTNAME.RULES"); 195 if (!menu) { 196 psError(PS_ERR_UNKNOWN, true, "missing EXTNAME.RULES in camera.config"); 197 return false; 198 } 199 200 // EXTNAME for image header 201 rule = psMetadataLookupStr(&status, menu, "ASTROMETRY"); 202 if (!rule) { 203 psError(PS_ERR_UNKNOWN, false, "missing entry for ASTROMETRY in EXTNAME.RULES in camera.config"); 204 return false; 205 } 206 207 // XXX need to finish this: uncomment when used 208 # if (0) 209 char *extname = pmFPAfileNameFromRule (rule, file, view); 210 # endif 201 211 202 212 // write the chip elements in the following form: … … 244 254 bool pmAstromReadChip (pmChip *chip, const pmFPAview *view, pmFPAfile *file, const pmConfig *config) 245 255 { 246 // define the EXTNAME values used for the table data, and residual image segments 247 { 248 // lookup the EXTNAME values used for table data and image header segments 249 char *rule = NULL; 250 251 // Menu of EXTNAME rules 252 psMetadata *menu = psMetadataLookupMetadata(&status, file->camera, "EXTNAME.RULES"); 253 if (!menu) { 254 psError(PS_ERR_UNKNOWN, true, "missing EXTNAME.RULES in camera.config"); 255 return false; 256 } 257 258 // EXTNAME for image header 259 rule = psMetadataLookupStr(&status, menu, "ASTROMETRY"); 260 if (!rule) { 261 psError(PS_ERR_UNKNOWN, false, "missing entry for ASTROMETRY in EXTNAME.RULES in camera.config"); 262 return false; 263 } 264 extname = pmFPAfileNameFromRule (rule, file, view); 265 } 256 bool status; 257 258 // lookup the EXTNAME values used for table data and image header segments 259 char *rule = NULL; 260 261 // Menu of EXTNAME rules 262 psMetadata *menu = psMetadataLookupMetadata(&status, file->camera, "EXTNAME.RULES"); 263 if (!menu) { 264 psError(PS_ERR_UNKNOWN, true, "missing EXTNAME.RULES in camera.config"); 265 return false; 266 } 267 268 // EXTNAME for image header 269 rule = psMetadataLookupStr(&status, menu, "ASTROMETRY"); 270 if (!rule) { 271 psError(PS_ERR_UNKNOWN, false, "missing entry for ASTROMETRY in EXTNAME.RULES in camera.config"); 272 return false; 273 } 274 275 // XXX finish this: uncomment when used 276 # if (0) 277 char *extname = pmFPAfileNameFromRule (rule, file, view); 278 # endif 266 279 267 280 // read the chip elements in the following form: -
branches/eam_branch_20071023/psModules/src/camera/pmFPAfile.h
r15180 r15398 4 4 * @author EAM, IfA 5 5 * 6 * @version $Revision: 1.22 $ $Name: not supported by cvs2svn $7 * @date $Date: 2007-10- 03 21:32:43$6 * @version $Revision: 1.22.2.1 $ $Name: not supported by cvs2svn $ 7 * @date $Date: 2007-10-29 01:37:48 $ 8 8 * Copyright 2004-2005 Institute for Astronomy, University of Hawaii 9 9 */ … … 35 35 PM_FPA_FILE_FRINGE, 36 36 PM_FPA_FILE_HEADER, 37 PM_FPA_FILE_ASTROM, 37 38 } pmFPAfileType; 38 39 -
branches/eam_branch_20071023/psModules/src/camera/pmFPAfileIO.c
r15359 r15398 34 34 #include "pmResiduals.h" 35 35 #include "pmPSF_IO.h" 36 #include "pmAstrometryTable.h" 36 37 #include "pmFPA_JPEG.h" 37 38 #include "pmSourcePlots.h" -
branches/eam_branch_20071023/psModules/src/detrend/pmDetrendDB.c
r13775 r15398 101 101 DETREND_STRING_CASE (SHUTTER); 102 102 DETREND_STRING_CASE (FRINGE); 103 DETREND_STRING_CASE (ASTROM); 103 104 default: 104 105 return NULL; -
branches/eam_branch_20071023/psModules/src/detrend/pmDetrendDB.h
r13775 r15398 9 9 * @author EAM, IfA 10 10 * 11 * @version $Revision: 1.13 $ $Name: not supported by cvs2svn $12 * @date $Date: 2007- 06-13 03:42:33$11 * @version $Revision: 1.13.14.1 $ $Name: not supported by cvs2svn $ 12 * @date $Date: 2007-10-29 01:37:48 $ 13 13 * Copyright 2004-2005 Institute for Astronomy, University of Hawaii 14 14 */ … … 29 29 PM_DETREND_TYPE_FRINGE, 30 30 PM_DETREND_TYPE_BACKGROUND, 31 PM_DETREND_TYPE_ASTROM, 31 32 } pmDetrendType; 32 33 -
branches/eam_branch_20071023/psModules/src/objects/Makefile.am
r15039 r15398 10 10 pmModelUtils.c \ 11 11 pmSource.c \ 12 pmSourceExtendedPars.c \ 12 13 pmSourceUtils.c \ 13 14 pmSourceSky.c \ … … 50 51 pmModelUtils.h \ 51 52 pmSource.h \ 53 pmSourceExtendedPars.h \ 52 54 pmSourceUtils.h \ 53 55 pmSourceSky.h \ -
branches/eam_branch_20071023/psModules/src/objects/pmModel.c
r15359 r15398 6 6 * @author EAM, IfA 7 7 * 8 * @version $Revision: 1.15.6. 1$ $Name: not supported by cvs2svn $9 * @date $Date: 2007-10-2 3 20:54:53$8 * @version $Revision: 1.15.6.2 $ $Name: not supported by cvs2svn $ 9 * @date $Date: 2007-10-29 01:37:48 $ 10 10 * 11 11 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 217 217 Ro = psImageInterpolateOptionsAlloc( 218 218 PS_INTERPOLATE_BILINEAR, 219 model->residuals->Ro, NULL, m odel->mask, 0, 0.0, 0.0, 1, 0, 0.0);219 model->residuals->Ro, NULL, mask, 0, 0.0, 0.0, 1, 0, 0.0); 220 220 Rx = psImageInterpolateOptionsAlloc( 221 221 PS_INTERPOLATE_BILINEAR, -
branches/eam_branch_20071023/psModules/src/objects/pmSource.h
r15359 r15398 3 3 * @author EAM, IfA; GLG, MHPCC 4 4 * 5 * @version $Revision: 1.18.2. 1$ $Name: not supported by cvs2svn $6 * @date $Date: 2007-10-2 3 20:54:53$5 * @version $Revision: 1.18.2.2 $ $Name: not supported by cvs2svn $ 6 * @date $Date: 2007-10-29 01:37:48 $ 7 7 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii 8 8 */ … … 10 10 # ifndef PM_SOURCE_H 11 11 # define PM_SOURCE_H 12 13 # include "pmSourceExtendedPars.h" 12 14 13 15 /// @addtogroup Objects Object Detection / Analysis Functions … … 84 86 psRegion region; ///< area on image covered by selected pixels 85 87 float sky, skyErr; ///< The sky and its error at the center of the object 86 pmSourceExtendedPar ameters *extpars; //extended source parameters88 pmSourceExtendedPars *extpars; ///< extended source parameters 87 89 }; 88 89 typedef struct {90 psVector *radius;91 psVector *flux;92 } pmSourceRadialProfile;93 94 typedef struct {95 psVector *flux;96 psVector *fluxVar; // measured variance97 psVector *fluxErr; // formal error98 } pmSourceAnnuli;99 100 typedef struct {101 float mag;102 float magErr;103 float rad;104 float radErr;105 } pmSourceIsophotalValues;106 107 typedef struct {108 float mag;109 float magErr;110 float rad;111 float radErr;112 } pmSourcePetrosianValues;113 114 typedef struct {115 float mag;116 float magErr;117 float rad;118 float radErr;119 } pmSourceKronValues;120 121 typedef struct {122 pmSourceRadialProfile *profile;123 pmSourceAnnuli *annuli;124 pmSourceIsophotalValues *isophot;125 pmSourcePetrosianValues *petrosian;126 pmSourceKronValues *kron;127 } pmSourceExtendedParameters;128 90 129 91 /** pmPSFClump data structure -
branches/eam_branch_20071023/psModules/src/objects/pmSourceIO.c
r15359 r15398 3 3 * @author EAM, IfA 4 4 * 5 * @version $Revision: 1.52.2. 1$ $Name: not supported by cvs2svn $6 * @date $Date: 2007-10-2 3 20:54:53$5 * @version $Revision: 1.52.2.2 $ $Name: not supported by cvs2svn $ 6 * @date $Date: 2007-10-29 01:37:48 $ 7 7 * 8 8 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 286 286 // get the current header 287 287 hdu = pmFPAviewThisHDU (view, file->fpa); 288 289 // determine the output table format 290 psMetadata *recipe = psMetadataLookupMetadata(&status, config->recipes, "PSPHOT"); 291 if (!status) { 292 psError(PS_ERR_UNKNOWN, true, "missing recipe PSPHOT in config data"); 293 return false; 294 } 295 296 // if this is not TRUE, the output files only contain the psf measurements. 297 bool XSRC_OUTPUT = psMetadataLookupBool(&status, recipe, "SAVE.XSRC"); 288 298 289 299 // define the EXTNAME values for the different data segments: … … 362 372 outhead = psMetadataAlloc (); 363 373 364 // determine the output table format365 psMetadata *recipe = psMetadataLookupMetadata(&status, config->recipes, "PSPHOT");366 if (!status) {367 psError(PS_ERR_UNKNOWN, true, "missing recipe PSPHOT in config data");368 return false;369 }370 374 exttype = psMemIncrRefCounter (psMetadataLookupStr(&status, recipe, "OUTPUT.FORMAT")); 371 375 if (!exttype) { -
branches/eam_branch_20071023/psModules/src/objects/pmSourceIO.h
r15039 r15398 4 4 * @author EAM, IfA; GLG, MHPCC 5 5 * 6 * @version $Revision: 1.12 $ $Name: not supported by cvs2svn $7 * @date $Date: 2007- 09-27 03:35:29$6 * @version $Revision: 1.12.2.1 $ $Name: not supported by cvs2svn $ 7 * @date $Date: 2007-10-29 01:37:48 $ 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); 28 bool pmSourcesWrite_PS1_DEV_1 (psFits *fits, psArray *sources, psMetadata *imageHeader, psMetadata *tableHeader, char *extname, char *xsrcname); 29 bool pmSourcesWrite_PS1_DEV_1_XSRC (psFits *fits, psArray *sources, char *extname); 29 30 30 31 bool pmSource_CMF_WritePHU (const pmFPAview *view, pmFPAfile *file, const pmConfig *config); -
branches/eam_branch_20071023/psModules/src/objects/pmSourceIO_PS1_DEV_1.c
r15359 r15398 3 3 * @author EAM, IfA 4 4 * 5 * @version $Revision: 1.4.2. 1$ $Name: not supported by cvs2svn $6 * @date $Date: 2007-10-2 3 20:54:53$5 * @version $Revision: 1.4.2.2 $ $Name: not supported by cvs2svn $ 6 * @date $Date: 2007-10-29 01:37:48 $ 7 7 * 8 8 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 60 60 // if we request XSRC output, add the XSRC name to this header 61 61 if (xsrcname) { 62 psMetadataAddStr (tableHeader, PS_LIST_TAIL, " EXTXSRC", PS_META_REPLACE, "name of XSRC table extension", xsrcname);62 psMetadataAddStr (tableHeader, PS_LIST_TAIL, "XSRCNAME", PS_META_REPLACE, "name of XSRC table extension", xsrcname); 63 63 } 64 64 … … 152 152 153 153 if (xsrcname) { 154 pmSourcesWrite XSRC_PS1_DEV_1 (file->fits, sources, xsrcname);154 pmSourcesWrite_PS1_DEV_1_XSRC (fits, sources, xsrcname); 155 155 } 156 156 … … 174 174 } 175 175 assert (modelType > -1); 176 177 // XXX need to look up the XSRCNAME entries 176 178 177 179 // validate a single row of the table (must match SMP) … … 251 253 } 252 254 253 bool pmSourcesWrite XSRC_PS1_DEV_1(psFits *fits, psArray *sources, char *extname)255 bool pmSourcesWrite_PS1_DEV_1_XSRC (psFits *fits, psArray *sources, char *extname) 254 256 { 255 257 … … 263 265 264 266 // create a header to hold the output data 265 outhead = psMetadataAlloc ();267 psMetadata *outhead = psMetadataAlloc (); 266 268 267 269 // write the links to the image header
Note:
See TracChangeset
for help on using the changeset viewer.
