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

Efficiency of unit conversion #132

Open
mkolopanis opened this issue Mar 16, 2021 · 0 comments
Open

Efficiency of unit conversion #132

mkolopanis opened this issue Mar 16, 2021 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@mkolopanis
Copy link
Member

We might want to move this to the << operator, it can save some time and memory. to make a copy of the entire array. see astropy docs

Definitely a needs investigation and profiling kind of thing.

if self.stokes.unit.is_equivalent("Jy"):
# need the `to(units.Jy)` call because otherwise even though it's in Jy,
# the units are a CompositeUnit object which doesn't have all the same
# functionality as a Unit object
self.stokes = self.stokes.to(units.Jy)

@bhazelton bhazelton changed the title Efficacy of unit conversion Efficiency of unit conversion Aug 24, 2021
@bhazelton bhazelton added enhancement New feature or request and removed needs research labels Jun 6, 2024
@bhazelton bhazelton added this to the Next version milestone Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants