BrokenPowerLawSpectrum#
- class uvex_transients.models.spectra.powerlaw.BrokenPowerLawSpectrum(**overrides: Parameter | Quantity | float | int)[source]#
Finite-band, two-segment power-law spectral shape.
Represents
\[S(\nu) = \nu_{\rm break}^{-1} \left(\frac{\nu}{\nu_{\rm break}}\right)^{\alpha_1 \,\mathrm{or}\,\alpha_2},\]using index \(\alpha_1\) below
break_frequencyand \(\alpha_2\) above it, and zero outside[frequency_min, frequency_max]. Because both segments are anchored to the samebreak_frequency, \(S(\nu)\) is automatically continuous there (both give \(\nu_{\rm break}^{-1}\)) without any extra matching condition.The default indices are sampled from Gaussian priors centered on -1 (below the break) and -2 (above it) – a generic steepening spectrum; like any other parameter, both can be overridden per instance.
break_frequencyand the cutoffs use constant priors by default, making them deterministic unless replaced or overridden explicitly.Parameters
The spectral shape parameters are summarized below.
Parameter
Symbol
Description
spectral_index_1\(\alpha_1\)
Power-law index below
break_frequency.spectral_index_2\(\alpha_2\)
Power-law index above
break_frequency.break_frequency\(\nu_{\rm break}\)
Frequency at which the spectral index switches from alpha_1 to alpha_2.
frequency_min\(\nu_{\min}\)
Lower frequency cutoff of the spectrum.
frequency_max\(\nu_{\max}\)
Upper frequency cutoff of the spectrum.
Methods
eval(nu, **parameters)Evaluate the spectral shape at the given frequency.
eval_cgs(nu, **parameters)Spectral shape, taking and returning plain cgs numbers.
eval_from_arrays(nu, *parameters)Positional-argument form of
eval().eval_log(nu, **parameters)Natural log of the spectral shape, given physical-unit inputs.
eval_log_cgs(nu, **parameters)Natural log of the spectral shape, taking and returning plain cgs numbers.
eval_normalization(**parameters)Evaluate \(\int S(\nu)\,d\nu\).
eval_normalization_cgs(**parameters)Return the shape's frequency integral as plain cgs numbers; see
eval_normalization_log_cgs().eval_normalization_log(**parameters)Natural log of the shape's frequency integral, given physical-unit inputs.
eval_normalization_log_cgs(**parameters)Natural log of the shape's frequency integral, taking and returning plain cgs numbers.
get(k[,d])items()keys()pack_params_to_arrays(**parameters)Convert a dict of parameter values into an ordered sequence.
sample_parameters([size, rng, parameters])Draw random samples of some or all of this model's parameters.
simulate(nu[, size, rng])Draw random parameter realizations and evaluate the model at the given frequency.
unpack_params_from_arrays(*parameters)Convert an ordered sequence of parameter values back into a dict.
values()