IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 12792


Ignore:
Timestamp:
Apr 10, 2007, 3:34:16 PM (19 years ago)
Author:
Paul Price
Message:

Separating public and private interfaces in header file and library.

Location:
trunk/psphot/src
Files:
1 added
49 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot/src/Makefile.am

    r12689 r12792  
    88psphot_LDFLAGS = $(PSLIB_LIBS) $(PSMODULE_LIBS) $(PSPHOT_LIBS)
    99psphot_LDADD = libpsphot.la
    10 psphot_SOURCES = psphot.c               
     10psphot_SOURCES = psphot.c       \
     11        psphotArguments.c       \
     12        psphotCleanup.c         \
     13        psphotImageLoop.c       \
     14        psphotMosaicChip.c      \
     15        psphotParseCamera.c
    1116
    1217libpsphot_la_SOURCES = \
     
    1419        psphotVersion.c         \
    1520        psphotModelGroupInit.c  \
    16         psphotArguments.c       \
    17         psphotParseCamera.c     \
    18         psphotMosaicChip.c      \
    19         psphotImageLoop.c       \
    2021        psphotMaskReadout.c     \
    2122        psphotReadout.c         \
     
    5354        psphotDeblendSatstars.c  \
    5455        psphotMosaicSubimage.c   \
    55         psphotAddNoise.c         \
    56         psphotCleanup.c         
     56        psphotAddNoise.c
    5757
    5858
     
    6060        psphot.h \
    6161        psphotErrorCodes.h
     62
     63noinst_HEADERS = \
     64        psphotInternal.h
    6265
    6366clean-local:
  • trunk/psphot/src/psphot.c

    r11263 r12792  
    1 # include "psphot.h"
     1# include "psphotInternal.h"
    22
    33static void usage (void) {
     
    1010    psTimerStart ("complete");
    1111    psphotErrorRegister();              // register our error codes/messages
    12     psphotModelGroupInit ();            // load implementation-specific models
     12    psphotModelGroupInit ();            // load implementation-specific models
    1313
    1414    // load command-line arguments, options, and system config data
  • trunk/psphot/src/psphot.h

    r12689 r12792  
    33# endif
    44
    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
    107
    11 # include "psphotErrorCodes.h"
     8#include <stdio.h>
     9#include <pslib.h>
     10#include <psmodules.h>
     11
     12#include "psphotErrorCodes.h"
    1213#define PSPHOT_RECIPE "PSPHOT" // Name of the recipe to use
    1314
     
    1718psString psphotVersionLong(void);
    1819
    19 // XXX test functions
    20 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 
    2820bool            psphotModelTest (pmReadout *readout, psMetadata *recipe);
    2921bool            psphotReadout (pmConfig *config, pmFPAview *view);
    30 void            psphotCleanup (pmConfig *config);
    31 
    32 psArray        *psphotFakeSources ();
    33 
    34 // psphotReadout functions
    35 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);
    5122bool            psphotReadoutCleanup (pmConfig *config, pmReadout *readout, psMetadata *recipe, pmPSF *psf, psArray *sources);
    5223
    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"
    22
    33bool psphotAddNoise (pmReadout *readout, psArray *sources, psMetadata *recipe, bool add) {
  • trunk/psphot/src/psphotApResid.c

    r11381 r12792  
    1 # include "psphot.h"
     1# include "psphotInternal.h"
    22// XXXX this code fails if there are too few sources to measure the aperture residual
    33// 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"
    22
    33pmConfig *psphotArguments(int argc, char **argv) {
  • trunk/psphot/src/psphotBasicDeblend.c

    r12689 r12792  
    1 # include "psphot.h"
     1# include "psphotInternal.h"
    22
    33bool psphotBasicDeblend (psArray *sources, psMetadata *recipe) {
  • trunk/psphot/src/psphotBlendFit.c

    r11702 r12792  
    1 # include "psphot.h"
     1# include "psphotInternal.h"
    22
    33// XXX I don't like this name
  • trunk/psphot/src/psphotChoosePSF.c

    r12665 r12792  
    1 # include "psphot.h"
     1# include "psphotInternal.h"
    22
    33// try PSF models and select best option
  • trunk/psphot/src/psphotCleanup.c

    r12561 r12792  
    1 # include "psphot.h"
     1# include "psphotInternal.h"
    22
    33void psphotCleanup (pmConfig *config) {
  • trunk/psphot/src/psphotDeblendSatstars.c

    r12689 r12792  
    1 # include "psphot.h"
     1# include "psphotInternal.h"
    22
    33bool psphotDeblendSatstars (psArray *sources, psMetadata *recipe) {
  • trunk/psphot/src/psphotEnsemblePSF.c

    r11702 r12792  
    1 # include "psphot.h"
     1# include "psphotInternal.h"
    22
    33// 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"
    22
    33bool psphotEvalEXT (pmSource *source, pmModel *model)
  • trunk/psphot/src/psphotEvalPSF.c

    r12689 r12792  
    1 # include "psphot.h"
     1# include "psphotInternal.h"
    22
    33// 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"
    22
    33psArray *psphotFakeSources () {
  • trunk/psphot/src/psphotFindPeaks.c

    r12689 r12792  
    1 # include "psphot.h"
     1# include "psphotInternal.h"
    22
    33// 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"
    22
    33// XXX this is not used in main psphot code
  • trunk/psphot/src/psphotGrowthCurve.c

    r9889 r12792  
    1 # include "psphot.h"
     1# include "psphotInternal.h"
    22
    33// XXX we can probably move this into pmGrowthCurve.c
  • trunk/psphot/src/psphotGuessModels.c

    r11309 r12792  
    1 # include "psphot.h"
     1# include "psphotInternal.h"
    22
    33// construct an initial PSF model for each object
  • trunk/psphot/src/psphotImageLoop.c

    r12631 r12792  
    1 # include "psphot.h"
     1# include "psphotInternal.h"
    22
    33bool psphotImageLoop (pmConfig *config) {
  • trunk/psphot/src/psphotImageMedian.c

    r12611 r12792  
    1 # include "psphot.h"
     1# include "psphotInternal.h"
    22static int npass = 0;
    33
  • trunk/psphot/src/psphotMagnitudes.c

    r12601 r12792  
    1 # include "psphot.h"
     1# include "psphotInternal.h"
    22
    33bool psphotMagnitudes(psArray *sources,
  • trunk/psphot/src/psphotMaskReadout.c

    r10053 r12792  
    1 # include "psphot.h"
     1# include "psphotInternal.h"
    22
    33bool psphotMaskReadout (pmReadout *readout, psMetadata *recipe) {
  • trunk/psphot/src/psphotMergeSources.c

    r11263 r12792  
    1 # include "psphot.h"
     1# include "psphotInternal.h"
    22
    33// 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"
    22
    33// 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"
    22static char DEFAULT_MODE[] = "EXT";
    33
  • trunk/psphot/src/psphotMosaicChip.c

    r12634 r12792  
    1 # include "psphot.h"
     1# include "psphotInternal.h"
    22
    33bool 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"
    22
    33// 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"
    22
    33pmReadout *psphotSelectBackground (pmConfig *config, pmFPAview *view) {
  • trunk/psphot/src/psphotPSFResiduals.c

    r12403 r12792  
    1 # include "psphot.h"
     1# include "psphotInternal.h"
    22
    33// construct an initial PSF model for each object
  • trunk/psphot/src/psphotParseCamera.c

    r12761 r12792  
    1 # include "psphot.h"
     1# include "psphotInternal.h"
    22
    33// define the needed / desired I/O files
  • trunk/psphot/src/psphotRadialPlot.c

    r12665 r12792  
    1 # include "psphot.h"
     1# include "psphotInternal.h"
    22
    33// 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"
    22# define RADIUS_TYPE int
    33
  • trunk/psphot/src/psphotReadout.c

    r12707 r12792  
    1 # include "psphot.h"
     1# include "psphotInternal.h"
    22
    33bool psphotReadout (pmConfig *config, pmFPAview *view) {
  • trunk/psphot/src/psphotReadoutCleanup.c

    r11583 r12792  
    1 # include "psphot.h"
     1# include "psphotInternal.h"
    22
    33// 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"
    22
    33bool psphotReplaceUnfit (psArray *sources) {
  • trunk/psphot/src/psphotRoughClass.c

    r11263 r12792  
    1 # include "psphot.h"
     1# include "psphotInternal.h"
    22
    33// 2006.02.02 : no leaks
  • trunk/psphot/src/psphotSkyReplace.c

    r11702 r12792  
    1 # include "psphot.h"
     1# include "psphotInternal.h"
    22
    33// XXX make this an option?
  • trunk/psphot/src/psphotSortBySN.c

    r11175 r12792  
    1 # include "psphot.h"
     1# include "psphotInternal.h"
    22
    33// sort by SN (descending)
  • trunk/psphot/src/psphotSourceFits.c

    r12601 r12792  
    1 # include "psphot.h"
     1# include "psphotInternal.h"
    22
    33// 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"
    22
    33void psphotSourceFreePixels (psArray *sources) {
  • trunk/psphot/src/psphotSourcePlots.c

    r12665 r12792  
    1 # include "psphot.h"
     1# include "psphotInternal.h"
    22
    33bool psphotSourcePlots (pmReadout *readout, psArray *sources, psMetadata *recipe) {
  • trunk/psphot/src/psphotSourceStats.c

    r11263 r12792  
    1 # include "psphot.h"
     1# include "psphotInternal.h"
    22
    33psArray *psphotSourceStats (pmReadout *readout, psMetadata *recipe, psArray *peaks)
  • trunk/psphot/src/psphotSummaryPlots.c

    r12627 r12792  
    1 # include "psphot.h"
     1# include "psphotInternal.h"
    22
    33// 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"
    22
    33void psExit (int status, char *process, char *format, ...) {
  • trunk/psphot/src/psphotTestArguments.c

    r9270 r12792  
    1 # include "psphot.h"
     1# include "psphotInternal.h"
    22static int usage ();
    33
  • trunk/psphot/src/psphotTestPSF.c

    r11702 r12792  
    1 # include "psphot.h"
     1# include "psphotInternal.h"
    22
    33bool psphotTestPSF (pmReadout *readout, psArray *sources, psMetadata *recipe) {
  • trunk/psphot/src/psphotVersion.c

    r10584 r12792  
    1 #include "psphot.h"
     1#include "psphotInternal.h"
    22
    33# if (HAVE_KAPA)
  • trunk/psphot/src/psphotWeightBias.c

    r11702 r12792  
    1 # include "psphot.h"
     1# include "psphotInternal.h"
    22
    33// select objects fitted with PSF model
Note: See TracChangeset for help on using the changeset viewer.