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

timed_dataframe has empty values when no electrons are present #307

Open
balerion opened this issue Dec 1, 2023 · 3 comments
Open

timed_dataframe has empty values when no electrons are present #307

balerion opened this issue Dec 1, 2023 · 3 comments

Comments

@balerion
Copy link
Collaborator

balerion commented Dec 1, 2023

Is your feature request related to a problem? Please describe.
when looking at the timed_dataframe, if there were no electrons for a specific pulseID, no other values are saved for any column, even if in principle these values are available in the h5 files

Describe the solution you'd like
I would like the dataframe to contain available values also for pulseIDs that have no electrons

Describe alternatives you've considered
I have not really considered any alternative, but i would be happy to

@zain-sohail
Copy link
Member

Currently this is the scope of how the timed df is produced.

dataframe_pulse = dataframe[
            self.multi_index + channels
        ]
dataframe_pulse = dataframe_pulse[
            (dataframe_pulse["electronId"] == 0) | (np.isnan(dataframe_pulse["electronId"]))
        ]

Are you suggesting we provide an option to keep the nans?

@balerion
Copy link
Collaborator Author

balerion commented Dec 7, 2023

i don't think so, but maybe i did not understand your reply fully.
Let me explain my problem better. If during a train of 400 FEL pulses, there is a pulse with no electron counts, then the timed_dataframe has no entries for that FEL pulse. Simply no value, which would actually be available in the original h5 file, is saved in the dataframe. These data would still be of great value, even if no electrons are detected by the dld.

@zain-sohail
Copy link
Member

zain-sohail commented Dec 12, 2023

#329 addresses it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants