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

Add selobs/seltrajectory method #138

Open
gauteh opened this issue Nov 12, 2024 · 1 comment
Open

Add selobs/seltrajectory method #138

gauteh opened this issue Nov 12, 2024 · 1 comment

Comments

@gauteh
Copy link
Member

gauteh commented Nov 12, 2024

Often you want to iterate over trajectories and get the data in the time vs variable format. As long as you only have one trajectory you can reduce the observation layout to just 1d time layout. Would be nice if this works with groupby as well.

ds.traj.iseltraj(0)

gives a ds in (trajectory, time) format (except trajectory is size 1).

ds.traj.grouptraj().map(lambda t: t....)
@gauteh
Copy link
Member Author

gauteh commented Nov 12, 2024

Will be fixed by #104 and the to_1d() method:

ds.isel(trajectory=0).traj.to_1d()

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

1 participant