|
LSST Applications g013ef56533+b8d55c8942,g083dd6704c+a047e97985,g199a45376c+0ba108daf9,g1fd858c14a+7a3b874d60,g210f2d0738+7416ca6900,g262e1987ae+1d557ba9a3,g29ae962dfc+519d34895e,g2cef7863aa+aef1011c0b,g30d7c61c20+36d16ea71a,g35bb328faa+8c5ae1fdc5,g3fd5ace14f+cb326ad149,g47891489e3+f459a6810c,g53246c7159+8c5ae1fdc5,g54cd7ddccb+890c8e1e5d,g5a60e81ecd+6240c63dbc,g64539dfbff+7416ca6900,g67b6fd64d1+f459a6810c,g6ebf1fc0d4+8c5ae1fdc5,g74acd417e5+0bae3c876a,g786e29fd12+668abc6043,g87389fa792+8856018cbb,g89139ef638+f459a6810c,g8d7436a09f+dee7680868,g8ea07a8fe4+81eaaadc04,g90f42f885a+34c0557caf,g97be763408+14b8164b5b,g98a1a72a9c+8389601a76,g98df359435+fff771c62d,gb8cb2b794d+6728931916,gbf99507273+8c5ae1fdc5,gc2a301910b+7416ca6900,gca7fc764a6+f459a6810c,gd7ef33dd92+f459a6810c,gdab6d2f7ff+0bae3c876a,ge410e46f29+f459a6810c,ge41e95a9f2+7416ca6900,geaed405ab2+e3b4b2a692,gf9a733ac38+8c5ae1fdc5,w.2025.43
LSST Data Management Base Package
|
Public Member Functions | |
| __init__ (self, np.ndarray x, dict[str, np.ndarray] helpers, Callable|float step, Callable|None grad=None, Callable|None prox=None) | |
| float | step (self) |
| tuple[int,...] | shape (self) |
| npt.DTypeLike | dtype (self) |
| Parameter | copy (self) |
| update (self, int it, np.ndarray input_grad, *args) | |
| resize (self, Box old_box, Box new_box) | |
Public Attributes | |
| x = x | |
| helpers = helpers | |
| grad = grad | |
| prox = prox | |
Protected Attributes | |
| _step = _step | |
A parameter in a `Component`
Parameters
----------
x:
The array of values that is being fit.
helpers:
A dictionary of helper arrays that are used by an optimizer to
persist values like the gradient of `x`, the Hessian of `x`, etc.
step:
A numerical step value or function to calculate the step for a
given `x``.
grad:
A function to calculate the gradient of `x`.
prox:
A function to take the proximal operator of `x`.
Definition at line 63 of file parameters.py.
| lsst.scarlet.lite.parameters.Parameter.__init__ | ( | self, | |
| np.ndarray | x, | ||
| dict[str, np.ndarray] | helpers, | ||
| Callable | float | step, | ||
| Callable | None | grad = None, | ||
| Callable | None | prox = None ) |
Definition at line 82 of file parameters.py.
| Parameter lsst.scarlet.lite.parameters.Parameter.copy | ( | self | ) |
Copy this parameter, including all of the helper arrays.
Definition at line 123 of file parameters.py.
| npt.DTypeLike lsst.scarlet.lite.parameters.Parameter.dtype | ( | self | ) |
The numpy dtype of the array that is being fit.
Definition at line 119 of file parameters.py.
Grow the parameter and all of the helper parameters
Parameters
----------
old_box:
The old bounding box for the parameter.
new_box:
The new bounding box for the parameter.
Definition at line 144 of file parameters.py.
| tuple[int, ...] lsst.scarlet.lite.parameters.Parameter.shape | ( | self | ) |
The shape of the array that is being fit.
Definition at line 114 of file parameters.py.
| float lsst.scarlet.lite.parameters.Parameter.step | ( | self | ) |
Calculate the step
Return
------
step:
The numerical step if no iteration is given.
Definition at line 103 of file parameters.py.
| lsst.scarlet.lite.parameters.Parameter.update | ( | self, | |
| int | it, | ||
| np.ndarray | input_grad, | ||
| * | args ) |
Update the parameter in one iteration.
This includes the gradient update, proximal update,
and any meta parameters that are stored as class
attributes to update the parameter.
Parameters
----------
it:
The current iteration
input_grad:
The gradient from the full model, passed to the parameter.
Reimplemented in lsst.scarlet.lite.parameters.AdaproxParameter, lsst.scarlet.lite.parameters.FistaParameter, and lsst.scarlet.lite.parameters.FixedParameter.
Definition at line 128 of file parameters.py.
|
protected |
Definition at line 98 of file parameters.py.
| lsst.scarlet.lite.parameters.Parameter.grad = grad |
Definition at line 99 of file parameters.py.
| lsst.scarlet.lite.parameters.Parameter.helpers = helpers |
Definition at line 91 of file parameters.py.
| lsst.scarlet.lite.parameters.Parameter.prox = prox |
Definition at line 100 of file parameters.py.
| lsst.scarlet.lite.parameters.Parameter.x = x |
Definition at line 90 of file parameters.py.