1 | // ----------------------------------------------------------------------- |
---|
2 | // devel.hh: Prototypes for development functions. |
---|
3 | // ----------------------------------------------------------------------- |
---|
4 | // Copyright (C) 2006, Matthew Whiting, ATNF |
---|
5 | // |
---|
6 | // This program is free software; you can redistribute it and/or modify it |
---|
7 | // under the terms of the GNU General Public License as published by the |
---|
8 | // Free Software Foundation; either version 2 of the License, or (at your |
---|
9 | // option) any later version. |
---|
10 | // |
---|
11 | // Duchamp is distributed in the hope that it will be useful, but WITHOUT |
---|
12 | // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
---|
13 | // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
---|
14 | // for more details. |
---|
15 | // |
---|
16 | // You should have received a copy of the GNU General Public License |
---|
17 | // along with Duchamp; if not, write to the Free Software Foundation, |
---|
18 | // Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA |
---|
19 | // |
---|
20 | // Correspondence concerning Duchamp may be directed to: |
---|
21 | // Internet email: Matthew.Whiting [at] atnf.csiro.au |
---|
22 | // Postal address: Dr. Matthew Whiting |
---|
23 | // Australia Telescope National Facility, CSIRO |
---|
24 | // PO Box 76 |
---|
25 | // Epping NSW 1710 |
---|
26 | // AUSTRALIA |
---|
27 | // ----------------------------------------------------------------------- |
---|
28 | #ifndef TESTS_HH |
---|
29 | #define TESTS_HH |
---|
30 | #include <vector> |
---|
31 | #include <string> |
---|
32 | #include <duchamp/param.hh> |
---|
33 | |
---|
34 | // MENU ROUTINES FOR DIGANOSTIC/TEST PROGRAMS |
---|
35 | std::string menu(); |
---|
36 | std::string specMenu(); |
---|
37 | std::string orionMenu(); |
---|
38 | std::string imageMenu(); |
---|
39 | std::string twoblMenu(); |
---|
40 | std::string b1555Menu(); |
---|
41 | void spectralSelection(std::vector<float> &xvalues, |
---|
42 | std::vector<float> &yvalues, |
---|
43 | long &zdim); |
---|
44 | |
---|
45 | // trimmed histogram statistics -- in trimStats.cc |
---|
46 | void findTrimmedHistStats(float *array, const int size, float &tmean, float &tsigma); |
---|
47 | void findTrimmedHistStatsOLD(float *array, const int size, float &tmean, float &tsigma); |
---|
48 | void findTrimmedHistStats2(float *array, const int size, float &tmean, float &tsigma); |
---|
49 | |
---|
50 | // Atrous tranform functions not used in duchamp code |
---|
51 | namespace duchamp { |
---|
52 | class Param; |
---|
53 | void atrousTransform(long &length, int &numScales, float *spectrum, double *coeffs, double *wavelet, Param &par); |
---|
54 | void atrousTransform(long &length, float *spectrum, float *coeffs, float *wavelet, Param &par); |
---|
55 | void atrousTransform2D(long &xdim, long &ydim, int &numScales, float *input, double *coeffs, double *wavelet, Param &par); |
---|
56 | void atrousTransform2D(long &xdim, long &ydim, int &numScales, float *input, double *coeffs, double *wavelet); |
---|
57 | void atrousTransform3D(long &xdim, long &ydim, long &zdim, int &numScales, float *&input, float *&coeffs, float *&wavelet, Param &par); |
---|
58 | void atrousTransform3D(long &xdim, long &ydim, long &zdim, int &numScales, float *input, float *coeffs, float *wavelet); |
---|
59 | } |
---|
60 | |
---|
61 | // Calculating the sigma factors for the atrous reconstruction |
---|
62 | // -- in sigma_factors.cc |
---|
63 | void getSigmaFactors(int &numScales, float *factors); |
---|
64 | void getSigmaFactors2D(int &numScales, float *factors); |
---|
65 | void getSigmaFactors3D(int &numScales, float *factors); |
---|
66 | void getSigmaFactors1DNew(int &numScales); |
---|
67 | void getSigmaFactors2DNew(int &numScales); |
---|
68 | void getSigmaFactors3DNew(int &numScales); |
---|
69 | |
---|
70 | |
---|
71 | // Random number generators -- all in get_random_spectrum.cc |
---|
72 | void getRandomSpectrum(int length, float *x, float *y); |
---|
73 | void getRandomSpectrum(int length, float *x, double *y); |
---|
74 | void getRandomSpectrum(int length, float mean, float sigma, |
---|
75 | float *x, double *y); |
---|
76 | void getRandomSpectrum(int length, float mean, float sigma, |
---|
77 | float *x, float *y); |
---|
78 | float getNormalRV(); |
---|
79 | float getNormalRVtrunc(); |
---|
80 | float getNormalRV(float mean, float sigma); |
---|
81 | |
---|
82 | //-------------------- |
---|
83 | // PLOTTING ROUTINES |
---|
84 | //-------------------- |
---|
85 | // The following are in plottingUtilities.cc |
---|
86 | // |
---|
87 | void plotLine(const float slope, const float intercept); |
---|
88 | void lineOfEquality(); |
---|
89 | void lineOfBestFit(int size, float *x, float *y); |
---|
90 | void lineOfBestFitPB(const int size, const float *x, const float *y); |
---|
91 | void plotVertLine(const float xval, const int colour, const int style); |
---|
92 | void plotVertLine(const float xval); |
---|
93 | void plotVertLine(const float xval, const int colour); |
---|
94 | void plotHorizLine(const float yval, const int colour, const int style); |
---|
95 | void plotHorizLine(const float yval); |
---|
96 | void plotHorizLine(const float yval, const int colour); |
---|
97 | void drawContours(const int size, const float *x, const float *y); |
---|
98 | |
---|
99 | // The following are in plotImage.cc |
---|
100 | // |
---|
101 | void plotImage(float *array, int xdim, int ydim); |
---|
102 | void plotImage(float *array, int xdim, int ydim, duchamp::Param par); |
---|
103 | void plotImage(float *array, int xdim, int ydim, float z1, float z2); |
---|
104 | |
---|
105 | |
---|
106 | |
---|
107 | #endif // TESTS_HH |
---|