casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
FluxStandard.h
Go to the documentation of this file.
1 //# FluxStandard.h: Compute flux densities for standard reference sources
2 //# Copyright (C) 1996,1997,1999,2001
3 //# Associated Universities, Inc. Washington DC, USA.
4 //#
5 //# This library is free software; you can redistribute it and/or modify it
6 //# under the terms of the GNU Library General Public License as published by
7 //# the Free Software Foundation; either version 2 of the License, or (at your
8 //# option) any later version.
9 //#
10 //# This library is distributed in the hope that it will be useful, but WITHOUT
11 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 //# License for more details.
14 //#
15 //# You should have received a copy of the GNU Library General Public License
16 //# along with this library; if not, write to the Free Software Foundation,
17 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18 //#
19 //# Correspondence concerning AIPS++ should be adressed as follows:
20 //# Internet email: aips2-request@nrao.edu.
21 //# Postal address: AIPS++ Project Office
22 //# National Radio Astronomy Observatory
23 //# 520 Edgemont Road
24 //# Charlottesville, VA 22903-2475 USA
25 //#
26 //#
27 //# $Id: FluxStandard.h 21292 2012-11-28 14:58:19Z gervandiepen $
28 
29 #ifndef COMPONENTS_FLUXSTANDARD_H
30 #define COMPONENTS_FLUXSTANDARD_H
31 
32 #include <casa/aips.h>
35 
36 namespace casacore{
37 
38 class String; //#include <casa/BasicSL/String.h>
39 class MEpoch; //#include <measures/Measures/MEpoch.h>
40 class MFrequency; //#include <measures/Measures/MFrequency.h>
41 }
42 
43 namespace casa { //# NAMESPACE CASA - BEGIN
44 
45 // Forward declarations
46 class SpectralModel; //#include <components/ComponentModels/SpectralModel.h>
47 
48 // <summary>
49 // FluxStandard: Compute flux densities for standard reference sources
50 // </summary>
51 
52 // <use visibility=export>
53 
54 // <reviewed reviewer="" date="" tests="" demos="">
55 
56 // <prerequisite>
57 // <li><linkto class="Flux">Flux</linkto> module
58 // </prerequisite>
59 //
60 // <etymology>
61 // From "flux density" and "standard".
62 // </etymology>
63 //
64 // <synopsis>
65 // The FluxStandard class provides a means to compute total flux
66 // densities for specified sources on a standard
67 // flux density scale, such as that established by Baars or
68 // Perley and Taylor.
69 // </synopsis>
70 //
71 // <example>
72 // <srcblock>
73 // </srcblock>
74 // </example>
75 //
76 // <motivation>
77 // Encapsulate information on standard flux density computation in one class.
78 // </motivation>
79 //
80 // <todo asof="99/06/01">
81 // <li> closer integration into component models.
82 // </todo>
83 
85 {
86  public:
87  // Flux scale types.
88  // Standards which do not include resolution info must come before
89  // HAS_RESOLUTION_INFO, and those with it must come after.
90  enum FluxScale {
91  // Perley (1990); plus Reynolds (1934-638; 7/94); Baars (3C138)
92  PERLEY_90 = 0,
93 
94  // Perley and Taylor (1995.2); plus Reynolds (1934-638; 7/94)
96 
97  // Perley and Taylor (1999.2); plus Reynolds (1934-638; 7/94)
99 
100  // Baars scale
101  // Baars J. W. M., Genzel R., Pauliny-Toth I. I. K., et al., 1977,
102  // A&A, 61, 99
103  // http://cdsads.u-strasbg.fr/abs/1977A%26A....61...99B
105 
106  // Perley-Butler 2010 Scale (using VLA [not EVLA!] data)
108 
109  // Perley-Butler 2013 (include time variable sources)
111 
112  // Scaife & Heald 2012MNRAS.423L..30S
113  // broadband low-frequency flux scale for frequencies <~500 MHz
115 
116  // Stevens & Reynolds 2016, A combination of the Reynolds low
117  // frequency flux scale with the Stevens high frequency flux scale
118  // for 1934-638 described in Partridge et al (2016), ApJ 821,1
120  //
121  // Perley-Butler 2017 (inculde time variable sources from Perley-Butler 2013)
123 
125 
126  // Estimate the flux density for a Solar System object using a JPL Horizons
127  // ephemeris/data page and model provided by Bryan Butler.
129 
130  // The number of standards in this enumerator.
132  };
133 
134  // Default constructor, and destructor
137  ~FluxStandard();
138 
139  // Compute the flux density for a specified source at a specified frequency
140  casacore::Bool compute (const casacore::String& sourceName, const casacore::MDirection& sourceDir, const casacore::MFrequency& mfreq, const casacore::MEpoch& mtime,
142 
143  // Compute the flux densities and their uncertainties for a specified source
144  // at a set of specified frequencies.
145  casacore::Bool compute(const casacore::String& sourceName,
146  const casacore::MDirection& sourceDir,
148  const casacore::MEpoch& mtime,
151  const casacore::Bool verbose=true);
152 
153  // Compute the flux densities and their uncertainties for a specified source
154  // for a set of sets of specified frequencies, i.e. mfreqs[spw] is a set of
155  // frequencies for channels in spectral window spw, and values and errors are
156  // arranged the same way.
157  casacore::Bool compute(const casacore::String& sourceName,
158  const casacore::MDirection& sourceDir,
160  const casacore::MEpoch& mtime,
163 
164  // Like compute, but it also saves a set of ComponentLists for the source to
165  // disk and puts the paths (sourceName_mfreq_mtime.cl) in clnames, making it
166  // suitable for resolved sources.
167  // mtime is ignored for nonvariable objects.
168  // Solar System objects are typically resolved and variable!
169  // The ComponentList names are formed from prefix, sourceName, the
170  // frequencies, and times.
172  const casacore::MEpoch& mtime, const casacore::MDirection& position,
175  casacore::Vector<casacore::String>& clnames, const casacore::String& prefix="");
176 
177  // set interpolation method for a time-variable source
178  void setInterpMethod(const casacore::String& interpmethod);
179 
180 
181  // Take a component cmp and save it to a ComponentList on disk, returning the
182  // pathname. ("" if unsuccessful, sourceName_mfreqGHzDateTime.cl otherwise)
183  //
184  // This is also used outside of FluxStandard, but it is declared here instead
185  // of in ComponentList because it is somewhat specialized, mainly in setting
186  // up the pathname. The ComponentList name is formed from prefix, sourceName,
187  // mfreq, and mtime.
188  //
189  static casacore::String makeComponentList(const casacore::String& sourceName, const casacore::MFrequency& mfreq,
190  const casacore::MEpoch& mtime, const Flux<casacore::Double>& fluxval,
191  const ComponentShape& cmp,
192  const SpectralModel& spectrum,
193  const casacore::String& prefix="");
194 
195  // Variation of the above that will fill a TabularSpectrum with mfreqs and
196  // values if appropriate.
197  static casacore::String makeComponentList(const casacore::String& sourceName,
199  const casacore::MEpoch& mtime,
201  const ComponentShape& cmp,
202  const casacore::String& prefix="");
203 
204  // Decode a string representation of the standard or catalog name
206  FluxStandard::FluxScale& stdEnum,
207  casacore::String& stdName);
208 
209  // Return a standard string description for each scale or catalog
211 
212  private:
213  // Flux scale in use
215 
217 
219 
221 };
222 
223 } //# NAMESPACE CASA - END
224 
225 #endif
A Measure: astronomical direction.
Definition: MDirection.h:174
FluxStandard(const FluxStandard::FluxScale scale=FluxStandard::PERLEY_TAYLOR_99)
Default constructor, and destructor.
FluxStandard::FluxScale itsFluxScale
Flux scale in use.
Definition: FluxStandard.h:214
Perley-Butler 2017 (inculde time variable sources from Perley-Butler 2013)
Definition: FluxStandard.h:122
Perley and Taylor (1999.2); plus Reynolds (1934-638; 7/94)
Definition: FluxStandard.h:98
void setInterpMethod(const casacore::String &interpmethod)
set interpolation method for a time-variable source
FluxStandard: Compute flux densities for standard reference sources.
Definition: FluxStandard.h:84
ABSTRACT CLASSES Abstract class for colors Any implementation of color should be able to provide a hexadecimal form of the if a human readable name(i.e."black").In many places throughout the plotter
casacore::Bool has_direction_p
Definition: FluxStandard.h:216
A Measure: instant in time.
Definition: MEpoch.h:104
Perley (1990); plus Reynolds (1934-638; 7/94); Baars (3C138)
Definition: FluxStandard.h:92
A Measure: wave characteristics.
Definition: MFrequency.h:161
static casacore::String standardName(const FluxStandard::FluxScale &stdEnum)
Return a standard string description for each scale or catalog.
FluxScale
Flux scale types.
Definition: FluxStandard.h:90
Base class for component shapes.
The number of standards in this enumerator.
Definition: FluxStandard.h:131
casacore::Bool compute(const casacore::String &sourceName, const casacore::MDirection &sourceDir, const casacore::MFrequency &mfreq, const casacore::MEpoch &mtime, Flux< casacore::Double > &value, Flux< casacore::Double > &error)
Compute the flux density for a specified source at a specified frequency.
casacore::Bool computeCL(const casacore::String &sourceName, const casacore::Vector< casacore::Vector< casacore::MFrequency > > &mfreqs, const casacore::MEpoch &mtime, const casacore::MDirection &position, casacore::Vector< casacore::Vector< Flux< casacore::Double > > > &values, casacore::Vector< casacore::Vector< Flux< casacore::Double > > > &errors, casacore::Vector< casacore::String > &clnames, const casacore::String &prefix="")
Like compute, but it also saves a set of ComponentLists for the source to disk and puts the paths (so...
casacore::MDirection direction_p
Definition: FluxStandard.h:218
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
Base class for spectral models.
Perley-Butler 2010 Scale (using VLA [not EVLA!] data)
Definition: FluxStandard.h:107
Stevens &amp; Reynolds 2016, A combination of the Reynolds low frequency flux scale with the Stevens high...
Definition: FluxStandard.h:119
Baars scale Baars J.
Definition: FluxStandard.h:104
casacore::String interpmethod_p
Definition: FluxStandard.h:220
Perley and Taylor (1995.2); plus Reynolds (1934-638; 7/94)
Definition: FluxStandard.h:95
Estimate the flux density for a Solar System object using a JPL Horizons ephemeris/data page and mode...
Definition: FluxStandard.h:128
String: the storage and methods of handling collections of characters.
Definition: String.h:223
Scaife &amp; Heald 2012MNRAS.423L..30S broadband low-frequency flux scale for frequencies &lt;~500 MHz...
Definition: FluxStandard.h:114
static casacore::String makeComponentList(const casacore::String &sourceName, const casacore::MFrequency &mfreq, const casacore::MEpoch &mtime, const Flux< casacore::Double > &fluxval, const ComponentShape &cmp, const SpectralModel &spectrum, const casacore::String &prefix="")
Take a component cmp and save it to a ComponentList on disk, returning the pathname.
Perley-Butler 2013 (include time variable sources)
Definition: FluxStandard.h:110
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
static casacore::Bool matchStandard(const casacore::String &name, FluxStandard::FluxScale &stdEnum, casacore::String &stdName)
Decode a string representation of the standard or catalog name.
#define casacore
&lt;X11/Intrinsic.h&gt; #defines true, false, casacore::Bool, and String.
Definition: X11Intrinsic.h:42