Skip to content

Commit 7bf7159

Browse files
committed
Spider shadows are optional
1 parent b033ec5 commit 7bf7159

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

python/lsst/ts/wep/estimation/danish.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,22 @@ class DanishAlgorithm(WfAlgorithm):
5656
Whether to jointly fit intra/extra pairs, when a pair is provided.
5757
If False, Zernikes are estimated for each individually, then
5858
averaged. (the default is True)
59+
modelSpiderShadows: bool = False,
60+
Whether to include the spider shadows or not in the danish forward
61+
model.
5962
"""
6063

6164
def __init__(
6265
self,
6366
lstsqKwargs: dict | None = None,
6467
binning: int = 1,
6568
jointFitPair: bool = True,
69+
modelSpiderShadows: bool = False,
6670
) -> None:
6771
self.binning = binning
6872
self.lstsqKwargs = lstsqKwargs if lstsqKwargs is not None else {}
6973
self.jointFitPair = jointFitPair
74+
self.modelSpiderShadows = modelSpiderShadows
7075
self.log = logging.getLogger(__name__)
7176

7277
@property
@@ -603,9 +608,11 @@ def _estimateZk(
603608
dict
604609
Output from the danish algorithm to pass on as metadata.
605610
"""
606-
if rtp is not None:
611+
if rtp is not None and self.modelSpiderShadows:
607612
rtp = rtp.wrap_at("180d").to_value("degree")
608613
self.log.info("Using RTP angle %s deg.", rtp)
614+
else:
615+
rtp = None
609616
# Create the Danish donut factory
610617
factory = danish.DonutFactory(
611618
R_outer=instrument.radius,

python/lsst/ts/wep/task/estimateZernikesDanishTask.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ class EstimateZernikesDanishConfig(EstimateZernikesBaseConfig):
5050
doc="Whether to jointly fit intra/extra pairs, when a pair is provided. "
5151
+ "If False, Zernikes are estimated for each individually, then averaged. ",
5252
)
53+
modelSpiderShadows: pexConfig.Field = pexConfig.Field(
54+
dtype=bool,
55+
default=False,
56+
doc="Whether to include the spider shadows or not in the danish forward "
57+
+ "model."
58+
)
5359

5460

5561
class EstimateZernikesDanishTask(EstimateZernikesBaseTask):

0 commit comments

Comments
 (0)