1 | #ifndef DUCHAMP_HH |
---|
2 | #define DUCHAMP_HH |
---|
3 | |
---|
4 | #include <iostream> |
---|
5 | #include <string> |
---|
6 | |
---|
7 | #undef PACKAGE_BUGREPORT |
---|
8 | #undef PACKAGE_NAME |
---|
9 | #undef PACKAGE_STRING |
---|
10 | #undef PACKAGE_TARNAME |
---|
11 | #undef PACKAGE_VERSION |
---|
12 | #include "config.h" |
---|
13 | |
---|
14 | /** how to convey whether a function has worked */ |
---|
15 | enum OUTCOME {SUCCESS=0, FAILURE}; |
---|
16 | |
---|
17 | /** Usage message for command line help. */ |
---|
18 | const std::string ERR_USAGE_MSG = |
---|
19 | "Usage: Duchamp [OPTION] [FILE]\n\ |
---|
20 | Duchamp is an object finder for spectral-line FITS cubes.\n\ |
---|
21 | \n\ |
---|
22 | -p FILE Read in parameters from FILE, including FITS image location.\n\ |
---|
23 | -f FILE Use default parameters with imageFile=FILE\n\ |
---|
24 | -x Do not use X-windows PGPLOT output\n\ |
---|
25 | (equivalent to setting flagXOutput=false -- overrides the parameter file)\n\n\ |
---|
26 | -v Return version number and exit\n\ |
---|
27 | -h Display this help information and exit\n"; |
---|
28 | |
---|
29 | /** Shorter Usage message for command line help. */ |
---|
30 | const std::string ERR_USAGE_MSG_SHORT="Usage: Duchamp -p [parameter file]\n"; |
---|
31 | |
---|
32 | /** The program name. (Duchamp) */ |
---|
33 | const std::string PROGNAME = PACKAGE_NAME; |
---|
34 | |
---|
35 | /** The program version */ |
---|
36 | const std::string VERSION = PACKAGE_VERSION; |
---|
37 | |
---|
38 | // Specialised functions to report warnings and errors -- in duchamp.cc |
---|
39 | /** Print a warning message to the stderr */ |
---|
40 | void duchampWarning(std::string subroutine, std::string warning); |
---|
41 | /** Print an error message to the stderr and sound the bell */ |
---|
42 | void duchampError(std::string subroutine, std::string error); |
---|
43 | |
---|
44 | |
---|
45 | /** The spectral type that we want the wcsprm structs to be in. */ |
---|
46 | const char duchampVelocityType[9] = "VELO-F2V"; |
---|
47 | /** The spectral type that we want the wcsprm structs to be in when no |
---|
48 | velocity info is present. */ |
---|
49 | const char duchampFrequencyType[9] = "FREQ "; |
---|
50 | |
---|
51 | /** Descriptions of the various spectral axis types */ |
---|
52 | enum TYPEDESC {FREQUENCY=0,VELOCITY,WAVELENGTH}; |
---|
53 | /** Human-readable descriptions of the various spectral axis types */ |
---|
54 | const std::string duchampSpectralDescription[3]= |
---|
55 | {"Frequency", "Velocity", "Wavelength"}; |
---|
56 | |
---|
57 | // The following are the FITS Header Keywords corresponding to the |
---|
58 | // parameters related to the atrous reconstruction. |
---|
59 | /** FITS header keyword for min atrous scale*/ |
---|
60 | const std::string keyword_scaleMin = "DU_MINSC"; |
---|
61 | /** FITS header keyword for S/N used in atrous reconstruction*/ |
---|
62 | const std::string keyword_snrRecon = "DU_ATCUT"; |
---|
63 | /** FITS header keyword for number of dimensions used in atrous |
---|
64 | reconstruction*/ |
---|
65 | const std::string keyword_reconDim = "DU_ATDIM"; |
---|
66 | /** FITS header keyword for the code number of the filter used in |
---|
67 | atrous reconstruction*/ |
---|
68 | const std::string keyword_filterCode = "DU_FILTR"; |
---|
69 | /** FITS header keyword: does this file hold the reconstructed array |
---|
70 | or the residual?*/ |
---|
71 | const std::string keyword_ReconResid = "DU_RECON"; |
---|
72 | /** FITS header keyword: type of smoothing done. */ |
---|
73 | const std::string keyword_smoothtype = "DU_SMTYP"; |
---|
74 | /** FITS header keyword for the gaussian kernel major axis FWHM*/ |
---|
75 | const std::string keyword_kernmaj = "DU_KMAJ"; |
---|
76 | /** FITS header keyword for the gaussian kernel minor axis FWHM*/ |
---|
77 | const std::string keyword_kernmin = "DU_KMIN"; |
---|
78 | /** FITS header keyword for the gaussian kernel position angle*/ |
---|
79 | const std::string keyword_kernpa = "DU_KPA"; |
---|
80 | /** FITS header keyword for the Hanning filter width*/ |
---|
81 | const std::string keyword_hanningwidth = "DU_WHANN"; |
---|
82 | /** FITS header keyword for the image subsection used*/ |
---|
83 | const std::string keyword_subsection = "DU_IMSUB"; |
---|
84 | |
---|
85 | // And these are the comments corresponding to the relevant keywords |
---|
86 | /** FITS header comment for DU_MINSC keyword*/ |
---|
87 | const std::string comment_scaleMin = "Duchamp parameter scaleMin"; |
---|
88 | /** FITS header comment for DU_ATCUT keyword*/ |
---|
89 | const std::string comment_snrRecon = "Duchamp parameter snrRecon"; |
---|
90 | /** FITS header comment for DU_ATDIM keyword*/ |
---|
91 | const std::string comment_reconDim = "Duchamp parameter reconDim"; |
---|
92 | /** FITS header comment for DU_FILTR keyword*/ |
---|
93 | const std::string comment_filterCode = "Duchamp parameter filterCode"; |
---|
94 | /** FITS header comment for DU_RECON keyword*/ |
---|
95 | const std::string comment_ReconResid = "Is this the reconstruction or residual?"; |
---|
96 | /** FITS header comment for DU_SMTYP keyword*/ |
---|
97 | const std::string comment_smoothtype = "Type of smoothing done"; |
---|
98 | /** FITS header comment for DU_KMAJ keyword*/ |
---|
99 | const std::string comment_kernmaj = "Duchamp parameter kernMaj"; |
---|
100 | /** FITS header comment for DU_KMIN keyword*/ |
---|
101 | const std::string comment_kernmin = "Duchamp parameter kernMin"; |
---|
102 | /** FITS header comment for DU_KPA keyword*/ |
---|
103 | const std::string comment_kernpa = "Duchamp parameter kernPA"; |
---|
104 | /** FITS header comment for DU_WHANN keyword*/ |
---|
105 | const std::string comment_hanningwidth = "Duchamp parameter hanningWidth"; |
---|
106 | /** FITS header comment for DU_IMSUB keyword*/ |
---|
107 | const std::string comment_subsection = "Subsection of the original image"; |
---|
108 | |
---|
109 | // Descriptive Headers: for the reconstruction case |
---|
110 | const std::string header_reconHistory1 = |
---|
111 | "Reconstructed with a trous wavelet technique"; |
---|
112 | const std::string header_reconHistory2 = |
---|
113 | "Reconstruction by Duchamp v." + VERSION; |
---|
114 | const std::string header_reconHistory_input = |
---|
115 | "Original (input) image used by Duchamp follows"; |
---|
116 | const std::string header_reconSubsection_comment = |
---|
117 | "A subsection of the original was reconstructed by Duchamp"; |
---|
118 | const std::string header_atrous_comment = |
---|
119 | "The following are the Duchamp parameters used in reconstruction"; |
---|
120 | |
---|
121 | // Descriptive Headers: for the Smoothing case |
---|
122 | const std::string header_smoothHistory = |
---|
123 | "Smoothed by Duchamp v." + VERSION; |
---|
124 | const std::string header_smoothHistory_input = |
---|
125 | "Original (input) image used by Duchamp follows"; |
---|
126 | const std::string header_smoothSubsection_comment = |
---|
127 | "A subsection of the original was smoothed by Duchamp"; |
---|
128 | const std::string header_smoothSpatial = "Spatial, gaussian kernel"; |
---|
129 | const std::string header_smoothSpectral= "Spectral, hanning filter"; |
---|
130 | #endif |
---|
131 | |
---|