forced_photometry#
- scarlet2.measure.forced_photometry(scene, obs)[source]#
Computes the spectra of every source in the scene to match the observations
Computes the best-fit amplitude of the rendered model of all components in every channel of every observation as a linear inverse problem.
If sources/sources components in scene have non-flat spectra, the output of this function is the correction factor that needs to be applied to those spectra to best match each channel of obs.
- Parameters:
scene (
scarlet2.scene.Scene) – Scene for which the spectra should be computedobs (
Observation) – The observation used to determine the spectra.
- Returns:
Array of the spectra, in the order of the sources in the scene
- Return type:
array