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 -p [parameter file]\n\ |
---|
20 | Other options:\n\ |
---|
21 | -f <file> Use default parameters with imageFile=<file>\n\ |
---|
22 | -v Version number\n\ |
---|
23 | -h This help information\n"; |
---|
24 | |
---|
25 | /** Shorter Usage message for command line help. */ |
---|
26 | const std::string ERR_USAGE_MSG_SHORT="Usage:: Duchamp -p [parameter file]\n"; |
---|
27 | |
---|
28 | /** The program name. (Duchamp) */ |
---|
29 | const std::string PROGNAME = PACKAGE_NAME; |
---|
30 | |
---|
31 | /** The program version */ |
---|
32 | const std::string VERSION = PACKAGE_VERSION; |
---|
33 | |
---|
34 | // Specialised functions to report warnings and errors -- in duchamp.cc |
---|
35 | /** Print a warning message to the stderr */ |
---|
36 | void duchampWarning(std::string subroutine, std::string warning); |
---|
37 | /** Print an error message to the stderr and sound the bell */ |
---|
38 | void duchampError(std::string subroutine, std::string error); |
---|
39 | |
---|
40 | |
---|
41 | /** The spectral type that we want the wcsprm structs to be in. */ |
---|
42 | const char duchampVelocityType[9] = "VELO-F2V"; |
---|
43 | /** The spectral type that we want the wcsprm structs to be in when no velocity info is present. */ |
---|
44 | const char duchampFrequencyType[9] = "FREQ "; |
---|
45 | |
---|
46 | /** Descriptions of the various spectral axis types */ |
---|
47 | enum TYPEDESC {FREQUENCY=0,VELOCITY,WAVELENGTH}; |
---|
48 | /** Human-readable descriptions of the various spectral axis types */ |
---|
49 | const std::string duchampSpectralDescription[3]= |
---|
50 | {"Frequency", "Velocity", "Wavelength"}; |
---|
51 | |
---|
52 | // The following are the FITS Header Keywords corresponding to the |
---|
53 | // parameters related to the atrous reconstruction. |
---|
54 | /** FITS header keyword for min atrous scale*/ |
---|
55 | const std::string keyword_scaleMin = "DU_MINSC"; |
---|
56 | /** FITS header keyword for S/N used in atrous reconstruction*/ |
---|
57 | const std::string keyword_snrRecon = "DU_ATCUT"; |
---|
58 | /** FITS header keyword for number of dimensions used in atrous reconstruction*/ |
---|
59 | const std::string keyword_reconDim = "DU_ATDIM"; |
---|
60 | /** FITS header keyword for the code number of the filter used in atrous reconstruction*/ |
---|
61 | const std::string keyword_filterCode = "DU_FILTR"; |
---|
62 | /** FITS header keyword: does this file hold the reconstructed array or the residual?*/ |
---|
63 | const std::string keyword_ReconResid = "DU_RECON"; |
---|
64 | /** FITS header keyword for the Hanning filter width*/ |
---|
65 | const std::string keyword_hanningwidth = "DU_WHANN"; |
---|
66 | /** FITS header keyword for the image subsection used*/ |
---|
67 | const std::string keyword_subsection = "DU_IMSUB"; |
---|
68 | |
---|
69 | // And these are the comments corresponding to the relevant keywords |
---|
70 | /** FITS header comment for DU_MINSC keyword*/ |
---|
71 | const std::string comment_scaleMin = "Duchamp parameter scaleMin"; |
---|
72 | /** FITS header comment for DU_ATCUT keyword*/ |
---|
73 | const std::string comment_snrRecon = "Duchamp parameter snrRecon"; |
---|
74 | /** FITS header comment for DU_ATDIM keyword*/ |
---|
75 | const std::string comment_reconDim = "Duchamp parameter reconDim"; |
---|
76 | /** FITS header comment for DU_FILTR keyword*/ |
---|
77 | const std::string comment_filterCode = "Duchamp parameter filterCode"; |
---|
78 | /** FITS header comment for DU_RECON keyword*/ |
---|
79 | const std::string comment_ReconResid = "Is this the reconstruction or residual?"; |
---|
80 | /** FITS header comment for DU_WHANN keyword*/ |
---|
81 | const std::string comment_hanningwidth = "Duchamp parameter hanningWidth"; |
---|
82 | /** FITS header comment for DU_IMSUB keyword*/ |
---|
83 | const std::string comment_subsection = "Subsection of the original image"; |
---|
84 | |
---|
85 | // Descriptive Headers: for the reconstruction case |
---|
86 | const std::string header_reconHistory1 = |
---|
87 | "Reconstructed with a trous wavelet technique"; |
---|
88 | const std::string header_reconHistory2 = |
---|
89 | "Reconstruction by Duchamp v." + VERSION; |
---|
90 | const std::string header_reconHistory_input = |
---|
91 | "Original (input) image used by Duchamp follows"; |
---|
92 | const std::string header_reconSubsection_comment = |
---|
93 | "A subsection of the original was reconstructed by Duchamp"; |
---|
94 | const std::string header_atrous_comment = |
---|
95 | "The following are the Duchamp parameters used in reconstruction"; |
---|
96 | |
---|
97 | // Descriptive Headers: for the Hanning-smoothing case |
---|
98 | const std::string header_smoothHistory = |
---|
99 | "Hanning smoothed by Duchamp v." + VERSION; |
---|
100 | const std::string header_smoothHistory_input = |
---|
101 | "Original (input) image used by Duchamp follows"; |
---|
102 | const std::string header_smoothSubsection_comment = |
---|
103 | "A subsection of the original was smoothed by Duchamp"; |
---|
104 | |
---|
105 | #endif |
---|
106 | |
---|