Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tangos/input_handlers/pynbody.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ def load_timestep_without_caching(self, ts_extension, mode=None) -> pynbody.snap
raise NotImplementedError("Load mode %r is not implemented"%mode)

def _build_kdtree(self, timestep, mode):
timestep.wrap() # Because we have converted pos to kpc, FP roundoff may place particles at the boundaries outside the period of the box.
timestep.build_tree()

def load_region(self, ts_extension, region_specification, mode=None, expected_number_of_queries=None) -> pynbody.snapshot.simsnap.SimSnap:
Expand Down
1 change: 1 addition & 0 deletions tangos/parallel_tasks/pynbody_server/snapshot_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ def build_tree(self):
num_threads = multiprocessing.cpu_count()
else:
num_threads = None
self.current_snapshot.wrap() # Because we have converted pos to kpc, FP roundoff may place particles at the boundaries outside the period of the box.
self.current_snapshot.build_tree(num_threads=num_threads,
shared_mem=self.current_shared_mem_flag)

Expand Down
Loading