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

Last change on this file since 313 was 313, checked in by Matthew Whiting, 17 years ago
  • Move plotting function prototypes to devel.hh from utils.hh
  • Changed type of Detection::intFlux from float to double.
  • Added code to write time of completion to the logfile.
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();
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
51void atrousTransform(long &length, int &numScales, float *spectrum, double *coeffs, double *wavelet, Param &par);
52void atrousTransform(long &length, float *spectrum, float *coeffs, float *wavelet, Param &par);
53void atrousTransform2D(long &xdim, long &ydim, int &numScales, float *input, double *coeffs, double *wavelet, Param &par);
54void atrousTransform2D(long &xdim, long &ydim, int &numScales, float *input, double *coeffs, double *wavelet);
55void atrousTransform3D(long &xdim, long &ydim, long &zdim, int &numScales, float *&input, float *&coeffs, float *&wavelet, Param &par);
56void atrousTransform3D(long &xdim, long &ydim, long &zdim, int &numScales, float *input, float *coeffs, float *wavelet);
57
58
59// Calculating the sigma factors for the atrous reconstruction
60//    -- in sigma_factors.cc
61void getSigmaFactors(int &numScales, float *factors);
62void getSigmaFactors2D(int &numScales, float *factors);
63void getSigmaFactors3D(int &numScales, float *factors);
64void getSigmaFactors1DNew(int &numScales);
65void getSigmaFactors2DNew(int &numScales);
66void getSigmaFactors3DNew(int &numScales);
67
68
69// Random number generators -- all in get_random_spectrum.cc
70void getRandomSpectrum(int length, float *x, float *y);
71void getRandomSpectrum(int length, float *x, double *y);
72void getRandomSpectrum(int length, float mean, float sigma,
73                       float *x, double *y);
74void getRandomSpectrum(int length, float mean, float sigma,
75                       float *x, float *y);
76float getNormalRV();
77float getNormalRVtrunc();
78float getNormalRV(float mean, float sigma);
79
80//--------------------
81// PLOTTING ROUTINES
82//--------------------
83// The following are in plottingUtilities.cc
84//
85void plotLine(const float slope, const float intercept);
86void lineOfEquality();
87void lineOfBestFit(int size, float *x, float *y);
88void lineOfBestFitPB(const int size, const float *x, const float *y);
89void plotVertLine(const float xval, const int colour, const int style);
90void plotVertLine(const float xval);
91void plotVertLine(const float xval, const int colour);
92void plotHorizLine(const float yval, const int colour, const int style);
93void plotHorizLine(const float yval);
94void plotHorizLine(const float yval, const int colour);
95void drawContours(const int size, const float *x, const float *y);
96
97
98
99
100#endif // TESTS_HH
Note: See TracBrowser for help on using the repository browser.