Skip to content

Commit 4f747ca

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents bc05006 + a71a795 commit 4f747ca

File tree

8 files changed

+143
-189
lines changed

8 files changed

+143
-189
lines changed

pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@ requires = ["setuptools>=61.0"]
33
build-backend = "setuptools.build_meta"
44

55
[tool.setuptools]
6-
packages = ["velociraptor"]
6+
packages = ["velociraptor", "velociraptor.catalogue", "velociraptor.fitting_formulae", "velociraptor.observations", "velociraptor.autoplotter", "velociraptor.particles", "velociraptor.swift", "velociraptor.tools"]
77

88
[project]
99
name = "velociraptor-python"
10-
version="0.16.1"
10+
version="0.18.0"
1111
authors = [
1212
{ name="Josh Borrow", email="[email protected]" },
1313
{ name="Kyle Oman", email="[email protected]" },
1414
]
1515
description="Velociraptor catalogue reading routines."
1616
readme = "README.md"
17-
requires-python = ">3.6.0"
17+
requires-python = ">3.10.0"
1818
classifiers = [
1919
"License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)",
2020
"Operating System :: OS Independent",
@@ -33,4 +33,4 @@ dependencies = [
3333

3434
[project.scripts]
3535
velociraptor-plot = "velociraptor.velociraptor_plot:velociraptor_plot"
36-
velociraptor-compute-box-size-correction = "velociraptor.velociraptor_compute_box_size_correction:velociraptor_compute_box_size_correction"
36+
velociraptor-compute-box-size-correction = "velociraptor.velociraptor_compute_box_size_correction:velociraptor_compute_box_size_correction"

setup.py

Lines changed: 0 additions & 27 deletions
This file was deleted.

velociraptor/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.17.0"
1+
__version__ = "0.18.0"

velociraptor/catalogue/soap_catalogue.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,9 @@ def _register_metadata(self, handle: h5py.File):
141141
"""
142142
metadata = handle[self.name].attrs
143143
factor = (
144-
metadata["Conversion factor to CGS (including cosmological corrections)"][0]
144+
metadata[
145+
"Conversion factor to physical CGS (including cosmological corrections)"
146+
][0]
145147
* unyt.A ** metadata["U_I exponent"][0]
146148
* unyt.cm ** metadata["U_L exponent"][0]
147149
* unyt.g ** metadata["U_M exponent"][0]
@@ -374,6 +376,8 @@ def _register_elements(self, handle: h5py.File):
374376
"""
375377
h5group = handle[self.name] if self.name != "" else handle["/"]
376378
for (key, h5obj) in h5group.items():
379+
if key == "Cells":
380+
continue
377381
if isinstance(h5obj, h5py.Group):
378382
el = CatalogueGroup(self.file_name, f"{self.name}/{key}", handle)
379383
dynamically_register_properties(el)
@@ -526,22 +530,21 @@ def _register_quantities(self):
526530
"""
527531
with h5py.File(self.file_name, "r") as handle:
528532
self.root = CatalogueGroup(self.file_name, "", handle)
529-
cosmology = handle["SWIFT/Cosmology"].attrs
533+
cosmology = handle["Cosmology"].attrs
530534
# set up a dummy units object for compatibility with the old VR API
531535
self.units = SimpleNamespace()
532536
self.a = cosmology["Scale-factor"][0]
533537
self.units.scale_factor = cosmology["Scale-factor"][0]
534538
self.z = cosmology["Redshift"][0]
535539
self.units.redshift = cosmology["Redshift"][0]
536540

537-
swift_units = SWIFTUnitsMockup(dict(handle["SWIFT/Units"].attrs))
541+
swift_units = SWIFTUnitsMockup(dict(handle["Units"].attrs))
538542
self.cosmology = swift_cosmology_to_astropy(dict(cosmology), swift_units)
539543

540544
# get the box size and length unit from the SWIFT header and unit metadata
541545
boxsize = handle["SWIFT/Header"].attrs["BoxSize"][0]
542546
boxsize_unit = (
543-
handle["SWIFT/InternalCodeUnits"].attrs["Unit length in cgs (U_L)"][0]
544-
* unyt.cm
547+
handle["Units"].attrs["Unit length in cgs (U_L)"][0] * unyt.cm
545548
).in_base("galactic")
546549
boxsize *= boxsize_unit
547550
physical_boxsize = self.a * boxsize

0 commit comments

Comments
 (0)