fluxcompensator.flux.SyntheticFlux¶
-
class
fluxcompensator.flux.
SyntheticFlux
(input_array, unit_out='ergs/cm^2/s', name=None)¶ SyntheticFlux is part of FluxCompensator. It converts input_arrays (e. g. HYPERION ModelOutput) to “realistic” synthetic observations. It contains attributes like ModelOutput (see Notes). If input_array is already a SyntheticFlux object, the attributes are passed. If input_array is not a SyntheticFlux object, SyntheticFlux specific attributes are defined and then passed.
Parameters: input_array : SyntheticFlux, ModelOutput (get_sed, one line), optional
input_array also reads arrays with ModelOutput like properties.
unit_out : str, optional
The output units for SyntheticFlux val. Valid options are:
'ergs/cm^2/s'
'ergs/cm^2/s/Hz'
'Jy'
'mJy'
'MJy/sr'
The default is
'ergs/cm^2/s'
.name : str
The name of the FluxCompensator object until another input_array is called. The default is
None
.Returns: flux : SyntheticFlux
0D val array (scalar) with SyntheticFlux Properties.
Notes
- unit_in : str
Unit of val in input_array. Valid options are:
'ergs/cm^2/s'
'ergs/cm^2/s/Hz'
'Jy'
'mJy'
'MJy/sr'
- grid_unit : float
Physical unit of FOV axis in cm. Valid options are:
au
in cmpc
in cmkpc
in cm
- grid_unit_name
Astronomical unit of FOV axis. Valid options are:
'au'
'pc'
'kpc'
- FOV : tuple
Tuple
FOV(x,y)
of Field of View pixel entries.- pixel in x direction:
FOV[0]
- pixel in y direction:
FOV[1]
- pixel in x direction:
- name : str
- The name of the FluxCompensator object until another
input_array is called. The default is
None
. - stage : str
- Gives current operation stage of SyntheticFlux.
E. g.
'SyntheticFlux: plot_sed_filter'
- log : list
- List of strings of the previous and current stages.
- filter : dict
Dictionary
filter = {name, waf_0, waf_min, waf_max}
of the applied filter.- name of filter:
filter['name']
- central wavelength:
filter['waf_0']
- minimal wavelength:
filter['waf_min']
- maximal wavelength:
filter['waf_max']
- name of filter:
Attributes
wav numpy.ndarray The wavelength of scalar val array in microns. val numpy.ndarray The scalar val with array shape like wav. units str Current units of the vector val. distance str Distance to the observed object in cm. x_min float Physical offset from axis origin in FOV in cm. x_max float Physical offset from axis origin in FOV in cm. y_min float Physical offset from axis origin in FOV in cm. y_max float Physical offset from axis origin in FOV in cm. lon_min float Minimal longitudinal angle. lon_max float Maximal longitudinal angle. lat_min float Minimal latitudinal angle. lat_max float Maximal latitudinal angle. pix_area_sr float Pixel area per sr. ap_min float Minimal aperture. ap_max float Maximal aperture. Methods
extinction
(A_v[, input_opacities])Accounts for reddening. magnitudes
(zero_point)Converts f.val to magnitudes. plot_sed_filter
(wav_sed, val_sed[, ymin, ...])Reads SED like val from SyntheticCube (from get_rough_sed) or SyntheticSED and plots it with the current passed val of SyntheticFlux in a log-log diagram. Methods (detail)
-
extinction
(A_v, input_opacities=None)¶ Accounts for reddening.
Parameters: A_v : Value of the visible extinction.
input_opacities :
None
, strIf
None
standard extinction law is used. Otherwise a e. g. input_opacities.txt file can be passed as a str to read an opacity file with column #1 wav in microns and column #2 in cm^2/g. Default isNone
.Returns: flux : SyntheticFlux
-
magnitudes
(zero_point)¶ Converts f.val to magnitudes.
Parameters: zero_point : zero-magnitude flux in Jy.
The zero-magnitude flux can be accessed from the database if the filter objects are defined therein.
Returns: flux : SyntheticFlux
-
plot_sed_filter
(wav_sed, val_sed, ymin=1e-10, my_own_filter=None, dpi=None)¶ Reads SED like val from SyntheticCube (from get_rough_sed) or SyntheticSED and plots it with the current passed val of SyntheticFlux in a log-log diagram. That way the quality of the filtered val can be checked. If the used filter is part of the filter database the filter curve will be plotted. Otherwise just the boundaries are given.
Parameters: wav_sed : np.ndarray
1D vector of wavelength from ModelOutput (get_sed) or SyntheticCube.rough_sed
val_sed : np.ndarray
1D vector with val entries from ModelOutput (get_sed) or SyntheticCube.rough_sed with the same dimensions like wav_sed.
ymin : float
Minimal vertical limit for SED plot. Default is 10.**(-10) of the maximum val.
my_own_filter :
None
, OneFilterOneFilter object which is passed from outside to plot the filter curve.
dpi :
None
, scalar > 0The resolution in dots per inch.
None
is default and will use the val savefig.dpi in the matplotlibrc file.Returns: flux : SyntheticFlux