-
Notifications
You must be signed in to change notification settings - Fork 639
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
Introduce universally Timestep.time as part of the Reader/Timestep API #308
Comments
So with this I've realised that Timesteps don't actually have a pointer to their Reader. So to give |
Ah, I've just seen #307 fixes this, so this is reliant on that. |
Should we give Timesteps a pointer to their Reader? What are the reasons to do it / not to do it? |
I actually started hacking on this today, what I did was make Reader.dt a property that updated its timestep. I do like that Timesteps can work alone and are essentially a simple container, but maybe adding an optional hook to their Reader might simplify things. |
I'd leave |
With this, I've changed it so that single frame readers now return a dt of 1.0 ps. They previously raised a KeyError. I figure this would make it more uniform for readers to always have a dt which you can kwarg in if you want. Might also help with the ChainReader issues. #309 Is this logic terrible? |
Makes sense and I don't think it will be a problem. Throwing the |
fixed, skip_timestep, periodic, skip and delta no longer required for Readers (Issue #350) All writers now refer to time between steps as "dt" (was previously delta in XTC, TRR and NCDF Writers) (Issue #206) Timesteps now have a default dt of 1.0 ps (and issue warning when using this) Timestep attribute time now tries to return data['time'] first, then dt * frame, using the default value of 1.0 ps if necessary. (Issue #308)
Subtask of #252:
Introduce universally
Timestep.time
(as part of the API):dt
and frame numbersN
, it will calculate the time asN * dt
.dt = 1
and use theN * dt
calculated time.deprecate
Reader.time
(for 1.0)The text was updated successfully, but these errors were encountered: