Elsewhere¶
Instances of Elsewhere
represent the region of the
photosphere in which smaller radiative features (such as spots) are embedded.

class
xpsi.Elsewhere.
Elsewhere
(sqrt_num_cells=64, num_rays=1000, bounds=None, values=None, custom=None, image_order_limit=None)[source]¶ The photospheric radiation field elsewhere.
This means the radiation field exterior to the hot regions. The local comoving radiation field properties are assumed (for now) to be azimuthally invariant but can in principle vary colatitudinally.
Parameters:  sqrt_num_cells (int) – Number of cells in both colatitude and azimuth which form a regular mesh on the surface. Must be an even number such that half of the cells are exactly in one hemisphere. The total number of cells is the square argument value. The mesh suffers from squeezing in the polar regions, leading to a high degree of noncongruence in cell shape over the surface.
 num_rays (int) – Number of rays to trace (integrate) at each colatitude, distributed in angle subtended between ray tangent 4vector and radial outward unit vector w.r.t a local orthonormal tetrad.
 bounds (dict) – If
custom is None
, these bounds are supplied for instantiation of a temperature parameter. The parameter name'elsewhere_temperature'
must be a key in the dictionary unless the parameter is fixed or derived. If a bound isNone
that bound is set equal to a strict hardcoded bound.  values (dict) – Either the fixed value of the temperature elsewhere, a callable if the
temperature is derived, or a value upon initialisation if the
temperature is free. The dictionary must have a key with name
'elsewhere_temperature'
if it is fixed or derived.  custom (iterable) – Iterable over
Parameter
instances. If you supply custom parameter definitions, you need to overwrite the_compute_cellParamVecs()
method to handle your custom behaviour.  image_order_limit (int) – The highestorder image to sum over. A value of one means primary
images only (deflections \(<\pi\)) whilst a value of two means
primary and secondary images (deflections \(<2pi\)) where visible,
and so on. If
None
(the default), there is no hard limit. In this case the limit is determined quasinaturally for each mesh element, meaning that images will be summed over until higher order images are not visible or the visibility limit is truncated due to lack of numerical precision (e.g. for rays that orbit very close to the Schwarzschild photon sphere three times or more). Higherorder images generally contribute less and less due to geometric projection effects (higherorder images become more tangential), and the images of elements get squeezed in solid angle at the stellar limb. In principle, effects such as relativistic beaming can counter this effect to a degree for certain sourcereceiver configurations, by increasing brightness whilst solid angle decreases, and thus the flux contribution relative to that from a primary image can be greater than suggested simply by geometric project effects. Nevertheless, inclusion of these images is more computationally expensive. If, when iterating through image orders, an image is not visible because the deflection required is greater than the highest deflection permitted at a given colatitude on a surface (accounting for the surface tilt due to rotation), then the iteration over image orders terminates.
 Required parameter names:
 elsewhere_temperature (if no custom specification)
Showinheritance: 
_compute_cellParamVecs
(*args)[source]¶ Precompute photospheric source radiation field parameter vectors cellbycell. Free model parameters and derived (fixed) variables can be transformed into local comoving radiation field variables.
Subclass and overwrite with custom functionality if you desire.
Parameters: args (tuple) – An ndarray[n,n] of meshpoint colatitudes.

_compute_rays
(st, threads)[source]¶ Trace (integrate) a set of rays.
These rays represent a null mapping from photosphere to a point at some effective infinity.
Parameters:  st – Instance of
Spacetime
.  threads (int) – Number of
OpenMP
threads for ray integration.
 st – Instance of

_construct_cellMesh
(st, threads)[source]¶ Call a lowlevel routine to construct a mesh representation.
Parameters:  st – Instance of
Spacetime
.  threads (int) – Number of
OpenMP
threads for mesh construction.
 st – Instance of

integrate
(st, energies, threads, *atmosphere)[source]¶ Integrate over the photospheric radiation field.
Parameters:  st – Instance of
Spacetime
.  energies – A onedimensional
numpy.ndarray
of energies in keV.  threads (int) – Number of
OpenMP
threads the integrator is permitted to spawn.
 st – Instance of

num_cells
¶ Get the total number of cells in the mesh.

num_rays
¶ Get the number of rays integrated per colatitude.

sqrt_num_cells
¶ Get the number of cell colatitudes.