uvex_transients.utils.phot_utils#

Photometry utilities: bandpasses as arrays, AB magnitudes, and integrating a spectrum over bands.

Attributes

AB_MAG_ZERO_POINT

The zero-point flux density of the AB magnitude system, in erg/s/cm^2/Hz.

D_LN_NU

Default spacing of the rest-frame frequency grid in \(\ln\nu\).

Functions

band_integration_weights(bandpass[, d_ln_nu])

Build the frequency grid and weights that integrate a luminosity density over a band.

band_luminosity_curve(eval_log_luminosity, ...)

Evaluate the rest-frame luminosity in a band for each of many draws, on a grid of times.

band_weight_matrix(nu_rest, band_grids, z_grid)

Build the weights that turn rest-frame luminosity densities into band-averaged ones, for every band and redshift.

bandpass_table(bandpass)

Return a bandpass's frequencies and its throughput there, in the order of its wavelength table.

default_chunk_size(n_draws, n_time, n_frequency)

Choose how many draws to evaluate per step, so that the largest intermediate array is about 32 MB.

effective_frequency(bandpass)

Return the throughput-weighted mean frequency of a bandpass: \(\int\nu\,T\,d\nu/\int T\,d\nu\).

equivalent_bandwidth(bandpass[, ...])

Return the equivalent width, in frequency, of a bandpass.

flux_to_ab_mag(flux_density)

Convert a flux density to an AB magnitude.

hz_per_unit(unit, *, is_wavelength)

Return the coefficient converting a bare number in unit to a frequency in Hz.

integrate_chunk(eval_log_luminosity, ...)

Evaluate the SED for some draws and apply frequency weights.

luminosity_to_absolute_magnitude(luminosity, ...)

Convert a band luminosity to an absolute AB magnitude, by the distance modulus of a flat spectrum.

photon_weighted_band_average(flux_density, ...)

Average a flux density over a band, weighting by photon counts: \(\int F_\nu T\,d\nu/\nu\,/\int T\,d\nu/\nu\).

relative_bandpass_table(bandpass)

Return a bandpass's frequencies, increasing, and its throughput there relative to the peak.

resolve_bandpasses(bandpasses)

Reduce bandpasses to the (frequency, throughput) arrays that band integration needs.

restframe_frequency_grid(band_grids, z_grid)

Build the uniform-in-\(\ln\nu\) rest-frame grid that covers every band at every redshift.