sccala.asynphot.synphot

Classes

BaseFilterCurve

FilterCurve

FilterSet

MagnitudeSet

Functions

calculate_vega_zp(filter)

calculate_lambda_eff(spec_wav, spec_flux, filter)

Calculate effective wavelength from spectral flux.

calculate_vega_magnitude(spec_wav, spec_flux, filter)

Calculate Vega magnitudes from spectral flux. If spectral uncertainties are

Module Contents

sccala.asynphot.synphot.calculate_vega_zp(filter)
sccala.asynphot.synphot.calculate_lambda_eff(spec_wav, spec_flux, filter)

Calculate effective wavelength from spectral flux.

Parameters:
  • spec_wav – np.array of floats wavelength values of spectrum

  • spec_flux – np.array of floats spectral flux

  • filter – BaseFilter filter object on which the magnitude is to be calculated

sccala.asynphot.synphot.calculate_vega_magnitude(spec_wav, spec_flux, filter, spec_err=None, error_method='analytic', error_n=100)

Calculate Vega magnitudes from spectral flux. If spectral uncertainties are supplied, a magnitude uncertainty will be calculated by propagating the uncertainty through the numerical integration (Simpson’s rule).

Parameters:
  • spec_wav – np.array of floats wavelength values of spectrum

  • spec_flux – np.array of floats spectral flux

  • filter – BaseFilter filter object on which the magnitude is to be calculated

  • spec_err – np.array of floats or None spectral uncertainty. Default=None

  • error_method – str method with which error is propagated. Default=’analytic’

  • error_n – int number of iteration for frequentist error propagation. Default=100

Return vega_magnitude:

np.array of floats calculated vega_magnitude

Return vega_magnitude_error:

np.array of floats, optional calculated magnitude uncertaint

class sccala.asynphot.synphot.BaseFilterCurve(wav, trans, interpolation_kind='linear', filter_id=None)

Bases: object

classmethod load_filter(filter_id=None, interpolation_kind='linear')
wav
trans
interpolation_object
filter_id = None
interpolate(wavelength)
calculate_vega_magnitude(spec_wav, spec_flux, spec_err=None)
calculate_lambda_eff(spec_wav, spec_flux)
class sccala.asynphot.synphot.FilterCurve(wav, trans, interpolation_kind='linear', filter_id=None)

Bases: BaseFilterCurve

__repr__()
class sccala.asynphot.synphot.FilterSet(filter_set, interpolation_kind='linear')

Bases: object

__iter__()
__next__()
next
__getitem__(item)
__repr__()
calculate_vega_magnitudes(spec_wav, spec_flux, spec_err=None)
calculate_lambda_effs(spec_wav, spec_flux)
class sccala.asynphot.synphot.MagnitudeSet(filter_set, magnitudes, magnitude_uncertainties=None, interpolation_kind='linear')

Bases: FilterSet

magnitudes
__repr__()