source: trunk/src/Devel/devel.hh @ 348

Last change on this file since 348 was 348, checked in by MatthewWhiting, 17 years ago
  • Added a "scaleMax" parameter, so we can specify a range of scales to be used in the reconstruction. Changed the 1D reconstruction code as well.
  • Minor fixes to the merger code so 2D data doesn't do unnecessary checking.
  • Other minor fixes to work around bugs in outputs.
File size: 4.3 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
33class Param;
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                       long &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
52void atrousTransform(long &length, int &numScales, float *spectrum, double *coeffs, double *wavelet, Param &par);
53void atrousTransform(long &length, float *spectrum, float *coeffs, float *wavelet, Param &par);
54void atrousTransform2D(long &xdim, long &ydim, int &numScales, float *input, double *coeffs, double *wavelet, Param &par);
55void atrousTransform2D(long &xdim, long &ydim, int &numScales, float *input, double *coeffs, double *wavelet);
56void atrousTransform3D(long &xdim, long &ydim, long &zdim, int &numScales, float *&input, float *&coeffs, float *&wavelet, Param &par);
57void atrousTransform3D(long &xdim, long &ydim, long &zdim, int &numScales, float *input, float *coeffs, float *wavelet);
58
59
60// Calculating the sigma factors for the atrous reconstruction
61//    -- in sigma_factors.cc
62void getSigmaFactors(int &numScales, float *factors);
63void getSigmaFactors2D(int &numScales, float *factors);
64void getSigmaFactors3D(int &numScales, float *factors);
65void getSigmaFactors1DNew(int &numScales);
66void getSigmaFactors2DNew(int &numScales);
67void getSigmaFactors3DNew(int &numScales);
68
69
70// Random number generators -- all in get_random_spectrum.cc
71void getRandomSpectrum(int length, float *x, float *y);
72void getRandomSpectrum(int length, float *x, double *y);
73void getRandomSpectrum(int length, float mean, float sigma,
74                       float *x, double *y);
75void getRandomSpectrum(int length, float mean, float sigma,
76                       float *x, float *y);
77float getNormalRV();
78float getNormalRVtrunc();
79float getNormalRV(float mean, float sigma);
80
81//--------------------
82// PLOTTING ROUTINES
83//--------------------
84// The following are in plottingUtilities.cc
85//
86void plotLine(const float slope, const float intercept);
87void lineOfEquality();
88void lineOfBestFit(int size, float *x, float *y);
89void lineOfBestFitPB(const int size, const float *x, const float *y);
90void plotVertLine(const float xval, const int colour, const int style);
91void plotVertLine(const float xval);
92void plotVertLine(const float xval, const int colour);
93void plotHorizLine(const float yval, const int colour, const int style);
94void plotHorizLine(const float yval);
95void plotHorizLine(const float yval, const int colour);
96void drawContours(const int size, const float *x, const float *y);
97
98
99
100
101#endif // TESTS_HH
Note: See TracBrowser for help on using the repository browser.