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 crop method to NDCubeSequence #466

Merged
merged 10 commits into from Nov 10, 2021
Merged

Conversation

DanRyanIrish
Copy link
Member

@DanRyanIrish DanRyanIrish commented Aug 24, 2021

Description

This PR adds a .crop and .crop_by_values to NDCubeSequence. It works by using the NDCube crop infrastructure to determine the slice items the crop inputs would require. If not all slice items are the same, the min and max start and stop values from all cubes are used. The slice item is them applied to the sequence as a whole. The sequence axis is not sliced.

Requires #472 to be merged first.

Fixes #

@DanRyanIrish DanRyanIrish added this to the 2.1 milestone Aug 24, 2021
@pep8speaks
Copy link

pep8speaks commented Aug 24, 2021

Hello @DanRyanIrish! Thanks for updating this PR.

Line 117:25: W503 line break before binary operator

Comment last updated at 2021-11-10 20:29:05 UTC

@DanRyanIrish DanRyanIrish mentioned this pull request Aug 24, 2021
3 tasks
@DanRyanIrish DanRyanIrish marked this pull request as ready for review November 4, 2021 11:52
@DanRyanIrish
Copy link
Member Author

@nabobalis this PR is now ready for a review if you are interested in giving one.

ndcube/utils/sequence.py Outdated Show resolved Hide resolved
ndcube/ndcube_sequence.py Outdated Show resolved Hide resolved
ndcube/ndcube_sequence.py Outdated Show resolved Hide resolved
ndcube/ndcube_sequence.py Outdated Show resolved Hide resolved
ndcube/ndcube_sequence.py Outdated Show resolved Hide resolved
DanRyanIrish and others added 2 commits November 10, 2021 21:18
Co-authored-by: Nabil Freij <nabil.freij@gmail.com>
ndcube/ndcube_sequence.py Outdated Show resolved Hide resolved
ndcube/ndcube_sequence.py Outdated Show resolved Hide resolved
ndcube/ndcube_sequence.py Outdated Show resolved Hide resolved
@DanRyanIrish
Copy link
Member Author

@nabobalis all your comments have been addressed. So I'll merge this once the tests are passed. That will enable NDCollection.crop PR to advance.

@DanRyanIrish DanRyanIrish merged commit fb810fe into sunpy:main Nov 10, 2021
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

Successfully merging this pull request may close these issues.

None yet

3 participants