source: tags/release-1.2.2/src/Devel/devel.hh

Last change on this file was 1053, checked in by MatthewWhiting, 12 years ago

Fixing a few more incomplete includes

File size: 4.7 KB
Line 
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#include <duchamp/ATrous/filter.hh>
34
35// MENU ROUTINES FOR DIGANOSTIC/TEST PROGRAMS
36std::string menu();
37std::string specMenu();
38std::string orionMenu();
39std::string imageMenu();
40std::string twoblMenu();
41std::string b1555Menu();
42void spectralSelection(std::vector<float> &xvalues,
43                       std::vector<float> &yvalues,
44                       size_t &zdim);
45
46// trimmed histogram statistics -- in trimStats.cc
47void findTrimmedHistStats(float *array, const int size, float &tmean, float &tsigma);
48void findTrimmedHistStatsOLD(float *array, const int size, float &tmean, float &tsigma);
49void findTrimmedHistStats2(float *array, const int size, float &tmean, float &tsigma);
50
51// Atrous tranform functions not used in duchamp code
52namespace duchamp {
53  class Param;
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);
60}
61
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);
67void getSigmaFactors1DNew(duchamp::Filter &reconFilter, int &numScales);
68void getSigmaFactors2DNew(duchamp::Filter &reconFilter, int &numScales);
69void getSigmaFactors3DNew(duchamp::Filter &reconFilter, int &numScales);
70
71
72// Random number generators -- all in get_random_spectrum.cc
73void getRandomSpectrum(int length, float *x, float *y);
74void getRandomSpectrum(int length, float *x, double *y);
75void getRandomSpectrum(int length, float mean, float sigma,
76                       float *x, double *y);
77void getRandomSpectrum(int length, float mean, float sigma,
78                       float *x, float *y);
79float getNormalRV();
80float getNormalRVtrunc();
81float getNormalRV(float mean, float sigma);
82
83//--------------------
84// PLOTTING ROUTINES
85//--------------------
86// The following are in plottingUtilities.cc
87//
88void plotLine(const float slope, const float intercept);
89void lineOfEquality();
90void lineOfBestFit(int size, float *x, float *y);
91void lineOfBestFitPB(const int size, const float *x, const float *y);
92void plotVertLine(const float xval, const int colour, const int style);
93void plotVertLine(const float xval);
94void plotVertLine(const float xval, const int colour);
95void plotHorizLine(const float yval, const int colour, const int style);
96void plotHorizLine(const float yval);
97void plotHorizLine(const float yval, const int colour);
98void drawContours(const int size, const float *x, const float *y);
99
100// The following are in plotImage.cc
101//
102void plotImage(float *array, int xdim, int ydim);
103void plotImage(float *array, int xdim, int ydim, duchamp::Param par);
104void plotImage(float *array, int xdim, int ydim, float z1, float z2);
105
106
107
108#endif // TESTS_HH
Note: See TracBrowser for help on using the repository browser.