source: branches/pixel-map-branch/src/duchamp.hh @ 1441

Last change on this file since 1441 was 224, checked in by Matthew Whiting, 17 years ago
  • Main change is to correct the problem reported in ticket #4, so that the velocity units are correctly dealt with. This entailed:
    • Changing the way wcssptr is called in FitsIO/wcsIO.cc, so that it is called when there is no CUNIT3 keyword, as well as when the type is different to that desired.
    • Changing the way fixUnits() will deal with missing units -- hopefully this will now not occur, and the error message has been changed accordingly.

Other changes include:

  • Making a new file cubes_extended.cc, that has those functions from cubes.cc that require external functions. This enables simpler compilation of test programs.
  • An additional clause in dataIO.cc to set the null value when the BLANK keyword is not present. However, this remains commented out, as I don't think it is necessary at this point, and there is a question about whether it is correct.
  • Other minor typo fixes.
File size: 4.4 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 -p [parameter file]\n\
20  Other options:\n\
21    -f <file>  Use default parameters with imageFile=<file>\n\
22    -v         Version number\n\
23    -h         This help information\n";
24
25/** Shorter Usage message for command line help. */
26const std::string ERR_USAGE_MSG_SHORT="Usage:: Duchamp -p [parameter file]\n";
27
28/** The program name. (Duchamp) */
29const std::string PROGNAME = PACKAGE_NAME;
30
31/** The program version */
32const std::string VERSION = PACKAGE_VERSION;
33
34// Specialised functions to report warnings and errors -- in duchamp.cc
35/** Print a warning message to the stderr */
36void duchampWarning(std::string subroutine, std::string warning);
37/** Print an error message to the stderr and sound the bell */
38void duchampError(std::string subroutine, std::string error);
39
40
41/** The spectral type that we want the wcsprm structs to be in. */
42const char duchampVelocityType[9] = "VELO-F2V";
43/** The spectral type that we want the wcsprm structs to be in when no velocity info is present. */
44const char duchampFrequencyType[9] = "FREQ    ";
45
46/** Descriptions of the various spectral axis types */
47enum TYPEDESC {FREQUENCY=0,VELOCITY,WAVELENGTH};
48/** Human-readable descriptions of the various spectral axis types */
49const std::string duchampSpectralDescription[3]=
50  {"Frequency", "Velocity", "Wavelength"};
51
52// The following are the FITS Header Keywords corresponding to the
53//  parameters related to the atrous reconstruction.
54/** FITS header keyword for min atrous scale*/
55const std::string keyword_scaleMin     = "DU_MINSC";
56/** FITS header keyword for S/N used in atrous reconstruction*/
57const std::string keyword_snrRecon     = "DU_ATCUT";
58/** FITS header keyword for number of dimensions used in atrous reconstruction*/
59const std::string keyword_reconDim     = "DU_ATDIM";
60/** FITS header keyword for the code number of the filter used in atrous reconstruction*/
61const std::string keyword_filterCode   = "DU_FILTR";
62/** FITS header keyword: does this file hold the reconstructed array or the residual?*/
63const std::string keyword_ReconResid   = "DU_RECON";
64/** FITS header keyword for the Hanning filter width*/
65const std::string keyword_hanningwidth = "DU_WHANN";
66/** FITS header keyword for the image subsection used*/
67const std::string keyword_subsection   = "DU_IMSUB";
68
69// And these are the comments corresponding to the relevant keywords
70/** FITS header comment for DU_MINSC keyword*/
71const std::string comment_scaleMin     = "Duchamp parameter scaleMin";
72/** FITS header comment for DU_ATCUT keyword*/
73const std::string comment_snrRecon     = "Duchamp parameter snrRecon";
74/** FITS header comment for DU_ATDIM keyword*/
75const std::string comment_reconDim     = "Duchamp parameter reconDim";
76/** FITS header comment for DU_FILTR keyword*/
77const std::string comment_filterCode   = "Duchamp parameter filterCode";
78/** FITS header comment for DU_RECON keyword*/
79const std::string comment_ReconResid   = "Is this the reconstruction or residual?";
80/** FITS header comment for DU_WHANN keyword*/
81const std::string comment_hanningwidth = "Duchamp parameter hanningWidth";
82/** FITS header comment for DU_IMSUB keyword*/
83const std::string comment_subsection   = "Subsection of the original image";
84
85// Descriptive Headers: for the reconstruction case
86const std::string header_reconHistory1 =
87"Reconstructed with a trous wavelet technique";
88const std::string header_reconHistory2 =
89"Reconstruction by Duchamp v." + VERSION;
90const std::string header_reconHistory_input =
91"Original (input) image used by Duchamp follows";
92const std::string header_reconSubsection_comment  =
93"A subsection of the original was reconstructed by Duchamp";
94const std::string header_atrous_comment  =
95"The following are the Duchamp parameters used in reconstruction";
96
97// Descriptive Headers: for the Hanning-smoothing case
98const std::string header_smoothHistory =
99"Hanning smoothed by Duchamp v." + VERSION;
100const std::string header_smoothHistory_input =
101"Original (input) image used by Duchamp follows";
102const std::string header_smoothSubsection_comment  =
103"A subsection of the original was smoothed by Duchamp";
104
105#endif
106
Note: See TracBrowser for help on using the repository browser.