diff --git a/python/_cosmotool.pyx b/python/_cosmotool.pyx index f6dce91..cb1e4b0 100644 --- a/python/_cosmotool.pyx +++ b/python/_cosmotool.pyx @@ -507,7 +507,7 @@ def writeGadget(str filename, object simulation): cxx_writeGadget(filename, &simdata) -def loadRamses(str basepath, int snapshot_id, int cpu_id, bool doublePrecision = False, bool loadPosition = True, bool loadVelocity = False): +def loadRamses(str basepath, int snapshot_id, int cpu_id, bool doublePrecision = False, bool loadPosition = True, bool loadVelocity = False, bool loadId = False): """ loadRamses(basepath, snapshot_id, cpu_id, doublePrecision = False, loadPosition = True, loadVelocity = False) Loads the indicated snapshot based on the cpu id, snapshot id and basepath. It is important to specify the correct precision in doublePrecision otherwise the loading will fail. There is no way of auto-detecting properly the precision of the snapshot file. @@ -520,6 +520,7 @@ def loadRamses(str basepath, int snapshot_id, int cpu_id, bool doublePrecision = doublePrecision (bool): By default it is False, thus singlePrecision loadPosition (bool): Whether to load positions loadVelocity (bool): Whether to load velocities + loadId (bol): Whether to load identifiers Returns: An object derived from PySimulationBase_. @@ -533,6 +534,8 @@ def loadRamses(str basepath, int snapshot_id, int cpu_id, bool doublePrecision = flags |= NEED_POSITION if loadVelocity: flags |= NEED_VELOCITY + if loadId: + flags |= NEED_GADGET_ID data = loadRamsesSimu(basepath, snapshot_id, cpu_id, doublePrecision, flags) if data == 0: