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

Change the way AtomData quantities are initialized #565

Merged
merged 2 commits into from
Jun 23, 2016

Conversation

yeganer
Copy link
Contributor

@yeganer yeganer commented May 17, 2016

astropy<1.1.0 is uses a different value for u for converting quantities
than the one specified in constants.u.
In astropy>=1.1 this is changed so that constants.u is always used. By
making this change we are independent of future changes.

Additionally the other quantities are changed to use units.Quantity for
initialization.

yeganer added 2 commits May 18, 2016 10:56
Quantities are initialized as units.Quantity instead of constructing a
Quantity by multiplicating with a unit.
astropy<1.1.0 uses a different value for 'u' when converting quantities
than the one specified as constants.u.
In astropy>=1.1 unit.u is changed to be equal to constants.u.
By using constants.u, our results will be independant of the astropy
version.

This change required an update of the reference-files for
test_plasmas_full.py and test_tardis_full.py.

Resolves: tardis-sn#564
@yeganer
Copy link
Contributor Author

yeganer commented May 18, 2016

@tardis-sn/tardis-core This PR is ready to be merged from my side.

@unoebauer
Copy link
Contributor

My first thought when looking at this was - why should we care about these minor discrepancies. We could just acknowledge these minor inconsistencies in astropy, update the test baseline data when we move to astopy>=1.1 and be done with it.

However, given the small changes in the code base which are necessary to fix it properly, I am fine with merging this PR.

@wkerzendorf
Copy link
Member

For now I'm against merging this PRs. I think we should wait for the detailed integration tests. I don't believe this is currently necessary to change this as we can keep the astropy version fixed below 1.1.

@unoebauer
Copy link
Contributor

I agree with @wkerzendorf - let's wait for now

@wkerzendorf wkerzendorf merged commit 45ed35a into tardis-sn:master Jun 23, 2016
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.

3 participants