Filters ======= .. autoclass:: qmostetc.Filter :members: :undoc-members: List of filters included in the ETC ----------------------------------- Zeropoints .......... .. exec:: import numpy as np import astropy.units as u from qmostetc import Filter, Spectrum, SEDTemplate, VEGAmag wavelength = np.arange(300, 2500, 0.1) * u.nm flux = np.ones(wavelength.shape) * u.Unit("1e-15 J / (cm2 nm s)") flat = SEDTemplate(Spectrum(wavelength, flux)) print(f".. list-table:: [{flux.unit.to_string('unicode')}]") print(" :header-rows: 1") print(" :stub-columns: 1") print(" :align: left") print() print(" * - **Filter**") print(" - **mag(AB)**") print(" - **mag(Vega)**") for name in Filter.list(): flux_ab = flat(0*u.ABmag, name).to(flux.unit).flux.mean().value flux_vega = flat(0*VEGAmag, name).to(flux.unit).flux.mean().value print(f" * - {name}") print(f" - {flux_ab:5g}") print(f" - {flux_vega:5g}") Reference plots ............... .. plot:: from qmostetc import Filter import matplotlib.pyplot as plt import astropy.units as u filter_names = Filter.list() prefixes = sorted(set(name.split('.', 1)[0] for name in filter_names)) sorted_filters = dict((p, []) for p in prefixes) for name in filter_names: prefix = name.split('.', 1)[0] sorted_filters[prefix].append(name) for prefix, names in sorted_filters.items(): plt.figure() plt.title(prefix) for name in names: flt = Filter.read(name) plt.plot(flt.wavelength, flt.flux, label=name) plt.xlabel(f"Wavelength [{flt.wavelength.unit}]") plt.ylabel("Filter value") plt.legend() plt.show()