Skip to content

Commit

Permalink
remove commented out code
Browse files Browse the repository at this point in the history
  • Loading branch information
nden committed Dec 13, 2024
1 parent 96de876 commit 08bafd0
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 33 deletions.
2 changes: 0 additions & 2 deletions gwcs/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,6 @@ def world_to_pixel(self, *world_objects):
"""
Convert world coordinates to pixel values.
"""
#args = high_level_objects_to_values(*world_objects, low_level_wcs=self)
#result = self.invert(*args)
result = self.invert(*world_objects, with_units=True)
if self.input_frame.naxes > 1:
first_res = result[0]
Expand Down
25 changes: 0 additions & 25 deletions gwcs/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,6 @@

from .. import examples
from .. import geometry
import numpy as np

import astropy.units as u
from astropy.time import Time
from astropy import coordinates as coord
from astropy.modeling import models

from gwcs import coordinate_frames as cf
from gwcs import spectroscopy as sp
from gwcs import wcs
from gwcs import geometry

# frames
detector_1d = cf.CoordinateFrame(name='detector', axes_order=(0,), naxes=1, axes_type="detector")
detector_2d = cf.Frame2D(name='detector', axes_order=(0, 1))
icrs_sky_frame = cf.CelestialFrame(reference_frame=coord.ICRS(),
axes_order=(0, 1))

freq_frame = cf.SpectralFrame(name='freq', unit=u.Hz, axes_order=(0, ))
wave_frame = cf.SpectralFrame(name='wave', unit=u.m, axes_order=(2, ),
axes_names=('lambda', ))

# transforms
model_2d_shift = models.Shift(1) & models.Shift(2)
model_1d_scale = models.Scale(2)


@pytest.fixture
Expand Down
3 changes: 0 additions & 3 deletions gwcs/tests/test_coordinate_systems.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@ def test_temporal_relative():
assert a[1] == Time("2018-01-01T00:00:00") + 20 * u.s


#@pytest.mark.skipif(astropy_version<"4", reason="Requires astropy 4.0 or higher")
def test_temporal_absolute():
t = cf.TemporalFrame(reference_frame=Time([], format='isot'))
assert t.coordinates("2018-01-01T00:00:00") == Time("2018-01-01T00:00:00")
Expand Down Expand Up @@ -240,7 +239,6 @@ def test_coordinate_to_quantity_spectral(inp):
(Time("2011-01-01T00:00:10"),),
(10 * u.s,)
])
#@pytest.mark.skipif(astropy_version<"4", reason="Requires astropy 4.0 or higher.")
def test_coordinate_to_quantity_temporal(inp):
temp = cf.TemporalFrame(reference_frame=Time("2011-01-01T00:00:00"), unit=u.s)

Expand Down Expand Up @@ -325,7 +323,6 @@ def test_coordinate_to_quantity_frame_2d():
assert_quantity_allclose(output, exp)


#@pytest.mark.skipif(astropy_version<"4", reason="Requires astropy 4.0 or higher.")
def test_coordinate_to_quantity_error():
frame = cf.Frame2D(unit=(u.one, u.arcsec))
with pytest.raises(ValueError):
Expand Down
6 changes: 3 additions & 3 deletions gwcs/tests/test_wcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1161,10 +1161,10 @@ def test_in_image():
None)])
w2.bounding_box = [(1, 100), (2, 20)]

assert np.isscalar(w2.in_image(2, 6))#[0])
assert np.isscalar(w2.in_image(2, 6))
assert not np.isscalar(w2.in_image([2], [6]))
assert (w2.in_image(4, 6))#.all()
assert not (w2.in_image(5, 0))#, [True, False])
assert (w2.in_image(4, 6))
assert not (w2.in_image(5, 0))
assert np.array_equal(
w2.in_image(
[[9, 10, 11, 15], [8, 9, 67, 98], [2, 2, np.nan, 102]],
Expand Down

0 comments on commit 08bafd0

Please sign in to comment.