darkhistory.electrons.ics.nonrel_diff_terms.diff_expansion¶
-
darkhistory.electrons.ics.nonrel_diff_terms.
diff_expansion
(beta, photeng, T, as_pairs=False)¶ Computes the expansion for small beta and photeng/T.
This term is used in the beta expansion method for computing the nonrelativistic ICS spectrum.
Parameters: - beta : ndarray
Velocity of the electron.
- photeng : ndarray
Secondary photon energy.
- T : float
CMB temperature
- as_pairs : bool, optional
If true, treats eleceng and photeng as a paired list: produces eleceng.size == photeng.size values. Otherwise, gets the spectrum at each photeng for each eleceng, returning an array of length eleceng.size*photeng.size.
Returns: - tuple of ndarray
The result of the expansion and the error. Note that the error is a significant overestimate, given by the beta**6 term, when the error should be O(beta**8).