Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def binned_hyper_galaxy_image_1d_path_dict(self, binned_grid):
"""
A dictionary associating 1D hyper_galaxies galaxy cluster images with their names.
"""
if binned_grid is not None:
hyper_minimum_percent = af.conf.instance.general.get(
"hyper", "hyper_minimum_percent", float
)
binned_image_1d_galaxy_dict = self.binned_image_1d_dict_from_binned_grid(
binned_grid=binned_grid
)
binned_hyper_galaxy_image_path_dict = {}
for path, galaxy in self.path_galaxy_tuples:
binned_galaxy_image_1d = binned_image_1d_galaxy_dict[path]
minimum_hyper_value = hyper_minimum_percent * max(
binned_galaxy_image_1d
)
binned_galaxy_image_1d[
def binned_hyper_galaxy_image_1d_path_dict(self, binned_grid):
"""
A dictionary associating 1D hyper_galaxies galaxy cluster images with their names.
"""
if binned_grid is not None:
hyper_minimum_percent = af.conf.instance.general.get(
"hyper", "hyper_minimum_percent", float
)
binned_image_1d_galaxy_dict = self.binned_image_1d_dict_from_binned_grid(
binned_grid=binned_grid
)
binned_hyper_galaxy_image_path_dict = {}
for path, galaxy in self.path_galaxy_tuples:
binned_galaxy_image_1d = binned_image_1d_galaxy_dict[path]
minimum_hyper_value = hyper_minimum_percent * max(
binned_galaxy_image_1d
)
binned_galaxy_image_1d[
def hyper_galaxy_image_1d_path_dict(self):
"""
A dictionary associating 1D hyper_galaxies galaxy images with their names.
"""
hyper_minimum_percent = af.conf.instance.general.get(
"hyper", "hyper_minimum_percent", float
)
hyper_galaxy_image_1d_path_dict = {}
for path, galaxy in self.path_galaxy_tuples:
galaxy_image_1d = self.image_galaxy_1d_dict[path]
minimum_galaxy_value = hyper_minimum_percent * max(galaxy_image_1d)
galaxy_image_1d[
galaxy_image_1d < minimum_galaxy_value
] = minimum_galaxy_value
hyper_galaxy_image_1d_path_dict[path] = galaxy_image_1d
return hyper_galaxy_image_1d_path_dict
@property
def hyper_galaxy_image_1d_path_dict(self):
"""
A dictionary associating 1D hyper_galaxies galaxy images with their names.
"""
hyper_minimum_percent = af.conf.instance.general.get(
"hyper", "hyper_minimum_percent", float
)
hyper_galaxy_image_1d_path_dict = {}
for path, galaxy in self.path_galaxy_tuples:
galaxy_image_1d = self.image_galaxy_1d_dict[path]
minimum_galaxy_value = hyper_minimum_percent * max(galaxy_image_1d)
galaxy_image_1d[
galaxy_image_1d < minimum_galaxy_value
] = minimum_galaxy_value
hyper_galaxy_image_1d_path_dict[path] = galaxy_image_1d
return hyper_galaxy_image_1d_path_dict
Signal-to_noise-map, etc).
Set *autolens.datas.array.plotters.array_plotters* for a description of all innput parameters not described below.
Parameters
-----------
image : datas.imaging.datas.Image
The datas-datas, which includes the observed datas, noise_map-map, PSF, signal-to-noise_map-map, etc.
plot_origin : True
If true, the origin of the datas's coordinate system is plotted as a 'x'.
"""
plot_imaging_image = conf.instance.general.get('output', 'plot_imaging_image', bool)
plot_imaging_noise_map = conf.instance.general.get('output', 'plot_imaging_noise_map', bool)
plot_imaging_psf = conf.instance.general.get('output', 'plot_imaging_psf', bool)
plot_imaging_signal_to_noise_map = conf.instance.general.get('output', 'plot_imaging_signal_to_noise_map', bool)
if plot_imaging_image:
plot_image(image=image, plot_origin=plot_origin, mask=mask, positions=positions, output_path=output_path,
output_format=output_format)
if plot_imaging_noise_map:
plot_noise_map(image=image, plot_origin=plot_origin, mask=mask, output_path=output_path,
output_format=output_format)
if plot_imaging_psf:
plot_psf(image=image, plot_origin=plot_origin, output_path=output_path, output_format=output_format)
if plot_imaging_signal_to_noise_map:
plot_signal_to_noise_map(image=image, plot_origin=plot_origin, mask=mask, output_path=output_path,
output_format=output_format)
def plot_image_individual(image, plot_origin=True, mask=None, positions=None, output_path=None, output_format='png'):
"""Plot each attribute of the datas datas as individual figures one by one (e.g. the datas, noise_map-map, PSF, \
Signal-to_noise-map, etc).
Set *autolens.datas.array.plotters.array_plotters* for a description of all innput parameters not described below.
Parameters
-----------
image : datas.imaging.datas.Image
The datas-datas, which includes the observed datas, noise_map-map, PSF, signal-to-noise_map-map, etc.
plot_origin : True
If true, the origin of the datas's coordinate system is plotted as a 'x'.
"""
plot_imaging_image = conf.instance.general.get('output', 'plot_imaging_image', bool)
plot_imaging_noise_map = conf.instance.general.get('output', 'plot_imaging_noise_map', bool)
plot_imaging_psf = conf.instance.general.get('output', 'plot_imaging_psf', bool)
plot_imaging_signal_to_noise_map = conf.instance.general.get('output', 'plot_imaging_signal_to_noise_map', bool)
if plot_imaging_image:
plot_image(image=image, plot_origin=plot_origin, mask=mask, positions=positions, output_path=output_path,
output_format=output_format)
if plot_imaging_noise_map:
plot_noise_map(image=image, plot_origin=plot_origin, mask=mask, output_path=output_path,
output_format=output_format)
if plot_imaging_psf:
plot_psf(image=image, plot_origin=plot_origin, output_path=output_path, output_format=output_format)
if plot_imaging_signal_to_noise_map:
plot_signal_to_noise_map(image=image, plot_origin=plot_origin, mask=mask, output_path=output_path,
def plot_image_individual(image, plot_origin=True, mask=None, positions=None, output_path=None, output_format='png'):
"""Plot each attribute of the datas datas as individual figures one by one (e.g. the datas, noise_map-map, PSF, \
Signal-to_noise-map, etc).
Set *autolens.datas.array.plotters.array_plotters* for a description of all innput parameters not described below.
Parameters
-----------
image : datas.imaging.datas.Image
The datas-datas, which includes the observed datas, noise_map-map, PSF, signal-to-noise_map-map, etc.
plot_origin : True
If true, the origin of the datas's coordinate system is plotted as a 'x'.
"""
plot_imaging_image = conf.instance.general.get('output', 'plot_imaging_image', bool)
plot_imaging_noise_map = conf.instance.general.get('output', 'plot_imaging_noise_map', bool)
plot_imaging_psf = conf.instance.general.get('output', 'plot_imaging_psf', bool)
plot_imaging_signal_to_noise_map = conf.instance.general.get('output', 'plot_imaging_signal_to_noise_map', bool)
if plot_imaging_image:
plot_image(image=image, plot_origin=plot_origin, mask=mask, positions=positions, output_path=output_path,
output_format=output_format)
if plot_imaging_noise_map:
plot_noise_map(image=image, plot_origin=plot_origin, mask=mask, output_path=output_path,
output_format=output_format)
if plot_imaging_psf:
plot_psf(image=image, plot_origin=plot_origin, output_path=output_path, output_format=output_format)
if plot_imaging_signal_to_noise_map:
"""Plot each attribute of the datas datas as individual figures one by one (e.g. the datas, noise_map-map, PSF, \
Signal-to_noise-map, etc).
Set *autolens.datas.array.plotters.array_plotters* for a description of all innput parameters not described below.
Parameters
-----------
image : datas.imaging.datas.Image
The datas-datas, which includes the observed datas, noise_map-map, PSF, signal-to-noise_map-map, etc.
plot_origin : True
If true, the origin of the datas's coordinate system is plotted as a 'x'.
"""
plot_imaging_image = conf.instance.general.get('output', 'plot_imaging_image', bool)
plot_imaging_noise_map = conf.instance.general.get('output', 'plot_imaging_noise_map', bool)
plot_imaging_psf = conf.instance.general.get('output', 'plot_imaging_psf', bool)
plot_imaging_signal_to_noise_map = conf.instance.general.get('output', 'plot_imaging_signal_to_noise_map', bool)
if plot_imaging_image:
plot_image(image=image, plot_origin=plot_origin, mask=mask, positions=positions, output_path=output_path,
output_format=output_format)
if plot_imaging_noise_map:
plot_noise_map(image=image, plot_origin=plot_origin, mask=mask, output_path=output_path,
output_format=output_format)
if plot_imaging_psf:
plot_psf(image=image, plot_origin=plot_origin, output_path=output_path, output_format=output_format)
if plot_imaging_signal_to_noise_map:
plot_signal_to_noise_map(image=image, plot_origin=plot_origin, mask=mask, output_path=output_path,
output_format=output_format)