WavefrontFittingConfig#

class lsst.ts.wep.blitz.WavefrontFittingConfig(*args, **kw)#

Bases: Config

Configuration for wavefront fitting via Danish algorithm.

Attributes Summary

binning

Binning factor applied to donut stamps before Danish fitting.

bkgOrder

Background polynomial order for Danish (-1=none, 0=constant).

doAoiThroughput

Apply angle-of-incidence throughput correction in Danish forward model.

jacobianFormat

scipy rejects it under tr_solver='exact', which validate checks for.

logPerGroup

Log a setup line and a result line per fit group at INFO.

lstsqKwargs

'trf', 'max_nfev': 200}.

maskModel

a file name in the danish package's data directory, or a 'policy:'-prefixed path relative to the ts_wep policy directory.

modelSpiderShadows

Include spider shadow modeling in Danish forward model.

nollIndices

Noll indices to fit with Danish.

systematicLossAlpha

Fractional systematic uncertainty for Danish loss function (0=chi2).

triangleMode

Use DonutTriangleFactory instead of DonutFactory.

wfFitTimeoutPerDonut

Timeout in seconds per donut for a single WF fit.

wfInitialGuessOnly

Skip the least-squares fit and return the initial-guess (x0) model only.

Methods Summary

validate()

Validate the configuration after the parent's checks.

Attributes Documentation

binning: pexConfig.Field[int]#

Binning factor applied to donut stamps before Danish fitting. (int, default 2)

bkgOrder: pexConfig.Field[int]#

Background polynomial order for Danish (-1=none, 0=constant). (int, default 0)

doAoiThroughput: pexConfig.Field[bool]#

Apply angle-of-incidence throughput correction in Danish forward model. (bool, default False)

jacobianFormat: pexConfig.ChoiceField[str]#

scipy rejects it under tr_solver=’exact’, which validate checks for. The sparse formats require danish >= 1.3.0. (str, default 'dense')

Allowed values:

'dense'

model.jac – a dense ndarray.

'csr'

model.jac_sparse in CSR.

'csc'

model.jac_sparse in CSC.

Type:

Storage for the Danish Jacobian passed to least_squares. All three give bit-identical Jacobian values; they differ only in how those values are stored. A sparse Jacobian also requires an iterative tr_solver

logPerGroup: pexConfig.Field[bool]#

Log a setup line and a result line per fit group at INFO. Useful when a quantum holds tens of groups, as corner mode’s do; full-array mode turns it off because ‘paired’ over 189 detectors is ~5000 groups, and ~10k lines bury the per-detector summaries that supersede them. Failures and timeouts are logged as warnings either way – this silences narration, not problems. (bool, default True)

lstsqKwargs: pexConfig.DictField[str, Any]#

‘trf’, ‘max_nfev’: 200}. fun, x0, jac, args and bounds are supplied by the task and are rejected here. (Dict, default {'xtol': 0.001, 'ftol': 0.001, 'gtol': 0.001, 'x_scale': 'jac', 'tr_solver': 'lsmr'})

Type:

Keyword arguments for scipy.optimize.least_squares passed to the Danish WF workers, e.g. {‘method’

maskModel: pexConfig.Field[str]#

a file name in the danish package’s data directory, or a ‘policy:’-prefixed path relative to the ts_wep policy directory. ‘policy:masks/LsstCamLegacy.yaml’ is the mask used before danish shipped fitted models. (str, default 'RubinObsc_v3.14_r_rtpp0_azp45_pp0d0.yaml')

Type:

Pupil mask model

modelSpiderShadows: pexConfig.Field[bool]#

Include spider shadow modeling in Danish forward model. (bool, default False)

nollIndices: pexConfig.ListField[int]#

Noll indices to fit with Danish. (List, default [4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 22, 23, 24, 25, 26])

systematicLossAlpha: pexConfig.Field[float]#

Fractional systematic uncertainty for Danish loss function (0=chi2). (float, default 0.0)

triangleMode: pexConfig.Field[bool]#

Use DonutTriangleFactory instead of DonutFactory. (bool, default True)

wfFitTimeoutPerDonut: pexConfig.Field[float]#

Timeout in seconds per donut for a single WF fit. The total timeout for a work unit is this value times the number of donuts (1 for unpaired, 2 for paired, N for full_detector/full_corner/full_detector_pair). Fits exceeding the limit are killed and return NaN Zernikes. (float, default 10.0)

wfInitialGuessOnly: pexConfig.Field[bool]#

Skip the least-squares fit and return the initial-guess (x0) model only. Useful for diagnosing stamp orientation and model setup without waiting for convergence. (bool, default False)

Methods Documentation

validate()#

Validate the configuration after the parent’s checks.

Raises:

lsst.pex.config.FieldValidationError – Raised if lstsqKwargs sets a keyword the task supplies itself (fun, x0, jac, args, bounds); if a sparse jacobianFormat is combined with tr_solver='exact'; if any nollIndices entry lies outside 4.._ZK_JMAX; or if nollIndices omits either half of a +/-m Zernike pair.

Return type:

None