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

RotatedSunFrame should accept an astropy.time.TimeDelta object as durations= input #6200

Open
Cadair opened this issue Jun 6, 2022 · 4 comments
Labels
coordinates Affects the coordinates submodule Effort Low Requires a small time investment Feature Request New feature wanted! Good First Issue The best issues for new people to tackle! Package Novice Requires little knowledge of the internal structure of SunPy Priority Low Slow action required

Comments

@Cadair
Copy link
Member

Cadair commented Jun 6, 2022

Describe the feature

If you do map1.date - map2.date and pass that into durations= you get a TimeDelta object which isn't a valid quantity so you have to call the .to method which seems silly.

@Cadair Cadair added the Feature Request New feature wanted! label Jun 6, 2022
@dstansby dstansby added the Good First Issue The best issues for new people to tackle! label Jun 6, 2022
@nabobalis nabobalis added coordinates Affects the coordinates submodule Priority Low Slow action required Effort Low Requires a small time investment Package Novice Requires little knowledge of the internal structure of SunPy labels Jun 6, 2022
@ayshih
Copy link
Member

ayshih commented Jun 6, 2022

Sure, we could add special support for TimeDelta, but it might be better to go for an upstream fix for QuantityAttribute (and maybe use duck-typing!).

Regardless, if your TimeDelta is the difference between two times, your map2.date is almost certainly your frame time, so you should simply specify rotated_time=map1.date instead of calculating and specifying duration.

@ryuusama09
Copy link
Contributor

So basically the timedelta object needs to be made into a valid time object without calling to() method ?

@nabobalis
Copy link
Contributor

nabobalis commented Jan 20, 2023

I am not sure that is quite what is required.
I will need to check with the others.

@ryuusama09
Copy link
Contributor

I am not sure that is quite what is required. I will need to check with the others.

alright sure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
coordinates Affects the coordinates submodule Effort Low Requires a small time investment Feature Request New feature wanted! Good First Issue The best issues for new people to tackle! Package Novice Requires little knowledge of the internal structure of SunPy Priority Low Slow action required
Projects
None yet
Development

No branches or pull requests

5 participants