[105] | 1 | #ifndef DUCHAMP_HH |
---|
| 2 | #define DUCHAMP_HH |
---|
| 3 | |
---|
[175] | 4 | #include <iostream> |
---|
[125] | 5 | #include <string> |
---|
| 6 | |
---|
[141] | 7 | #undef PACKAGE_BUGREPORT |
---|
| 8 | #undef PACKAGE_NAME |
---|
| 9 | #undef PACKAGE_STRING |
---|
| 10 | #undef PACKAGE_TARNAME |
---|
| 11 | #undef PACKAGE_VERSION |
---|
[110] | 12 | #include "config.h" |
---|
| 13 | |
---|
[221] | 14 | /** how to convey whether a function has worked */ |
---|
[168] | 15 | enum OUTCOME {SUCCESS=0, FAILURE}; |
---|
[71] | 16 | |
---|
[221] | 17 | /** Usage message for command line help. */ |
---|
[110] | 18 | const std::string ERR_USAGE_MSG = |
---|
[85] | 19 | "Usage:: Duchamp -p [parameter file]\n\ |
---|
[57] | 20 | Other options:\n\ |
---|
[85] | 21 | -f <file> Use default parameters with imageFile=<file>\n\ |
---|
| 22 | -v Version number\n\ |
---|
| 23 | -h This help information\n"; |
---|
[57] | 24 | |
---|
[221] | 25 | /** Shorter Usage message for command line help. */ |
---|
[142] | 26 | const std::string ERR_USAGE_MSG_SHORT="Usage:: Duchamp -p [parameter file]\n"; |
---|
[57] | 27 | |
---|
[221] | 28 | /** The program name. (Duchamp) */ |
---|
[110] | 29 | const std::string PROGNAME = PACKAGE_NAME; |
---|
[57] | 30 | |
---|
[221] | 31 | /** The program version */ |
---|
[110] | 32 | const std::string VERSION = PACKAGE_VERSION; |
---|
[71] | 33 | |
---|
[221] | 34 | // Specialised functions to report warnings and errors -- in duchamp.cc |
---|
| 35 | /** Print a warning message to the stderr */ |
---|
[120] | 36 | void duchampWarning(std::string subroutine, std::string warning); |
---|
[221] | 37 | /** Print an error message to the stderr and sound the bell */ |
---|
[120] | 38 | void duchampError(std::string subroutine, std::string error); |
---|
| 39 | |
---|
[201] | 40 | |
---|
[221] | 41 | /** The spectral type that we want the wcsprm structs to be in. */ |
---|
[142] | 42 | const char duchampVelocityType[9] = "VELO-F2V"; |
---|
[221] | 43 | /** The spectral type that we want the wcsprm structs to be in when no velocity info is present. */ |
---|
[142] | 44 | const char duchampFrequencyType[9] = "FREQ"; |
---|
[103] | 45 | |
---|
[221] | 46 | /** Descriptions of the various spectral axis types */ |
---|
[186] | 47 | enum TYPEDESC {FREQUENCY=0,VELOCITY,WAVELENGTH}; |
---|
[221] | 48 | /** Human-readable descriptions of the various spectral axis types */ |
---|
[186] | 49 | const std::string duchampSpectralDescription[3]= |
---|
| 50 | {"Frequency", "Velocity", "Wavelength"}; |
---|
| 51 | |
---|
[110] | 52 | // The following are the FITS Header Keywords corresponding to the |
---|
[71] | 53 | // parameters related to the atrous reconstruction. |
---|
[221] | 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*/ |
---|
[208] | 57 | const std::string keyword_snrRecon = "DU_ATCUT"; |
---|
[221] | 58 | /** FITS header keyword for number of dimensions used in atrous reconstruction*/ |
---|
[208] | 59 | const std::string keyword_reconDim = "DU_ATDIM"; |
---|
[221] | 60 | /** FITS header keyword for the code number of the filter used in atrous reconstruction*/ |
---|
[208] | 61 | const std::string keyword_filterCode = "DU_FILTR"; |
---|
[221] | 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*/ |
---|
[208] | 67 | const std::string keyword_subsection = "DU_IMSUB"; |
---|
[142] | 68 | |
---|
[71] | 69 | // And these are the comments corresponding to the relevant keywords |
---|
[221] | 70 | /** FITS header comment for DU_MINSC keyword*/ |
---|
[208] | 71 | const std::string comment_scaleMin = "Duchamp parameter scaleMin"; |
---|
[221] | 72 | /** FITS header comment for DU_ATCUT keyword*/ |
---|
[208] | 73 | const std::string comment_snrRecon = "Duchamp parameter snrRecon"; |
---|
[221] | 74 | /** FITS header comment for DU_ATDIM keyword*/ |
---|
[208] | 75 | const std::string comment_reconDim = "Duchamp parameter reconDim"; |
---|
[221] | 76 | /** FITS header comment for DU_FILTR keyword*/ |
---|
[208] | 77 | const std::string comment_filterCode = "Duchamp parameter filterCode"; |
---|
[221] | 78 | /** FITS header comment for DU_RECON keyword*/ |
---|
[208] | 79 | const std::string comment_ReconResid = "Is this the reconstruction or residual?"; |
---|
[221] | 80 | /** FITS header comment for DU_WHANN keyword*/ |
---|
[208] | 81 | const std::string comment_hanningwidth = "Duchamp parameter hanningWidth"; |
---|
[221] | 82 | /** FITS header comment for DU_IMSUB keyword*/ |
---|
[208] | 83 | const std::string comment_subsection = "Subsection of the original image"; |
---|
[105] | 84 | |
---|
[208] | 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] | 105 | #endif |
---|
| 106 | |
---|