Changeset 12792
- Timestamp:
- Apr 10, 2007, 3:34:16 PM (19 years ago)
- Location:
- trunk/psphot/src
- Files:
-
- 1 added
- 49 edited
-
Makefile.am (modified) (4 diffs)
-
psphot.c (modified) (2 diffs)
-
psphot.h (modified) (2 diffs)
-
psphotAddNoise.c (modified) (1 diff)
-
psphotApResid.c (modified) (1 diff)
-
psphotArguments.c (modified) (1 diff)
-
psphotBasicDeblend.c (modified) (1 diff)
-
psphotBlendFit.c (modified) (1 diff)
-
psphotChoosePSF.c (modified) (1 diff)
-
psphotCleanup.c (modified) (1 diff)
-
psphotDeblendSatstars.c (modified) (1 diff)
-
psphotEnsemblePSF.c (modified) (1 diff)
-
psphotEvalFLT.c (modified) (1 diff)
-
psphotEvalPSF.c (modified) (1 diff)
-
psphotFakeSources.c (modified) (1 diff)
-
psphotFindPeaks.c (modified) (1 diff)
-
psphotFitSet.c (modified) (1 diff)
-
psphotGrowthCurve.c (modified) (1 diff)
-
psphotGuessModels.c (modified) (1 diff)
-
psphotImageLoop.c (modified) (1 diff)
-
psphotImageMedian.c (modified) (1 diff)
-
psphotInternal.h (added)
-
psphotMagnitudes.c (modified) (1 diff)
-
psphotMaskReadout.c (modified) (1 diff)
-
psphotMergeSources.c (modified) (1 diff)
-
psphotModelGroupInit.c (modified) (1 diff)
-
psphotModelTest.c (modified) (1 diff)
-
psphotMosaicChip.c (modified) (1 diff)
-
psphotMosaicSubimage.c (modified) (1 diff)
-
psphotOutput.c (modified) (1 diff)
-
psphotPSFResiduals.c (modified) (1 diff)
-
psphotParseCamera.c (modified) (1 diff)
-
psphotRadialPlot.c (modified) (1 diff)
-
psphotRadiusChecks.c (modified) (1 diff)
-
psphotReadout.c (modified) (1 diff)
-
psphotReadoutCleanup.c (modified) (1 diff)
-
psphotReplaceUnfit.c (modified) (1 diff)
-
psphotRoughClass.c (modified) (1 diff)
-
psphotSkyReplace.c (modified) (1 diff)
-
psphotSortBySN.c (modified) (1 diff)
-
psphotSourceFits.c (modified) (1 diff)
-
psphotSourceFreePixels.c (modified) (1 diff)
-
psphotSourcePlots.c (modified) (1 diff)
-
psphotSourceStats.c (modified) (1 diff)
-
psphotSummaryPlots.c (modified) (1 diff)
-
psphotTest.c (modified) (1 diff)
-
psphotTestArguments.c (modified) (1 diff)
-
psphotTestPSF.c (modified) (1 diff)
-
psphotVersion.c (modified) (1 diff)
-
psphotWeightBias.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/Makefile.am
r12689 r12792 8 8 psphot_LDFLAGS = $(PSLIB_LIBS) $(PSMODULE_LIBS) $(PSPHOT_LIBS) 9 9 psphot_LDADD = libpsphot.la 10 psphot_SOURCES = psphot.c 10 psphot_SOURCES = psphot.c \ 11 psphotArguments.c \ 12 psphotCleanup.c \ 13 psphotImageLoop.c \ 14 psphotMosaicChip.c \ 15 psphotParseCamera.c 11 16 12 17 libpsphot_la_SOURCES = \ … … 14 19 psphotVersion.c \ 15 20 psphotModelGroupInit.c \ 16 psphotArguments.c \17 psphotParseCamera.c \18 psphotMosaicChip.c \19 psphotImageLoop.c \20 21 psphotMaskReadout.c \ 21 22 psphotReadout.c \ … … 53 54 psphotDeblendSatstars.c \ 54 55 psphotMosaicSubimage.c \ 55 psphotAddNoise.c \ 56 psphotCleanup.c 56 psphotAddNoise.c 57 57 58 58 … … 60 60 psphot.h \ 61 61 psphotErrorCodes.h 62 63 noinst_HEADERS = \ 64 psphotInternal.h 62 65 63 66 clean-local: -
trunk/psphot/src/psphot.c
r11263 r12792 1 # include "psphot .h"1 # include "psphotInternal.h" 2 2 3 3 static void usage (void) { … … 10 10 psTimerStart ("complete"); 11 11 psphotErrorRegister(); // register our error codes/messages 12 psphotModelGroupInit (); // load implementation-specific models12 psphotModelGroupInit (); // load implementation-specific models 13 13 14 14 // load command-line arguments, options, and system config data -
trunk/psphot/src/psphot.h
r12689 r12792 3 3 # endif 4 4 5 # include <stdio.h> 6 # include <strings.h> // for strcasecmp 7 # include <unistd.h> // for unlink 8 # include <pslib.h> 9 # include <psmodules.h> 5 #ifndef PS_PHOT_H 6 #define PS_PHOT_H 10 7 11 # include "psphotErrorCodes.h" 8 #include <stdio.h> 9 #include <pslib.h> 10 #include <psmodules.h> 11 12 #include "psphotErrorCodes.h" 12 13 #define PSPHOT_RECIPE "PSPHOT" // Name of the recipe to use 13 14 … … 17 18 psString psphotVersionLong(void); 18 19 19 // XXX test functions20 bool psphotTestPSF (pmReadout *readout, psArray *sources, psMetadata *recipe);21 bool pmPSFtestModel (psArray *sources, char *modelName, float RADIUS, bool poissonErrors, psPolynomial2D *psfTrendMask);22 23 pmConfig *psphotArguments (int argc, char **argv);24 bool psphotParseCamera (pmConfig *config);25 bool psphotImageLoop (pmConfig *config);26 bool psphotMosaicChip(pmConfig *config, const pmFPAview *view, char *outFile, char *inFile);27 28 20 bool psphotModelTest (pmReadout *readout, psMetadata *recipe); 29 21 bool psphotReadout (pmConfig *config, pmFPAview *view); 30 void psphotCleanup (pmConfig *config);31 32 psArray *psphotFakeSources ();33 34 // psphotReadout functions35 bool psphotImageMedian (pmConfig *config, pmFPAview *view);36 psArray *psphotFindPeaks (pmReadout *readout, psMetadata *recipe, int pass);37 psArray *psphotSourceStats (pmReadout *readout, psMetadata *recipe, psArray *allpeaks);38 bool psphotRoughClass (psArray *sources, psMetadata *recipe);39 bool psphotBasicDeblend (psArray *sources, psMetadata *recipe);40 pmPSF *psphotChoosePSF (pmReadout *readout, psArray *sources, psMetadata *recipe);41 bool psphotPSFstats (pmReadout *readout, psMetadata *recipe, pmPSF *psf);42 bool psphotMomentsStats (pmReadout *readout, psMetadata *recipe, psArray *sources);43 bool psphotEnsemblePSF (pmReadout *readout, psArray *sources, psMetadata *recipe, pmPSF *psf, bool final);44 bool psphotGuessModels (pmReadout *readout, psArray *sources, psMetadata *recipe, pmPSF *psf);45 bool psphotBlendFit (pmReadout *readout, psArray *sources, psMetadata *recipe, pmPSF *psf);46 bool psphotReplaceUnfit (psArray *sources);47 bool psphotReplaceAll (psArray *sources);48 bool psphotApResid (pmReadout *readout, psArray *sources, psMetadata *recipe, pmPSF *psf);49 bool psphotMagnitudes (psArray *sources, psMetadata *recipe, pmPSF *psf, pmReadout *background);50 bool psphotSkyReplace (pmConfig *config, pmFPAview *view);51 22 bool psphotReadoutCleanup (pmConfig *config, pmReadout *readout, psMetadata *recipe, pmPSF *psf, psArray *sources); 52 23 53 // basic support functions 54 void psphotModelGroupInit (void); 55 int psphotSortBySN (const void **a, const void **b); 56 int psphotSortByY (const void **a, const void **b); 57 bool psphotGrowthCurve (pmReadout *readout, pmPSF *psf, bool ignore); 58 void psphotTestArguments (int *argc, char **argv); 59 bool psphotMaskReadout (pmReadout *readout, psMetadata *recipe); 60 void psphotSourceFreePixels (psArray *sources); 61 62 // functions to set the correct source pixels 63 bool psphotInitRadiusPSF (const psMetadata *recipe, const pmModelType type); 64 bool psphotCheckRadiusPSF (pmReadout *readout, pmSource *source, pmModel *model); 65 bool psphotCheckRadiusPSFBlend (pmReadout *readout, pmSource *source, pmModel *model, float dR); 66 bool psphotInitRadiusEXT (psMetadata *recipe, pmModelType type); 67 bool psphotCheckRadiusEXT (pmReadout *readout, pmSource *source, pmModel *model); 68 69 // output functions 70 bool psphotAddPhotcode (psMetadata *recipe, pmConfig *config, pmFPAview *view); 71 bool psphotDumpMoments (psMetadata *recipe, psArray *sources); 72 psMetadata *psphotDefineHeader (psMetadata *recipe); 73 bool psphotWeightBias (pmReadout *readout, psArray *sources, psMetadata *recipe, pmPSF *psf); 74 int psphotSaveImage (psMetadata *header, psImage *image, char *filename); 75 bool psphotDumpConfig (pmConfig *config); 76 pmReadout *psphotSelectBackground (pmConfig *config, pmFPAview *view); 77 78 // PSF / DBL / EXT evaluation functions 79 bool psphotEvalPSF (pmSource *source, pmModel *model); 80 bool psphotEvalDBL (pmSource *source, pmModel *model); 81 bool psphotEvalEXT (pmSource *source, pmModel *model); 82 83 // functions to support the source fitting process 84 bool psphotInitLimitsPSF (psMetadata *recipe, pmReadout *readout); 85 bool psphotInitLimitsEXT (psMetadata *recipe); 86 bool psphotFitBlend (pmReadout *readout, pmSource *source, pmPSF *psf); 87 bool psphotFitBlob (pmReadout *readout, pmSource *source, psArray *sources, pmPSF *psf); 88 bool psphotFitPSF (pmReadout *readout, pmSource *source, pmPSF *psf); 89 pmModel *psphotFitEXT (pmReadout *readout, pmSource *source); 90 psArray *psphotFitDBL (pmReadout *readout, pmSource *source); 91 92 // functions to support simultaneous multi-source fitting 93 bool psphotFitSet (pmSource *oneSrc, pmModel *oneModel, char *fitset, pmSourceFitMode mode); 94 95 // plotting functions (available if libkapa is installed) 96 bool psphotPlotMoments (pmConfig *config, pmFPAview *view, psArray *sources); 97 bool psphotPlotPSFModel (pmConfig *config, pmFPAview *view, psArray *sources); 98 99 bool psphotFitInit (); 100 bool psphotFitSummary (); 101 bool psphotMergeSources (psArray *oldSources, psArray *newSources); 102 bool psphotLoadExtSources (pmConfig *config, pmFPAview *view, psArray *sources); 103 psExit psphotGetExitStatus (); 104 bool psphotSetHeaderNstars (psMetadata *recipe, psArray *sources); 105 bool psphotAddNoise (pmReadout *readout, psArray *sources, psMetadata *recipe, bool add); 106 bool psphotRadialPlot (int *kapa, char *filename, pmSource *source); 107 bool psphotSourcePlots (pmReadout *readout, psArray *sources, psMetadata *recipe); 108 bool psphotMosaicSubimage (psImage *outImage, pmSource *source, int Xo, int Yo, int DX, int DY); 109 110 bool psphotAddWithTest (pmSource *source, bool useState); 111 bool psphotSubWithTest (pmSource *source, bool useState); 112 bool psphotSetState (pmSource *source, bool curState); 113 bool psphotDeblendSatstars (psArray *sources, psMetadata *recipe); 24 #endif -
trunk/psphot/src/psphotAddNoise.c
r12689 r12792 1 # include "psphot .h"1 # include "psphotInternal.h" 2 2 3 3 bool psphotAddNoise (pmReadout *readout, psArray *sources, psMetadata *recipe, bool add) { -
trunk/psphot/src/psphotApResid.c
r11381 r12792 1 # include "psphot .h"1 # include "psphotInternal.h" 2 2 // XXXX this code fails if there are too few sources to measure the aperture residual 3 3 // the larger problem is that the rules for accepting more polynomial terms are weak. -
trunk/psphot/src/psphotArguments.c
r12545 r12792 1 # include "psphot .h"1 # include "psphotInternal.h" 2 2 3 3 pmConfig *psphotArguments(int argc, char **argv) { -
trunk/psphot/src/psphotBasicDeblend.c
r12689 r12792 1 # include "psphot .h"1 # include "psphotInternal.h" 2 2 3 3 bool psphotBasicDeblend (psArray *sources, psMetadata *recipe) { -
trunk/psphot/src/psphotBlendFit.c
r11702 r12792 1 # include "psphot .h"1 # include "psphotInternal.h" 2 2 3 3 // XXX I don't like this name -
trunk/psphot/src/psphotChoosePSF.c
r12665 r12792 1 # include "psphot .h"1 # include "psphotInternal.h" 2 2 3 3 // try PSF models and select best option -
trunk/psphot/src/psphotCleanup.c
r12561 r12792 1 # include "psphot .h"1 # include "psphotInternal.h" 2 2 3 3 void psphotCleanup (pmConfig *config) { -
trunk/psphot/src/psphotDeblendSatstars.c
r12689 r12792 1 # include "psphot .h"1 # include "psphotInternal.h" 2 2 3 3 bool psphotDeblendSatstars (psArray *sources, psMetadata *recipe) { -
trunk/psphot/src/psphotEnsemblePSF.c
r11702 r12792 1 # include "psphot .h"1 # include "psphotInternal.h" 2 2 3 3 // fit flux (and optionally sky model) to all reasonable sources -
trunk/psphot/src/psphotEvalFLT.c
r9270 r12792 1 # include "psphot .h"1 # include "psphotInternal.h" 2 2 3 3 bool psphotEvalEXT (pmSource *source, pmModel *model) -
trunk/psphot/src/psphotEvalPSF.c
r12689 r12792 1 # include "psphot .h"1 # include "psphotInternal.h" 2 2 3 3 // given a pmSource which has been fitted using modelPSF, evaluate the -
trunk/psphot/src/psphotFakeSources.c
r9734 r12792 1 # include "psphot .h"1 # include "psphotInternal.h" 2 2 3 3 psArray *psphotFakeSources () { -
trunk/psphot/src/psphotFindPeaks.c
r12689 r12792 1 # include "psphot .h"1 # include "psphotInternal.h" 2 2 3 3 // In this function, we smooth the image, then search for the peaks -
trunk/psphot/src/psphotFitSet.c
r9889 r12792 1 # include "psphot .h"1 # include "psphotInternal.h" 2 2 3 3 // XXX this is not used in main psphot code -
trunk/psphot/src/psphotGrowthCurve.c
r9889 r12792 1 # include "psphot .h"1 # include "psphotInternal.h" 2 2 3 3 // XXX we can probably move this into pmGrowthCurve.c -
trunk/psphot/src/psphotGuessModels.c
r11309 r12792 1 # include "psphot .h"1 # include "psphotInternal.h" 2 2 3 3 // construct an initial PSF model for each object -
trunk/psphot/src/psphotImageLoop.c
r12631 r12792 1 # include "psphot .h"1 # include "psphotInternal.h" 2 2 3 3 bool psphotImageLoop (pmConfig *config) { -
trunk/psphot/src/psphotImageMedian.c
r12611 r12792 1 # include "psphot .h"1 # include "psphotInternal.h" 2 2 static int npass = 0; 3 3 -
trunk/psphot/src/psphotMagnitudes.c
r12601 r12792 1 # include "psphot .h"1 # include "psphotInternal.h" 2 2 3 3 bool psphotMagnitudes(psArray *sources, -
trunk/psphot/src/psphotMaskReadout.c
r10053 r12792 1 # include "psphot .h"1 # include "psphotInternal.h" 2 2 3 3 bool psphotMaskReadout (pmReadout *readout, psMetadata *recipe) { -
trunk/psphot/src/psphotMergeSources.c
r11263 r12792 1 # include "psphot .h"1 # include "psphotInternal.h" 2 2 3 3 // add newly selected sources to the existing list of sources -
trunk/psphot/src/psphotModelGroupInit.c
r10414 r12792 1 # include "psphot .h"1 # include "psphotInternal.h" 2 2 3 3 // Add locally-defined models here. As these mature, they can be moved to -
trunk/psphot/src/psphotModelTest.c
r11702 r12792 1 # include "psphot .h"1 # include "psphotInternal.h" 2 2 static char DEFAULT_MODE[] = "EXT"; 3 3 -
trunk/psphot/src/psphotMosaicChip.c
r12634 r12792 1 # include "psphot .h"1 # include "psphotInternal.h" 2 2 3 3 bool psphotMosaicChip(pmConfig *config, const pmFPAview *view, char *outFile, char *inFile) -
trunk/psphot/src/psphotMosaicSubimage.c
r12665 r12792 1 # include "psphot .h"1 # include "psphotInternal.h" 2 2 3 3 // insert the source image into the outimage at Xo, Yo -
trunk/psphot/src/psphotOutput.c
r12601 r12792 1 # include "psphot .h"1 # include "psphotInternal.h" 2 2 3 3 pmReadout *psphotSelectBackground (pmConfig *config, pmFPAview *view) { -
trunk/psphot/src/psphotPSFResiduals.c
r12403 r12792 1 # include "psphot .h"1 # include "psphotInternal.h" 2 2 3 3 // construct an initial PSF model for each object -
trunk/psphot/src/psphotParseCamera.c
r12761 r12792 1 # include "psphot .h"1 # include "psphotInternal.h" 2 2 3 3 // define the needed / desired I/O files -
trunk/psphot/src/psphotRadialPlot.c
r12665 r12792 1 # include "psphot .h"1 # include "psphotInternal.h" 2 2 3 3 // this variable is defined in psmodules.h if ohana-config is found -
trunk/psphot/src/psphotRadiusChecks.c
r11702 r12792 1 # include "psphot .h"1 # include "psphotInternal.h" 2 2 # define RADIUS_TYPE int 3 3 -
trunk/psphot/src/psphotReadout.c
r12707 r12792 1 # include "psphot .h"1 # include "psphotInternal.h" 2 2 3 3 bool psphotReadout (pmConfig *config, pmFPAview *view) { -
trunk/psphot/src/psphotReadoutCleanup.c
r11583 r12792 1 # include "psphot .h"1 # include "psphotInternal.h" 2 2 3 3 // psphotReadoutCleanup is called on exit from psphotReadout if the last raised -
trunk/psphot/src/psphotReplaceUnfit.c
r12665 r12792 1 # include "psphot .h"1 # include "psphotInternal.h" 2 2 3 3 bool psphotReplaceUnfit (psArray *sources) { -
trunk/psphot/src/psphotRoughClass.c
r11263 r12792 1 # include "psphot .h"1 # include "psphotInternal.h" 2 2 3 3 // 2006.02.02 : no leaks -
trunk/psphot/src/psphotSkyReplace.c
r11702 r12792 1 # include "psphot .h"1 # include "psphotInternal.h" 2 2 3 3 // XXX make this an option? -
trunk/psphot/src/psphotSortBySN.c
r11175 r12792 1 # include "psphot .h"1 # include "psphotInternal.h" 2 2 3 3 // sort by SN (descending) -
trunk/psphot/src/psphotSourceFits.c
r12601 r12792 1 # include "psphot .h"1 # include "psphotInternal.h" 2 2 3 3 // given a source with an existing modelPSF, attempt a full PSF fit, subtract if successful -
trunk/psphot/src/psphotSourceFreePixels.c
r9270 r12792 1 # include "psphot .h"1 # include "psphotInternal.h" 2 2 3 3 void psphotSourceFreePixels (psArray *sources) { -
trunk/psphot/src/psphotSourcePlots.c
r12665 r12792 1 # include "psphot .h"1 # include "psphotInternal.h" 2 2 3 3 bool psphotSourcePlots (pmReadout *readout, psArray *sources, psMetadata *recipe) { -
trunk/psphot/src/psphotSourceStats.c
r11263 r12792 1 # include "psphot .h"1 # include "psphotInternal.h" 2 2 3 3 psArray *psphotSourceStats (pmReadout *readout, psMetadata *recipe, psArray *peaks) -
trunk/psphot/src/psphotSummaryPlots.c
r12627 r12792 1 # include "psphot .h"1 # include "psphotInternal.h" 2 2 3 3 // the top portion of this file defines plotting functions which use kapa for plotting. -
trunk/psphot/src/psphotTest.c
r9734 r12792 1 # include "psphot .h"1 # include "psphotInternal.h" 2 2 3 3 void psExit (int status, char *process, char *format, ...) { -
trunk/psphot/src/psphotTestArguments.c
r9270 r12792 1 # include "psphot .h"1 # include "psphotInternal.h" 2 2 static int usage (); 3 3 -
trunk/psphot/src/psphotTestPSF.c
r11702 r12792 1 # include "psphot .h"1 # include "psphotInternal.h" 2 2 3 3 bool psphotTestPSF (pmReadout *readout, psArray *sources, psMetadata *recipe) { -
trunk/psphot/src/psphotVersion.c
r10584 r12792 1 #include "psphot .h"1 #include "psphotInternal.h" 2 2 3 3 # if (HAVE_KAPA) -
trunk/psphot/src/psphotWeightBias.c
r11702 r12792 1 # include "psphot .h"1 # include "psphotInternal.h" 2 2 3 3 // select objects fitted with PSF model
Note:
See TracChangeset
for help on using the changeset viewer.
