Misc. Utilities¶
- utils.calculate_local_densities(obj, group_list)[source]¶
Calculate the local number and mass density of objects.
- Parameters
obj (SPHGR object) –
group_list (list) – List of objects to perform this operation on.
- utils.info_printer(obj, group_type, top)[source]¶
General method to print data.
- Parameters
obj (
main.CAESAR
) – Main CAESAR object.group_type ({'halo','galaxy','cloud'}) – Type of group to print data for.
top (int) – Number of objects to print.
- utils.rotator(vals, ALPHA=0, BETA=0)[source]¶
Rotate particle set around given angles.
- Parameters
vals (np.array) – a Nx3 array typically consisting of either positions or velocities.
ALPHA (float, optional) – First angle to rotate about
BETA (float, optional) – Second angle to rotate about
Examples
>>> rotated_pos = rotator(positions, 32.3, 55.2)