Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] authored and mairanteodoro committed Oct 5, 2023
1 parent cb3ef7a commit d004017
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions romancal/tweakreg/tests/test_astrometric_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
from astropy import coordinates as coord
from astropy import table
from astropy import units as u
from astropy.time import Time
from astropy.modeling import models
from astropy.modeling.models import RotationSequence3D, Scale, Shift
from astropy.time import Time
from gwcs import coordinate_frames as cf
from gwcs import wcs
from gwcs.geometry import CartesianToSpherical, SphericalToCartesian
Expand Down Expand Up @@ -116,9 +116,7 @@ def get_parallax_correction(epoch, gaia_ref_epoch_coords):
"""

obs_date = Time(epoch, format="decimalyear")
earths_center_barycentric_coords = coord.get_body_barycentric(
"earth", obs_date
)
earths_center_barycentric_coords = coord.get_body_barycentric("earth", obs_date)
earth_X = earths_center_barycentric_coords.x
earth_Y = earths_center_barycentric_coords.y
earth_Z = earths_center_barycentric_coords.z
Expand Down Expand Up @@ -198,9 +196,7 @@ def create_wcs_for_tweakreg_pipeline(input_dm, shift_1=0, shift_2=0):
tel2sky = _create_tel2sky_model(input_dm)

# create required frames
detector = cf.Frame2D(
name="detector", axes_order=(0, 1), unit=(u.pix, u.pix)
)
detector = cf.Frame2D(name="detector", axes_order=(0, 1), unit=(u.pix, u.pix))
v2v3 = cf.Frame2D(
name="v2v3",
axes_order=(0, 1),
Expand Down Expand Up @@ -458,9 +454,7 @@ def test_create_astrometric_catalog_write_results_to_disk(tmp_path, base_image):
("GAIADR3", None),
],
)
def test_create_astrometric_catalog_using_epoch(
tmp_path, catalog, epoch, request
):
def test_create_astrometric_catalog_using_epoch(tmp_path, catalog, epoch, request):
"""Test fetching data from supported catalogs for a specific epoch."""
output_filename = "ref_cat.ecsv"
img = request.getfixturevalue("base_image")(shift_1=1000, shift_2=1000)
Expand Down Expand Up @@ -627,9 +621,7 @@ def test_get_catalog_using_epoch(ra, dec, epoch):
gaia_ref_epoch=gaia_ref_epoch,
)
# calculate parallax corrections
get_parallax_correction(
epoch=epoch, gaia_ref_epoch_coords=gaia_ref_epoch_coords
)
get_parallax_correction(epoch=epoch, gaia_ref_epoch_coords=gaia_ref_epoch_coords)

# calculate the expected coordinates value after corrections have been applied to
# Gaia's reference epoch coordinates
Expand Down

0 comments on commit d004017

Please sign in to comment.