prepare_snapshot#

cogsworth.hydro.utils.prepare_snapshot(path, halo_params={'mode': 'ssc'})[source]#

Prepare a snapshot for use in cogsworth

Convert a snapshot to physical units, centre it on the main halo, and orient it face-on and side-on.

Parameters:
pathstring

Path to the snapshot file or directory (as used in pynbody.snapshot.load())

halo_paramsdict, optional

Keyword parameters to be passed to pynbody.analysis.halo.center(), by default {“mode”: “ssc”}

Returns:
snappynbody.snapshot.SimSnap

The prepared snapshot