source: trunk/src/duchamp.hh @ 294

Last change on this file since 294 was 294, checked in by Matthew Whiting, 17 years ago

Added a -x option to the command-line so that one can manually override the flagXOutput setting and disable the PGPLOT X-window plotting (Ticket #10).

File size: 5.7 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  -x           Do not use X-windows PGPLOT output\n\
25               (equivalent to setting flagXOutput=false -- overrides the parameter file)\n\n\
26  -v           Return version number and exit\n\
27  -h           Display this help information and exit\n";
28
29/** Shorter Usage message for command line help. */
30const std::string ERR_USAGE_MSG_SHORT="Usage: Duchamp -p [parameter file]\n";
31
32/** The program name. (Duchamp) */
33const std::string PROGNAME = PACKAGE_NAME;
34
35/** The program version */
36const std::string VERSION = PACKAGE_VERSION;
37
38// Specialised functions to report warnings and errors -- in duchamp.cc
39/** Print a warning message to the stderr */
40void duchampWarning(std::string subroutine, std::string warning);
41/** Print an error message to the stderr and sound the bell */
42void duchampError(std::string subroutine, std::string error);
43
44
45/** The spectral type that we want the wcsprm structs to be in. */
46const char duchampVelocityType[9] = "VELO-F2V";
47/** The spectral type that we want the wcsprm structs to be in when no
48    velocity info is present. */
49const char duchampFrequencyType[9] = "FREQ    ";
50
51/** Descriptions of the various spectral axis types */
52enum TYPEDESC {FREQUENCY=0,VELOCITY,WAVELENGTH};
53/** Human-readable descriptions of the various spectral axis types */
54const std::string duchampSpectralDescription[3]=
55  {"Frequency", "Velocity", "Wavelength"};
56
57// The following are the FITS Header Keywords corresponding to the
58// parameters related to the atrous reconstruction.
59/** FITS header keyword for min atrous scale*/
60const std::string keyword_scaleMin     = "DU_MINSC";
61/** FITS header keyword for S/N used in atrous reconstruction*/
62const std::string keyword_snrRecon     = "DU_ATCUT";
63/** FITS header keyword for number of dimensions used in atrous
64    reconstruction*/
65const std::string keyword_reconDim     = "DU_ATDIM";
66/** FITS header keyword for the code number of the filter used in
67    atrous reconstruction*/
68const std::string keyword_filterCode   = "DU_FILTR";
69/** FITS header keyword: does this file hold the reconstructed array
70    or the residual?*/
71const std::string keyword_ReconResid   = "DU_RECON";
72/** FITS header keyword: type of smoothing done. */
73const std::string keyword_smoothtype   = "DU_SMTYP";
74/** FITS header keyword for the gaussian kernel major axis FWHM*/
75const std::string keyword_kernmaj      = "DU_KMAJ";
76/** FITS header keyword for the gaussian kernel minor axis FWHM*/
77const std::string keyword_kernmin      = "DU_KMIN";
78/** FITS header keyword for the gaussian kernel position angle*/
79const std::string keyword_kernpa       = "DU_KPA";
80/** FITS header keyword for the Hanning filter width*/
81const std::string keyword_hanningwidth = "DU_WHANN";
82/** FITS header keyword for the image subsection used*/
83const std::string keyword_subsection   = "DU_IMSUB";
84
85// And these are the comments corresponding to the relevant keywords
86/** FITS header comment for DU_MINSC keyword*/
87const std::string comment_scaleMin     = "Duchamp parameter scaleMin";
88/** FITS header comment for DU_ATCUT keyword*/
89const std::string comment_snrRecon     = "Duchamp parameter snrRecon";
90/** FITS header comment for DU_ATDIM keyword*/
91const std::string comment_reconDim     = "Duchamp parameter reconDim";
92/** FITS header comment for DU_FILTR keyword*/
93const std::string comment_filterCode   = "Duchamp parameter filterCode";
94/** FITS header comment for DU_RECON keyword*/
95const std::string comment_ReconResid   = "Is this the reconstruction or residual?";
96/** FITS header comment for DU_SMTYP keyword*/
97const std::string comment_smoothtype   = "Type of smoothing done";
98/** FITS header comment for DU_KMAJ  keyword*/
99const std::string comment_kernmaj      = "Duchamp parameter kernMaj";
100/** FITS header comment for DU_KMIN  keyword*/
101const std::string comment_kernmin      = "Duchamp parameter kernMin";
102/** FITS header comment for DU_KPA   keyword*/
103const std::string comment_kernpa       = "Duchamp parameter kernPA";
104/** FITS header comment for DU_WHANN keyword*/
105const std::string comment_hanningwidth = "Duchamp parameter hanningWidth";
106/** FITS header comment for DU_IMSUB keyword*/
107const std::string comment_subsection   = "Subsection of the original image";
108
109// Descriptive Headers: for the reconstruction case
110const std::string header_reconHistory1 =
111"Reconstructed with a trous wavelet technique";
112const std::string header_reconHistory2 =
113"Reconstruction by Duchamp v." + VERSION;
114const std::string header_reconHistory_input =
115"Original (input) image used by Duchamp follows";
116const std::string header_reconSubsection_comment  =
117"A subsection of the original was reconstructed by Duchamp";
118const std::string header_atrous_comment  =
119"The following are the Duchamp parameters used in reconstruction";
120
121// Descriptive Headers: for the Smoothing case
122const std::string header_smoothHistory =
123"Smoothed by Duchamp v." + VERSION;
124const std::string header_smoothHistory_input =
125"Original (input) image used by Duchamp follows";
126const std::string header_smoothSubsection_comment  =
127"A subsection of the original was smoothed by Duchamp";
128const std::string header_smoothSpatial = "Spatial, gaussian kernel";
129const std::string header_smoothSpectral= "Spectral, hanning filter";
130#endif
131
Note: See TracBrowser for help on using the repository browser.