source: trunk/src/param.hh @ 684

Last change on this file since 684 was 673, checked in by MatthewWhiting, 14 years ago

Fixing up the way the MW range interacts with the subsectioning. MW range should refer to channels in the full cube.

File size: 26.3 KB
Line 
1// -----------------------------------------------------------------------
2// param.hh: Definition of the parameter set.
3// -----------------------------------------------------------------------
4// Copyright (C) 2006, Matthew Whiting, ATNF
5//
6// This program is free software; you can redistribute it and/or modify it
7// under the terms of the GNU General Public License as published by the
8// Free Software Foundation; either version 2 of the License, or (at your
9// option) any later version.
10//
11// Duchamp is distributed in the hope that it will be useful, but WITHOUT
12// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13// FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14// for more details.
15//
16// You should have received a copy of the GNU General Public License
17// along with Duchamp; if not, write to the Free Software Foundation,
18// Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
19//
20// Correspondence concerning Duchamp may be directed to:
21//    Internet email: Matthew.Whiting [at] atnf.csiro.au
22//    Postal address: Dr. Matthew Whiting
23//                    Australia Telescope National Facility, CSIRO
24//                    PO Box 76
25//                    Epping NSW 1710
26//                    AUSTRALIA
27// -----------------------------------------------------------------------
28#ifndef PARAM_H
29#define PARAM_H
30
31#include <iostream>
32#include <string>
33#include <vector>
34#include <math.h>
35#include <wcslib/wcs.h>
36#include <wcslib/wcshdr.h>
37#include <duchamp/Utils/Section.hh>
38#include <duchamp/ATrous/filter.hh>
39
40namespace duchamp
41{
42
43  /// @brief Write out info on a parameter to e.g. the results file.
44  void recordParameters(std::ostream& theStream, std::string paramName, std::string paramDesc, std::string paramValue);
45
46  /// @brief A macro to handle streamed output to recordParameters
47#define recordParam(outstream,string1,string2,instream)      \
48  do{                                                       \
49    std::ostringstream oss;                                 \
50    oss<<instream;                                          \
51    recordParameters(outstream,string1,string2,oss.str());   \
52  }while(0)
53
54
55  class FitsHeader; // foreshadow this so that Param knows it exists
56
57  const int numSortingParamOptions = 10;
58  const std::string sortingParamOptions[numSortingParamOptions]={"xvalue","yvalue","zvalue","ra","dec","vel","w50","iflux","pflux","snr"};
59
60
61  /// @brief Class to store general parameters.
62  ///
63  /// @details This is a general repository for parameters that are used by all
64  /// functions. This is how the user interacts with the program, as
65  /// parameters are read in from disk files through functions in this
66  /// class.
67
68  class Param
69  {
70  public:
71    /// @brief Default constructor.
72    Param();
73
74    /// @brief Copy constructor for Param.
75    Param(const Param& p);
76
77    /// @brief Assignment operator for Param.
78    Param& operator= (const Param& p);
79
80    /// @brief Destructor function. 
81    virtual ~Param();
82
83    /// @brief Define the default values of each parameter.
84    void  defaultValues();
85
86    //-----------------
87    // Functions in param.cc
88    //
89    /// @brief Parse the command line parameters correctly.
90    int    getopts(int argc, char ** argv, std::string progname="Duchamp");
91
92    /// @brief Read in parameters from a disk file.
93    int    readParams(std::string paramfile);
94
95    /// @brief Check the parameter list for inconsistencies
96    void   checkPars();
97
98    /// @brief Copy certain necessary FITS header parameters from a FitsHeader object
99    void   copyHeaderInfo(FitsHeader &head);
100
101    /// @brief Determine filename in which to save the mask array.
102    std::string outputMomentMapFile();
103
104    /// @brief Determine filename in which to save the mask array.
105    std::string outputMaskFile();
106
107    /// @brief Determine filename in which to save the smoothed array.
108    std::string outputSmoothFile();
109
110    /// @brief Determine filename in which to save the reconstructed array.
111    std::string outputReconFile();
112
113    /// @brief Determine filename in which to save the residual array from the atrous reconstruction.
114    std::string outputResidFile();
115
116    /// @brief Print the parameter set in a readable fashion.
117    friend std::ostream& operator<< ( std::ostream& theStream, Param& par);
118    friend class Image;
119
120    //------------------
121    // Functions in FitsIO/subsection.cc
122    //
123    /// @brief Make sure the subsection strings are OK.
124    int    verifySubsection();
125
126    /// @brief Set the correct offset values for each axis
127    void   setOffsets(struct wcsprm *wcs);
128
129    /// @brief Set the correct offset values for each axis
130    void   setOffsets(struct wcsprm &wcs);
131
132    //------------------
133    // These are in param.cc
134    /// @brief Is a pixel value a BLANK?
135    bool   isBlank(float &value);
136
137    /// @brief Is a given channel flagged as being in the Milky Way?           
138    bool   isInMW(int z);
139
140    /// @brief Is a given pixel position OK for use with stats calculations?
141    bool   isStatOK(int x, int y, int z);
142
143    /// @brief Make a mask array -- an array saying whether each pixel is BLANK or not
144    bool  *makeBlankMask(float *array, int size);
145
146    /// @brief Make a mask array -- an array saying whether each pixel is able to be used for statistics calculations
147    bool *makeStatMask(float *array, long *dim);
148
149    //--------------------
150    // Basic inline accessor functions
151    //
152    std::string getImageFile(){return imageFile;};
153    void   setImageFile(std::string fname){imageFile = fname;};
154    std::string getFullImageFile(){
155      if(flagSubsection) return imageFile+pixelSec.getSection();
156      else return imageFile;
157    };
158    bool   getFlagSubsection(){return flagSubsection;};
159    void   setFlagSubsection(bool flag){flagSubsection=flag;};
160    std::string getSubsection(){return pixelSec.getSection();};
161    void   setSubsection(std::string range){pixelSec.setSection(range);};
162    Section &section(){Section &rsection = pixelSec; return rsection;};
163    bool   getFlagReconExists(){return flagReconExists;};
164    void   setFlagReconExists(bool flag){flagReconExists=flag;};
165    std::string getReconFile(){return reconFile;};
166    void   setReconFile(std::string file){reconFile = file;};
167    bool   getFlagSmoothExists(){return flagSmoothExists;};
168    void   setFlagSmoothExists(bool flag){flagSmoothExists=flag;};
169    std::string getSmoothFile(){return smoothFile;};
170    void   setSmoothFile(std::string file){smoothFile = file;};
171    //
172    bool   getFlagUsePrevious(){return usePrevious;};
173    void   setFlagUsePrevious(bool flag){usePrevious=flag;};
174    std::string getObjectList(){return objectList;};
175    void   setObjectList(std::string s){objectList = s;};
176    std::vector<int> getObjectRequest();
177    std::vector<bool> getObjectChoices();
178    std::vector<bool> getObjectChoices(int numObjects);
179    //
180    bool   getFlagLog(){return flagLog;};
181    void   setFlagLog(bool flag){flagLog=flag;};
182    std::string getLogFile(){return logFile;};
183    void   setLogFile(std::string fname){logFile = fname;};
184    std::string getOutFile(){return outFile;};
185    void   setOutFile(std::string fname){outFile = fname;};
186    bool   getFlagSeparateHeader(){return flagSeparateHeader;};
187    void   setFlagSeparateHeader(bool b){flagSeparateHeader=b;};
188    std::string getHeaderFile(){return headerFile;};
189    void   setHeaderFile(std::string s){headerFile=s;};
190    std::string getSpectraFile(){return spectraFile;};
191    void   setSpectraFile(std::string fname){spectraFile = fname;};
192    bool   getFlagTextSpectra(){return flagTextSpectra;};
193    void   setFlagTextSpectra(bool b){flagTextSpectra = b;};
194    std::string getSpectraTextFile(){return spectraTextFile;};
195    void   setSpectraTextFile(std::string fname){spectraTextFile = fname;};
196    bool   getFlagOutputMomentMap(){return flagOutputMomentMap;};
197    void   setFlagOutputMomentMap(bool flag){flagOutputMomentMap=flag;};
198    std::string getFileOutputMomentMap(){return fileOutputMomentMap;};
199    void   setFileOutputMomentMap(std::string s){fileOutputMomentMap=s;};
200    bool   getFlagOutputMask(){return flagOutputMask;};
201    void   setFlagOutputMask(bool flag){flagOutputMask=flag;};
202    std::string getFileOutputMask(){return fileOutputMask;};
203    void   setFileOutputMask(std::string s){fileOutputMask=s;};
204    bool   getFlagMaskWithObjectNum(){return flagMaskWithObjectNum;};
205    void   setFlagMaskWithObjectNum(bool flag){flagMaskWithObjectNum=flag;};
206    bool   getFlagOutputSmooth(){return flagOutputSmooth;};
207    void   setFlagOutputSmooth(bool flag){flagOutputSmooth=flag;};
208    std::string getFileOutputSmooth(){return fileOutputSmooth;};
209    void   setFileOutputSmooth(std::string s){fileOutputSmooth=s;};
210    bool   getFlagOutputRecon(){return flagOutputRecon;};
211    void   setFlagOutputRecon(bool flag){flagOutputRecon=flag;};
212    std::string getFileOutputRecon(){return fileOutputRecon;};
213    void   setFileOutputRecon(std::string s){fileOutputRecon=s;};
214    bool   getFlagOutputResid(){return flagOutputResid;};
215    void   setFlagOutputResid(bool flag){flagOutputResid=flag;};
216    std::string getFileOutputResid(){return fileOutputResid;};
217    void   setFileOutputResid(std::string s){fileOutputResid=s;};
218    bool   getFlagVOT(){return flagVOT;};
219    void   setFlagVOT(bool flag){flagVOT=flag;};
220    std::string getVOTFile(){return votFile;};
221    void   setVOTFile(std::string fname){votFile = fname;};
222    bool   getFlagKarma(){return flagKarma;};
223    void   setFlagKarma(bool flag){flagKarma=flag;};
224    std::string getAnnotationType(){return annotationType;};
225    void   setAnnotationType(std::string s){annotationType=s;};
226    std::string getKarmaFile(){return karmaFile;};
227    void   setKarmaFile(std::string fname){karmaFile = fname;};
228    bool   getFlagMaps(){return flagMaps;};
229    void   setFlagMaps(bool flag){flagMaps=flag;};
230    std::string getDetectionMap(){return detectionMap;};
231    void   setDetectionMap(std::string fname){detectionMap = fname;};
232    std::string getMomentMap(){return momentMap;};
233    void   setMomentMap(std::string fname){momentMap = fname;};
234    bool   getFlagXOutput(){return flagXOutput;};
235    void   setFlagXOutput(bool b){flagXOutput=b;};
236    int    getPrecFlux(){return precFlux;};
237    void   setPrecFlux(int i){precFlux=i;};
238    int    getPrecVel(){return precVel;};
239    void   setPrecVel(int i){precVel=i;};
240    int    getPrecSNR(){return precSNR;};
241    void   setPrecSNR(int i){precSNR=i;};
242    //
243    bool   getFlagNegative(){return flagNegative;};
244    void   setFlagNegative(bool flag){flagNegative=flag;};
245    bool   getFlagBlankPix(){return flagBlankPix;};
246    void   setFlagBlankPix(bool flag){flagBlankPix=flag;};
247    float  getBlankPixVal(){return blankPixValue;};
248    void   setBlankPixVal(float v){blankPixValue=v;};
249    int    getBlankKeyword(){return blankKeyword;};
250    void   setBlankKeyword(int v){blankKeyword=v;};
251    float  getBscaleKeyword(){return bscaleKeyword;};
252    void   setBscaleKeyword(float v){bscaleKeyword=v;};
253    float  getBzeroKeyword(){return bzeroKeyword;};
254    void   setBzeroKeyword(float v){bzeroKeyword=v;};
255    bool   getFlagMW(){return flagMW;};
256    void   setFlagMW(bool flag){flagMW=flag;};
257    int    getMaxMW(){return maxMW - zSubOffset;};
258    void   setMaxMW(int m){maxMW=m;};
259    int    getMinMW(){return minMW - zSubOffset;};
260    void   setMinMW(int m){minMW=m;};
261    void   setBeamSize(float s){areaBeam = s;};
262    float  getBeamSize(){return areaBeam;};
263    void   setBeamFWHM(float s){fwhmBeam = s;};
264    float  getBeamFWHM(){return fwhmBeam;};
265    bool   getFlagUsingBeam(){return flagUsingBeam;};
266    void   setFlagUsingBeam(bool b){flagUsingBeam=b;};
267    std::string getNewFluxUnits(){return newFluxUnits;};
268    void setNewFluxUnits(std::string s){newFluxUnits=s;};
269    //
270    bool   getFlagTrim(){return flagTrim;};
271    void   setFlagTrim(bool b){flagTrim=b;};
272    bool   getFlagCubeTrimmed(){return hasBeenTrimmed;};
273    void   setFlagCubeTrimmed(bool flag){hasBeenTrimmed = flag;};
274    long   getBorderLeft(){return borderLeft;};
275    void   setBorderLeft(long b){borderLeft = b;};
276    long   getBorderRight(){return borderRight;};
277    void   setBorderRight(long b){borderRight = b;};
278    long   getBorderBottom(){return borderBottom;};
279    void   setBorderBottom(long b){borderBottom = b;};
280    long   getBorderTop(){return borderTop;};
281    void   setBorderTop(long b){borderTop = b;};
282    //
283    long   getXOffset(){return xSubOffset;};
284    void   setXOffset(long o){xSubOffset = o;};
285    long   getYOffset(){return ySubOffset;};
286    void   setYOffset(long o){ySubOffset = o;};
287    long   getZOffset(){return zSubOffset;};
288    void   setZOffset(long o){zSubOffset = o;};
289    //
290    unsigned int   getMinPix(){return minPix;};
291    void   setMinPix(int m){minPix=m;};
292    //   
293    bool   getFlagGrowth(){return flagGrowth;};
294    void   setFlagGrowth(bool flag){flagGrowth=flag;};
295    float  getGrowthCut(){return growthCut;};
296    void   setGrowthCut(float c){growthCut=c;};
297    float  getGrowthThreshold(){return growthThreshold;};
298    void   setGrowthThreshold(float f){growthThreshold=f;};
299    bool   getFlagUserGrowthThreshold(){return flagUserGrowthThreshold;};
300    void   setFlagUserGrowthThreshold(bool b){flagUserGrowthThreshold=b;};
301    //   
302    bool   getFlagFDR(){return flagFDR;};
303    void   setFlagFDR(bool flag){flagFDR=flag;};
304    float  getAlpha(){return alphaFDR;};
305    void   setAlpha(float a){alphaFDR=a;};
306    int    getFDRnumCorChan(){return FDRnumCorChan;};
307    void   setFDRnumCorChan(int i){FDRnumCorChan=i;};
308    //
309    bool   getFlagBaseline(){return flagBaseline;};
310    void   setFlagBaseline(bool flag){flagBaseline = flag;};
311    //
312    bool   getFlagStatSec(){return flagStatSec;};
313    void   setFlagStatSec(bool flag){flagStatSec=flag;};
314    std::string getStatSec(){return statSec.getSection();};
315    void   setStatSec(std::string range){statSec.setSection(range);};
316    bool   getFlagRobustStats(){return flagRobustStats;};
317    void   setFlagRobustStats(bool flag){flagRobustStats=flag;};
318    float  getCut(){return snrCut;};
319    void   setCut(float c){snrCut=c;};
320    float  getThreshold(){return threshold;};
321    void   setThreshold(float f){threshold=f;};
322    bool   getFlagUserThreshold(){return flagUserThreshold;};
323    void   setFlagUserThreshold(bool b){flagUserThreshold=b;};
324    //   
325    bool   getFlagSmooth(){return flagSmooth;};
326    void   setFlagSmooth(bool b){flagSmooth=b;};
327    std::string getSmoothType(){return smoothType;};
328    void   setSmoothType(std::string s){smoothType=s;};
329    int    getHanningWidth(){return hanningWidth;};
330    void   setHanningWidth(int f){hanningWidth=f;};
331    void   setKernMaj(float f){kernMaj=f;};
332    float  getKernMaj(){return kernMaj;};
333    void   setKernMin(float f){kernMin=f;};
334    float  getKernMin(){return kernMin;};
335    void   setKernPA(float f){kernPA=f;};
336    float  getKernPA(){return kernPA;};
337    //   
338    bool   getFlagATrous(){return flagATrous;};
339    void   setFlagATrous(bool flag){flagATrous=flag;};
340    int    getReconDim(){return reconDim;};
341    void   setReconDim(int i){reconDim=i;};
342    int    getMinScale(){return scaleMin;};
343    void   setMinScale(int s){scaleMin=s;};
344    int    getMaxScale(){return scaleMax;};
345    void   setMaxScale(int s){scaleMax=s;};
346    float  getAtrousCut(){return snrRecon;};
347    void   setAtrousCut(float c){snrRecon=c;};
348    int    getFilterCode(){return filterCode;};
349    void   setFilterCode(int c){filterCode=c;};
350    std::string getFilterName(){return reconFilter.getName();};
351    Filter& filter(){ Filter &rfilter = reconFilter; return rfilter; };
352    //   
353    bool   getFlagAdjacent(){return flagAdjacent;};
354    void   setFlagAdjacent(bool flag){flagAdjacent=flag;};
355    float  getThreshS(){return threshSpatial;};
356    void   setThreshS(float t){threshSpatial=t;};
357    float  getThreshV(){return threshVelocity;};
358    void   setThreshV(float t){threshVelocity=t;};
359    int    getMinChannels(){return minChannels;};
360    void   setMinChannels(int n){minChannels=n;};
361    bool   getFlagRejectBeforeMerge(){return flagRejectBeforeMerge;};
362    void   setFlagRejectBeforeMerge(bool flag){flagRejectBeforeMerge=flag;};
363    //
364    std::string getSpectralMethod(){return spectralMethod;};
365    void   setSpectralMethod(std::string s){spectralMethod=s;};
366    std::string getSpectralUnits(){return spectralUnits;};
367    void   setSpectralUnits(std::string s){spectralUnits=s;};
368    std::string getPixelCentre(){return pixelCentre;};
369    void   setPixelCentre(std::string s){pixelCentre=s;};
370    std::string getSortingParam(){return sortingParam;};
371    void   setSortingParam(std::string s){sortingParam=s;};
372    bool   drawBorders(){return borders;};
373    void   setDrawBorders(bool f){borders=f;};
374    bool   drawBlankEdge(){return blankEdge;};
375    void   setDrawBlankEdge(bool f){blankEdge=f;};
376
377    /// @brief Are we in verbose mode?
378    bool   isVerbose(){return verbose;};
379    void   setVerbosity(bool f){verbose=f;};
380 
381  private:
382    // Input files
383    std::string imageFile;       ///< The image to be analysed.
384    bool        flagSubsection;  ///< Whether we just want a subsection of the image
385    Section pixelSec;            ///< The Section object storing the pixel subsection information.
386    bool        flagReconExists; ///< The reconstructed array is in a FITS file on disk.
387    std::string reconFile;       ///< The FITS file containing the reconstructed array.
388    bool        flagSmoothExists;///< The smoothed array is in a FITS file.
389    std::string smoothFile;      ///< The FITS file containing the smoothed array.
390
391    bool       usePrevious;      ///< Whether to read the detections from a previously-created log file
392    std::string objectList;      ///< List of objects to re-plot
393
394    // Output files
395    bool        flagLog;         ///< Should we do the intermediate logging?
396    std::string logFile;         ///< Where the intermediate logging goes.
397    std::string outFile;         ///< Where the final results get put.
398    bool        flagSeparateHeader;///< Should the header information(parameters & statistics) be written to a separate file to the table ofresults?
399    std::string headerFile;      ///< Where the header information to go with the results table should be written.
400    std::string spectraFile;     ///< Where the spectra are displayed
401    bool        flagTextSpectra; ///< Should a text file with all spectra be written?
402    std::string spectraTextFile; ///< Where the text spectra are written.
403    bool        flagOutputMomentMap;  ///< Should the moment map image be written to a FITS file?
404    std::string fileOutputMomentMap;  ///< The name of the moment map FITS file
405    bool        flagOutputMask;  ///< Should the mask image be written?
406    std::string fileOutputMask;  ///< The name of the mask image.
407    bool        flagMaskWithObjectNum;///< Should the mask values be labeled with the object ID (or just 1)?
408    bool        flagOutputSmooth;///< Should the smoothed cube be written?
409    std::string fileOutputSmooth;///< The name of the smoothed cube file
410    bool        flagOutputRecon; ///< Should the reconstructed cube be written to a FITS file?
411    std::string fileOutputRecon; ///< The name of the reconstructed cube file
412    bool        flagOutputResid; ///< Should the residuals from the reconstruction be written to a FITS file?
413    std::string fileOutputResid; ///< The name of the residual cube file
414    bool        flagVOT;         ///< Should we save results in VOTable format?
415    std::string votFile;         ///< Where the VOTable goes.
416    bool        flagKarma;       ///< Should we save results in Karma annotation format?
417    std::string karmaFile;       ///< Where the Karma annotation file goes.
418    std::string annotationType;  ///< Should the annoations be circles or borders?
419    bool        flagMaps;        ///< Should we produce detection and moment maps in postscript form?
420    std::string detectionMap;    ///< The name of the detection map (postscript file).
421    std::string momentMap;       ///< The name of the 0th moment map (ps file).
422    bool        flagXOutput;     ///< Should there be an xwindows output of the detection map?
423    int         precFlux;        ///< The desired precision for flux values.
424    int         precVel;         ///< The desired precision for velocity/frequency values.
425    int         precSNR;         ///< The desired precision for the SNR values.
426
427    // Cube related parameters
428    bool        flagNegative;    ///< Are we going to search for negative features?
429    bool        flagBlankPix;    ///< A flag that indicates whether there are pixels defined as BLANK and whether we need to remove & ignore them in processing.
430    float       blankPixValue;   ///< Pixel value that is considered BLANK.
431    int         blankKeyword;    ///< The FITS header keyword BLANK.
432    float       bscaleKeyword;   ///< The FITS header keyword BSCALE.
433    float       bzeroKeyword;    ///< The FITS header keyword BZERO.
434    std::string newFluxUnits;    ///< The user-requested flux units, to replace BUNIT.
435
436    // Milky-Way parameters
437    bool        flagMW;          ///< A flag that indicates whether to ignore the Milky Way channels.
438    int         maxMW;           ///< Last  Milky Way channel
439    int         minMW;           ///< First Milky Way channel
440
441    // Trim-related
442    bool        flagTrim;        ///< Does the user want the cube trimmed?
443    bool        hasBeenTrimmed;  ///< Has the cube been trimmed of excess BLANKs around the edge?
444    long        borderLeft;      ///< The number of BLANK pixels trimmed from the left of the cube;
445    long        borderRight;     ///< The number trimmed from the Right of the cube;
446    long        borderBottom;    ///< The number trimmed from the Bottom of the cube;
447    long        borderTop;       ///< The number trimmed from the Top of the cube;
448
449    // Subsection offsets
450    long       *offsets;         ///< The array of offsets for each FITS axis.
451    long        sizeOffsets;     ///< The size of the offsets array.
452    long        xSubOffset;      ///< The subsection's x-axis offset
453    long        ySubOffset;      ///< The subsection's y-axis offset
454    long        zSubOffset;      ///< The subsection's z-axis offset
455
456    // Baseline related
457    bool        flagBaseline;    ///< Whether to do baseline subtraction before reconstruction and/or searching.
458
459    // Detection-related
460    int         minPix;          ///< Minimum number of pixels for a detected object to be counted
461    float       areaBeam;        ///< Size (area) of the beam in pixels.
462    float       fwhmBeam;        ///< FWHM of the beam in pixels.
463    bool        flagUsingBeam;   ///< If true, we are using the numPixBeam parameter, otherwise we use the value in the FITS header.
464
465    // Object growth
466    bool        flagGrowth;      ///< Are we growing objects once they are found?
467    float       growthCut;       ///< The SNR that we are growing objects down to.
468    bool        flagUserGrowthThreshold; ///< Whether the user has manually defined a growth threshold
469    float       growthThreshold; ///< The threshold for growing objects down to
470
471    // FDR analysis
472    bool        flagFDR;         ///< Should the FDR method be used?
473    float       alphaFDR;        ///< Alpha value for FDR detection algorithm
474    int         FDRnumCorChan;   ///< Number of correlated channels, used in the FDR algorithm
475
476    // Basic detection
477    bool        flagStatSec;     ///< Whether we just want to use a subsection of the image to calculate the statistics.
478    Section     statSec;         ///< The Section object storing the statistics subsection information.
479    bool        flagRobustStats; ///< Whether to use robust statistics.
480    float       snrCut;          ///< How many sigma above mean is a detection when sigma-clipping
481    float       threshold;       ///< What the threshold is (when sigma-clipping).
482    bool        flagUserThreshold;///< Whether the user has defined a threshold of their own.
483
484    // Smoothing of the cube
485    bool        flagSmooth;      ///< Should the cube be smoothed before searching?
486    std::string smoothType;      ///< The type of smoothing to be done.
487    int         hanningWidth;    ///< Width for hanning smoothing.
488    float       kernMaj;         ///< Semi-Major axis of gaussian smoothing kernel
489    float       kernMin;         ///< Semi-Minor axis of gaussian smoothing kernel
490    float       kernPA;          ///< Position angle of gaussian smoothing kernel, in degrees east of north (i.e. anticlockwise).
491
492    // A trous reconstruction parameters
493    bool   flagATrous;      ///< Are we using the a trous reconstruction?
494    int    reconDim;        ///< How many dimensions to use for the reconstruction?
495    int    scaleMin;        ///< Min scale used in a trous reconstruction
496    int    scaleMax;        ///< Max scale used in a trous reconstruction
497    float  snrRecon;        ///< SNR cutoff used in a trous reconstruction (only wavelet coefficients that survive this threshold are kept)
498    Filter reconFilter;     ///< The filter used for reconstructions.
499    int    filterCode;      ///< The code number for the filter to be used (saves having to parse names)
500    std::string filterName; ///< The code number converted into a name, for outputting purposes.
501
502    // Volume-merging parameters
503    bool   flagAdjacent;    ///< Whether to use the adjacent criterion for judging if objects are to be merged.
504    float  threshSpatial;   ///< Maximum spatial separation between objects
505    float  threshVelocity;  ///< Maximum channels separation between objects
506    int    minChannels;     ///< Minimum no. of channels to make an object
507    bool   flagRejectBeforeMerge; ///< Whether to reject sources before merging
508
509    // Input-Output related
510    std::string spectralMethod; ///< A string indicating choice of spectral plotting method: choices are "peak" (default) or "sum"
511    std::string spectralUnits;   ///< A string indicating what units the spectral axis should be quoted in.
512    std::string pixelCentre;///< A string indicating which type of centre to give the results in: "average", "centroid", or "peak"(flux).
513    std::string sortingParam; ///< A string indicating the parameter to sort the detection list on.
514    bool   borders;         ///< Whether to draw a border around the individual pixels of a detection in the spectral display
515    bool   blankEdge;       ///< Whether to draw a border around the BLANK pixel region in the moment maps and cutout images
516    bool   verbose;         ///< Whether to use maximum verbosity -- use progress indicators in the reconstruction & merging steps.
517
518  };
519
520  //===========================================================================
521
522
523  /// @brief Convert a string to lowercase.
524  std::string makelower( std::string s );
525
526}
527#endif
Note: See TracBrowser for help on using the repository browser.