RadioAstronomySoftwareGroup / pyuvsim

A ultra-high precision package for simulating radio interferometers in python on compute clusters.
https://pyuvsim.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
43 stars 7 forks source link

fix: SkyModelData.name must be an array not a list #357

Closed steven-murray closed 3 years ago

steven-murray commented 3 years ago

Description

This does two things:

  1. Adds psutil as a dependency (rather than optional extra). psutil is used in a default run, so it should not be optional.
  2. Makes sure the SkyModel.name attribute is an array, not a list. By default, the SkyModel object creates a list for a healpix map. But then doing subselect breaks because an index range can't be used on lists.

Types of changes

Checklist:

For all pull requests:

Bug fix checklist:

codecov[bot] commented 3 years ago

Codecov Report

Merging #357 (d04b9a7) into main (82f1439) will increase coverage by 0.04%. The diff coverage is 100.00%.

:exclamation: Current head d04b9a7 differs from pull request most recent head 3f9b908. Consider uploading reports for the commit 3f9b908 to get more accurate results Impacted file tree graph

@@            Coverage Diff             @@
##             main     #357      +/-   ##
==========================================
+ Coverage   99.02%   99.07%   +0.04%     
==========================================
  Files          13       13              
  Lines        1945     1941       -4     
==========================================
- Hits         1926     1923       -3     
+ Misses         19       18       -1     
Impacted Files Coverage Δ
pyuvsim/simsetup.py 99.88% <100.00%> (+<0.01%) :arrow_up:
pyuvsim/utils.py 97.97% <100.00%> (+0.57%) :arrow_up:

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 82f1439...3f9b908. Read the comment docs.

steven-murray commented 3 years ago

OK, I did all the things you requested, @bhazelton. Ball has been knocked back into your court :-)

bhazelton commented 3 years ago

Hmm, everything is failing, I think there's an indent error. Do you have the pre-commit hook installed?

steven-murray commented 3 years ago

OK. All good now. Sorry for my daftness.

bhazelton commented 3 years ago

Ack, I just merged another PR and in the process I created a merge conflict with this one. Sorry! I can fix it if you'd like or you can.