LsstBlend¶
-
class
lsst.meas.extensions.scarlet.LsstBlend(sources, observations)¶ Bases:
scarlet.blend.BlendLSST Blend of sources
It is possible that LSST blends might require different funtionality than those in scarlet, which is being designed for multiresolution blends. So this class exists for any LSST specific changes.
Attributes Summary
KNumber of components. componentsFlattened tuple of all components in the tree. coordThe coordinate in tree. frameFrame of the components. n_componentsNumber of components. n_sourcesNumber of initial sources or components. parametersThe list of non-fixed parameters sourcesInitial list of components or sources that generate the tree. Methods Summary
check_parameters()Check that all parameters have finite elements fit([max_iter, e_rel])Fit the model for each source to the data get_model(*params)Get the model of this component tree set_frame(frame)Set the frame for all components in the tree Attributes Documentation
-
K¶ Number of components.
-
components¶ Flattened tuple of all components in the tree.
CAUTION: Each component in a tree can only be a leaf of a single node. While one can construct trees that hold the same component multiple times, this method will only return that component at its first encountered location
-
coord¶ The coordinate in tree.
The coordinate can be used to traverse the tree and for
__getitem__.
-
frame¶ Frame of the components.
-
n_components¶ Number of components.
-
n_sources¶ Number of initial sources or components.
This can be different than
self.n_componentsbecause sources can have multiple components.Returns: - int: number of initial sources
-
parameters¶ The list of non-fixed parameters
Returns: - list of parameters available for optimization
- If `parameter.fixed == True`, the parameter will not returned here.
-
sources¶ Initial list of components or sources that generate the tree.
This can be different than
self.componentsbecause sources can have multiple components.Returns: - The arguments of `__init__`
Methods Documentation
-
check_parameters()¶ Check that all parameters have finite elements
Raises: - `ArithmeticError` when non-finite elements are present
-
fit(max_iter=200, e_rel=0.001, **alg_kwargs)¶ Fit the model for each source to the data
Parameters: - max_iter: int
Maximum number of iterations if the algorithm doesn’t converge
- e_rel: float
Relative error for convergence of the loss function
- alg_kwargs: dict
Keywords for the
proxmin.adaproxoptimizer
-
get_model(*params)¶ Get the model of this component tree
Parameters: - params: tuple of optimization parameters
Returns: - model: array
(Bands, Height, Width) data cube
-
set_frame(frame)¶ Set the frame for all components in the tree
see
set_framefor details.Parameters: - frame: `~scarlet.Frame`
Frame to adopt for this component
-