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

Reading data idx culling is not correct related to VoV #91

Open
lvarriano opened this issue May 10, 2024 · 0 comments
Open

Reading data idx culling is not correct related to VoV #91

lvarriano opened this issue May 10, 2024 · 0 comments
Labels
bug Something isn't working lh5 HDF5 I/O

Comments

@lvarriano
Copy link
Contributor

lvarriano commented May 10, 2024

I try to load data from an LH5 file while passing idx with some range larger than the number of events that the file contains (while making sure that the idx I request is not 0:N since this is handled as a special case so e.g. 1:N). Then I get an error message as attached. errormessage.txt This seems to be a problem for VoV.

import lgdo
import h5py
import numpy as np

store = lgdo.lh5.LH5Store()

input_raw = '/home/lv/Documents/uw/l200/l200-p06-r000-phy-20230619T034203Z-tier_raw.lh5'

ch_list = lgdo.lh5.ls(input_raw)[2:] # skip FCConfig and OrcaHeader

geds_list = []
with h5py.File(input_raw, mode='r') as f:
    for ch in ch_list:
        if 'waveform_presummed' in f[ch]['raw'].keys():
            geds_list.append(ch)

for ch in geds_list:
    chobj, _ = store.read(f'{ch}/raw', input_raw, idx=np.arange(1,5000))
@gipert gipert added bug Something isn't working lh5 HDF5 I/O labels May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working lh5 HDF5 I/O
Projects
None yet
Development

No branches or pull requests

2 participants