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 photutils and fix a couple broken tests #175

Merged
merged 2 commits into from
Oct 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ install_requires =
ginga
ipywidgets
bottleneck
photutils >=1
photutils >=1.9
matplotlib
pandas
gatspy
pyyaml
astrowidgets
ipyfilechooser
ipyautoui
pydantic <2
pydantic<2
ipyautoui >=0.5.9
python_requires = >=3.10
setup_requires = setuptools_scm
zip_safe = False
Expand Down
8 changes: 4 additions & 4 deletions stellarphot/tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,9 @@ def test_photometry_data():
assert phot_data.camera.read_noise == 10.0 * u.electron
assert phot_data.camera.dark_current == 0.01 * u.electron / u.second
assert phot_data.camera.pixel_scale == 0.563 * u.arcsec / u.pix
assert phot_data.observatory.lat.value == 46.86678
np.testing.assert_almost_equal(phot_data.observatory.lat.value, 46.86678)
Copy link
Contributor

Choose a reason for hiding this comment

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

Cool, nice to know this function exists for checking floats. Looked over the document, seems to be used fine here (I was concerned about precision, but default precision is 7 decimal places, which is clearly enough here).

assert phot_data.observatory.lat.unit == u.deg
assert phot_data.observatory.lon.value == -96.45328
np.testing.assert_almost_equal(phot_data.observatory.lon.value, -96.45328)
assert phot_data.observatory.lon.unit == u.deg
assert round(phot_data.observatory.height.value) == 311
assert phot_data.observatory.height.unit == u.m
Expand Down Expand Up @@ -276,9 +276,9 @@ def test_photometry_slicing():
assert two_cols.camera.read_noise == 10.0 * u.electron
assert two_cols.camera.dark_current == 0.01 * u.electron / u.second
assert two_cols.camera.pixel_scale == 0.563 * u.arcsec / u.pix
assert two_cols.observatory.lat.value == 46.86678
np.testing.assert_almost_equal(two_cols.observatory.lat.value, 46.86678)
assert two_cols.observatory.lat.unit == u.deg
assert two_cols.observatory.lon.value == -96.45328
np.testing.assert_almost_equal(two_cols.observatory.lon.value, -96.45328)
assert two_cols.observatory.lon.unit == u.deg
assert round(two_cols.observatory.height.value) == 311
assert two_cols.observatory.height.unit == u.m
Expand Down