Changeset 28013 for trunk/psphot/src/psphot.h
- Timestamp:
- May 18, 2010, 4:11:53 PM (16 years ago)
- Location:
- trunk/psphot
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/psphot.h (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot
-
Property svn:mergeinfo
set to
/branches/eam_branches/psphot.20100506 merged eligible
-
Property svn:mergeinfo
set to
-
trunk/psphot/src/psphot.h
r27819 r28013 37 37 bool psphotReadoutMinimal(pmConfig *config, const pmFPAview *view); 38 38 39 bool psphotReadoutCleanup (pmConfig *config, const pmFPAview *view );40 bool psphotReadoutCleanupReadout (pmConfig *config, const pmFPAview *view, const char *file name, int index, psMetadata *recipe);39 bool psphotReadoutCleanup (pmConfig *config, const pmFPAview *view, const char *filerule); 40 bool psphotReadoutCleanupReadout (pmConfig *config, const pmFPAview *view, const char *filerule, int index, psMetadata *recipe); 41 41 42 42 bool psphotDefineFiles (pmConfig *config, pmFPAfile *input); … … 51 51 52 52 // psphotReadout functions 53 bool psphotAddPhotcode (pmConfig *config, const pmFPAview *view );53 bool psphotAddPhotcode (pmConfig *config, const pmFPAview *view, const char *filerule); 54 54 bool psphotAddPhotcodeReadout (pmConfig *config, const pmFPAview *view, const char *filerule, int index); 55 55 56 bool psphotSetMaskAndVariance (pmConfig *config, const pmFPAview *view );57 bool psphotSetMaskAndVarianceReadout (pmConfig *config, const pmFPAview *view, const char *file name, int index, psMetadata *recipe);58 59 bool psphotModelBackground (pmConfig *config, const pmFPAview *view );60 bool psphotModelBackgroundReadoutFileIndex (pmConfig *config, const pmFPAview *view, const char *file name, int index);61 62 bool psphotSubtractBackground (pmConfig *config, const pmFPAview *view );63 bool psphotSubtractBackgroundReadout (pmConfig *config, const pmFPAview *view, const char *file name, int index, psMetadata *recipe);64 65 bool psphotFindDetections (pmConfig *config, const pmFPAview *view, bool firstPass);66 bool psphotFindDetectionsReadout (pmConfig *config, const pmFPAview *view, const char *file name, int index, psMetadata *recipe, bool firstPass);67 68 bool psphotSourceStats (pmConfig *config, const pmFPAview *view, bool setWindow);69 bool psphotSourceStatsReadout (pmConfig *config, const pmFPAview *view, const char *file name, int index, psMetadata *recipe, bool setWindow);70 71 bool psphotDeblendSatstars (pmConfig *config, const pmFPAview *view );72 bool psphotDeblendSatstarsReadout (pmConfig *config, const pmFPAview *view, const char *file name, int index);73 74 bool psphotBasicDeblend (pmConfig *config, const pmFPAview *view );75 bool psphotBasicDeblendReadout (pmConfig *config, const pmFPAview *view, const char *file name, int index);76 77 bool psphotRoughClass (pmConfig *config, const pmFPAview *view );78 bool psphotRoughClassReadout (pmConfig *config, const pmFPAview *view, const char *file name, int index, psMetadata *recipe);56 bool psphotSetMaskAndVariance (pmConfig *config, const pmFPAview *view, const char *filerule); 57 bool psphotSetMaskAndVarianceReadout (pmConfig *config, const pmFPAview *view, const char *filerule, int index, psMetadata *recipe); 58 59 bool psphotModelBackground (pmConfig *config, const pmFPAview *view, const char *filerule); 60 bool psphotModelBackgroundReadoutFileIndex (pmConfig *config, const pmFPAview *view, const char *filerule, int index); 61 62 bool psphotSubtractBackground (pmConfig *config, const pmFPAview *view, const char *filerule); 63 bool psphotSubtractBackgroundReadout (pmConfig *config, const pmFPAview *view, const char *filerule, int index, psMetadata *recipe); 64 65 bool psphotFindDetections (pmConfig *config, const pmFPAview *view, const char *filerule, bool firstPass); 66 bool psphotFindDetectionsReadout (pmConfig *config, const pmFPAview *view, const char *filerule, int index, psMetadata *recipe, bool firstPass); 67 68 bool psphotSourceStats (pmConfig *config, const pmFPAview *view, const char *filerule, bool setWindow); 69 bool psphotSourceStatsReadout (pmConfig *config, const pmFPAview *view, const char *filerule, int index, psMetadata *recipe, bool setWindow); 70 71 bool psphotDeblendSatstars (pmConfig *config, const pmFPAview *view, const char *filerule); 72 bool psphotDeblendSatstarsReadout (pmConfig *config, const pmFPAview *view, const char *filerule, int index); 73 74 bool psphotBasicDeblend (pmConfig *config, const pmFPAview *view, const char *filerule); 75 bool psphotBasicDeblendReadout (pmConfig *config, const pmFPAview *view, const char *filerule, int index); 76 77 bool psphotRoughClass (pmConfig *config, const pmFPAview *view, const char *filerule); 78 bool psphotRoughClassReadout (pmConfig *config, const pmFPAview *view, const char *filerule, int index, psMetadata *recipe); 79 79 bool psphotRoughClassRegion (int nRegion, psRegion *region, psArray *sources, psMetadata *analysis, psMetadata *recipe, const bool havePSF); 80 80 81 bool psphotImageQuality (pmConfig *config, const pmFPAview *view );82 bool psphotImageQualityReadout(pmConfig *config, const pmFPAview *view, const char *file name, int index, psMetadata *recipe);83 84 bool psphotChoosePSF (pmConfig *config, const pmFPAview *view );85 bool psphotChoosePSFReadout (pmConfig *config, const pmFPAview *view, const char *file name, int index, psMetadata *recipe);86 87 bool psphotGuessModels (pmConfig *config, const pmFPAview *view );88 bool psphotGuessModelsReadout (pmConfig *config, const pmFPAview *view, const char *file name, int index);89 90 bool psphotMergeSources (pmConfig *config, const pmFPAview *view );91 bool psphotMergeSourcesReadout (pmConfig *config, const pmFPAview *view, const char *file name, int index);92 93 bool psphotFitSourcesLinear (pmConfig *config, const pmFPAview *view, bool final);81 bool psphotImageQuality (pmConfig *config, const pmFPAview *view, const char *filerule); 82 bool psphotImageQualityReadout(pmConfig *config, const pmFPAview *view, const char *filerule, int index, psMetadata *recipe); 83 84 bool psphotChoosePSF (pmConfig *config, const pmFPAview *view, const char *filerule); 85 bool psphotChoosePSFReadout (pmConfig *config, const pmFPAview *view, const char *filerule, int index, psMetadata *recipe); 86 87 bool psphotGuessModels (pmConfig *config, const pmFPAview *view, const char *filerule); 88 bool psphotGuessModelsReadout (pmConfig *config, const pmFPAview *view, const char *filerule, int index); 89 90 bool psphotMergeSources (pmConfig *config, const pmFPAview *view, const char *filerule); 91 bool psphotMergeSourcesReadout (pmConfig *config, const pmFPAview *view, const char *filerule, int index); 92 93 bool psphotFitSourcesLinear (pmConfig *config, const pmFPAview *view, const char *filerule, bool final); 94 94 bool psphotFitSourcesLinearReadout (psMetadata *recipe, pmReadout *readout, psArray *sources, pmPSF *psf, bool final); 95 95 96 bool psphotSourceSize (pmConfig *config, const pmFPAview *view, bool getPSFsize);97 bool psphotSourceSizeReadout(pmConfig *config, const pmFPAview *view, const char *file name, int index, psMetadata *recipe, bool getPSFsize);98 99 bool psphotBlendFit (pmConfig *config, const pmFPAview *view );100 bool psphotBlendFitReadout (pmConfig *config, const pmFPAview *view, const char *file name, int index, psMetadata *recipe);96 bool psphotSourceSize (pmConfig *config, const pmFPAview *view, const char *filerule, bool getPSFsize); 97 bool psphotSourceSizeReadout(pmConfig *config, const pmFPAview *view, const char *filerule, int index, psMetadata *recipe, bool getPSFsize); 98 99 bool psphotBlendFit (pmConfig *config, const pmFPAview *view, const char *filerule); 100 bool psphotBlendFitReadout (pmConfig *config, const pmFPAview *view, const char *filerule, int index, psMetadata *recipe); 101 101 bool psphotBlendFit_Threaded (psThreadJob *job); 102 102 103 bool psphotReplaceAllSources (pmConfig *config, const pmFPAview *view );104 bool psphotReplaceAllSourcesReadout (pmConfig *config, const pmFPAview *view, const char *file name, int index, psMetadata *recipe);105 106 bool psphotAddNoise (pmConfig *config, const pmFPAview *view );107 bool psphotSubNoise (pmConfig *config, const pmFPAview *view );108 bool psphotAddOrSubNoise (pmConfig *config, const pmFPAview *view, bool add);109 bool psphotAddOrSubNoiseReadout (pmConfig *config, const pmFPAview *view, const char *file name, int index, psMetadata *recipe, bool add);110 111 bool psphotExtendedSourceAnalysis (pmConfig *config, const pmFPAview *view );112 bool psphotExtendedSourceAnalysisReadout (pmConfig *config, const pmFPAview *view, const char *file name, int index, psMetadata *recipe);113 114 bool psphotExtendedSourceFits (pmConfig *config, const pmFPAview *view );115 bool psphotExtendedSourceFitsReadout (pmConfig *config, const pmFPAview *view, const char *file name, int index, psMetadata *recipe);116 117 bool psphotApResid (pmConfig *config, const pmFPAview *view );118 bool psphotApResidReadout (pmConfig *config, const pmFPAview *view, const char *file name, int index, psMetadata *recipe);119 120 bool psphotMagnitudes (pmConfig *config, const pmFPAview *view );103 bool psphotReplaceAllSources (pmConfig *config, const pmFPAview *view, const char *filerule); 104 bool psphotReplaceAllSourcesReadout (pmConfig *config, const pmFPAview *view, const char *filerule, int index, psMetadata *recipe); 105 106 bool psphotAddNoise (pmConfig *config, const pmFPAview *view, const char *filerule); 107 bool psphotSubNoise (pmConfig *config, const pmFPAview *view, const char *filerule); 108 bool psphotAddOrSubNoise (pmConfig *config, const pmFPAview *view, const char *filerule, bool add); 109 bool psphotAddOrSubNoiseReadout (pmConfig *config, const pmFPAview *view, const char *filerule, int index, psMetadata *recipe, bool add); 110 111 bool psphotExtendedSourceAnalysis (pmConfig *config, const pmFPAview *view, const char *filerule); 112 bool psphotExtendedSourceAnalysisReadout (pmConfig *config, const pmFPAview *view, const char *filerule, int index, psMetadata *recipe); 113 114 bool psphotExtendedSourceFits (pmConfig *config, const pmFPAview *view, const char *filerule); 115 bool psphotExtendedSourceFitsReadout (pmConfig *config, const pmFPAview *view, const char *filerule, int index, psMetadata *recipe); 116 117 bool psphotApResid (pmConfig *config, const pmFPAview *view, const char *filerule); 118 bool psphotApResidReadout (pmConfig *config, const pmFPAview *view, const char *filerule, int index, psMetadata *recipe); 119 120 bool psphotMagnitudes (pmConfig *config, const pmFPAview *view, const char *filerule); 121 121 bool psphotMagnitudesReadout(pmConfig *config, psMetadata *recipe, const pmFPAview *view, pmReadout *readout, psArray *sources, pmPSF *psf); 122 122 bool psphotMagnitudes_Threaded (psThreadJob *job); 123 123 124 bool psphotEfficiency (pmConfig *config, const pmFPAview *view );125 bool psphotEfficiencyReadout(pmConfig *config, const pmFPAview *view, const char *file name, int index, psMetadata *recipe);124 bool psphotEfficiency (pmConfig *config, const pmFPAview *view, const char *filerule); 125 bool psphotEfficiencyReadout(pmConfig *config, const pmFPAview *view, const char *filerule, int index, psMetadata *recipe); 126 126 127 127 bool psphotPSFWeights(pmConfig *config, pmReadout *readout, const pmFPAview *view, psArray *sources); 128 128 bool psphotPSFWeights_Threaded (psThreadJob *job); 129 129 130 bool psphotSkyReplace (pmConfig *config, const pmFPAview *view );131 bool psphotSkyReplaceReadout (pmConfig *config, const pmFPAview *view, const char *file name, int index);132 133 bool psphotSourceFreePixels (pmConfig *config, const pmFPAview *view );134 bool psphotSourceFreePixelsReadout(pmConfig *config, const pmFPAview *view, const char *file name, int index);130 bool psphotSkyReplace (pmConfig *config, const pmFPAview *view, const char *filerule); 131 bool psphotSkyReplaceReadout (pmConfig *config, const pmFPAview *view, const char *filerule, int index); 132 133 bool psphotSourceFreePixels (pmConfig *config, const pmFPAview *view, const char *filerule); 134 bool psphotSourceFreePixelsReadout(pmConfig *config, const pmFPAview *view, const char *filerule, int index); 135 135 136 136 // in psphotSourceStats.c: … … 147 147 148 148 // in psphotMergeSources.c: 149 bool psphotLoadExtSources (pmConfig *config, const pmFPAview *view );149 bool psphotLoadExtSources (pmConfig *config, const pmFPAview *view, const char *filerule); 150 150 psArray *psphotLoadPSFSources (pmConfig *config, const pmFPAview *view); 151 bool psphotRepairLoadedSources (pmConfig *config, const pmFPAview *view );152 bool psphotCheckExtSources (pmConfig *config, const pmFPAview *view );151 bool psphotRepairLoadedSources (pmConfig *config, const pmFPAview *view, const char *filerule); 152 bool psphotCheckExtSources (pmConfig *config, const pmFPAview *view, const char *filerule); 153 153 154 154 // generate the detection structure for the supplied array of sources 155 bool psphotDetectionsFromSources (pmConfig *config, const pmFPAview *view, psArray *sources);155 bool psphotDetectionsFromSources (pmConfig *config, const pmFPAview *view, const char *filerule, psArray *sources); 156 156 157 157 // generate the detection structure for the supplied array of sources … … 349 349 bool psphotStackImageLoop (pmConfig *config); 350 350 bool psphotStackReadout (pmConfig *config, const pmFPAview *view); 351 bool psphotStackChisqImage (pmConfig *config, const pmFPAview *view );351 bool psphotStackChisqImage (pmConfig *config, const pmFPAview *view, const char *ruleDet, const char *ruleCnv); 352 352 bool psphotStackChisqImageAddReadout(const pmConfig *config, // Configuration 353 353 const pmFPAview *view, 354 const char *filename, 354 355 pmReadout **chiReadout, 355 char *filename,356 356 int index); 357 357 358 bool psphotStackRemoveChisqFromInputs (pmConfig *config );358 bool psphotStackRemoveChisqFromInputs (pmConfig *config, const char *filerule); 359 359 bool pmFPAfileRemoveSingle(psMetadata *files, const char *name, int num); 360 360 361 psArray *psphotMatchSources (pmConfig *config, const pmFPAview *view );362 bool psphotMatchSourcesReadout (psArray *objects, pmConfig *config, const pmFPAview *view, c har *filename, int index);361 psArray *psphotMatchSources (pmConfig *config, const pmFPAview *view, const char *filerule); 362 bool psphotMatchSourcesReadout (psArray *objects, pmConfig *config, const pmFPAview *view, const char *filerule, int index); 363 363 bool psphotMatchSourcesToObjects (psArray *objects, psArray *sources, float RADIUS); 364 364 … … 367 367 int pmPhotObjSortByX (const void **a, const void **b); 368 368 369 typedef enum { 370 PSPHOT_CNV_SRC_NONE, 371 PSPHOT_CNV_SRC_AUTO, 372 PSPHOT_CNV_SRC_CNV, 373 PSPHOT_CNV_SRC_RAW, 374 } psphotStackConvolveSource; 375 376 /// Options for stacking process 377 typedef struct { 378 // Setup 379 380 int numCols; // size of image (X) 381 int numRows; // size of image (Y) 382 383 int num; // Number of inputs 384 bool convolve; // Convolve images? 385 psphotStackConvolveSource convolveSource; 386 // psArray *convImages, *convMasks, *convVariances; // Filenames for the temporary convolved images 387 388 // bool matchZPs; // Adjust relative fluxes based on transparency analysis? 389 // bool photometry; // Perform photometry? 390 // psMetadata *stats; // Statistics for output 391 // FILE *statsFile; // File to which to write statistics 392 // psArray *origImages, *origMasks, *origVariances; // Filenames of the original images 393 // psArray *origCovars; // Original covariances matrices 394 // int quality; // Bad data quality flag 395 396 // Prepare 397 pmPSF *psf; // Target PSF 398 psVector *inputSeeing; // Input seeing FWHMs 399 psVector *inputMask; // Mask for inputs 400 401 float targetSeeing; // Target seeing FWHM 402 psArray *sourceLists; // Individual lists of sources for matching 403 psVector *norm; // Normalisation for each image 404 psArray *psfs; 405 406 // psVector *exposures; // Exposure times 407 // float sumExposure; // Sum of exposure times 408 // float zp; // Zero point for output 409 // psVector *inputMask; // Mask for inputs 410 // psArray *sources; // Matched sources 411 412 // Convolve 413 psArray *kernels; // PSF-matching kernels --- required in the stacking 414 psArray *regions; // PSF-matching regions --- required in the stacking 415 psVector *matchChi2; // chi^2 for stamps from matching 416 psVector *weightings; // Combination weightings for images (1/noise^2) 417 // psArray *cells; // Cells for convolved images --- a handle for reading again 418 // int numCols, numRows; // Size of image 419 // psArray *convCovars; // Convolved covariance matrices 420 421 // Combine initial 422 // pmReadout *outRO; // Output readout 423 // pmReadout *expRO; // Exposure readout 424 // psArray *inspect; // Array of arrays of pixels to inspect 425 426 // Rejection 427 // psArray *rejected; // Rejected pixels 428 } psphotStackOptions; 429 430 /*** psphotStackMatchPSF prototypes ***/ 431 bool psphotStackMatchPSFs (pmConfig *config, const pmFPAview *view); 432 bool psphotStackMatchPSFsReadout (pmConfig *config, const pmFPAview *view, psphotStackOptions *options, int index); 433 bool psphotStackMatchPSFsPrepare (pmConfig *config, const pmFPAview *view, psphotStackOptions *options, int index); 434 435 // psphotStackMatchPSFsUtils 436 psVector *SetOptWidths (bool *optimum, psMetadata *recipe); 437 pmReadout *makeFakeReadout(pmConfig *config, pmReadout *raw, psArray *sources, pmPSF *psf, psImageMaskType maskVal, int fullSize); 438 bool rescaleData(pmReadout *readout, pmConfig *config, psphotStackOptions *options, int index); 439 bool renormKernel(pmReadout *readout, psphotStackOptions *options, int index); 440 bool saveMatchData (pmReadout *readout, psphotStackOptions *options, int index); 441 bool matchKernel(pmConfig *config, pmReadout *cnv, pmReadout *raw, psphotStackOptions *options, int index); 442 bool dumpImageDiff(pmReadout *readoutConv, pmReadout *readoutFake, pmReadout *readoutRef, int index, char *rootname); 443 bool dumpImage(pmReadout *readoutOut, pmReadout *readoutRef, int index, char *rootname); 444 bool loadKernel (pmConfig *config, pmReadout *readoutCnv, psphotStackOptions *options, int index); 445 446 pmPSF *psphotStackPSF(const pmConfig *config, int numCols, int numRows, const psArray *psfs, const psVector *inputMask); 447 448 psphotStackOptions *psphotStackOptionsAlloc (int num); 449 psphotStackConvolveSource psphotStackConvolveSourceFromString (const char *string); 450 pmFPAfile *psphotStackGetConvolveSource (pmConfig *config, psphotStackOptions *options, int index); 451 452 bool psphotCopySources (pmConfig *config, const pmFPAview *view, const char *ruleOut, const char *ruleSrc); 453 bool psphotCopySourcesReadout (pmConfig *config, const pmFPAview *view, const char *ruleOut, const char *ruleSrc, int index); 454 455 bool psphotRadialApertures (pmConfig *config, const pmFPAview *view, const char *filerule); 456 bool psphotRadialAperturesReadout (pmConfig *config, const pmFPAview *view, const char *filerule, int index, psMetadata *recipe); 457 bool psphotRadialApertureSource (pmSource *source, psMetadata *recipe, float skynoise, psImageMaskType maskVal, const psVector *radMax); 458 459 bool psphotExtendedSourceAnalysisByObject (pmConfig *config, psArray *objects, const pmFPAview *view, const char *filerule); 460 bool psphotRadialAperturesByObject (pmConfig *config, psArray *objects, const pmFPAview *view, const char *filerule); 461 462 bool psphotStackObjectsUnifyPosition (psArray *objects); 463 369 464 #endif
Note:
See TracChangeset
for help on using the changeset viewer.
