darkhistory.spec.spectools.get_bounds_between¶
-
darkhistory.spec.spectools.
get_bounds_between
(eng, E1, E2=None, bound_type='inc')¶ Returns the bin boundary of an abscissa between two energies.
If set to inc(lusive), E1 and E2 are part of the returned bounds. If set to exc(lusive), the bin boundaries between E1 and E2 are returned.
Parameters: - eng : ndarray
Abscissa from which the bin boundary is obtained.
- E1 : float
Lower bound
- E2 : float, optional
Upper bound. If None, E2 = max(bound of eng)
- bound_type : {‘inc’, ‘exc’}, optional
if ‘inc’, E1 and E2 are part of the returned bounds. If ‘exc’, they are not.
Returns: - ndarray
The bin boundaries between E1 and E2.