-
Notifications
You must be signed in to change notification settings - Fork 11
Description
Hi, thanks for developing and maintaining IMAS-Python.
Summary
We are currently working on replacing an OMAS HDF5–based remote HSDS database with an IMAS-Python HDF5 backend in the database platform used for the VEST device.
HSDS (Highly Scalable Data Service) provides REST-based access to HDF5 data stored on distributed or cloud storage systems. Our goal is to store IMAS IDS data locally using the IMAS HDF5 backend, upload the resulting HDF5 files to an HSDS server, and later download and read them again using imas.DBEntry.get().
However, after transferring the file through HSDS, reading the IDS fails with an ImasCoreBackendException.
What we did
We create and store an IDS using the IMAS HDF5 backend:
import imas
import os
factory = imas.IDSFactory()
pf_active = factory.pf_active()
pf_active.ids_properties.homogeneous_time = imas.ids_defs.IDS_TIME_MODE_HOMOGENEOUS
pf_active.time = [0.01]
dir_path = "/tmp/tet"
os.makedirs(dir_path, exist_ok=True)
with imas.DBEntry("imas:hdf5?path=" + dir_path, "w") as dbentry:
dbentry.put(pf_active)The file appears correct when inspected using h5py:
import h5py
f = h5py.File("/tmp/tet/pf_active.h5")
print(list(f.keys()))Output:
['pf_active']
Problem
When trying to read the data again:
with imas.DBEntry("imas:hdf5?path=/tmp/tet", "r") as dbentry:
ids = dbentry.get("pf_active")we get the following error:
ImasCoreBackendException:
Question
Even though we upload and download the exact same file, it becomes unreadable by imas.DBEntry.get().
Is there any additional requirement (e.g., metadata, directory structure, or backend-specific information) that must be preserved when transferring IMAS HDF5 data between systems (for example through HSDS)?