-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Treble DAS #15
Comments
Hello, That’s great, nice contribution! Would you dare doing a PR? That would make you an official contributor :). I’ll let you know if I need some data samples thanks. |
I created a branch |
Hello It seems that I push a request with the change. I put tz in option like this you can choose your time zone. {
"name": "TypeError",
"message": "Invalid object for specifying NumPy datetime metadata",
"stack": "---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
Cell In[2], line 2
1 fname=\"/mnt/data2/Planpincieux2024/7-OpticFiber/202408/UTC-YMD20240822-HMS112759.092/20240821_TT_RGH_TAP1_980_velocity_UTC-YMD20240822-HMS112759.092_seq_00000000000.hdf5\"
----> 2 da = xdas.open_dataarray(fname, engine='terra15')
File ~/Documents/Projets/Gricad/xdas/xdas/core/routines.py:351, in open_dataarray(fname, group, engine, **kwargs)
348 from .. import io
350 module = getattr(io, engine)
--> 351 return module.read(fname)
352 else:
353 raise ValueError(\"engine not recognized\")
File ~/Documents/Projets/Gricad/xdas/xdas/io/terra15.py:12, in read(fname)
10 def read(fname):
11 with h5py.File(fname, \"r\") as file:
---> 12 ti = np.datetime64(
13 datetime.fromtimestamp(file[\"data_product\"][\"gps_time\"][0]), timezone.utc
14 ).astype(\"datetime64[ms]\")
15 tf = np.datetime64(
16 datetime.fromtimestamp(file[\"data_product\"][\"gps_time\"][-1]), timezone.utc
17 ).astype(\"datetime64[ms]\")
18 d0 = file.attrs[\"sensing_range_start\"]
TypeError: Invalid object for specifying NumPy datetime metadata"
} Best |
Thanks, I still haven't found a simple way to include automatic tests for file formats reading. I can't found your request. I gave you right permissions so you can commit the fix. |
Let the choise to select the timezone #15
Looks good enough for me. |
Hi
I am getting my first data from Treble DAS (https://terra15.com.au/products/treble-das-interrogator/) and I wrote a function to load the data (format version 6 for terra15 files). If you like you can include it to your loader if it can benefit to other.
It works as expected with
or with multiple files
I can provide you some file if you want to test it.
Best
Thomas
The text was updated successfully, but these errors were encountered: