source: trunk/src/duchamp.hh @ 269

Last change on this file since 269 was 266, checked in by Matthew Whiting, 17 years ago
  • Moved the getopts function to the Param class from the Cube class. It is more logical to have it here, as it is only the parameter set that is affected by the input options.
  • Removed the inline swap function in utils.hh -- changed all calls to it to std::swap.
  • Moved the definition of madfmToSigma to the Statistics.cc file to prevent dodgy compilations.
  • Changed configure.ac so that the order of -lwcs and -lpgsbox are correct.
File size: 4.6 KB
Line 
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 */
15enum OUTCOME {SUCCESS=0, FAILURE};
16
17/** Usage message for command line help. */
18const std::string ERR_USAGE_MSG =
19"Usage: Duchamp [OPTION] [FILE]\n\
20Duchamp 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";
26
27/** Shorter Usage message for command line help. */
28const std::string ERR_USAGE_MSG_SHORT="Usage: Duchamp -p [parameter file]\n";
29
30/** The program name. (Duchamp) */
31const std::string PROGNAME = PACKAGE_NAME;
32
33/** The program version */
34const std::string VERSION = PACKAGE_VERSION;
35
36// Specialised functions to report warnings and errors -- in duchamp.cc
37/** Print a warning message to the stderr */
38void duchampWarning(std::string subroutine, std::string warning);
39/** Print an error message to the stderr and sound the bell */
40void duchampError(std::string subroutine, std::string error);
41
42
43/** The spectral type that we want the wcsprm structs to be in. */
44const char duchampVelocityType[9] = "VELO-F2V";
45/** The spectral type that we want the wcsprm structs to be in when no
46    velocity info is present. */
47const char duchampFrequencyType[9] = "FREQ    ";
48
49/** Descriptions of the various spectral axis types */
50enum TYPEDESC {FREQUENCY=0,VELOCITY,WAVELENGTH};
51/** Human-readable descriptions of the various spectral axis types */
52const std::string duchampSpectralDescription[3]=
53  {"Frequency", "Velocity", "Wavelength"};
54
55// The following are the FITS Header Keywords corresponding to the
56// parameters related to the atrous reconstruction.
57/** FITS header keyword for min atrous scale*/
58const std::string keyword_scaleMin     = "DU_MINSC";
59/** FITS header keyword for S/N used in atrous reconstruction*/
60const std::string keyword_snrRecon     = "DU_ATCUT";
61/** FITS header keyword for number of dimensions used in atrous
62    reconstruction*/
63const std::string keyword_reconDim     = "DU_ATDIM";
64/** FITS header keyword for the code number of the filter used in
65    atrous reconstruction*/
66const std::string keyword_filterCode   = "DU_FILTR";
67/** FITS header keyword: does this file hold the reconstructed array
68    or the residual?*/
69const std::string keyword_ReconResid   = "DU_RECON";
70/** FITS header keyword for the Hanning filter width*/
71const std::string keyword_hanningwidth = "DU_WHANN";
72/** FITS header keyword for the image subsection used*/
73const std::string keyword_subsection   = "DU_IMSUB";
74
75// And these are the comments corresponding to the relevant keywords
76/** FITS header comment for DU_MINSC keyword*/
77const std::string comment_scaleMin     = "Duchamp parameter scaleMin";
78/** FITS header comment for DU_ATCUT keyword*/
79const std::string comment_snrRecon     = "Duchamp parameter snrRecon";
80/** FITS header comment for DU_ATDIM keyword*/
81const std::string comment_reconDim     = "Duchamp parameter reconDim";
82/** FITS header comment for DU_FILTR keyword*/
83const std::string comment_filterCode   = "Duchamp parameter filterCode";
84/** FITS header comment for DU_RECON keyword*/
85const std::string comment_ReconResid   = "Is this the reconstruction or residual?";
86/** FITS header comment for DU_WHANN keyword*/
87const std::string comment_hanningwidth = "Duchamp parameter hanningWidth";
88/** FITS header comment for DU_IMSUB keyword*/
89const std::string comment_subsection   = "Subsection of the original image";
90
91// Descriptive Headers: for the reconstruction case
92const std::string header_reconHistory1 =
93"Reconstructed with a trous wavelet technique";
94const std::string header_reconHistory2 =
95"Reconstruction by Duchamp v." + VERSION;
96const std::string header_reconHistory_input =
97"Original (input) image used by Duchamp follows";
98const std::string header_reconSubsection_comment  =
99"A subsection of the original was reconstructed by Duchamp";
100const std::string header_atrous_comment  =
101"The following are the Duchamp parameters used in reconstruction";
102
103// Descriptive Headers: for the Hanning-smoothing case
104const std::string header_smoothHistory =
105"Hanning smoothed by Duchamp v." + VERSION;
106const std::string header_smoothHistory_input =
107"Original (input) image used by Duchamp follows";
108const std::string header_smoothSubsection_comment  =
109"A subsection of the original was smoothed by Duchamp";
110
111#endif
112
Note: See TracBrowser for help on using the repository browser.