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

Last change on this file was 641, checked in by MatthewWhiting, 15 years ago

Some changes to the development code, with some image plotting functions, and fixing namespaces for the atrous transform code.

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