sarracen.disc.honH
- sarracen.disc.honH(data: SarracenDataFrame, r_in: float | None = None, r_out: float | None = None, bins: int = 300, log: bool = False, geometry: str = 'cylindrical', origin: list | None = None, retbins: bool = False) ndarray | Tuple[ndarray, ndarray]
Calculates <h>/H, the averaged smoothing length divided by the scale height.
The profile is computed by segmenting the particles into radial bins (rings). The average smoothing length in each bin is divided by the scale height as calculated for that bin.
- Parameters:
data (SarracenDataFrame) – Particle data, in a SarracenDataFrame.
r_in (float, optional) – Inner radius of the disc. Defaults to the minimum r value.
r_out (float, optional) – Outer radius of the disc. Defaults to the maximum r value.
bins (int, optional) – Defines the number of equal-width bins in the range [r_in, r_out]. Default is 300.
log (bool, optional) – Whether to bin in log scale or not. Defaults to False.
geometry (str, optional) – Coordinate system to use to calculate the particle radii. Can be either spherical or cylindrical. Defaults to cylindrical.
origin (array-like, optional) – The x, y and z centre point around which to compute radii. Defaults to [0, 0, 0].
retbins (bool, optional) – Whether to return the midpoints of the bins or not. Defaults to False.
- Returns:
array – A NumPy array of length bins containing the <h>/H profile.
array, optional – The midpoint values of each bin. Only returned if retbins=True.
- Raises:
ValueError – If the geometry is not cylindrical or spherical.
See also
scale_height()Calculate the scale height of a disc.