source: trunk/src/Devel/devel.hh

Last change on this file was 1347, checked in by MatthewWhiting, 10 years ago

Changing the verification cube so that the FWHM are done properly. Also moving the random spectrum code out of Devel into Utils so that the released code can run createTestImage.

File size: 4.3 KB
RevLine 
[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
36std::string menu();
37std::string specMenu();
38std::string orionMenu();
39std::string imageMenu();
40std::string twoblMenu();
[348]41std::string b1555Menu();
[258]42void spectralSelection(std::vector<float> &xvalues,
43                       std::vector<float> &yvalues,
[1018]44                       size_t &zdim);
[222]45
46// trimmed histogram statistics -- in trimStats.cc
47void findTrimmedHistStats(float *array, const int size, float &tmean, float &tsigma);
[233]48void findTrimmedHistStatsOLD(float *array, const int size, float &tmean, float &tsigma);
49void findTrimmedHistStats2(float *array, const int size, float &tmean, float &tsigma);
[222]50
[233]51// Atrous tranform functions not used in duchamp code
[641]52namespace 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
64void getSigmaFactors(int &numScales, float *factors);
65void getSigmaFactors2D(int &numScales, float *factors);
66void getSigmaFactors3D(int &numScales, float *factors);
[860]67void getSigmaFactors1DNew(duchamp::Filter &reconFilter, int &numScales);
68void getSigmaFactors2DNew(duchamp::Filter &reconFilter, int &numScales);
69void getSigmaFactors3DNew(duchamp::Filter &reconFilter, int &numScales);
[222]70
71
72
[313]73//--------------------
74// PLOTTING ROUTINES
75//--------------------
76// The following are in plottingUtilities.cc
77//
78void plotLine(const float slope, const float intercept);
79void lineOfEquality();
80void lineOfBestFit(int size, float *x, float *y);
81void lineOfBestFitPB(const int size, const float *x, const float *y);
82void plotVertLine(const float xval, const int colour, const int style);
83void plotVertLine(const float xval);
84void plotVertLine(const float xval, const int colour);
85void plotHorizLine(const float yval, const int colour, const int style);
86void plotHorizLine(const float yval);
87void plotHorizLine(const float yval, const int colour);
88void drawContours(const int size, const float *x, const float *y);
[222]89
[641]90// The following are in plotImage.cc
91//
92void plotImage(float *array, int xdim, int ydim);
93void plotImage(float *array, int xdim, int ydim, duchamp::Param par);
94void plotImage(float *array, int xdim, int ydim, float z1, float z2);
[222]95
96
[313]97
[222]98#endif // TESTS_HH
Note: See TracBrowser for help on using the repository browser.