get_binned_counts#

torusimaging.data.get_binned_counts(pos, vel, bins, units=None)#

Bin the data in pixels of phase-space coordinates (pos, vel) and return the number of stars (counts) and log-number of stars (label).

Parameters:
  • pos (Quantity) – The position values.

  • vel (Quantity) – The velocity values.

  • bins (dict[str, Quantity] | tuple) – A specification of the bins. This can either be a tuple, where the order is assumed to be (pos, vel), or a dictionary with keys “pos” and “vel”.

  • units (Optional[UnitSystem]) – The unit system to work in.

Returns:

Keys are “pos”, “vel”, “counts”, “label”, where label is the natural log of the counts.

Return type:

dict