[301] | 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 | // ----------------------------------------------------------------------- |
---|
[222] | 28 | #ifndef TESTS_HH |
---|
| 29 | #define TESTS_HH |
---|
[258] | 30 | #include <vector> |
---|
[274] | 31 | #include <string> |
---|
[641] | 32 | #include <duchamp/param.hh> |
---|
[1053] | 33 | #include <duchamp/ATrous/filter.hh> |
---|
[222] | 34 | |
---|
| 35 | // MENU ROUTINES FOR DIGANOSTIC/TEST PROGRAMS |
---|
| 36 | std::string menu(); |
---|
| 37 | std::string specMenu(); |
---|
| 38 | std::string orionMenu(); |
---|
| 39 | std::string imageMenu(); |
---|
| 40 | std::string twoblMenu(); |
---|
[348] | 41 | std::string b1555Menu(); |
---|
[258] | 42 | void spectralSelection(std::vector<float> &xvalues, |
---|
| 43 | std::vector<float> &yvalues, |
---|
[1018] | 44 | size_t &zdim); |
---|
[222] | 45 | |
---|
| 46 | // trimmed histogram statistics -- in trimStats.cc |
---|
| 47 | void findTrimmedHistStats(float *array, const int size, float &tmean, float &tsigma); |
---|
[233] | 48 | void findTrimmedHistStatsOLD(float *array, const int size, float &tmean, float &tsigma); |
---|
| 49 | void findTrimmedHistStats2(float *array, const int size, float &tmean, float &tsigma); |
---|
[222] | 50 | |
---|
[233] | 51 | // Atrous tranform functions not used in duchamp code |
---|
[641] | 52 | namespace duchamp { |
---|
| 53 | class Param; |
---|
[1018] | 54 | void atrousTransform(size_t &length, int &numScales, float *spectrum, double *coeffs, double *wavelet, Param &par); |
---|
| 55 | void atrousTransform(size_t &length, float *spectrum, float *coeffs, float *wavelet, Param &par); |
---|
| 56 | void atrousTransform2D(size_t &xdim, size_t &ydim, int &numScales, float *input, double *coeffs, double *wavelet, Param &par); |
---|
| 57 | void atrousTransform2D(size_t &xdim, size_t &ydim, int &numScales, float *input, double *coeffs, double *wavelet); |
---|
| 58 | void atrousTransform3D(size_t &xdim, size_t &ydim, size_t &zdim, int &numScales, float *&input, float *&coeffs, float *&wavelet, Param &par); |
---|
| 59 | void atrousTransform3D(size_t &xdim, size_t &ydim, size_t &zdim, int &numScales, float *input, float *coeffs, float *wavelet); |
---|
[641] | 60 | } |
---|
[233] | 61 | |
---|
[222] | 62 | // Calculating the sigma factors for the atrous reconstruction |
---|
| 63 | // -- in sigma_factors.cc |
---|
| 64 | void getSigmaFactors(int &numScales, float *factors); |
---|
| 65 | void getSigmaFactors2D(int &numScales, float *factors); |
---|
| 66 | void getSigmaFactors3D(int &numScales, float *factors); |
---|
[860] | 67 | void getSigmaFactors1DNew(duchamp::Filter &reconFilter, int &numScales); |
---|
| 68 | void getSigmaFactors2DNew(duchamp::Filter &reconFilter, int &numScales); |
---|
| 69 | void getSigmaFactors3DNew(duchamp::Filter &reconFilter, int &numScales); |
---|
[222] | 70 | |
---|
| 71 | |
---|
| 72 | |
---|
[313] | 73 | //-------------------- |
---|
| 74 | // PLOTTING ROUTINES |
---|
| 75 | //-------------------- |
---|
| 76 | // The following are in plottingUtilities.cc |
---|
| 77 | // |
---|
| 78 | void plotLine(const float slope, const float intercept); |
---|
| 79 | void lineOfEquality(); |
---|
| 80 | void lineOfBestFit(int size, float *x, float *y); |
---|
| 81 | void lineOfBestFitPB(const int size, const float *x, const float *y); |
---|
| 82 | void plotVertLine(const float xval, const int colour, const int style); |
---|
| 83 | void plotVertLine(const float xval); |
---|
| 84 | void plotVertLine(const float xval, const int colour); |
---|
| 85 | void plotHorizLine(const float yval, const int colour, const int style); |
---|
| 86 | void plotHorizLine(const float yval); |
---|
| 87 | void plotHorizLine(const float yval, const int colour); |
---|
| 88 | void drawContours(const int size, const float *x, const float *y); |
---|
[222] | 89 | |
---|
[641] | 90 | // The following are in plotImage.cc |
---|
| 91 | // |
---|
| 92 | void plotImage(float *array, int xdim, int ydim); |
---|
| 93 | void plotImage(float *array, int xdim, int ydim, duchamp::Param par); |
---|
| 94 | void plotImage(float *array, int xdim, int ydim, float z1, float z2); |
---|
[222] | 95 | |
---|
| 96 | |
---|
[313] | 97 | |
---|
[222] | 98 | #endif // TESTS_HH |
---|