Interstellar

Instances of Interstellar are objects representing model interstellar processes which modify source intensities.

class xpsi.Interstellar.Interstellar(*args, **kwargs)[source]

Bases: xpsi.ParameterSubspace.ParameterSubspace

Base class for model interstellar X-ray processes (e.g., attenuation).

__call__(energies, signal)[source]

Attenuate a (specific) photon flux signal in-place.

Parameters:
  • energies (ndarray[m[,n]]) – An array of energies in keV at which attenuation factors need to be applied to the corresponding elements of the signal array.
  • energies – A signal array to be attenuated, where the second dimension (columns) is optional and generally represents time (phase). The number of rows must be equal to the number of energies.
Returns:

None.

Note

It is expected that the operations performed on a column of specific fluxes need to be applied identically to all other columns. The referenced object signal needs to be directly modified in-place, and not copied.

attenuation(energies)[source]

Return the attenuation factor at a set of energies.

The attenuation model can depend on fixed or free variables in the subspace, and generally requires loading model data from disk.

Parameters:energies (ndarray[m]) – An array of energies in keV at which attenuation factors are requested.
Returns:An array of attenuation factors, one at each input energy.