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 stscieisenhamer committed Nov 15, 2024
1 parent ff0b534 commit d77e3a3
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 @@ -95,8 +95,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 @@ -107,7 +111,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(
va_scale, name="dva_scale_v3"
)

if v2_ref is None:
v2_ref = 0
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

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(
v3_shift, name="dva_v3_shift"
)
va_corr.name = "DVA_Correction"
return va_corr

0 comments on commit d77e3a3

Please sign in to comment.