source: tags/release-1.0.5/src/duchamp.hh @ 1455

Last change on this file since 1455 was 183, checked in by Matthew Whiting, 18 years ago

Added code to make the labelling of the spectral axis in the spectral output more robust, so that it writes either Velocity or Frequency as appropriate.

File size: 3.2 KB
Line 
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
16enum OUTCOME {SUCCESS=0, FAILURE};
17
18
19const 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
26const std::string ERR_USAGE_MSG_SHORT="Usage:: Duchamp -p [parameter file]\n";
27
28const std::string PROGNAME = PACKAGE_NAME;
29
30const std::string VERSION = PACKAGE_VERSION;
31
32// Specialised functions to report warnings and errors.
33// These are defined in duchamp.cc
34void duchampWarning(std::string subroutine, std::string warning);
35void 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
39inline void printBackSpace(int num){for(int i=0;i<num;i++) std::cout << '\b';};
40inline void printSpace(int num){ for(int i=0;i<num;i++) std::cout << ' '; };
41inline void printHash(int num){ for(int i=0;i<num;i++) std::cout << '#'; };
42inline void initialiseMeter(){
43  std::cout << "|"; printSpace(20); std::cout << "|" << std::flush;};
44inline 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
49const char duchampVelocityType[9] = "VELO-F2V";
50const char duchampFrequencyType[9] = "FREQ";
51
52enum TYPEDESC {FREQUENCY=0,VELOCITY,WAVELENGTH};
53const 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.
58const std::string keyword_scaleMin   = "DU_MINSC";
59const std::string keyword_snrRecon   = "DU_ATCUT";
60const std::string keyword_reconDim   = "DU_ATDIM";
61const std::string keyword_filterCode = "DU_FILTR";
62const std::string keyword_ReconResid = "DU_RECON";//reconstruction or residual?
63const std::string keyword_subsection = "DU_IMSUB";
64
65// And these are the comments corresponding to the relevant keywords
66const std::string comment_scaleMin   = "Duchamp parameter scaleMin";
67const std::string comment_snrRecon   = "Duchamp parameter snrRecon";
68const std::string comment_reconDim   = "Duchamp parameter reconDim";
69const std::string comment_filterCode = "Duchamp parameter filterCode";
70const std::string comment_ReconResid = "Is this the reconstruction or residual?";
71const std::string comment_subsection = "Subsection of the original image";
72// Descriptive Headers:
73const std::string header_history1 = "Reconstructed with a trous wavelet technique";
74const std::string header_history2 = "Reconstruction by Duchamp v." + VERSION;
75const std::string header_history_input = "Original (input) image used by Duchamp follows";
76const std::string header_subsection_comment  = "A subsection of the original was reconstructed by Duchamp";
77const std::string header_atrous_comment  = "The following are the Duchamp parameters used in reconstruction";
78
79#endif
80
Note: See TracBrowser for help on using the repository browser.