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

make SkyModel inherit from UVBase, adjust accordingly #49

Merged
merged 24 commits into from
Apr 3, 2020
Merged

Conversation

bhazelton
Copy link
Member

@bhazelton bhazelton commented Mar 13, 2020

Description

Make SkyModel inherit from UVBase. This highlighted some inconsistencies with how we were handling different spectral types. This PR clarifies that and makes a number of changes to fully support all the different spectral types.

Motivation and Context

closes #37
closes #24
closes #20
closes #12

partially addresses #8 -- Flux still needs units.

Checklist:

  • I have read the contribution guide.
  • My code follows the code style of this project.
  • Any new or updated docstrings use the numpy docstring format.
  • I have added tests to cover any changes.
  • My change includes a breaking change
    • My change includes backwards compatibility and deprecation warnings (if possible).
  • I have updated the CHANGELOG if appropriate.

@codecov
Copy link

codecov bot commented Mar 13, 2020

Codecov Report

Merging #49 into master will increase coverage by 3.78%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #49      +/-   ##
==========================================
+ Coverage   91.40%   95.19%   +3.78%     
==========================================
  Files           4        4              
  Lines         512      853     +341     
==========================================
+ Hits          468      812     +344     
+ Misses         44       41       -3     
Impacted Files Coverage Δ
pyradiosky/utils.py 100.00% <ø> (ø)
pyradiosky/skymodel.py 97.61% <100.00%> (+2.98%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 73693e6...26d58f5. Read the comment docs.

@bhazelton
Copy link
Member Author

@aelanman Ok, I think this PR is finally ready for you to look at.

@bhazelton bhazelton marked this pull request as ready for review March 19, 2020 19:34
@bhazelton bhazelton requested a review from aelanman March 19, 2020 21:42
Copy link
Contributor

@aelanman aelanman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! Thank you for all of this work. My comments are mostly questions and a few nitpicks. I think the biggest thing we'll have to figure out following this is how to handle the votable catalog reading in pyuvsim again.

I haven't looked very closely at the changes to test_skymodel.py, but from what I can tell they look fine. I'd like to try running the reference simulations with these changes to see if they break anything before approving. We may need to include a small patch to pyuvsim just to get the gleam catalog to work, before doing a larger overhaul of how catalogs are specified in configuration files.

pyradiosky/skymodel.py Show resolved Hide resolved
pyradiosky/skymodel.py Outdated Show resolved Hide resolved
pyradiosky/skymodel.py Outdated Show resolved Hide resolved
pyradiosky/skymodel.py Show resolved Hide resolved
pyradiosky/skymodel.py Show resolved Hide resolved
pyradiosky/skymodel.py Show resolved Hide resolved
pyradiosky/skymodel.py Outdated Show resolved Hide resolved
pyradiosky/skymodel.py Show resolved Hide resolved
pyradiosky/skymodel.py Outdated Show resolved Hide resolved
pyradiosky/skymodel.py Outdated Show resolved Hide resolved
@mkolopanis
Copy link
Member

I took a general scroll through and things seem to make sense to me, nothing glaring stuck out. I can give it a much finer toothed comb after lunch today.

@mkolopanis
Copy link
Member

I was able to look more closely. Changes Look nice.

Copy link
Contributor

@aelanman aelanman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for addressing my comments. I just have a couple more minor things I noticed, but this should be ready to go.

pyradiosky/skymodel.py Show resolved Hide resolved
pyradiosky/skymodel.py Show resolved Hide resolved
pyradiosky/skymodel.py Show resolved Hide resolved
pyradiosky/skymodel.py Show resolved Hide resolved
aelanman
aelanman previously approved these changes Mar 27, 2020
Copy link
Contributor

@aelanman aelanman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good! Thanks for doing all this.

@aelanman
Copy link
Contributor

@bhazelton I've changed test_circumpolar_nonrising to actually run source_cuts and check that the rise/set lsts, and that sources that will never rise are excluded by the cut and sources that are circumpolar are identified correctly.

aelanman
aelanman previously approved these changes Apr 3, 2020
Copy link
Contributor

@aelanman aelanman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all looks good to me now, but Bryna should take a look at the test I changed.

@bhazelton
Copy link
Member Author

@aelanman your test looks good. I added a round-tripping test for the rise/set_lst parameters through the conversion to a SkyModel object and back. I also added support (and a test) for MoonLocation type telescope locations.

Copy link
Contributor

@aelanman aelanman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thanks.

@aelanman aelanman merged commit c462681 into master Apr 3, 2020
@aelanman aelanman deleted the use_uvbase branch April 3, 2020 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants