darkhistory.spec.transferfunction.TransFuncAtEnergy¶
- class darkhistory.spec.transferfunction.TransFuncAtEnergy(spec_arr, eng=None, in_eng=None, rs=None, spec_type='dNdE', dlnz=-1, rebin_eng=None)¶
Transfer function at a given injection energy.
Collection of Spectrum objects, each at different redshifts.
- Parameters:
- spec_arrlist of Spectrum
List of Spectrum to be stored together.
- engndarray, optional
Energy abscissa.
- in_engndarray, optional
Injection energy abscissa.
- rsndarray, optional
The redshift of the spectra.
- spec_type{‘N’, ‘dNdE’}, optional
Type of data stored, ‘dNdE’ is the default.
- dlnzfloat
The d ln(1+z) step for the transfer function.
- rebin_engndarray, optional
New abscissa to rebin all of the Spectrum objects into.
- Attributes:
- in_engndarray
Array of injection energies corresponding to each spectrum.
- engndarray
Array of energy abscissa of each spectrum.
- rsndarray
Array of redshifts corresponding to each spectrum.
- spec_type{‘N’, ‘dNdE’}
The type of values stored.
- dlnzfloat
The d ln(1+z) step for the transfer function.
Methods
append(spec)Appends a new Spectrum.
at_rs(new_rs[, interp_type, bounds_error, ...])Interpolates the transfer function at a new redshift.
integrate_each_spec([weight])Sums over each individual spectrum with some weight.
plot(ax[, ind, step, indtype, fac])Plots the contained Spectrum objects.
rebin(out_eng)Re-bins all Spectrum objects according to a new abscissa.
redshift(rs_arr)Redshifts the stored spectra.
sum_specs([weight])Sums the spectrum in each energy bin, weighted by weight.
switch_spec_type([target])Switches between the type of values to be stored.
totN([bound_type, bound_arr])Returns the total number of particles in part of the spectra.
toteng([bound_type, bound_arr])Returns the total energy of particles in part of the spectra.
- __init__(spec_arr, eng=None, in_eng=None, rs=None, spec_type='dNdE', dlnz=-1, rebin_eng=None)¶
Methods
__add__(other)Adds two
Spectrainstances together, or an array to theSpectra.__delattr__(name, /)Implement delattr(self, name).
__dir__(/)Default dir() implementation.
__eq__(value, /)Return self==value.
__format__(format_spec, /)Default object formatter.
__ge__(value, /)Return self>=value.
__getattribute__(name, /)Return getattr(self, name).
__getitem__(key)__getstate__(/)Helper for pickle.
__gt__(value, /)Return self>value.
__hash__(/)Return hash(self).
__init__(spec_arr[, eng, in_eng, rs, ...])__init_subclass__This method is called when a class is subclassed.
__iter__()__le__(value, /)Return self<=value.
__lt__(value, /)Return self<value.
__mul__(other)Takes a product with the spectra with a
Spectraobject, array or number.__ne__(value, /)Return self!=value.
__neg__()Negates the spectra.
__new__(*args, **kwargs)__radd__(other)Adds two
Spectrainstances together, or an array to the spectra.__reduce__(/)Helper for pickle.
__reduce_ex__(protocol, /)Helper for pickle.
__repr__(/)Return repr(self).
__rmul__(other)Takes a product with the spectra with a
Spectraobject, array or number.__rsub__(other)Subtracts this
Spectrafrom another or an array.__rtruediv__(other)Divides an object by the spectra.
__setattr__(name, value, /)Implement setattr(self, name, value).
__setitem__(key, value)__sizeof__(/)Size of object in memory, in bytes.
__str__(/)Return str(self).
__sub__(other)Subtracts a
Spectraor array from thisSpectra.__subclasshook__Abstract classes can override this to customize issubclass().
__truediv__(other)Divides the spectra by another object.
append(spec)Appends a new Spectrum.
at_rs(new_rs[, interp_type, bounds_error, ...])Interpolates the transfer function at a new redshift.
integrate_each_spec([weight])Sums over each individual spectrum with some weight.
plot(ax[, ind, step, indtype, fac])Plots the contained Spectrum objects.
rebin(out_eng)Re-bins all Spectrum objects according to a new abscissa.
redshift(rs_arr)Redshifts the stored spectra.
sum_specs([weight])Sums the spectrum in each energy bin, weighted by weight.
switch_spec_type([target])Switches between the type of values to be stored.
totN([bound_type, bound_arr])Returns the total number of particles in part of the spectra.
toteng([bound_type, bound_arr])Returns the total energy of particles in part of the spectra.
Attributes
N_underflow__annotations____array_priority____dict____doc____module____weakref__list of weak references to the object
engeng_underflowgrid_valsin_engrsspec_type
