Skip to content

Commit f6642a9

Browse files
committed
Fix diffsky opening
1 parent 7553917 commit f6642a9

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/opencosmo/io/io.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ class FILE_TYPE(Enum):
6565
LIGHTCONE = 5
6666
STRUCTURE_COLLECTION = 6
6767
SIMULATION_COLLECTION = 7
68+
SYNTHETIC_CATALOG = 8
6869

6970

7071
class COLLECTION_TYPE(Enum):
@@ -96,6 +97,8 @@ def get_file_type(file: h5py.File) -> FILE_TYPE:
9697
return FILE_TYPE.GALAXY_PROPERTIES
9798
elif dtype == "galaxy_particles":
9899
return FILE_TYPE.GALAXY_PARTICLES
100+
elif dtype == "diffsky_fits":
101+
return FILE_TYPE.SYNTHETIC_CATALOG
99102
else:
100103
raise ValueError(f"Unknown file type {dtype}")
101104

test/test_collection.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ def test_link_particles_only(halo_paths):
8484

8585

8686
def test_link_profiles_only(halo_paths):
87-
collection = oc.open(halo_paths[1], halo_paths[2])
87+
print(halo_paths)
88+
collection = oc.open(halo_paths[0], halo_paths[2])
8889
assert isinstance(collection, oc.StructureCollection)
8990
assert set(collection.keys()) == {"halo_properties", "halo_profiles"}
9091

0 commit comments

Comments
 (0)