1 | /* src/duchamp.hh. Generated by configure. */ |
---|
2 | #ifndef DUCHAMP_HH |
---|
3 | #define DUCHAMP_HH |
---|
4 | |
---|
5 | #include <iostream> |
---|
6 | #include <string> |
---|
7 | |
---|
8 | #undef PACKAGE_BUGREPORT |
---|
9 | #undef PACKAGE_NAME |
---|
10 | #undef PACKAGE_STRING |
---|
11 | #undef PACKAGE_TARNAME |
---|
12 | #undef PACKAGE_VERSION |
---|
13 | #include "config.h" |
---|
14 | |
---|
15 | // how to convey whether a function has worked |
---|
16 | enum OUTCOME {SUCCESS=0, FAILURE}; |
---|
17 | |
---|
18 | |
---|
19 | const std::string ERR_USAGE_MSG = |
---|
20 | "Usage:: Duchamp -p [parameter file]\n\ |
---|
21 | Other options:\n\ |
---|
22 | -f <file> Use default parameters with imageFile=<file>\n\ |
---|
23 | -v Version number\n\ |
---|
24 | -h This help information\n"; |
---|
25 | |
---|
26 | const std::string ERR_USAGE_MSG_SHORT="Usage:: Duchamp -p [parameter file]\n"; |
---|
27 | |
---|
28 | const std::string PROGNAME = PACKAGE_NAME; |
---|
29 | |
---|
30 | const std::string VERSION = PACKAGE_VERSION; |
---|
31 | |
---|
32 | // Specialised functions to report warnings and errors. |
---|
33 | // These are defined in duchamp.cc |
---|
34 | void duchampWarning(std::string subroutine, std::string warning); |
---|
35 | void duchampError(std::string subroutine, std::string error); |
---|
36 | |
---|
37 | // A simple functions to print a given number of backspaces or spaces |
---|
38 | // to std::cout |
---|
39 | inline void printBackSpace(int num){for(int i=0;i<num;i++) std::cout << '\b';}; |
---|
40 | inline void printSpace(int num){ for(int i=0;i<num;i++) std::cout << ' '; }; |
---|
41 | inline void printHash(int num){ for(int i=0;i<num;i++) std::cout << '#'; }; |
---|
42 | inline void initialiseMeter(){ |
---|
43 | std::cout << "|"; printSpace(20); std::cout << "|" << std::flush;}; |
---|
44 | inline void updateMeter(int num){ |
---|
45 | printBackSpace(22); std::cout << "|"; printHash(num); printSpace(20-num); |
---|
46 | std::cout << "|" << std::flush;}; |
---|
47 | |
---|
48 | // The spectral type that we want the wcsprm structs to be in |
---|
49 | const char duchampVelocityType[9] = "VELO-F2V"; |
---|
50 | const char duchampFrequencyType[9] = "FREQ"; |
---|
51 | |
---|
52 | enum TYPEDESC {FREQUENCY=0,VELOCITY,WAVELENGTH}; |
---|
53 | const std::string duchampSpectralDescription[3]= |
---|
54 | {"Frequency", "Velocity", "Wavelength"}; |
---|
55 | |
---|
56 | // The following are the FITS Header Keywords corresponding to the |
---|
57 | // parameters related to the atrous reconstruction. |
---|
58 | const std::string keyword_scaleMin = "DU_MINSC"; |
---|
59 | const std::string keyword_snrRecon = "DU_ATCUT"; |
---|
60 | const std::string keyword_reconDim = "DU_ATDIM"; |
---|
61 | const std::string keyword_filterCode = "DU_FILTR"; |
---|
62 | const std::string keyword_ReconResid = "DU_RECON";//reconstruction or residual? |
---|
63 | const std::string keyword_subsection = "DU_IMSUB"; |
---|
64 | |
---|
65 | // And these are the comments corresponding to the relevant keywords |
---|
66 | const std::string comment_scaleMin = "Duchamp parameter scaleMin"; |
---|
67 | const std::string comment_snrRecon = "Duchamp parameter snrRecon"; |
---|
68 | const std::string comment_reconDim = "Duchamp parameter reconDim"; |
---|
69 | const std::string comment_filterCode = "Duchamp parameter filterCode"; |
---|
70 | const std::string comment_ReconResid = "Is this the reconstruction or residual?"; |
---|
71 | const std::string comment_subsection = "Subsection of the original image"; |
---|
72 | // Descriptive Headers: |
---|
73 | const std::string header_history1 = "Reconstructed with a trous wavelet technique"; |
---|
74 | const std::string header_history2 = "Reconstruction by Duchamp v." + VERSION; |
---|
75 | const std::string header_history_input = "Original (input) image used by Duchamp follows"; |
---|
76 | const std::string header_subsection_comment = "A subsection of the original was reconstructed by Duchamp"; |
---|
77 | const std::string header_atrous_comment = "The following are the Duchamp parameters used in reconstruction"; |
---|
78 | |
---|
79 | #endif |
---|
80 | |
---|