Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def fit_for_instance(self, instance):
fit_y = fit_galaxy.FitGalaxy(
masked_galaxy_dataset=self.galaxy_data_y, model_galaxies=instance.galaxies
)
fit_x = fit_galaxy.FitGalaxy(
masked_galaxy_dataset=self.galaxy_data_x, model_galaxies=instance.galaxies
)
return fit_y, fit_x
"""
Determine the fit of a lens galaxy and source galaxy to the masked_imaging in
this lens.
Parameters
----------
instance
A model instance with attributes
Returns
-------
fit: Fit
A fractional value indicating how well this model fit and the model
masked_imaging itself
"""
return fit_galaxy.FitGalaxy(
masked_galaxy_dataset=self.galaxy_data, model_galaxies=instance.galaxies
)
def fit_for_instance(self, instance):
fit_y = fit_galaxy.FitGalaxy(
masked_galaxy_dataset=self.galaxy_data_y, model_galaxies=instance.galaxies
)
fit_x = fit_galaxy.FitGalaxy(
masked_galaxy_dataset=self.galaxy_data_x, model_galaxies=instance.galaxies
)
return fit_y, fit_x