Skip to content
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

Saving a patch in NEUBREXRFS format raises NotImplementedError #490

Open
danilodjor opened this issue Feb 19, 2025 · 1 comment
Open

Saving a patch in NEUBREXRFS format raises NotImplementedError #490

danilodjor opened this issue Feb 19, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@danilodjor
Copy link

Description

When loading an H5 file, it generates a patch with attributes of type NeubrexRFSPatchAttrs. After processing the DAS file, I attempt to save the file using the following method:

patch.io.write('save_file.h5', file_format="NEUBREXRFS").

However, this raises an error: NotImplementedError: FiberIO: NeubrexRFS has no write method.
I would like to know how to process a DAS patch and save it in the exact same format in which it was loaded.

Example

Here is an example that reproduces the issue:

import dascore as dc

patch = dc.spool("input_file.h5")[0]
patch = patch.decimate(time=2)
patch.io.write("test.h5", file_format="NEUBREXRFS")

Expected behavior

The expected behavior is that the file should be saved in the exact same format that it was loaded.

Versions

  • OS: macOS Sequoia 15.1.1
  • DasCore Version: 0.1.5
  • Python Version: 3.12.2
@danilodjor danilodjor added the bug Something isn't working label Feb 19, 2025
@ahmadtourei
Copy link
Collaborator

Hey @danilodjor, For DASCore IO, we prioritize providing read support for a wide range of formats so more users can use the software. While we do offer write support for some formats (listed here), it is not yet universal across all supported formats, including NeubrexRFS. We plan to add write support for other formats as we get requests from the users, so we will keep this on our radar. In the meantime, you can write in supported formats such as "DASDAE" or "SEGY," so you can read the processed data using DASCore as well.

Also, check out this documentation on implementing a new IO format in DASCore here. Let us know if you are interested in working on adding write support for NeubrexRFS so we address questions you may have on your first PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants