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] committed Aug 8, 2024
1 parent 4b1a0e5 commit 2f3cfc0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
10 changes: 7 additions & 3 deletions romancal/assign_wcs/assign_wcs_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,12 @@ def load_wcs(input_model, reference_files=None):
axes_names=("v2", "v3"),
unit=(u.arcsec, u.arcsec),
)
v2v3vacorr = cf.Frame2D(name='v2v3vacorr', axes_order=(0, 1),
axes_names=('v2', 'v3'), unit=(u.arcsec, u.arcsec))
v2v3vacorr = cf.Frame2D(
name="v2v3vacorr",
axes_order=(0, 1),
axes_names=("v2", "v3"),
unit=(u.arcsec, u.arcsec),
)
world = cf.CelestialFrame(reference_frame=coord.ICRS(), name="world")

# Transforms between frames
Expand All @@ -105,7 +109,7 @@ def load_wcs(input_model, reference_files=None):
va_corr = pointing.dva_corr_model(
va_scale=input_model.meta.velocity_aberration.scale_factor,
v2_ref=input_model.meta.wcsinfo.v2_ref,
v3_ref=input_model.meta.wcsinfo.v3_ref
v3_ref=input_model.meta.wcsinfo.v3_ref,
)

pipeline = [
Expand Down
10 changes: 7 additions & 3 deletions romancal/assign_wcs/pointing.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ def dva_corr_model(va_scale, v2_ref, v3_ref):
if va_scale <= 0:
raise ValueError("'Velocity aberration scale must be a positive number.")

va_corr = Scale(va_scale, name='dva_scale_v2') & Scale(va_scale, name='dva_scale_v3')
va_corr = Scale(va_scale, name="dva_scale_v2") & Scale(

Check warning on line 83 in romancal/assign_wcs/pointing.py

View check run for this annotation

Codecov / codecov/patch

romancal/assign_wcs/pointing.py#L83

Added line #L83 was not covered by tests
va_scale, name="dva_scale_v3"
)

if v2_ref is None:
v2_ref = 0

Check warning on line 88 in romancal/assign_wcs/pointing.py

View check run for this annotation

Codecov / codecov/patch

romancal/assign_wcs/pointing.py#L87-L88

Added lines #L87 - L88 were not covered by tests
Expand All @@ -97,6 +99,8 @@ def dva_corr_model(va_scale, v2_ref, v3_ref):
v2_shift = (1 - va_scale) * v2_ref
v3_shift = (1 - va_scale) * v3_ref

Check warning on line 100 in romancal/assign_wcs/pointing.py

View check run for this annotation

Codecov / codecov/patch

romancal/assign_wcs/pointing.py#L99-L100

Added lines #L99 - L100 were not covered by tests

va_corr |= Shift(v2_shift, name='dva_v2_shift') & Shift(v3_shift, name='dva_v3_shift')
va_corr.name = 'DVA_Correction'
va_corr |= Shift(v2_shift, name="dva_v2_shift") & Shift(

Check warning on line 102 in romancal/assign_wcs/pointing.py

View check run for this annotation

Codecov / codecov/patch

romancal/assign_wcs/pointing.py#L102

Added line #L102 was not covered by tests
v3_shift, name="dva_v3_shift"
)
va_corr.name = "DVA_Correction"
return va_corr

Check warning on line 106 in romancal/assign_wcs/pointing.py

View check run for this annotation

Codecov / codecov/patch

romancal/assign_wcs/pointing.py#L105-L106

Added lines #L105 - L106 were not covered by tests

0 comments on commit 2f3cfc0

Please sign in to comment.