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

Update healpixgrp() in path.py to group by 1000 instead of by 100. #23

Merged
merged 2 commits into from
Oct 12, 2020

Conversation

dnidever
Copy link

@dnidever dnidever commented Oct 8, 2020

We decided to use nside=128 for the APOGEE apStar HEALPix scheme because other the HEALPix directories for the MW midplane would have had too many stars. At nside=128 we have 196608 HEALPix and it makes more sense to sort them by 1000s than 100s. So I modified healpixgrp() in path.py to divide healpix by 1000.

@coveralls
Copy link

coveralls commented Oct 8, 2020

Coverage Status

Coverage decreased (-0.5%) to 50.219% when pulling 7905468 on branch_healpix into 157ab5b on master.

@codecov
Copy link

codecov bot commented Oct 8, 2020

Codecov Report

Merging #23 into master will decrease coverage by 0.46%.
The diff coverage is 11.76%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #23      +/-   ##
==========================================
- Coverage   49.96%   49.49%   -0.47%     
==========================================
  Files          12       12              
  Lines        1283     1299      +16     
  Branches      263      266       +3     
==========================================
+ Hits          641      643       +2     
- Misses        558      572      +14     
  Partials       84       84              
Impacted Files Coverage Δ
python/sdss_access/path/path.py 71.53% <11.76%> (-2.44%) ⬇️

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 9ed3325...7905468. Read the comment docs.

Copy link
Collaborator

@havok2063 havok2063 left a comment

Choose a reason for hiding this comment

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

@dnidever
This looks ok to me. I've added some small comments regarding setting a default value of None to kwargs.get in case they aren't present.

Can you also please add some tests to ensure these functions work? You can take a look at the test_special_function in tests/path/test_path.py for some examples. You can try to add new entries here. If you need help with this, let me know.


'''

telescope = kwargs.get('telescope')
Copy link
Collaborator

Choose a reason for hiding this comment

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

To ensure that telescope is set to None if it is not present in the kwargs, try telescope = kwargs.get('telescope', None). Otherwise this will throw an uncaught error.

if telescope is not None:
prefix = {'apo25m':'ap', 'apo1m':'ap', 'lco25m':'as'}[telescope]
return prefix
instrument = kwargs.get('instrument')
Copy link
Collaborator

Choose a reason for hiding this comment

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

Similar here as with previous comment on telescope


'''

telescope = kwargs.get('telescope')
Copy link
Collaborator

Choose a reason for hiding this comment

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

Similar here as with previous comments.

return ''

def apginst(self, filetype, **kwargs):
''' Returns APOGEE "instrument" from "telescope".
Copy link
Collaborator

Choose a reason for hiding this comment

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

For this function to work, it needs a telescope kwarg. Are there any paths that do not have telescope but have instrument as a kwarg? If so, is the plan to migrate those over to use telescope and this function?

@havok2063 havok2063 merged commit 7905468 into master Oct 12, 2020
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