fluxcompensator.sed.SyntheticSED

class fluxcompensator.sed.SyntheticSED(input_array, unit_out='ergs/cm^2/s', name=None)

SyntheticSED is part of the 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 SyntheticSED object, the attributes are passed. If input_array is not a SyntheticSED object, SyntheticSED specific attributes are defined and then passed.

Parameters:

input_array : SyntheticSED, ModelOutput (get_sed), optional

input_array also reads arrays with ModelOutput like properties.

unit_out : str, optional

The output units for SyntheticSED 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:

sed : SyntheticSED

1D val array (collapsed rough SED) with SyntheticSED properties.

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 cm
  • pc in cm
  • kpc 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]
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 SyntheticSED. E. g. 'SyntheticSED: convolve_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']

Attributes

wav numpy.ndarray The wavelengths of the val vector entries in microns.
val numpy.ndarray The 1D vector with shape like wav.
units str Current units of the val vector.
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.
convolve_filter(filter_input[, plot_rebin, ...]) Convolves vector val entries within filter limits in a 0D val array.
get_total_val(wav_1, wav_2) Collapses the val entries in the vector within the boundaries wav_1 and wav_2 into a 0D val array.
plot_sed_multi_filter(multi_filter_val, ...) Reads in array of filtered val and plots it with the current passed val of SyntheticSED 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, str

If 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 is None.

Returns:

sed : SyntheticSED

convolve_filter(filter_input, plot_rebin=None, plot_rebin_dpi=None)

Convolves vector val entries within filter limits in a 0D val array.

Parameters:

filter_input : object

  • database : if filter name from FluxCompensator database is used.
  • Filter : if own filter is used.

plot_rebin : True, None

Switch to plot the rebined filter and the original filter in one plot.

plot_rebin_dpi : None, scalar > 0

The resolution in dots per inch. None is default and will use the val savefig.dpi in the matplotlibrc file.

Returns:

flux : SyntheticFlux

get_total_val(wav_1, wav_2)

Collapses the val entries in the vector within the boundaries wav_1 and wav_2 into a 0D val array.

WARNING: This tool cannot replace convolve_filter!
But it can be used to produce rough estimates in-between the processes.
Parameters:

wav_1, wav_2 : float

Boundaries in microns.

Returns:

flux : SyntheticFlux

plot_sed_multi_filter(multi_filter_val, multi_filter_wav, names, filter_label_size=None, ymin=1e-05, dpi=None)

Reads in array of filtered val and plots it with the current passed val of SyntheticSED in a log-log diagram. That way the quality of multiple filtered val can be checked, if filters are in database. If the used filters are not part of the filter database, define a OneFilter object.

Parameters:

multi_filter_val : np.ndarray

1D vector with val entries from several filters.

multi_filter_wav : np.ndarray

1D vector of central wavelengths from several filters.

names : np.ndarray

Original name of several filters, if found in database.

filter_label_size : None, True

Switch wether to set print labels above the filters.

  • None: No labels plotted.
  • True: Plots names[index] as label.

ymin : float

Minimal vertical limit for SED plot. Default is 10.**(-10) of the maximum val.

dpi : None, scalar > 0

The resolution in dots per inch. None is default and will use the val savefig.dpi in the matplotlibrc file.

Returns:

flux : SyntheticFlux