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