partition stringclasses 3
values | func_name stringlengths 1 134 | docstring stringlengths 1 46.9k | path stringlengths 4 223 | original_string stringlengths 75 104k | code stringlengths 75 104k | docstring_tokens listlengths 1 1.97k | repo stringlengths 7 55 | language stringclasses 1
value | url stringlengths 87 315 | code_tokens listlengths 19 28.4k | sha stringlengths 40 40 |
|---|---|---|---|---|---|---|---|---|---|---|---|
valid | load_ccd_data_from_fits | Factory for loading the ccd data from .fits files, as well as computing properties like the noise-map,
exposure-time map, etc. from the ccd-data.
This factory also includes a number of routines for converting the ccd-data from units not supported by PyAutoLens \
(e.g. adus, electrons) to electrons per seco... | autolens/data/ccd.py | def load_ccd_data_from_fits(image_path, pixel_scale, image_hdu=0,
resized_ccd_shape=None, resized_ccd_origin_pixels=None,
resized_ccd_origin_arcsec=None,
psf_path=None, psf_hdu=0, resized_psf_shape=None, renormalize_psf=True,
... | def load_ccd_data_from_fits(image_path, pixel_scale, image_hdu=0,
resized_ccd_shape=None, resized_ccd_origin_pixels=None,
resized_ccd_origin_arcsec=None,
psf_path=None, psf_hdu=0, resized_psf_shape=None, renormalize_psf=True,
... | [
"Factory",
"for",
"loading",
"the",
"ccd",
"data",
"from",
".",
"fits",
"files",
"as",
"well",
"as",
"computing",
"properties",
"like",
"the",
"noise",
"-",
"map",
"exposure",
"-",
"time",
"map",
"etc",
".",
"from",
"the",
"ccd",
"-",
"data",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/ccd.py#L728-L906 | [
"def",
"load_ccd_data_from_fits",
"(",
"image_path",
",",
"pixel_scale",
",",
"image_hdu",
"=",
"0",
",",
"resized_ccd_shape",
"=",
"None",
",",
"resized_ccd_origin_pixels",
"=",
"None",
",",
"resized_ccd_origin_arcsec",
"=",
"None",
",",
"psf_path",
"=",
"None",
... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | load_image | Factory for loading the image from a .fits file
Parameters
----------
image_path : str
The path to the image .fits file containing the image (e.g. '/path/to/image.fits')
image_hdu : int
The hdu the image is contained in the .fits file specified by *image_path*.
pixel_scale : float
... | autolens/data/ccd.py | def load_image(image_path, image_hdu, pixel_scale):
"""Factory for loading the image from a .fits file
Parameters
----------
image_path : str
The path to the image .fits file containing the image (e.g. '/path/to/image.fits')
image_hdu : int
The hdu the image is contained in the .fit... | def load_image(image_path, image_hdu, pixel_scale):
"""Factory for loading the image from a .fits file
Parameters
----------
image_path : str
The path to the image .fits file containing the image (e.g. '/path/to/image.fits')
image_hdu : int
The hdu the image is contained in the .fit... | [
"Factory",
"for",
"loading",
"the",
"image",
"from",
"a",
".",
"fits",
"file"
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/ccd.py#L909-L922 | [
"def",
"load_image",
"(",
"image_path",
",",
"image_hdu",
",",
"pixel_scale",
")",
":",
"return",
"ScaledSquarePixelArray",
".",
"from_fits_with_pixel_scale",
"(",
"file_path",
"=",
"image_path",
",",
"hdu",
"=",
"image_hdu",
",",
"pixel_scale",
"=",
"pixel_scale",
... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | load_noise_map | Factory for loading the noise-map from a .fits file.
This factory also includes a number of routines for converting the noise-map from from other units (e.g. \
a weight map) or computing the noise-map from other unblurred_image_1d (e.g. the ccd image and background noise-map).
Parameters
----------
... | autolens/data/ccd.py | def load_noise_map(noise_map_path, noise_map_hdu, pixel_scale, image, background_noise_map, exposure_time_map,
convert_noise_map_from_weight_map, convert_noise_map_from_inverse_noise_map,
noise_map_from_image_and_background_noise_map, convert_from_electrons, gain, convert_from_adus... | def load_noise_map(noise_map_path, noise_map_hdu, pixel_scale, image, background_noise_map, exposure_time_map,
convert_noise_map_from_weight_map, convert_noise_map_from_inverse_noise_map,
noise_map_from_image_and_background_noise_map, convert_from_electrons, gain, convert_from_adus... | [
"Factory",
"for",
"loading",
"the",
"noise",
"-",
"map",
"from",
"a",
".",
"fits",
"file",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/ccd.py#L925-L1014 | [
"def",
"load_noise_map",
"(",
"noise_map_path",
",",
"noise_map_hdu",
",",
"pixel_scale",
",",
"image",
",",
"background_noise_map",
",",
"exposure_time_map",
",",
"convert_noise_map_from_weight_map",
",",
"convert_noise_map_from_inverse_noise_map",
",",
"noise_map_from_image_a... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | load_background_noise_map | Factory for loading the background noise-map from a .fits file.
This factory also includes a number of routines for converting the background noise-map from from other units (e.g. \
a weight map).
Parameters
----------
background_noise_map_path : str
The path to the background_noise_map .f... | autolens/data/ccd.py | def load_background_noise_map(background_noise_map_path, background_noise_map_hdu, pixel_scale,
convert_background_noise_map_from_weight_map,
convert_background_noise_map_from_inverse_noise_map):
"""Factory for loading the background noise-map from a .fits... | def load_background_noise_map(background_noise_map_path, background_noise_map_hdu, pixel_scale,
convert_background_noise_map_from_weight_map,
convert_background_noise_map_from_inverse_noise_map):
"""Factory for loading the background noise-map from a .fits... | [
"Factory",
"for",
"loading",
"the",
"background",
"noise",
"-",
"map",
"from",
"a",
".",
"fits",
"file",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/ccd.py#L1017-L1054 | [
"def",
"load_background_noise_map",
"(",
"background_noise_map_path",
",",
"background_noise_map_hdu",
",",
"pixel_scale",
",",
"convert_background_noise_map_from_weight_map",
",",
"convert_background_noise_map_from_inverse_noise_map",
")",
":",
"background_noise_map_options",
"=",
"... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | load_poisson_noise_map | Factory for loading the Poisson noise-map from a .fits file.
This factory also includes a number of routines for converting the Poisson noise-map from from other units (e.g. \
a weight map) or computing the Poisson noise_map from other unblurred_image_1d (e.g. the ccd image).
Parameters
----------
... | autolens/data/ccd.py | def load_poisson_noise_map(poisson_noise_map_path, poisson_noise_map_hdu, pixel_scale,
convert_poisson_noise_map_from_weight_map,
convert_poisson_noise_map_from_inverse_noise_map,
poisson_noise_map_from_image,
im... | def load_poisson_noise_map(poisson_noise_map_path, poisson_noise_map_hdu, pixel_scale,
convert_poisson_noise_map_from_weight_map,
convert_poisson_noise_map_from_inverse_noise_map,
poisson_noise_map_from_image,
im... | [
"Factory",
"for",
"loading",
"the",
"Poisson",
"noise",
"-",
"map",
"from",
"a",
".",
"fits",
"file",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/ccd.py#L1057-L1129 | [
"def",
"load_poisson_noise_map",
"(",
"poisson_noise_map_path",
",",
"poisson_noise_map_hdu",
",",
"pixel_scale",
",",
"convert_poisson_noise_map_from_weight_map",
",",
"convert_poisson_noise_map_from_inverse_noise_map",
",",
"poisson_noise_map_from_image",
",",
"image",
",",
"expo... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | load_psf | Factory for loading the psf from a .fits file.
Parameters
----------
psf_path : str
The path to the psf .fits file containing the psf (e.g. '/path/to/psf.fits')
psf_hdu : int
The hdu the psf is contained in the .fits file specified by *psf_path*.
pixel_scale : float
The size... | autolens/data/ccd.py | def load_psf(psf_path, psf_hdu, pixel_scale, renormalize=False):
"""Factory for loading the psf from a .fits file.
Parameters
----------
psf_path : str
The path to the psf .fits file containing the psf (e.g. '/path/to/psf.fits')
psf_hdu : int
The hdu the psf is contained in the .fit... | def load_psf(psf_path, psf_hdu, pixel_scale, renormalize=False):
"""Factory for loading the psf from a .fits file.
Parameters
----------
psf_path : str
The path to the psf .fits file containing the psf (e.g. '/path/to/psf.fits')
psf_hdu : int
The hdu the psf is contained in the .fit... | [
"Factory",
"for",
"loading",
"the",
"psf",
"from",
"a",
".",
"fits",
"file",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/ccd.py#L1132-L1149 | [
"def",
"load_psf",
"(",
"psf_path",
",",
"psf_hdu",
",",
"pixel_scale",
",",
"renormalize",
"=",
"False",
")",
":",
"if",
"renormalize",
":",
"return",
"PSF",
".",
"from_fits_renormalized",
"(",
"file_path",
"=",
"psf_path",
",",
"hdu",
"=",
"psf_hdu",
",",
... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | load_exposure_time_map | Factory for loading the exposure time map from a .fits file.
This factory also includes a number of routines for computing the exposure-time map from other unblurred_image_1d \
(e.g. the background noise-map).
Parameters
----------
exposure_time_map_path : str
The path to the exposure_time... | autolens/data/ccd.py | def load_exposure_time_map(exposure_time_map_path, exposure_time_map_hdu, pixel_scale, shape, exposure_time,
exposure_time_map_from_inverse_noise_map, inverse_noise_map):
"""Factory for loading the exposure time map from a .fits file.
This factory also includes a number of routines f... | def load_exposure_time_map(exposure_time_map_path, exposure_time_map_hdu, pixel_scale, shape, exposure_time,
exposure_time_map_from_inverse_noise_map, inverse_noise_map):
"""Factory for loading the exposure time map from a .fits file.
This factory also includes a number of routines f... | [
"Factory",
"for",
"loading",
"the",
"exposure",
"time",
"map",
"from",
"a",
".",
"fits",
"file",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/ccd.py#L1152-L1198 | [
"def",
"load_exposure_time_map",
"(",
"exposure_time_map_path",
",",
"exposure_time_map_hdu",
",",
"pixel_scale",
",",
"shape",
",",
"exposure_time",
",",
"exposure_time_map_from_inverse_noise_map",
",",
"inverse_noise_map",
")",
":",
"exposure_time_map_options",
"=",
"sum",
... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | load_background_sky_map | Factory for loading the background sky from a .fits file.
Parameters
----------
background_sky_map_path : str
The path to the background_sky_map .fits file containing the background sky map \
(e.g. '/path/to/background_sky_map.fits').
background_sky_map_hdu : int
The hdu the bac... | autolens/data/ccd.py | def load_background_sky_map(background_sky_map_path, background_sky_map_hdu, pixel_scale):
"""Factory for loading the background sky from a .fits file.
Parameters
----------
background_sky_map_path : str
The path to the background_sky_map .fits file containing the background sky map \
(... | def load_background_sky_map(background_sky_map_path, background_sky_map_hdu, pixel_scale):
"""Factory for loading the background sky from a .fits file.
Parameters
----------
background_sky_map_path : str
The path to the background_sky_map .fits file containing the background sky map \
(... | [
"Factory",
"for",
"loading",
"the",
"background",
"sky",
"from",
"a",
".",
"fits",
"file",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/ccd.py#L1201-L1218 | [
"def",
"load_background_sky_map",
"(",
"background_sky_map_path",
",",
"background_sky_map_hdu",
",",
"pixel_scale",
")",
":",
"if",
"background_sky_map_path",
"is",
"not",
"None",
":",
"return",
"ScaledSquarePixelArray",
".",
"from_fits_with_pixel_scale",
"(",
"file_path",... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | load_positions | Load the positions of an image.
Positions correspond to a set of pixels in the lensed source galaxy that are anticipated to come from the same \
multiply-imaged region of the source-plane. Mass models which do not trace the pixels within a threshold value of \
one another are resampled during the non-linea... | autolens/data/ccd.py | def load_positions(positions_path):
"""Load the positions of an image.
Positions correspond to a set of pixels in the lensed source galaxy that are anticipated to come from the same \
multiply-imaged region of the source-plane. Mass models which do not trace the pixels within a threshold value of \
one... | def load_positions(positions_path):
"""Load the positions of an image.
Positions correspond to a set of pixels in the lensed source galaxy that are anticipated to come from the same \
multiply-imaged region of the source-plane. Mass models which do not trace the pixels within a threshold value of \
one... | [
"Load",
"the",
"positions",
"of",
"an",
"image",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/ccd.py#L1247-L1272 | [
"def",
"load_positions",
"(",
"positions_path",
")",
":",
"with",
"open",
"(",
"positions_path",
")",
"as",
"f",
":",
"position_string",
"=",
"f",
".",
"readlines",
"(",
")",
"positions",
"=",
"[",
"]",
"for",
"line",
"in",
"position_string",
":",
"positio... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | output_positions | Output the positions of an image to a positions.dat file.
Positions correspond to a set of pixels in the lensed source galaxy that are anticipated to come from the same \
multiply-imaged region of the source-plane. Mass models which do not trace the pixels within a threshold value of \
one another are resa... | autolens/data/ccd.py | def output_positions(positions, positions_path):
"""Output the positions of an image to a positions.dat file.
Positions correspond to a set of pixels in the lensed source galaxy that are anticipated to come from the same \
multiply-imaged region of the source-plane. Mass models which do not trace the pixel... | def output_positions(positions, positions_path):
"""Output the positions of an image to a positions.dat file.
Positions correspond to a set of pixels in the lensed source galaxy that are anticipated to come from the same \
multiply-imaged region of the source-plane. Mass models which do not trace the pixel... | [
"Output",
"the",
"positions",
"of",
"an",
"image",
"to",
"a",
"positions",
".",
"dat",
"file",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/ccd.py#L1275-L1295 | [
"def",
"output_positions",
"(",
"positions",
",",
"positions_path",
")",
":",
"with",
"open",
"(",
"positions_path",
",",
"'w'",
")",
"as",
"f",
":",
"for",
"position",
"in",
"positions",
":",
"f",
".",
"write",
"(",
"\"%s\\n\"",
"%",
"position",
")"
] | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | CCDData.simulate_variable_arrays | Create a realistic simulated image by applying effects to a plain simulated image.
Parameters
----------
name
array : ndarray
The image before simulating (e.g. the lens and source galaxies before optics blurring and CCD read-out).
pixel_scale: float
The s... | autolens/data/ccd.py | def simulate_variable_arrays(cls, array, pixel_scale, exposure_time_map, psf=None, background_sky_map=None,
add_noise=True, noise_if_add_noise_false=0.1, noise_seed=-1, name=None):
"""
Create a realistic simulated image by applying effects to a plain simulated image.
... | def simulate_variable_arrays(cls, array, pixel_scale, exposure_time_map, psf=None, background_sky_map=None,
add_noise=True, noise_if_add_noise_false=0.1, noise_seed=-1, name=None):
"""
Create a realistic simulated image by applying effects to a plain simulated image.
... | [
"Create",
"a",
"realistic",
"simulated",
"image",
"by",
"applying",
"effects",
"to",
"a",
"plain",
"simulated",
"image",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/ccd.py#L80-L153 | [
"def",
"simulate_variable_arrays",
"(",
"cls",
",",
"array",
",",
"pixel_scale",
",",
"exposure_time_map",
",",
"psf",
"=",
"None",
",",
"background_sky_map",
"=",
"None",
",",
"add_noise",
"=",
"True",
",",
"noise_if_add_noise_false",
"=",
"0.1",
",",
"noise_se... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | CCDData.simulate_to_target_signal_to_noise | Create a realistic simulated image by applying effects to a plain simulated image.
Parameters
----------
target_signal_to_noise
array : ndarray
The image before simulating (e.g. the lens and source galaxies before optics blurring and CCD read-out).
pixel_scale: float... | autolens/data/ccd.py | def simulate_to_target_signal_to_noise(cls, array, pixel_scale, target_signal_to_noise, exposure_time_map,
psf=None, background_sky_map=None, seed=-1):
"""
Create a realistic simulated image by applying effects to a plain simulated image.
Parameters
... | def simulate_to_target_signal_to_noise(cls, array, pixel_scale, target_signal_to_noise, exposure_time_map,
psf=None, background_sky_map=None, seed=-1):
"""
Create a realistic simulated image by applying effects to a plain simulated image.
Parameters
... | [
"Create",
"a",
"realistic",
"simulated",
"image",
"by",
"applying",
"effects",
"to",
"a",
"plain",
"simulated",
"image",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/ccd.py#L156-L201 | [
"def",
"simulate_to_target_signal_to_noise",
"(",
"cls",
",",
"array",
",",
"pixel_scale",
",",
"target_signal_to_noise",
",",
"exposure_time_map",
",",
"psf",
"=",
"None",
",",
"background_sky_map",
"=",
"None",
",",
"seed",
"=",
"-",
"1",
")",
":",
"max_index"... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | CCDData.signal_to_noise_map | The estimated signal-to-noise_maps mappers of the image. | autolens/data/ccd.py | def signal_to_noise_map(self):
"""The estimated signal-to-noise_maps mappers of the image."""
signal_to_noise_map = np.divide(self.image, self.noise_map)
signal_to_noise_map[signal_to_noise_map < 0] = 0
return signal_to_noise_map | def signal_to_noise_map(self):
"""The estimated signal-to-noise_maps mappers of the image."""
signal_to_noise_map = np.divide(self.image, self.noise_map)
signal_to_noise_map[signal_to_noise_map < 0] = 0
return signal_to_noise_map | [
"The",
"estimated",
"signal",
"-",
"to",
"-",
"noise_maps",
"mappers",
"of",
"the",
"image",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/ccd.py#L323-L327 | [
"def",
"signal_to_noise_map",
"(",
"self",
")",
":",
"signal_to_noise_map",
"=",
"np",
".",
"divide",
"(",
"self",
".",
"image",
",",
"self",
".",
"noise_map",
")",
"signal_to_noise_map",
"[",
"signal_to_noise_map",
"<",
"0",
"]",
"=",
"0",
"return",
"signal... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | CCDData.absolute_signal_to_noise_map | The estimated absolute_signal-to-noise_maps mappers of the image. | autolens/data/ccd.py | def absolute_signal_to_noise_map(self):
"""The estimated absolute_signal-to-noise_maps mappers of the image."""
return np.divide(np.abs(self.image), self.noise_map) | def absolute_signal_to_noise_map(self):
"""The estimated absolute_signal-to-noise_maps mappers of the image."""
return np.divide(np.abs(self.image), self.noise_map) | [
"The",
"estimated",
"absolute_signal",
"-",
"to",
"-",
"noise_maps",
"mappers",
"of",
"the",
"image",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/ccd.py#L335-L337 | [
"def",
"absolute_signal_to_noise_map",
"(",
"self",
")",
":",
"return",
"np",
".",
"divide",
"(",
"np",
".",
"abs",
"(",
"self",
".",
"image",
")",
",",
"self",
".",
"noise_map",
")"
] | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | CCDData.array_from_adus_to_electrons_per_second | For an array (in counts) and an exposure time mappers, convert the array to units electrons per second
Parameters
----------
array : ndarray
The array the values are to be converted from counts to electrons per second. | autolens/data/ccd.py | def array_from_adus_to_electrons_per_second(self, array, gain):
"""
For an array (in counts) and an exposure time mappers, convert the array to units electrons per second
Parameters
----------
array : ndarray
The array the values are to be converted from counts to el... | def array_from_adus_to_electrons_per_second(self, array, gain):
"""
For an array (in counts) and an exposure time mappers, convert the array to units electrons per second
Parameters
----------
array : ndarray
The array the values are to be converted from counts to el... | [
"For",
"an",
"array",
"(",
"in",
"counts",
")",
"and",
"an",
"exposure",
"time",
"mappers",
"convert",
"the",
"array",
"to",
"units",
"electrons",
"per",
"second"
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/ccd.py#L391-L403 | [
"def",
"array_from_adus_to_electrons_per_second",
"(",
"self",
",",
"array",
",",
"gain",
")",
":",
"if",
"array",
"is",
"not",
"None",
":",
"return",
"np",
".",
"divide",
"(",
"gain",
"*",
"array",
",",
"self",
".",
"exposure_time_map",
")",
"else",
":",
... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | CCDData.estimated_noise_map_counts | The estimated noise_maps mappers of the image (using its background noise_maps mappers and image values
in counts) in counts. | autolens/data/ccd.py | def estimated_noise_map_counts(self):
""" The estimated noise_maps mappers of the image (using its background noise_maps mappers and image values
in counts) in counts.
"""
return np.sqrt((np.abs(self.image_counts) + np.square(self.background_noise_map_counts))) | def estimated_noise_map_counts(self):
""" The estimated noise_maps mappers of the image (using its background noise_maps mappers and image values
in counts) in counts.
"""
return np.sqrt((np.abs(self.image_counts) + np.square(self.background_noise_map_counts))) | [
"The",
"estimated",
"noise_maps",
"mappers",
"of",
"the",
"image",
"(",
"using",
"its",
"background",
"noise_maps",
"mappers",
"and",
"image",
"values",
"in",
"counts",
")",
"in",
"counts",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/ccd.py#L416-L420 | [
"def",
"estimated_noise_map_counts",
"(",
"self",
")",
":",
"return",
"np",
".",
"sqrt",
"(",
"(",
"np",
".",
"abs",
"(",
"self",
".",
"image_counts",
")",
"+",
"np",
".",
"square",
"(",
"self",
".",
"background_noise_map_counts",
")",
")",
")"
] | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | CCDData.background_noise_from_edges | Estimate the background signal_to_noise_ratio by binning data_to_image located at the edge(s) of an image
into a histogram and fitting a Gaussian profiles to this histogram. The standard deviation (sigma) of this
Gaussian gives a signal_to_noise_ratio estimate.
Parameters
----------
... | autolens/data/ccd.py | def background_noise_from_edges(self, no_edges):
"""Estimate the background signal_to_noise_ratio by binning data_to_image located at the edge(s) of an image
into a histogram and fitting a Gaussian profiles to this histogram. The standard deviation (sigma) of this
Gaussian gives a signal_to_nois... | def background_noise_from_edges(self, no_edges):
"""Estimate the background signal_to_noise_ratio by binning data_to_image located at the edge(s) of an image
into a histogram and fitting a Gaussian profiles to this histogram. The standard deviation (sigma) of this
Gaussian gives a signal_to_nois... | [
"Estimate",
"the",
"background",
"signal_to_noise_ratio",
"by",
"binning",
"data_to_image",
"located",
"at",
"the",
"edge",
"(",
"s",
")",
"of",
"an",
"image",
"into",
"a",
"histogram",
"and",
"fitting",
"a",
"Gaussian",
"profiles",
"to",
"this",
"histogram",
... | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/ccd.py#L429-L451 | [
"def",
"background_noise_from_edges",
"(",
"self",
",",
"no_edges",
")",
":",
"edges",
"=",
"[",
"]",
"for",
"edge_no",
"in",
"range",
"(",
"no_edges",
")",
":",
"top_edge",
"=",
"self",
".",
"image",
"[",
"edge_no",
",",
"edge_no",
":",
"self",
".",
"... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | NoiseMap.from_weight_map | Setup the noise-map from a weight map, which is a form of noise-map that comes via HST image-reduction and \
the software package MultiDrizzle.
The variance in each pixel is computed as:
Variance = 1.0 / sqrt(weight_map).
The weight map may contain zeros, in which cause the variances ... | autolens/data/ccd.py | def from_weight_map(cls, pixel_scale, weight_map):
"""Setup the noise-map from a weight map, which is a form of noise-map that comes via HST image-reduction and \
the software package MultiDrizzle.
The variance in each pixel is computed as:
Variance = 1.0 / sqrt(weight_map).
T... | def from_weight_map(cls, pixel_scale, weight_map):
"""Setup the noise-map from a weight map, which is a form of noise-map that comes via HST image-reduction and \
the software package MultiDrizzle.
The variance in each pixel is computed as:
Variance = 1.0 / sqrt(weight_map).
T... | [
"Setup",
"the",
"noise",
"-",
"map",
"from",
"a",
"weight",
"map",
"which",
"is",
"a",
"form",
"of",
"noise",
"-",
"map",
"that",
"comes",
"via",
"HST",
"image",
"-",
"reduction",
"and",
"\\",
"the",
"software",
"package",
"MultiDrizzle",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/ccd.py#L472-L493 | [
"def",
"from_weight_map",
"(",
"cls",
",",
"pixel_scale",
",",
"weight_map",
")",
":",
"np",
".",
"seterr",
"(",
"divide",
"=",
"'ignore'",
")",
"noise_map",
"=",
"1.0",
"/",
"np",
".",
"sqrt",
"(",
"weight_map",
")",
"noise_map",
"[",
"noise_map",
"==",... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | NoiseMap.from_inverse_noise_map | Setup the noise-map from an root-mean square standard deviation map, which is a form of noise-map that \
comes via HST image-reduction and the software package MultiDrizzle.
The variance in each pixel is computed as:
Variance = 1.0 / inverse_std_map.
The weight map may contain zeros, ... | autolens/data/ccd.py | def from_inverse_noise_map(cls, pixel_scale, inverse_noise_map):
"""Setup the noise-map from an root-mean square standard deviation map, which is a form of noise-map that \
comes via HST image-reduction and the software package MultiDrizzle.
The variance in each pixel is computed as:
V... | def from_inverse_noise_map(cls, pixel_scale, inverse_noise_map):
"""Setup the noise-map from an root-mean square standard deviation map, which is a form of noise-map that \
comes via HST image-reduction and the software package MultiDrizzle.
The variance in each pixel is computed as:
V... | [
"Setup",
"the",
"noise",
"-",
"map",
"from",
"an",
"root",
"-",
"mean",
"square",
"standard",
"deviation",
"map",
"which",
"is",
"a",
"form",
"of",
"noise",
"-",
"map",
"that",
"\\",
"comes",
"via",
"HST",
"image",
"-",
"reduction",
"and",
"the",
"soft... | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/ccd.py#L496-L515 | [
"def",
"from_inverse_noise_map",
"(",
"cls",
",",
"pixel_scale",
",",
"inverse_noise_map",
")",
":",
"noise_map",
"=",
"1.0",
"/",
"inverse_noise_map",
"return",
"NoiseMap",
"(",
"array",
"=",
"noise_map",
",",
"pixel_scale",
"=",
"pixel_scale",
")"
] | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | PSF.simulate_as_gaussian | Simulate the PSF as an elliptical Gaussian profile. | autolens/data/ccd.py | def simulate_as_gaussian(cls, shape, pixel_scale, sigma, centre=(0.0, 0.0), axis_ratio=1.0, phi=0.0):
"""Simulate the PSF as an elliptical Gaussian profile."""
from autolens.model.profiles.light_profiles import EllipticalGaussian
gaussian = EllipticalGaussian(centre=centre, axis_ratio=axis_ratio... | def simulate_as_gaussian(cls, shape, pixel_scale, sigma, centre=(0.0, 0.0), axis_ratio=1.0, phi=0.0):
"""Simulate the PSF as an elliptical Gaussian profile."""
from autolens.model.profiles.light_profiles import EllipticalGaussian
gaussian = EllipticalGaussian(centre=centre, axis_ratio=axis_ratio... | [
"Simulate",
"the",
"PSF",
"as",
"an",
"elliptical",
"Gaussian",
"profile",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/ccd.py#L567-L577 | [
"def",
"simulate_as_gaussian",
"(",
"cls",
",",
"shape",
",",
"pixel_scale",
",",
"sigma",
",",
"centre",
"=",
"(",
"0.0",
",",
"0.0",
")",
",",
"axis_ratio",
"=",
"1.0",
",",
"phi",
"=",
"0.0",
")",
":",
"from",
"autolens",
".",
"model",
".",
"profi... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | PSF.from_fits_renormalized | Loads a PSF from fits and renormalizes it
Parameters
----------
pixel_scale
file_path: String
The path to the file containing the PSF
hdu : int
The HDU the PSF is stored in the .fits file.
Returns
-------
psf: PSF
A re... | autolens/data/ccd.py | def from_fits_renormalized(cls, file_path, hdu, pixel_scale):
"""Loads a PSF from fits and renormalizes it
Parameters
----------
pixel_scale
file_path: String
The path to the file containing the PSF
hdu : int
The HDU the PSF is stored in the .fits... | def from_fits_renormalized(cls, file_path, hdu, pixel_scale):
"""Loads a PSF from fits and renormalizes it
Parameters
----------
pixel_scale
file_path: String
The path to the file containing the PSF
hdu : int
The HDU the PSF is stored in the .fits... | [
"Loads",
"a",
"PSF",
"from",
"fits",
"and",
"renormalizes",
"it"
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/ccd.py#L600-L618 | [
"def",
"from_fits_renormalized",
"(",
"cls",
",",
"file_path",
",",
"hdu",
",",
"pixel_scale",
")",
":",
"psf",
"=",
"PSF",
".",
"from_fits_with_scale",
"(",
"file_path",
",",
"hdu",
",",
"pixel_scale",
")",
"psf",
"[",
":",
",",
":",
"]",
"=",
"np",
"... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | PSF.from_fits_with_scale | Loads the PSF from a .fits file.
Parameters
----------
pixel_scale
file_path: String
The path to the file containing the PSF
hdu : int
The HDU the PSF is stored in the .fits file. | autolens/data/ccd.py | def from_fits_with_scale(cls, file_path, hdu, pixel_scale):
"""
Loads the PSF from a .fits file.
Parameters
----------
pixel_scale
file_path: String
The path to the file containing the PSF
hdu : int
The HDU the PSF is stored in the .fits f... | def from_fits_with_scale(cls, file_path, hdu, pixel_scale):
"""
Loads the PSF from a .fits file.
Parameters
----------
pixel_scale
file_path: String
The path to the file containing the PSF
hdu : int
The HDU the PSF is stored in the .fits f... | [
"Loads",
"the",
"PSF",
"from",
"a",
".",
"fits",
"file",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/ccd.py#L621-L633 | [
"def",
"from_fits_with_scale",
"(",
"cls",
",",
"file_path",
",",
"hdu",
",",
"pixel_scale",
")",
":",
"return",
"cls",
"(",
"array",
"=",
"array_util",
".",
"numpy_array_2d_from_fits",
"(",
"file_path",
",",
"hdu",
")",
",",
"pixel_scale",
"=",
"pixel_scale",... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | PSF.new_psf_with_renormalized_array | Renormalize the PSF such that its data_vector values sum to unity. | autolens/data/ccd.py | def new_psf_with_renormalized_array(self):
"""Renormalize the PSF such that its data_vector values sum to unity."""
return PSF(array=self, pixel_scale=self.pixel_scale, renormalize=True) | def new_psf_with_renormalized_array(self):
"""Renormalize the PSF such that its data_vector values sum to unity."""
return PSF(array=self, pixel_scale=self.pixel_scale, renormalize=True) | [
"Renormalize",
"the",
"PSF",
"such",
"that",
"its",
"data_vector",
"values",
"sum",
"to",
"unity",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/ccd.py#L652-L654 | [
"def",
"new_psf_with_renormalized_array",
"(",
"self",
")",
":",
"return",
"PSF",
"(",
"array",
"=",
"self",
",",
"pixel_scale",
"=",
"self",
".",
"pixel_scale",
",",
"renormalize",
"=",
"True",
")"
] | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | PSF.convolve | Convolve an array with this PSF
Parameters
----------
image : ndarray
An array representing the image the PSF is convolved with.
Returns
-------
convolved_image : ndarray
An array representing the image after convolution.
Raises
... | autolens/data/ccd.py | def convolve(self, array):
"""
Convolve an array with this PSF
Parameters
----------
image : ndarray
An array representing the image the PSF is convolved with.
Returns
-------
convolved_image : ndarray
An array representing the im... | def convolve(self, array):
"""
Convolve an array with this PSF
Parameters
----------
image : ndarray
An array representing the image the PSF is convolved with.
Returns
-------
convolved_image : ndarray
An array representing the im... | [
"Convolve",
"an",
"array",
"with",
"this",
"PSF"
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/ccd.py#L656-L677 | [
"def",
"convolve",
"(",
"self",
",",
"array",
")",
":",
"if",
"self",
".",
"shape",
"[",
"0",
"]",
"%",
"2",
"==",
"0",
"or",
"self",
".",
"shape",
"[",
"1",
"]",
"%",
"2",
"==",
"0",
":",
"raise",
"exc",
".",
"KernelException",
"(",
"\"PSF Ker... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | setup_image_plane_pixelization_grid_from_galaxies_and_grid_stack | An image-plane pixelization is one where its pixel centres are computed by tracing a sparse grid of pixels from \
the image's regular grid to other planes (e.g. the source-plane).
Provided a galaxy has an image-plane pixelization, this function returns a new *GridStack* instance where the \
image-plane pix... | autolens/model/inversion/pixelizations.py | def setup_image_plane_pixelization_grid_from_galaxies_and_grid_stack(galaxies, grid_stack):
"""An image-plane pixelization is one where its pixel centres are computed by tracing a sparse grid of pixels from \
the image's regular grid to other planes (e.g. the source-plane).
Provided a galaxy has an image-p... | def setup_image_plane_pixelization_grid_from_galaxies_and_grid_stack(galaxies, grid_stack):
"""An image-plane pixelization is one where its pixel centres are computed by tracing a sparse grid of pixels from \
the image's regular grid to other planes (e.g. the source-plane).
Provided a galaxy has an image-p... | [
"An",
"image",
"-",
"plane",
"pixelization",
"is",
"one",
"where",
"its",
"pixel",
"centres",
"are",
"computed",
"by",
"tracing",
"a",
"sparse",
"grid",
"of",
"pixels",
"from",
"\\",
"the",
"image",
"s",
"regular",
"grid",
"to",
"other",
"planes",
"(",
"... | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/model/inversion/pixelizations.py#L11-L39 | [
"def",
"setup_image_plane_pixelization_grid_from_galaxies_and_grid_stack",
"(",
"galaxies",
",",
"grid_stack",
")",
":",
"if",
"not",
"isinstance",
"(",
"grid_stack",
".",
"regular",
",",
"grids",
".",
"PaddedRegularGrid",
")",
":",
"for",
"galaxy",
"in",
"galaxies",
... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | ImagePlanePixelization.image_plane_pix_grid_from_regular_grid | Calculate the image-plane pixelization from a regular-grid of coordinates (and its mask).
See *grid_stacks.SparseToRegularGrid* for details on how this grid is calculated.
Parameters
-----------
regular_grid : grids.RegularGrid
The grid of (y,x) arc-second coordinates at th... | autolens/model/inversion/pixelizations.py | def image_plane_pix_grid_from_regular_grid(self, regular_grid):
"""Calculate the image-plane pixelization from a regular-grid of coordinates (and its mask).
See *grid_stacks.SparseToRegularGrid* for details on how this grid is calculated.
Parameters
-----------
regular_grid : g... | def image_plane_pix_grid_from_regular_grid(self, regular_grid):
"""Calculate the image-plane pixelization from a regular-grid of coordinates (and its mask).
See *grid_stacks.SparseToRegularGrid* for details on how this grid is calculated.
Parameters
-----------
regular_grid : g... | [
"Calculate",
"the",
"image",
"-",
"plane",
"pixelization",
"from",
"a",
"regular",
"-",
"grid",
"of",
"coordinates",
"(",
"and",
"its",
"mask",
")",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/model/inversion/pixelizations.py#L60-L77 | [
"def",
"image_plane_pix_grid_from_regular_grid",
"(",
"self",
",",
"regular_grid",
")",
":",
"pixel_scale",
"=",
"regular_grid",
".",
"mask",
".",
"pixel_scale",
"pixel_scales",
"=",
"(",
"(",
"regular_grid",
".",
"masked_shape_arcsec",
"[",
"0",
"]",
"+",
"pixel_... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | Rectangular.geometry_from_grid | Determine the geometry of the rectangular grid, by overlaying it over a grid of coordinates such that its \
outer-most pixels align with the grid's outer most coordinates plus a small buffer.
Parameters
-----------
grid : ndarray
The (y,x) grid of coordinates over which the... | autolens/model/inversion/pixelizations.py | def geometry_from_grid(self, grid, buffer=1e-8):
"""Determine the geometry of the rectangular grid, by overlaying it over a grid of coordinates such that its \
outer-most pixels align with the grid's outer most coordinates plus a small buffer.
Parameters
-----------
grid : ndar... | def geometry_from_grid(self, grid, buffer=1e-8):
"""Determine the geometry of the rectangular grid, by overlaying it over a grid of coordinates such that its \
outer-most pixels align with the grid's outer most coordinates plus a small buffer.
Parameters
-----------
grid : ndar... | [
"Determine",
"the",
"geometry",
"of",
"the",
"rectangular",
"grid",
"by",
"overlaying",
"it",
"over",
"a",
"grid",
"of",
"coordinates",
"such",
"that",
"its",
"\\",
"outer",
"-",
"most",
"pixels",
"align",
"with",
"the",
"grid",
"s",
"outer",
"most",
"coor... | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/model/inversion/pixelizations.py#L150-L169 | [
"def",
"geometry_from_grid",
"(",
"self",
",",
"grid",
",",
"buffer",
"=",
"1e-8",
")",
":",
"y_min",
"=",
"np",
".",
"min",
"(",
"grid",
"[",
":",
",",
"0",
"]",
")",
"-",
"buffer",
"y_max",
"=",
"np",
".",
"max",
"(",
"grid",
"[",
":",
",",
... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | Rectangular.mapper_from_grid_stack_and_border | Setup a rectangular mapper from a rectangular pixelization, as follows:
1) If a border is supplied, relocate all of the grid-stack's regular and sub grid pixels beyond the border.
2) Determine the rectangular pixelization's geometry, by laying the pixelization over the sub-grid.
3) Setup the re... | autolens/model/inversion/pixelizations.py | def mapper_from_grid_stack_and_border(self, grid_stack, border):
"""Setup a rectangular mapper from a rectangular pixelization, as follows:
1) If a border is supplied, relocate all of the grid-stack's regular and sub grid pixels beyond the border.
2) Determine the rectangular pixelization's geo... | def mapper_from_grid_stack_and_border(self, grid_stack, border):
"""Setup a rectangular mapper from a rectangular pixelization, as follows:
1) If a border is supplied, relocate all of the grid-stack's regular and sub grid pixels beyond the border.
2) Determine the rectangular pixelization's geo... | [
"Setup",
"a",
"rectangular",
"mapper",
"from",
"a",
"rectangular",
"pixelization",
"as",
"follows",
":"
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/model/inversion/pixelizations.py#L174-L197 | [
"def",
"mapper_from_grid_stack_and_border",
"(",
"self",
",",
"grid_stack",
",",
"border",
")",
":",
"if",
"border",
"is",
"not",
"None",
":",
"relocated_grid_stack",
"=",
"border",
".",
"relocated_grid_stack_from_grid_stack",
"(",
"grid_stack",
")",
"else",
":",
... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | Voronoi.geometry_from_grid | Determine the geometry of the Voronoi pixelization, by alligning it with the outer-most coordinates on a \
grid plus a small buffer.
Parameters
-----------
grid : ndarray
The (y,x) grid of coordinates which determine the Voronoi pixelization's geometry.
pixel_centres... | autolens/model/inversion/pixelizations.py | def geometry_from_grid(self, grid, pixel_centres, pixel_neighbors, pixel_neighbors_size, buffer=1e-8):
"""Determine the geometry of the Voronoi pixelization, by alligning it with the outer-most coordinates on a \
grid plus a small buffer.
Parameters
-----------
grid : ndarray
... | def geometry_from_grid(self, grid, pixel_centres, pixel_neighbors, pixel_neighbors_size, buffer=1e-8):
"""Determine the geometry of the Voronoi pixelization, by alligning it with the outer-most coordinates on a \
grid plus a small buffer.
Parameters
-----------
grid : ndarray
... | [
"Determine",
"the",
"geometry",
"of",
"the",
"Voronoi",
"pixelization",
"by",
"alligning",
"it",
"with",
"the",
"outer",
"-",
"most",
"coordinates",
"on",
"a",
"\\",
"grid",
"plus",
"a",
"small",
"buffer",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/model/inversion/pixelizations.py#L238-L264 | [
"def",
"geometry_from_grid",
"(",
"self",
",",
"grid",
",",
"pixel_centres",
",",
"pixel_neighbors",
",",
"pixel_neighbors_size",
",",
"buffer",
"=",
"1e-8",
")",
":",
"y_min",
"=",
"np",
".",
"min",
"(",
"grid",
"[",
":",
",",
"0",
"]",
")",
"-",
"buf... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | Voronoi.voronoi_from_pixel_centers | Compute the Voronoi grid of the pixelization, using the pixel centers.
Parameters
----------
pixel_centers : ndarray
The (y,x) centre of every Voronoi pixel. | autolens/model/inversion/pixelizations.py | def voronoi_from_pixel_centers(pixel_centers):
"""Compute the Voronoi grid of the pixelization, using the pixel centers.
Parameters
----------
pixel_centers : ndarray
The (y,x) centre of every Voronoi pixel.
"""
return scipy.spatial.Voronoi(np.asarray([pixel_... | def voronoi_from_pixel_centers(pixel_centers):
"""Compute the Voronoi grid of the pixelization, using the pixel centers.
Parameters
----------
pixel_centers : ndarray
The (y,x) centre of every Voronoi pixel.
"""
return scipy.spatial.Voronoi(np.asarray([pixel_... | [
"Compute",
"the",
"Voronoi",
"grid",
"of",
"the",
"pixelization",
"using",
"the",
"pixel",
"centers",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/model/inversion/pixelizations.py#L267-L276 | [
"def",
"voronoi_from_pixel_centers",
"(",
"pixel_centers",
")",
":",
"return",
"scipy",
".",
"spatial",
".",
"Voronoi",
"(",
"np",
".",
"asarray",
"(",
"[",
"pixel_centers",
"[",
":",
",",
"1",
"]",
",",
"pixel_centers",
"[",
":",
",",
"0",
"]",
"]",
"... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | Voronoi.neighbors_from_pixelization | Compute the neighbors of every Voronoi pixel as an ndarray of the pixel index's each pixel shares a \
vertex with.
The ridge points of the Voronoi grid are used to derive this.
Parameters
----------
ridge_points : scipy.spatial.Voronoi.ridge_points
Each Voronoi-ridg... | autolens/model/inversion/pixelizations.py | def neighbors_from_pixelization(self, pixels, ridge_points):
"""Compute the neighbors of every Voronoi pixel as an ndarray of the pixel index's each pixel shares a \
vertex with.
The ridge points of the Voronoi grid are used to derive this.
Parameters
----------
ridge_p... | def neighbors_from_pixelization(self, pixels, ridge_points):
"""Compute the neighbors of every Voronoi pixel as an ndarray of the pixel index's each pixel shares a \
vertex with.
The ridge points of the Voronoi grid are used to derive this.
Parameters
----------
ridge_p... | [
"Compute",
"the",
"neighbors",
"of",
"every",
"Voronoi",
"pixel",
"as",
"an",
"ndarray",
"of",
"the",
"pixel",
"index",
"s",
"each",
"pixel",
"shares",
"a",
"\\",
"vertex",
"with",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/model/inversion/pixelizations.py#L279-L291 | [
"def",
"neighbors_from_pixelization",
"(",
"self",
",",
"pixels",
",",
"ridge_points",
")",
":",
"return",
"pixelization_util",
".",
"voronoi_neighbors_from_pixels_and_ridge_points",
"(",
"pixels",
"=",
"pixels",
",",
"ridge_points",
"=",
"np",
".",
"asarray",
"(",
... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | AdaptiveMagnification.mapper_from_grid_stack_and_border | Setup a Voronoi mapper from an adaptive-magnification pixelization, as follows:
1) (before this routine is called), setup the 'pix' grid as part of the grid-stack, which corresponds to a \
sparse set of pixels in the image-plane which are traced to form the pixel centres.
2) If a border is s... | autolens/model/inversion/pixelizations.py | def mapper_from_grid_stack_and_border(self, grid_stack, border):
"""Setup a Voronoi mapper from an adaptive-magnification pixelization, as follows:
1) (before this routine is called), setup the 'pix' grid as part of the grid-stack, which corresponds to a \
sparse set of pixels in the image-p... | def mapper_from_grid_stack_and_border(self, grid_stack, border):
"""Setup a Voronoi mapper from an adaptive-magnification pixelization, as follows:
1) (before this routine is called), setup the 'pix' grid as part of the grid-stack, which corresponds to a \
sparse set of pixels in the image-p... | [
"Setup",
"a",
"Voronoi",
"mapper",
"from",
"an",
"adaptive",
"-",
"magnification",
"pixelization",
"as",
"follows",
":"
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/model/inversion/pixelizations.py#L309-L347 | [
"def",
"mapper_from_grid_stack_and_border",
"(",
"self",
",",
"grid_stack",
",",
"border",
")",
":",
"if",
"border",
"is",
"not",
"None",
":",
"relocated_grids",
"=",
"border",
".",
"relocated_grid_stack_from_grid_stack",
"(",
"grid_stack",
")",
"else",
":",
"relo... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | plot_grid | Plot a grid of (y,x) Cartesian coordinates as a scatter plot of points.
Parameters
-----------
grid : data.array.grids.RegularGrid
The (y,x) coordinates of the grid, in an array of shape (total_coordinates, 2).
axis_limits : []
The axis limits of the figure on which the grid is plotted,... | autolens/plotters/grid_plotters.py | def plot_grid(grid, axis_limits=None, points=None, as_subplot=False,
units='arcsec', kpc_per_arcsec=None,
figsize=(12, 8), pointsize=5, pointcolor='k', xyticksize=16,
title='Grid', titlesize=16, xlabelsize=16, ylabelsize=16,
output_path=None, output_format='show',... | def plot_grid(grid, axis_limits=None, points=None, as_subplot=False,
units='arcsec', kpc_per_arcsec=None,
figsize=(12, 8), pointsize=5, pointcolor='k', xyticksize=16,
title='Grid', titlesize=16, xlabelsize=16, ylabelsize=16,
output_path=None, output_format='show',... | [
"Plot",
"a",
"grid",
"of",
"(",
"y",
"x",
")",
"Cartesian",
"coordinates",
"as",
"a",
"scatter",
"plot",
"of",
"points",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/plotters/grid_plotters.py#L9-L66 | [
"def",
"plot_grid",
"(",
"grid",
",",
"axis_limits",
"=",
"None",
",",
"points",
"=",
"None",
",",
"as_subplot",
"=",
"False",
",",
"units",
"=",
"'arcsec'",
",",
"kpc_per_arcsec",
"=",
"None",
",",
"figsize",
"=",
"(",
"12",
",",
"8",
")",
",",
"poi... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | convert_grid_units | Convert the grid from its input units (arc-seconds) to the input unit (e.g. retain arc-seconds) or convert to \
another set of units (kiloparsecs).
Parameters
-----------
grid_arcsec : ndarray or data.array.grids.RegularGrid
The (y,x) coordinates of the grid in arc-seconds, in an array of shape... | autolens/plotters/grid_plotters.py | def convert_grid_units(grid_arcsec, units, kpc_per_arcsec):
"""Convert the grid from its input units (arc-seconds) to the input unit (e.g. retain arc-seconds) or convert to \
another set of units (kiloparsecs).
Parameters
-----------
grid_arcsec : ndarray or data.array.grids.RegularGrid
The... | def convert_grid_units(grid_arcsec, units, kpc_per_arcsec):
"""Convert the grid from its input units (arc-seconds) to the input unit (e.g. retain arc-seconds) or convert to \
another set of units (kiloparsecs).
Parameters
-----------
grid_arcsec : ndarray or data.array.grids.RegularGrid
The... | [
"Convert",
"the",
"grid",
"from",
"its",
"input",
"units",
"(",
"arc",
"-",
"seconds",
")",
"to",
"the",
"input",
"unit",
"(",
"e",
".",
"g",
".",
"retain",
"arc",
"-",
"seconds",
")",
"or",
"convert",
"to",
"\\",
"another",
"set",
"of",
"units",
"... | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/plotters/grid_plotters.py#L68-L85 | [
"def",
"convert_grid_units",
"(",
"grid_arcsec",
",",
"units",
",",
"kpc_per_arcsec",
")",
":",
"if",
"units",
"in",
"'arcsec'",
"or",
"kpc_per_arcsec",
"is",
"None",
":",
"return",
"grid_arcsec",
"elif",
"units",
"in",
"'kpc'",
":",
"return",
"grid_arcsec",
"... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | set_xy_labels | Set the x and y labels of the figure, and set the fontsize of those labels.
The x and y labels are always the distance scales, thus the labels are either arc-seconds or kpc and depend on the \
units the figure is plotted in.
Parameters
-----------
units : str
The units of the y / x axis of... | autolens/plotters/grid_plotters.py | def set_xy_labels(units, kpc_per_arcsec, xlabelsize, ylabelsize, xyticksize):
"""Set the x and y labels of the figure, and set the fontsize of those labels.
The x and y labels are always the distance scales, thus the labels are either arc-seconds or kpc and depend on the \
units the figure is plotted in.
... | def set_xy_labels(units, kpc_per_arcsec, xlabelsize, ylabelsize, xyticksize):
"""Set the x and y labels of the figure, and set the fontsize of those labels.
The x and y labels are always the distance scales, thus the labels are either arc-seconds or kpc and depend on the \
units the figure is plotted in.
... | [
"Set",
"the",
"x",
"and",
"y",
"labels",
"of",
"the",
"figure",
"and",
"set",
"the",
"fontsize",
"of",
"those",
"labels",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/plotters/grid_plotters.py#L87-L120 | [
"def",
"set_xy_labels",
"(",
"units",
",",
"kpc_per_arcsec",
",",
"xlabelsize",
",",
"ylabelsize",
",",
"xyticksize",
")",
":",
"if",
"units",
"in",
"'arcsec'",
"or",
"kpc_per_arcsec",
"is",
"None",
":",
"plt",
".",
"xlabel",
"(",
"'x (arcsec)'",
",",
"fonts... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | plot_points | Plot a subset of points in a different color, to highlight a specifc region of the grid (e.g. how certain \
pixels map between different planes).
Parameters
-----------
grid : ndarray or data.array.grids.RegularGrid
The (y,x) coordinates of the grid, in an array of shape (total_coordinates, 2).... | autolens/plotters/grid_plotters.py | def plot_points(grid, points, pointcolor):
"""Plot a subset of points in a different color, to highlight a specifc region of the grid (e.g. how certain \
pixels map between different planes).
Parameters
-----------
grid : ndarray or data.array.grids.RegularGrid
The (y,x) coordinates of the ... | def plot_points(grid, points, pointcolor):
"""Plot a subset of points in a different color, to highlight a specifc region of the grid (e.g. how certain \
pixels map between different planes).
Parameters
-----------
grid : ndarray or data.array.grids.RegularGrid
The (y,x) coordinates of the ... | [
"Plot",
"a",
"subset",
"of",
"points",
"in",
"a",
"different",
"color",
"to",
"highlight",
"a",
"specifc",
"region",
"of",
"the",
"grid",
"(",
"e",
".",
"g",
".",
"how",
"certain",
"\\",
"pixels",
"map",
"between",
"different",
"planes",
")",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/plotters/grid_plotters.py#L133-L160 | [
"def",
"plot_points",
"(",
"grid",
",",
"points",
",",
"pointcolor",
")",
":",
"if",
"points",
"is",
"not",
"None",
":",
"if",
"pointcolor",
"is",
"None",
":",
"point_colors",
"=",
"itertools",
".",
"cycle",
"(",
"[",
"\"y\"",
",",
"\"r\"",
",",
"\"k\"... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | sub_to_image_grid | Wrap the function in a function that, if the grid is a sub-grid (grids.SubGrid), rebins the computed \
values to the sub-grids corresponding regular-grid by taking the mean of each set of sub-gridded values.
Parameters
----------
func : (profiles, *args, **kwargs) -> Object
A function that requ... | autolens/data/array/grids.py | def sub_to_image_grid(func):
"""
Wrap the function in a function that, if the grid is a sub-grid (grids.SubGrid), rebins the computed \
values to the sub-grids corresponding regular-grid by taking the mean of each set of sub-gridded values.
Parameters
----------
func : (profiles, *args, **kwarg... | def sub_to_image_grid(func):
"""
Wrap the function in a function that, if the grid is a sub-grid (grids.SubGrid), rebins the computed \
values to the sub-grids corresponding regular-grid by taking the mean of each set of sub-gridded values.
Parameters
----------
func : (profiles, *args, **kwarg... | [
"Wrap",
"the",
"function",
"in",
"a",
"function",
"that",
"if",
"the",
"grid",
"is",
"a",
"sub",
"-",
"grid",
"(",
"grids",
".",
"SubGrid",
")",
"rebins",
"the",
"computed",
"\\",
"values",
"to",
"the",
"sub",
"-",
"grids",
"corresponding",
"regular",
... | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/array/grids.py#L11-L58 | [
"def",
"sub_to_image_grid",
"(",
"func",
")",
":",
"@",
"wraps",
"(",
"func",
")",
"def",
"wrapper",
"(",
"grid",
",",
"galaxies",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"\"\"\"\n\n Parameters\n ----------\n grid : RegularGrid\n ... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | grid_interpolate | Decorate a profile method that accepts a coordinate grid and returns a data grid.
If an interpolator attribute is associated with the input grid then that interpolator is used to down sample the
coordinate grid prior to calling the function and up sample the result of the function.
If no interpolator attr... | autolens/data/array/grids.py | def grid_interpolate(func):
"""
Decorate a profile method that accepts a coordinate grid and returns a data grid.
If an interpolator attribute is associated with the input grid then that interpolator is used to down sample the
coordinate grid prior to calling the function and up sample the result of th... | def grid_interpolate(func):
"""
Decorate a profile method that accepts a coordinate grid and returns a data grid.
If an interpolator attribute is associated with the input grid then that interpolator is used to down sample the
coordinate grid prior to calling the function and up sample the result of th... | [
"Decorate",
"a",
"profile",
"method",
"that",
"accepts",
"a",
"coordinate",
"grid",
"and",
"returns",
"a",
"data",
"grid",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/array/grids.py#L1128-L1162 | [
"def",
"grid_interpolate",
"(",
"func",
")",
":",
"@",
"wraps",
"(",
"func",
")",
"def",
"wrapper",
"(",
"profile",
",",
"grid",
",",
"grid_radial_minimum",
"=",
"None",
",",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"if",
"hasattr",
"(",
"grid... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | GridStack.unmasked_blurred_image_from_psf_and_unmasked_image | For a padded grid-stack and psf, compute an unmasked blurred image from an unmasked unblurred image.
This relies on using the lens data's padded-grid, which is a grid of (y,x) coordinates which extends over the \
entire image as opposed to just the masked region.
Parameters
----------
... | autolens/data/array/grids.py | def unmasked_blurred_image_from_psf_and_unmasked_image(self, psf, unmasked_image_1d):
"""For a padded grid-stack and psf, compute an unmasked blurred image from an unmasked unblurred image.
This relies on using the lens data's padded-grid, which is a grid of (y,x) coordinates which extends over the \
... | def unmasked_blurred_image_from_psf_and_unmasked_image(self, psf, unmasked_image_1d):
"""For a padded grid-stack and psf, compute an unmasked blurred image from an unmasked unblurred image.
This relies on using the lens data's padded-grid, which is a grid of (y,x) coordinates which extends over the \
... | [
"For",
"a",
"padded",
"grid",
"-",
"stack",
"and",
"psf",
"compute",
"an",
"unmasked",
"blurred",
"image",
"from",
"an",
"unmasked",
"unblurred",
"image",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/array/grids.py#L104-L120 | [
"def",
"unmasked_blurred_image_from_psf_and_unmasked_image",
"(",
"self",
",",
"psf",
",",
"unmasked_image_1d",
")",
":",
"blurred_image_1d",
"=",
"self",
".",
"regular",
".",
"convolve_array_1d_with_psf",
"(",
"padded_array_1d",
"=",
"unmasked_image_1d",
",",
"psf",
"=... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | GridStack.grid_stack_from_mask_sub_grid_size_and_psf_shape | Setup a grid-stack of grid_stack from a mask, sub-grid size and psf-shape.
Parameters
-----------
mask : Mask
The mask whose unmasked pixels (*False*) are used to generate the grid-stack's grid_stack.
sub_grid_size : int
The size of a sub-pixel's sub-grid (sub_gr... | autolens/data/array/grids.py | def grid_stack_from_mask_sub_grid_size_and_psf_shape(cls, mask, sub_grid_size, psf_shape):
"""Setup a grid-stack of grid_stack from a mask, sub-grid size and psf-shape.
Parameters
-----------
mask : Mask
The mask whose unmasked pixels (*False*) are used to generate the grid-... | def grid_stack_from_mask_sub_grid_size_and_psf_shape(cls, mask, sub_grid_size, psf_shape):
"""Setup a grid-stack of grid_stack from a mask, sub-grid size and psf-shape.
Parameters
-----------
mask : Mask
The mask whose unmasked pixels (*False*) are used to generate the grid-... | [
"Setup",
"a",
"grid",
"-",
"stack",
"of",
"grid_stack",
"from",
"a",
"mask",
"sub",
"-",
"grid",
"size",
"and",
"psf",
"-",
"shape",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/array/grids.py#L123-L138 | [
"def",
"grid_stack_from_mask_sub_grid_size_and_psf_shape",
"(",
"cls",
",",
"mask",
",",
"sub_grid_size",
",",
"psf_shape",
")",
":",
"regular_grid",
"=",
"RegularGrid",
".",
"from_mask",
"(",
"mask",
")",
"sub_grid",
"=",
"SubGrid",
".",
"from_mask_and_sub_grid_size"... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | GridStack.from_shape_pixel_scale_and_sub_grid_size | Setup a grid-stack of grid_stack from a 2D array shape, a pixel scale and a sub-grid size.
This grid corresponds to a fully unmasked 2D array.
Parameters
-----------
shape : (int, int)
The 2D shape of the array, where all pixels are used to generate the grid-stack's... | autolens/data/array/grids.py | def from_shape_pixel_scale_and_sub_grid_size(cls, shape, pixel_scale, sub_grid_size=2):
"""Setup a grid-stack of grid_stack from a 2D array shape, a pixel scale and a sub-grid size.
This grid corresponds to a fully unmasked 2D array.
Parameters
-----------
shape : (int,... | def from_shape_pixel_scale_and_sub_grid_size(cls, shape, pixel_scale, sub_grid_size=2):
"""Setup a grid-stack of grid_stack from a 2D array shape, a pixel scale and a sub-grid size.
This grid corresponds to a fully unmasked 2D array.
Parameters
-----------
shape : (int,... | [
"Setup",
"a",
"grid",
"-",
"stack",
"of",
"grid_stack",
"from",
"a",
"2D",
"array",
"shape",
"a",
"pixel",
"scale",
"and",
"a",
"sub",
"-",
"grid",
"size",
".",
"This",
"grid",
"corresponds",
"to",
"a",
"fully",
"unmasked",
"2D",
"array",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/array/grids.py#L141-L159 | [
"def",
"from_shape_pixel_scale_and_sub_grid_size",
"(",
"cls",
",",
"shape",
",",
"pixel_scale",
",",
"sub_grid_size",
"=",
"2",
")",
":",
"regular_grid",
"=",
"RegularGrid",
".",
"from_shape_and_pixel_scale",
"(",
"shape",
"=",
"shape",
",",
"pixel_scale",
"=",
"... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | GridStack.padded_grid_stack_from_mask_sub_grid_size_and_psf_shape | Setup a grid-stack of masked grid_stack from a mask, sub-grid size and psf-shape.
Parameters
-----------
mask : Mask
The mask whose masked pixels the grid-stack are setup using.
sub_grid_size : int
The size of a sub-pixels sub-grid (sub_grid_size x sub_grid_size... | autolens/data/array/grids.py | def padded_grid_stack_from_mask_sub_grid_size_and_psf_shape(cls, mask, sub_grid_size, psf_shape):
"""Setup a grid-stack of masked grid_stack from a mask, sub-grid size and psf-shape.
Parameters
-----------
mask : Mask
The mask whose masked pixels the grid-stack are setup us... | def padded_grid_stack_from_mask_sub_grid_size_and_psf_shape(cls, mask, sub_grid_size, psf_shape):
"""Setup a grid-stack of masked grid_stack from a mask, sub-grid size and psf-shape.
Parameters
-----------
mask : Mask
The mask whose masked pixels the grid-stack are setup us... | [
"Setup",
"a",
"grid",
"-",
"stack",
"of",
"masked",
"grid_stack",
"from",
"a",
"mask",
"sub",
"-",
"grid",
"size",
"and",
"psf",
"-",
"shape",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/array/grids.py#L162-L183 | [
"def",
"padded_grid_stack_from_mask_sub_grid_size_and_psf_shape",
"(",
"cls",
",",
"mask",
",",
"sub_grid_size",
",",
"psf_shape",
")",
":",
"regular_padded_grid",
"=",
"PaddedRegularGrid",
".",
"padded_grid_from_shape_psf_shape_and_pixel_scale",
"(",
"shape",
"=",
"mask",
... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | GridStack.grid_stack_for_simulation | Setup a grid-stack of grid_stack for simulating an image of a strong lens, whereby the grid's use \
padded-grid_stack to ensure that the PSF blurring in the simulation routine (*ccd.PrepatoryImage.simulate*) \
is not degraded due to edge effects.
Parameters
-----------
shape : (... | autolens/data/array/grids.py | def grid_stack_for_simulation(cls, shape, pixel_scale, psf_shape, sub_grid_size=2):
"""Setup a grid-stack of grid_stack for simulating an image of a strong lens, whereby the grid's use \
padded-grid_stack to ensure that the PSF blurring in the simulation routine (*ccd.PrepatoryImage.simulate*) \
... | def grid_stack_for_simulation(cls, shape, pixel_scale, psf_shape, sub_grid_size=2):
"""Setup a grid-stack of grid_stack for simulating an image of a strong lens, whereby the grid's use \
padded-grid_stack to ensure that the PSF blurring in the simulation routine (*ccd.PrepatoryImage.simulate*) \
... | [
"Setup",
"a",
"grid",
"-",
"stack",
"of",
"grid_stack",
"for",
"simulating",
"an",
"image",
"of",
"a",
"strong",
"lens",
"whereby",
"the",
"grid",
"s",
"use",
"\\",
"padded",
"-",
"grid_stack",
"to",
"ensure",
"that",
"the",
"PSF",
"blurring",
"in",
"the... | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/array/grids.py#L186-L206 | [
"def",
"grid_stack_for_simulation",
"(",
"cls",
",",
"shape",
",",
"pixel_scale",
",",
"psf_shape",
",",
"sub_grid_size",
"=",
"2",
")",
":",
"return",
"cls",
".",
"padded_grid_stack_from_mask_sub_grid_size_and_psf_shape",
"(",
"mask",
"=",
"msk",
".",
"Mask",
"("... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | GridStack.new_grid_stack_with_pix_grid_added | Setup a grid-stack of grid_stack using an existing grid-stack.
The new grid-stack has the same grid_stack (regular, sub, blurring, etc.) as before, but adds a pix-grid as a \
new attribute.
Parameters
-----------
pix_grid : ndarray
The grid of (y,x) arc-seco... | autolens/data/array/grids.py | def new_grid_stack_with_pix_grid_added(self, pix_grid, regular_to_nearest_pix):
"""Setup a grid-stack of grid_stack using an existing grid-stack.
The new grid-stack has the same grid_stack (regular, sub, blurring, etc.) as before, but adds a pix-grid as a \
new attribute.
Param... | def new_grid_stack_with_pix_grid_added(self, pix_grid, regular_to_nearest_pix):
"""Setup a grid-stack of grid_stack using an existing grid-stack.
The new grid-stack has the same grid_stack (regular, sub, blurring, etc.) as before, but adds a pix-grid as a \
new attribute.
Param... | [
"Setup",
"a",
"grid",
"-",
"stack",
"of",
"grid_stack",
"using",
"an",
"existing",
"grid",
"-",
"stack",
".",
"The",
"new",
"grid",
"-",
"stack",
"has",
"the",
"same",
"grid_stack",
"(",
"regular",
"sub",
"blurring",
"etc",
".",
")",
"as",
"before",
"b... | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/array/grids.py#L220-L235 | [
"def",
"new_grid_stack_with_pix_grid_added",
"(",
"self",
",",
"pix_grid",
",",
"regular_to_nearest_pix",
")",
":",
"pix",
"=",
"PixGrid",
"(",
"arr",
"=",
"pix_grid",
",",
"regular_to_nearest_pix",
"=",
"regular_to_nearest_pix",
")",
"return",
"GridStack",
"(",
"re... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | GridStack.apply_function | Apply a function to all grid_stack in the grid-stack.
This is used by the *ray-tracing* module to easily apply tracing operations to all grid_stack. | autolens/data/array/grids.py | def apply_function(self, func):
"""Apply a function to all grid_stack in the grid-stack.
This is used by the *ray-tracing* module to easily apply tracing operations to all grid_stack."""
if self.blurring is not None and self.pix is not None:
return GridStack(func(self.regula... | def apply_function(self, func):
"""Apply a function to all grid_stack in the grid-stack.
This is used by the *ray-tracing* module to easily apply tracing operations to all grid_stack."""
if self.blurring is not None and self.pix is not None:
return GridStack(func(self.regula... | [
"Apply",
"a",
"function",
"to",
"all",
"grid_stack",
"in",
"the",
"grid",
"-",
"stack",
".",
"This",
"is",
"used",
"by",
"the",
"*",
"ray",
"-",
"tracing",
"*",
"module",
"to",
"easily",
"apply",
"tracing",
"operations",
"to",
"all",
"grid_stack",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/array/grids.py#L237-L248 | [
"def",
"apply_function",
"(",
"self",
",",
"func",
")",
":",
"if",
"self",
".",
"blurring",
"is",
"not",
"None",
"and",
"self",
".",
"pix",
"is",
"not",
"None",
":",
"return",
"GridStack",
"(",
"func",
"(",
"self",
".",
"regular",
")",
",",
"func",
... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | GridStack.map_function | Map a function to all grid_stack in a grid-stack | autolens/data/array/grids.py | def map_function(self, func, *arg_lists):
"""Map a function to all grid_stack in a grid-stack"""
return GridStack(*[func(*args) for args in zip(self, *arg_lists)]) | def map_function(self, func, *arg_lists):
"""Map a function to all grid_stack in a grid-stack"""
return GridStack(*[func(*args) for args in zip(self, *arg_lists)]) | [
"Map",
"a",
"function",
"to",
"all",
"grid_stack",
"in",
"a",
"grid",
"-",
"stack"
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/array/grids.py#L250-L252 | [
"def",
"map_function",
"(",
"self",
",",
"func",
",",
"*",
"arg_lists",
")",
":",
"return",
"GridStack",
"(",
"*",
"[",
"func",
"(",
"*",
"args",
")",
"for",
"args",
"in",
"zip",
"(",
"self",
",",
"*",
"arg_lists",
")",
"]",
")"
] | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | RegularGrid.convolve_array_1d_with_psf | Convolve a 1d padded array of values (e.g. intensities before PSF blurring) with a PSF, and then trim \
the convolved array to its original 2D shape.
Parameters
-----------
padded_array_1d: ndarray
A 1D array of values which were computed using the *PaddedRegularGrid*.
... | autolens/data/array/grids.py | def convolve_array_1d_with_psf(self, padded_array_1d, psf):
"""Convolve a 1d padded array of values (e.g. intensities before PSF blurring) with a PSF, and then trim \
the convolved array to its original 2D shape.
Parameters
-----------
padded_array_1d: ndarray
A 1D a... | def convolve_array_1d_with_psf(self, padded_array_1d, psf):
"""Convolve a 1d padded array of values (e.g. intensities before PSF blurring) with a PSF, and then trim \
the convolved array to its original 2D shape.
Parameters
-----------
padded_array_1d: ndarray
A 1D a... | [
"Convolve",
"a",
"1d",
"padded",
"array",
"of",
"values",
"(",
"e",
".",
"g",
".",
"intensities",
"before",
"PSF",
"blurring",
")",
"with",
"a",
"PSF",
"and",
"then",
"trim",
"\\",
"the",
"convolved",
"array",
"to",
"its",
"original",
"2D",
"shape",
".... | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/array/grids.py#L339-L355 | [
"def",
"convolve_array_1d_with_psf",
"(",
"self",
",",
"padded_array_1d",
",",
"psf",
")",
":",
"padded_array_2d",
"=",
"mapping_util",
".",
"map_unmasked_1d_array_to_2d_array_from_array_1d_and_shape",
"(",
"array_1d",
"=",
"padded_array_1d",
",",
"shape",
"=",
"self",
... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | RegularGrid.from_mask | Setup a regular-grid from a mask, wehere the center of every unmasked pixel gives the grid's (y,x) \
arc-second coordinates.
Parameters
-----------
mask : Mask
The mask whose unmasked pixels are used to setup the regular-pixel grid. | autolens/data/array/grids.py | def from_mask(cls, mask):
"""Setup a regular-grid from a mask, wehere the center of every unmasked pixel gives the grid's (y,x) \
arc-second coordinates.
Parameters
-----------
mask : Mask
The mask whose unmasked pixels are used to setup the regular-pixel grid.
... | def from_mask(cls, mask):
"""Setup a regular-grid from a mask, wehere the center of every unmasked pixel gives the grid's (y,x) \
arc-second coordinates.
Parameters
-----------
mask : Mask
The mask whose unmasked pixels are used to setup the regular-pixel grid.
... | [
"Setup",
"a",
"regular",
"-",
"grid",
"from",
"a",
"mask",
"wehere",
"the",
"center",
"of",
"every",
"unmasked",
"pixel",
"gives",
"the",
"grid",
"s",
"(",
"y",
"x",
")",
"\\",
"arc",
"-",
"second",
"coordinates",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/array/grids.py#L358-L369 | [
"def",
"from_mask",
"(",
"cls",
",",
"mask",
")",
":",
"array",
"=",
"grid_util",
".",
"regular_grid_1d_masked_from_mask_pixel_scales_and_origin",
"(",
"mask",
"=",
"mask",
",",
"pixel_scales",
"=",
"mask",
".",
"pixel_scales",
")",
"return",
"cls",
"(",
"array"... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | RegularGrid.from_shape_and_pixel_scale | Setup a regular-grid from a 2D array shape and pixel scale. Here, the center of every pixel on the 2D \
array gives the grid's (y,x) arc-second coordinates.
This is equivalent to using a 2D mask consisting entirely of unmasked pixels.
Parameters
-----------
shape : (i... | autolens/data/array/grids.py | def from_shape_and_pixel_scale(cls, shape, pixel_scale):
"""Setup a regular-grid from a 2D array shape and pixel scale. Here, the center of every pixel on the 2D \
array gives the grid's (y,x) arc-second coordinates.
This is equivalent to using a 2D mask consisting entirely of unmaske... | def from_shape_and_pixel_scale(cls, shape, pixel_scale):
"""Setup a regular-grid from a 2D array shape and pixel scale. Here, the center of every pixel on the 2D \
array gives the grid's (y,x) arc-second coordinates.
This is equivalent to using a 2D mask consisting entirely of unmaske... | [
"Setup",
"a",
"regular",
"-",
"grid",
"from",
"a",
"2D",
"array",
"shape",
"and",
"pixel",
"scale",
".",
"Here",
"the",
"center",
"of",
"every",
"pixel",
"on",
"the",
"2D",
"\\",
"array",
"gives",
"the",
"grid",
"s",
"(",
"y",
"x",
")",
"arc",
"-",... | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/array/grids.py#L372-L388 | [
"def",
"from_shape_and_pixel_scale",
"(",
"cls",
",",
"shape",
",",
"pixel_scale",
")",
":",
"mask",
"=",
"msk",
".",
"Mask",
".",
"unmasked_for_shape_and_pixel_scale",
"(",
"shape",
"=",
"shape",
",",
"pixel_scale",
"=",
"pixel_scale",
")",
"array",
"=",
"gri... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | RegularGrid.blurring_grid_from_mask_and_psf_shape | Setup a blurring-grid from a mask, where a blurring grid consists of all pixels that are masked, but they \
are close enough to the unmasked pixels that a fraction of their light will be blurred into those pixels \
via PSF convolution. For example, if our mask is as follows:
|x|x|x|x|x|... | autolens/data/array/grids.py | def blurring_grid_from_mask_and_psf_shape(cls, mask, psf_shape):
"""Setup a blurring-grid from a mask, where a blurring grid consists of all pixels that are masked, but they \
are close enough to the unmasked pixels that a fraction of their light will be blurred into those pixels \
via PSF convo... | def blurring_grid_from_mask_and_psf_shape(cls, mask, psf_shape):
"""Setup a blurring-grid from a mask, where a blurring grid consists of all pixels that are masked, but they \
are close enough to the unmasked pixels that a fraction of their light will be blurred into those pixels \
via PSF convo... | [
"Setup",
"a",
"blurring",
"-",
"grid",
"from",
"a",
"mask",
"where",
"a",
"blurring",
"grid",
"consists",
"of",
"all",
"pixels",
"that",
"are",
"masked",
"but",
"they",
"\\",
"are",
"close",
"enough",
"to",
"the",
"unmasked",
"pixels",
"that",
"a",
"frac... | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/array/grids.py#L391-L450 | [
"def",
"blurring_grid_from_mask_and_psf_shape",
"(",
"cls",
",",
"mask",
",",
"psf_shape",
")",
":",
"blurring_mask",
"=",
"mask",
".",
"blurring_mask_for_psf_shape",
"(",
"psf_shape",
")",
"return",
"RegularGrid",
".",
"from_mask",
"(",
"blurring_mask",
")"
] | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | RegularGrid.array_2d_from_array_1d | Map a 1D array the same dimension as the grid to its original masked 2D array.
Parameters
-----------
array_1d : ndarray
The 1D array which is mapped to its masked 2D array. | autolens/data/array/grids.py | def array_2d_from_array_1d(self, array_1d):
""" Map a 1D array the same dimension as the grid to its original masked 2D array.
Parameters
-----------
array_1d : ndarray
The 1D array which is mapped to its masked 2D array.
"""
return mapping_util.map_masked_1d... | def array_2d_from_array_1d(self, array_1d):
""" Map a 1D array the same dimension as the grid to its original masked 2D array.
Parameters
-----------
array_1d : ndarray
The 1D array which is mapped to its masked 2D array.
"""
return mapping_util.map_masked_1d... | [
"Map",
"a",
"1D",
"array",
"the",
"same",
"dimension",
"as",
"the",
"grid",
"to",
"its",
"original",
"masked",
"2D",
"array",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/array/grids.py#L460-L469 | [
"def",
"array_2d_from_array_1d",
"(",
"self",
",",
"array_1d",
")",
":",
"return",
"mapping_util",
".",
"map_masked_1d_array_to_2d_array_from_array_1d_shape_and_one_to_two",
"(",
"array_1d",
"=",
"array_1d",
",",
"shape",
"=",
"self",
".",
"mask",
".",
"shape",
",",
... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | RegularGrid.scaled_array_2d_from_array_1d | Map a 1D array the same dimension as the grid to its original masked 2D array and return it as a scaled \
array.
Parameters
-----------
array_1d : ndarray
The 1D array of which is mapped to a 2D scaled array. | autolens/data/array/grids.py | def scaled_array_2d_from_array_1d(self, array_1d):
""" Map a 1D array the same dimension as the grid to its original masked 2D array and return it as a scaled \
array.
Parameters
-----------
array_1d : ndarray
The 1D array of which is mapped to a 2D scaled array.
... | def scaled_array_2d_from_array_1d(self, array_1d):
""" Map a 1D array the same dimension as the grid to its original masked 2D array and return it as a scaled \
array.
Parameters
-----------
array_1d : ndarray
The 1D array of which is mapped to a 2D scaled array.
... | [
"Map",
"a",
"1D",
"array",
"the",
"same",
"dimension",
"as",
"the",
"grid",
"to",
"its",
"original",
"masked",
"2D",
"array",
"and",
"return",
"it",
"as",
"a",
"scaled",
"\\",
"array",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/array/grids.py#L471-L482 | [
"def",
"scaled_array_2d_from_array_1d",
"(",
"self",
",",
"array_1d",
")",
":",
"return",
"scaled_array",
".",
"ScaledSquarePixelArray",
"(",
"array",
"=",
"self",
".",
"array_2d_from_array_1d",
"(",
"array_1d",
")",
",",
"pixel_scale",
"=",
"self",
".",
"mask",
... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | RegularGrid.yticks | Compute the yticks labels of this grid, used for plotting the y-axis ticks when visualizing a regular | autolens/data/array/grids.py | def yticks(self):
"""Compute the yticks labels of this grid, used for plotting the y-axis ticks when visualizing a regular"""
return np.linspace(np.min(self[:, 0]), np.max(self[:, 0]), 4) | def yticks(self):
"""Compute the yticks labels of this grid, used for plotting the y-axis ticks when visualizing a regular"""
return np.linspace(np.min(self[:, 0]), np.max(self[:, 0]), 4) | [
"Compute",
"the",
"yticks",
"labels",
"of",
"this",
"grid",
"used",
"for",
"plotting",
"the",
"y",
"-",
"axis",
"ticks",
"when",
"visualizing",
"a",
"regular"
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/array/grids.py#L511-L513 | [
"def",
"yticks",
"(",
"self",
")",
":",
"return",
"np",
".",
"linspace",
"(",
"np",
".",
"min",
"(",
"self",
"[",
":",
",",
"0",
"]",
")",
",",
"np",
".",
"max",
"(",
"self",
"[",
":",
",",
"0",
"]",
")",
",",
"4",
")"
] | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | RegularGrid.xticks | Compute the xticks labels of this grid, used for plotting the x-axis ticks when visualizing a regular | autolens/data/array/grids.py | def xticks(self):
"""Compute the xticks labels of this grid, used for plotting the x-axis ticks when visualizing a regular"""
return np.linspace(np.min(self[:, 1]), np.max(self[:, 1]), 4) | def xticks(self):
"""Compute the xticks labels of this grid, used for plotting the x-axis ticks when visualizing a regular"""
return np.linspace(np.min(self[:, 1]), np.max(self[:, 1]), 4) | [
"Compute",
"the",
"xticks",
"labels",
"of",
"this",
"grid",
"used",
"for",
"plotting",
"the",
"x",
"-",
"axis",
"ticks",
"when",
"visualizing",
"a",
"regular"
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/array/grids.py#L516-L518 | [
"def",
"xticks",
"(",
"self",
")",
":",
"return",
"np",
".",
"linspace",
"(",
"np",
".",
"min",
"(",
"self",
"[",
":",
",",
"1",
"]",
")",
",",
"np",
".",
"max",
"(",
"self",
"[",
":",
",",
"1",
"]",
")",
",",
"4",
")"
] | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | SubGrid.from_mask_and_sub_grid_size | Setup a sub-grid of the unmasked pixels, using a mask and a specified sub-grid size. The center of \
every unmasked pixel's sub-pixels give the grid's (y,x) arc-second coordinates.
Parameters
-----------
mask : Mask
The mask whose masked pixels are used to setup the sub-pixe... | autolens/data/array/grids.py | def from_mask_and_sub_grid_size(cls, mask, sub_grid_size=1):
"""Setup a sub-grid of the unmasked pixels, using a mask and a specified sub-grid size. The center of \
every unmasked pixel's sub-pixels give the grid's (y,x) arc-second coordinates.
Parameters
-----------
mask : Mask... | def from_mask_and_sub_grid_size(cls, mask, sub_grid_size=1):
"""Setup a sub-grid of the unmasked pixels, using a mask and a specified sub-grid size. The center of \
every unmasked pixel's sub-pixels give the grid's (y,x) arc-second coordinates.
Parameters
-----------
mask : Mask... | [
"Setup",
"a",
"sub",
"-",
"grid",
"of",
"the",
"unmasked",
"pixels",
"using",
"a",
"mask",
"and",
"a",
"specified",
"sub",
"-",
"grid",
"size",
".",
"The",
"center",
"of",
"\\",
"every",
"unmasked",
"pixel",
"s",
"sub",
"-",
"pixels",
"give",
"the",
... | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/array/grids.py#L614-L629 | [
"def",
"from_mask_and_sub_grid_size",
"(",
"cls",
",",
"mask",
",",
"sub_grid_size",
"=",
"1",
")",
":",
"sub_grid_masked",
"=",
"grid_util",
".",
"sub_grid_1d_masked_from_mask_pixel_scales_and_sub_grid_size",
"(",
"mask",
"=",
"mask",
",",
"pixel_scales",
"=",
"mask"... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | SubGrid.from_shape_pixel_scale_and_sub_grid_size | Setup a sub-grid from a 2D array shape and pixel scale. Here, the center of every pixel on the 2D \
array gives the grid's (y,x) arc-second coordinates, where each pixel has sub-pixels specified by the \
sub-grid size.
This is equivalent to using a 2D mask consisting entirely of unmasked pixels... | autolens/data/array/grids.py | def from_shape_pixel_scale_and_sub_grid_size(cls, shape, pixel_scale, sub_grid_size):
"""Setup a sub-grid from a 2D array shape and pixel scale. Here, the center of every pixel on the 2D \
array gives the grid's (y,x) arc-second coordinates, where each pixel has sub-pixels specified by the \
sub... | def from_shape_pixel_scale_and_sub_grid_size(cls, shape, pixel_scale, sub_grid_size):
"""Setup a sub-grid from a 2D array shape and pixel scale. Here, the center of every pixel on the 2D \
array gives the grid's (y,x) arc-second coordinates, where each pixel has sub-pixels specified by the \
sub... | [
"Setup",
"a",
"sub",
"-",
"grid",
"from",
"a",
"2D",
"array",
"shape",
"and",
"pixel",
"scale",
".",
"Here",
"the",
"center",
"of",
"every",
"pixel",
"on",
"the",
"2D",
"\\",
"array",
"gives",
"the",
"grid",
"s",
"(",
"y",
"x",
")",
"arc",
"-",
"... | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/array/grids.py#L632-L652 | [
"def",
"from_shape_pixel_scale_and_sub_grid_size",
"(",
"cls",
",",
"shape",
",",
"pixel_scale",
",",
"sub_grid_size",
")",
":",
"mask",
"=",
"msk",
".",
"Mask",
".",
"unmasked_for_shape_and_pixel_scale",
"(",
"shape",
"=",
"shape",
",",
"pixel_scale",
"=",
"pixel... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | SubGrid.sub_array_2d_from_sub_array_1d | Map a 1D sub-array the same dimension as the sub-grid (e.g. including sub-pixels) to its original masked
2D sub array.
Parameters
-----------
sub_array_1d : ndarray
The 1D sub_array which is mapped to its masked 2D sub-array. | autolens/data/array/grids.py | def sub_array_2d_from_sub_array_1d(self, sub_array_1d):
""" Map a 1D sub-array the same dimension as the sub-grid (e.g. including sub-pixels) to its original masked
2D sub array.
Parameters
-----------
sub_array_1d : ndarray
The 1D sub_array which is mapped to its ma... | def sub_array_2d_from_sub_array_1d(self, sub_array_1d):
""" Map a 1D sub-array the same dimension as the sub-grid (e.g. including sub-pixels) to its original masked
2D sub array.
Parameters
-----------
sub_array_1d : ndarray
The 1D sub_array which is mapped to its ma... | [
"Map",
"a",
"1D",
"sub",
"-",
"array",
"the",
"same",
"dimension",
"as",
"the",
"sub",
"-",
"grid",
"(",
"e",
".",
"g",
".",
"including",
"sub",
"-",
"pixels",
")",
"to",
"its",
"original",
"masked",
"2D",
"sub",
"array",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/array/grids.py#L654-L666 | [
"def",
"sub_array_2d_from_sub_array_1d",
"(",
"self",
",",
"sub_array_1d",
")",
":",
"sub_shape",
"=",
"(",
"self",
".",
"mask",
".",
"shape",
"[",
"0",
"]",
"*",
"self",
".",
"sub_grid_size",
",",
"self",
".",
"mask",
".",
"shape",
"[",
"1",
"]",
"*",... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | SubGrid.scaled_array_2d_with_sub_dimensions_from_sub_array_1d | Map a 1D sub-array the same dimension as the sub-grid to its original masked 2D sub-array and return it as
a scaled array.
Parameters
-----------
sub_array_1d : ndarray
The 1D sub-array of which is mapped to a 2D scaled sub-array the dimensions. | autolens/data/array/grids.py | def scaled_array_2d_with_sub_dimensions_from_sub_array_1d(self, sub_array_1d):
""" Map a 1D sub-array the same dimension as the sub-grid to its original masked 2D sub-array and return it as
a scaled array.
Parameters
-----------
sub_array_1d : ndarray
The 1D sub-arra... | def scaled_array_2d_with_sub_dimensions_from_sub_array_1d(self, sub_array_1d):
""" Map a 1D sub-array the same dimension as the sub-grid to its original masked 2D sub-array and return it as
a scaled array.
Parameters
-----------
sub_array_1d : ndarray
The 1D sub-arra... | [
"Map",
"a",
"1D",
"sub",
"-",
"array",
"the",
"same",
"dimension",
"as",
"the",
"sub",
"-",
"grid",
"to",
"its",
"original",
"masked",
"2D",
"sub",
"-",
"array",
"and",
"return",
"it",
"as",
"a",
"scaled",
"array",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/array/grids.py#L668-L679 | [
"def",
"scaled_array_2d_with_sub_dimensions_from_sub_array_1d",
"(",
"self",
",",
"sub_array_1d",
")",
":",
"return",
"scaled_array",
".",
"ScaledSquarePixelArray",
"(",
"array",
"=",
"self",
".",
"sub_array_2d_from_sub_array_1d",
"(",
"sub_array_1d",
"=",
"sub_array_1d",
... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | SubGrid.scaled_array_2d_with_regular_dimensions_from_binned_up_sub_array_1d | Map a 1D sub-array the same dimension as the sub-grid to its original masked 2D sub-array and return it as
a scaled array.
Parameters
-----------
sub_array_1d : ndarray
The 1D sub-array of which is mapped to a 2D scaled sub-array the dimensions. | autolens/data/array/grids.py | def scaled_array_2d_with_regular_dimensions_from_binned_up_sub_array_1d(self, sub_array_1d):
""" Map a 1D sub-array the same dimension as the sub-grid to its original masked 2D sub-array and return it as
a scaled array.
Parameters
-----------
sub_array_1d : ndarray
T... | def scaled_array_2d_with_regular_dimensions_from_binned_up_sub_array_1d(self, sub_array_1d):
""" Map a 1D sub-array the same dimension as the sub-grid to its original masked 2D sub-array and return it as
a scaled array.
Parameters
-----------
sub_array_1d : ndarray
T... | [
"Map",
"a",
"1D",
"sub",
"-",
"array",
"the",
"same",
"dimension",
"as",
"the",
"sub",
"-",
"grid",
"to",
"its",
"original",
"masked",
"2D",
"sub",
"-",
"array",
"and",
"return",
"it",
"as",
"a",
"scaled",
"array",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/array/grids.py#L681-L693 | [
"def",
"scaled_array_2d_with_regular_dimensions_from_binned_up_sub_array_1d",
"(",
"self",
",",
"sub_array_1d",
")",
":",
"array_1d",
"=",
"self",
".",
"regular_data_1d_from_sub_data_1d",
"(",
"sub_array_1d",
"=",
"sub_array_1d",
")",
"return",
"scaled_array",
".",
"ScaledS... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | SubGrid.regular_data_1d_from_sub_data_1d | For an input sub-gridded array, map its hyper-values from the sub-gridded values to a 1D regular grid of \
values by summing each set of each set of sub-pixels values and dividing by the total number of sub-pixels.
Parameters
-----------
sub_array_1d : ndarray
A 1D sub-gridd... | autolens/data/array/grids.py | def regular_data_1d_from_sub_data_1d(self, sub_array_1d):
"""For an input sub-gridded array, map its hyper-values from the sub-gridded values to a 1D regular grid of \
values by summing each set of each set of sub-pixels values and dividing by the total number of sub-pixels.
Parameters
... | def regular_data_1d_from_sub_data_1d(self, sub_array_1d):
"""For an input sub-gridded array, map its hyper-values from the sub-gridded values to a 1D regular grid of \
values by summing each set of each set of sub-pixels values and dividing by the total number of sub-pixels.
Parameters
... | [
"For",
"an",
"input",
"sub",
"-",
"gridded",
"array",
"map",
"its",
"hyper",
"-",
"values",
"from",
"the",
"sub",
"-",
"gridded",
"values",
"to",
"a",
"1D",
"regular",
"grid",
"of",
"\\",
"values",
"by",
"summing",
"each",
"set",
"of",
"each",
"set",
... | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/array/grids.py#L703-L713 | [
"def",
"regular_data_1d_from_sub_data_1d",
"(",
"self",
",",
"sub_array_1d",
")",
":",
"return",
"np",
".",
"multiply",
"(",
"self",
".",
"sub_grid_fraction",
",",
"sub_array_1d",
".",
"reshape",
"(",
"-",
"1",
",",
"self",
".",
"sub_grid_length",
")",
".",
... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | SparseToRegularGrid.unmasked_sparse_to_sparse | The 1D index mappings between the unmasked sparse-grid and masked sparse grid. | autolens/data/array/grids.py | def unmasked_sparse_to_sparse(self):
"""The 1D index mappings between the unmasked sparse-grid and masked sparse grid."""
return mapping_util.unmasked_sparse_to_sparse_from_mask_and_pixel_centres(
mask=self.regular_grid.mask,
unmasked_sparse_grid_pixel_centres=self.unmasked_spar... | def unmasked_sparse_to_sparse(self):
"""The 1D index mappings between the unmasked sparse-grid and masked sparse grid."""
return mapping_util.unmasked_sparse_to_sparse_from_mask_and_pixel_centres(
mask=self.regular_grid.mask,
unmasked_sparse_grid_pixel_centres=self.unmasked_spar... | [
"The",
"1D",
"index",
"mappings",
"between",
"the",
"unmasked",
"sparse",
"-",
"grid",
"and",
"masked",
"sparse",
"grid",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/array/grids.py#L811-L818 | [
"def",
"unmasked_sparse_to_sparse",
"(",
"self",
")",
":",
"return",
"mapping_util",
".",
"unmasked_sparse_to_sparse_from_mask_and_pixel_centres",
"(",
"mask",
"=",
"self",
".",
"regular_grid",
".",
"mask",
",",
"unmasked_sparse_grid_pixel_centres",
"=",
"self",
".",
"u... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | SparseToRegularGrid.sparse_to_unmasked_sparse | The 1D index mappings between the masked sparse-grid and unmasked sparse grid. | autolens/data/array/grids.py | def sparse_to_unmasked_sparse(self):
"""The 1D index mappings between the masked sparse-grid and unmasked sparse grid."""
return mapping_util.sparse_to_unmasked_sparse_from_mask_and_pixel_centres(
total_sparse_pixels=self.total_sparse_pixels, mask=self.regular_grid.mask,
unmasked... | def sparse_to_unmasked_sparse(self):
"""The 1D index mappings between the masked sparse-grid and unmasked sparse grid."""
return mapping_util.sparse_to_unmasked_sparse_from_mask_and_pixel_centres(
total_sparse_pixels=self.total_sparse_pixels, mask=self.regular_grid.mask,
unmasked... | [
"The",
"1D",
"index",
"mappings",
"between",
"the",
"masked",
"sparse",
"-",
"grid",
"and",
"unmasked",
"sparse",
"grid",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/array/grids.py#L821-L825 | [
"def",
"sparse_to_unmasked_sparse",
"(",
"self",
")",
":",
"return",
"mapping_util",
".",
"sparse_to_unmasked_sparse_from_mask_and_pixel_centres",
"(",
"total_sparse_pixels",
"=",
"self",
".",
"total_sparse_pixels",
",",
"mask",
"=",
"self",
".",
"regular_grid",
".",
"m... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | SparseToRegularGrid.regular_to_sparse | The 1D index mappings between the regular-grid and masked sparse-grid. | autolens/data/array/grids.py | def regular_to_sparse(self):
"""The 1D index mappings between the regular-grid and masked sparse-grid."""
return mapping_util.regular_to_sparse_from_sparse_mappings(
regular_to_unmasked_sparse=self.regular_to_unmasked_sparse,
unmasked_sparse_to_sparse=self.unmasked_sparse_to_spa... | def regular_to_sparse(self):
"""The 1D index mappings between the regular-grid and masked sparse-grid."""
return mapping_util.regular_to_sparse_from_sparse_mappings(
regular_to_unmasked_sparse=self.regular_to_unmasked_sparse,
unmasked_sparse_to_sparse=self.unmasked_sparse_to_spa... | [
"The",
"1D",
"index",
"mappings",
"between",
"the",
"regular",
"-",
"grid",
"and",
"masked",
"sparse",
"-",
"grid",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/array/grids.py#L833-L838 | [
"def",
"regular_to_sparse",
"(",
"self",
")",
":",
"return",
"mapping_util",
".",
"regular_to_sparse_from_sparse_mappings",
"(",
"regular_to_unmasked_sparse",
"=",
"self",
".",
"regular_to_unmasked_sparse",
",",
"unmasked_sparse_to_sparse",
"=",
"self",
".",
"unmasked_spars... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | SparseToRegularGrid.sparse_grid | The (y,x) arc-second coordinates of the masked sparse-grid. | autolens/data/array/grids.py | def sparse_grid(self):
"""The (y,x) arc-second coordinates of the masked sparse-grid."""
return mapping_util.sparse_grid_from_unmasked_sparse_grid(
unmasked_sparse_grid=self.unmasked_sparse_grid,
sparse_to_unmasked_sparse=self.sparse_to_unmasked_sparse) | def sparse_grid(self):
"""The (y,x) arc-second coordinates of the masked sparse-grid."""
return mapping_util.sparse_grid_from_unmasked_sparse_grid(
unmasked_sparse_grid=self.unmasked_sparse_grid,
sparse_to_unmasked_sparse=self.sparse_to_unmasked_sparse) | [
"The",
"(",
"y",
"x",
")",
"arc",
"-",
"second",
"coordinates",
"of",
"the",
"masked",
"sparse",
"-",
"grid",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/array/grids.py#L841-L845 | [
"def",
"sparse_grid",
"(",
"self",
")",
":",
"return",
"mapping_util",
".",
"sparse_grid_from_unmasked_sparse_grid",
"(",
"unmasked_sparse_grid",
"=",
"self",
".",
"unmasked_sparse_grid",
",",
"sparse_to_unmasked_sparse",
"=",
"self",
".",
"sparse_to_unmasked_sparse",
")"... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | PaddedRegularGrid.padded_grid_from_shape_psf_shape_and_pixel_scale | Setup a regular padded grid from a 2D array shape, psf-shape and pixel-scale.
The center of every pixel is used to setup the grid's (y,x) arc-second coordinates, including padded pixels \
which are beyond the input shape but will blurred light into the 2D array's shape due to the psf.
Paramete... | autolens/data/array/grids.py | def padded_grid_from_shape_psf_shape_and_pixel_scale(cls, shape, psf_shape, pixel_scale):
"""Setup a regular padded grid from a 2D array shape, psf-shape and pixel-scale.
The center of every pixel is used to setup the grid's (y,x) arc-second coordinates, including padded pixels \
which are beyo... | def padded_grid_from_shape_psf_shape_and_pixel_scale(cls, shape, psf_shape, pixel_scale):
"""Setup a regular padded grid from a 2D array shape, psf-shape and pixel-scale.
The center of every pixel is used to setup the grid's (y,x) arc-second coordinates, including padded pixels \
which are beyo... | [
"Setup",
"a",
"regular",
"padded",
"grid",
"from",
"a",
"2D",
"array",
"shape",
"psf",
"-",
"shape",
"and",
"pixel",
"-",
"scale",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/array/grids.py#L873-L892 | [
"def",
"padded_grid_from_shape_psf_shape_and_pixel_scale",
"(",
"cls",
",",
"shape",
",",
"psf_shape",
",",
"pixel_scale",
")",
":",
"padded_shape",
"=",
"(",
"shape",
"[",
"0",
"]",
"+",
"psf_shape",
"[",
"0",
"]",
"-",
"1",
",",
"shape",
"[",
"1",
"]",
... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | PaddedRegularGrid.padded_blurred_image_2d_from_padded_image_1d_and_psf | Compute a 2D padded blurred image from a 1D padded image.
Parameters
----------
padded_image_1d : ndarray
A 1D unmasked image which is blurred with the PSF.
psf : ndarray
An array describing the PSF kernel of the image. | autolens/data/array/grids.py | def padded_blurred_image_2d_from_padded_image_1d_and_psf(self, padded_image_1d, psf):
"""Compute a 2D padded blurred image from a 1D padded image.
Parameters
----------
padded_image_1d : ndarray
A 1D unmasked image which is blurred with the PSF.
psf : ndarray
... | def padded_blurred_image_2d_from_padded_image_1d_and_psf(self, padded_image_1d, psf):
"""Compute a 2D padded blurred image from a 1D padded image.
Parameters
----------
padded_image_1d : ndarray
A 1D unmasked image which is blurred with the PSF.
psf : ndarray
... | [
"Compute",
"a",
"2D",
"padded",
"blurred",
"image",
"from",
"a",
"1D",
"padded",
"image",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/array/grids.py#L894-L905 | [
"def",
"padded_blurred_image_2d_from_padded_image_1d_and_psf",
"(",
"self",
",",
"padded_image_1d",
",",
"psf",
")",
":",
"padded_model_image_1d",
"=",
"self",
".",
"convolve_array_1d_with_psf",
"(",
"padded_array_1d",
"=",
"padded_image_1d",
",",
"psf",
"=",
"psf",
")"... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | PaddedRegularGrid.array_2d_from_array_1d | Map a padded 1D array of values to its original 2D array, trimming all edge values.
Parameters
-----------
padded_array_1d : ndarray
A 1D array of values which were computed using the *PaddedRegularGrid*. | autolens/data/array/grids.py | def array_2d_from_array_1d(self, padded_array_1d):
""" Map a padded 1D array of values to its original 2D array, trimming all edge values.
Parameters
-----------
padded_array_1d : ndarray
A 1D array of values which were computed using the *PaddedRegularGrid*.
"""
... | def array_2d_from_array_1d(self, padded_array_1d):
""" Map a padded 1D array of values to its original 2D array, trimming all edge values.
Parameters
-----------
padded_array_1d : ndarray
A 1D array of values which were computed using the *PaddedRegularGrid*.
"""
... | [
"Map",
"a",
"padded",
"1D",
"array",
"of",
"values",
"to",
"its",
"original",
"2D",
"array",
"trimming",
"all",
"edge",
"values",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/array/grids.py#L907-L919 | [
"def",
"array_2d_from_array_1d",
"(",
"self",
",",
"padded_array_1d",
")",
":",
"padded_array_2d",
"=",
"self",
".",
"map_to_2d_keep_padded",
"(",
"padded_array_1d",
")",
"pad_size_0",
"=",
"self",
".",
"mask",
".",
"shape",
"[",
"0",
"]",
"-",
"self",
".",
... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | PaddedRegularGrid.map_to_2d_keep_padded | Map a padded 1D array of values to its padded 2D array.
Parameters
-----------
padded_array_1d : ndarray
A 1D array of values which were computed using the *PaddedRegularGrid*. | autolens/data/array/grids.py | def map_to_2d_keep_padded(self, padded_array_1d):
""" Map a padded 1D array of values to its padded 2D array.
Parameters
-----------
padded_array_1d : ndarray
A 1D array of values which were computed using the *PaddedRegularGrid*.
"""
return mapping_util.map_... | def map_to_2d_keep_padded(self, padded_array_1d):
""" Map a padded 1D array of values to its padded 2D array.
Parameters
-----------
padded_array_1d : ndarray
A 1D array of values which were computed using the *PaddedRegularGrid*.
"""
return mapping_util.map_... | [
"Map",
"a",
"padded",
"1D",
"array",
"of",
"values",
"to",
"its",
"padded",
"2D",
"array",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/array/grids.py#L921-L930 | [
"def",
"map_to_2d_keep_padded",
"(",
"self",
",",
"padded_array_1d",
")",
":",
"return",
"mapping_util",
".",
"map_unmasked_1d_array_to_2d_array_from_array_1d_and_shape",
"(",
"array_1d",
"=",
"padded_array_1d",
",",
"shape",
"=",
"self",
".",
"mask",
".",
"shape",
")... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | PaddedSubGrid.padded_grid_from_mask_sub_grid_size_and_psf_shape | Setup an *PaddedSubGrid* for an input mask, sub-grid size and psf-shape.
The center of every sub-pixel is used to setup the grid's (y,x) arc-second coordinates, including \
masked-pixels which are beyond the input shape but will have light blurred into them given the psf-shape.
Parameters
... | autolens/data/array/grids.py | def padded_grid_from_mask_sub_grid_size_and_psf_shape(cls, mask, sub_grid_size, psf_shape):
"""Setup an *PaddedSubGrid* for an input mask, sub-grid size and psf-shape.
The center of every sub-pixel is used to setup the grid's (y,x) arc-second coordinates, including \
masked-pixels which are bey... | def padded_grid_from_mask_sub_grid_size_and_psf_shape(cls, mask, sub_grid_size, psf_shape):
"""Setup an *PaddedSubGrid* for an input mask, sub-grid size and psf-shape.
The center of every sub-pixel is used to setup the grid's (y,x) arc-second coordinates, including \
masked-pixels which are bey... | [
"Setup",
"an",
"*",
"PaddedSubGrid",
"*",
"for",
"an",
"input",
"mask",
"sub",
"-",
"grid",
"size",
"and",
"psf",
"-",
"shape",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/array/grids.py#L953-L977 | [
"def",
"padded_grid_from_mask_sub_grid_size_and_psf_shape",
"(",
"cls",
",",
"mask",
",",
"sub_grid_size",
",",
"psf_shape",
")",
":",
"padded_shape",
"=",
"(",
"mask",
".",
"shape",
"[",
"0",
"]",
"+",
"psf_shape",
"[",
"0",
"]",
"-",
"1",
",",
"mask",
".... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | RegularGridBorder.relocated_grid_stack_from_grid_stack | Determine a set of relocated grid_stack from an input set of grid_stack, by relocating their pixels based on the \
borders.
The blurring-grid does not have its coordinates relocated, as it is only used for computing analytic \
light-profiles and not inversion-grid_stack.
Parameters
... | autolens/data/array/grids.py | def relocated_grid_stack_from_grid_stack(self, grid_stack):
"""Determine a set of relocated grid_stack from an input set of grid_stack, by relocating their pixels based on the \
borders.
The blurring-grid does not have its coordinates relocated, as it is only used for computing analytic \
... | def relocated_grid_stack_from_grid_stack(self, grid_stack):
"""Determine a set of relocated grid_stack from an input set of grid_stack, by relocating their pixels based on the \
borders.
The blurring-grid does not have its coordinates relocated, as it is only used for computing analytic \
... | [
"Determine",
"a",
"set",
"of",
"relocated",
"grid_stack",
"from",
"an",
"input",
"set",
"of",
"grid_stack",
"by",
"relocating",
"their",
"pixels",
"based",
"on",
"the",
"\\",
"borders",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/array/grids.py#L1014-L1030 | [
"def",
"relocated_grid_stack_from_grid_stack",
"(",
"self",
",",
"grid_stack",
")",
":",
"border_grid",
"=",
"grid_stack",
".",
"regular",
"[",
"self",
"]",
"return",
"GridStack",
"(",
"regular",
"=",
"self",
".",
"relocated_grid_from_grid_jit",
"(",
"grid",
"=",
... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | RegularGridBorder.relocated_grid_from_grid_jit | Relocate the coordinates of a grid to its border if they are outside the border. This is performed as \
follows:
1) Use the mean value of the grid's y and x coordinates to determine the origin of the grid.
2) Compute the radial distance of every grid coordinate from the origin.
3) For e... | autolens/data/array/grids.py | def relocated_grid_from_grid_jit(grid, border_grid):
""" Relocate the coordinates of a grid to its border if they are outside the border. This is performed as \
follows:
1) Use the mean value of the grid's y and x coordinates to determine the origin of the grid.
2) Compute the radial di... | def relocated_grid_from_grid_jit(grid, border_grid):
""" Relocate the coordinates of a grid to its border if they are outside the border. This is performed as \
follows:
1) Use the mean value of the grid's y and x coordinates to determine the origin of the grid.
2) Compute the radial di... | [
"Relocate",
"the",
"coordinates",
"of",
"a",
"grid",
"to",
"its",
"border",
"if",
"they",
"are",
"outside",
"the",
"border",
".",
"This",
"is",
"performed",
"as",
"\\",
"follows",
":"
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/array/grids.py#L1034-L1067 | [
"def",
"relocated_grid_from_grid_jit",
"(",
"grid",
",",
"border_grid",
")",
":",
"border_origin",
"=",
"np",
".",
"zeros",
"(",
"2",
")",
"border_origin",
"[",
"0",
"]",
"=",
"np",
".",
"mean",
"(",
"border_grid",
"[",
":",
",",
"0",
"]",
")",
"border... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | set_defaults | Load a default value for redshift from config and set it as the redshift for source or lens galaxies that have
falsey redshifts
Parameters
----------
key: str
Returns
-------
decorator
A decorator that wraps the setter function to set defaults | autolens/pipeline/phase.py | def set_defaults(key):
"""
Load a default value for redshift from config and set it as the redshift for source or lens galaxies that have
falsey redshifts
Parameters
----------
key: str
Returns
-------
decorator
A decorator that wraps the setter function to set defaults
... | def set_defaults(key):
"""
Load a default value for redshift from config and set it as the redshift for source or lens galaxies that have
falsey redshifts
Parameters
----------
key: str
Returns
-------
decorator
A decorator that wraps the setter function to set defaults
... | [
"Load",
"a",
"default",
"value",
"for",
"redshift",
"from",
"config",
"and",
"set",
"it",
"as",
"the",
"redshift",
"for",
"source",
"or",
"lens",
"galaxies",
"that",
"have",
"falsey",
"redshifts"
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/pipeline/phase.py#L741-L768 | [
"def",
"set_defaults",
"(",
"key",
")",
":",
"def",
"decorator",
"(",
"func",
")",
":",
"@",
"functools",
".",
"wraps",
"(",
"func",
")",
"def",
"wrapper",
"(",
"phase",
",",
"new_value",
")",
":",
"new_value",
"=",
"new_value",
"or",
"[",
"]",
"for"... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | PhasePositions.run | Run this phase.
Parameters
----------
pixel_scale
positions
results: autofit.tools.pipeline.ResultsCollection
An object describing the results of the last phase or None if no phase has been executed
Returns
-------
result: AbstractPhase.Resul... | autolens/pipeline/phase.py | def run(self, positions, pixel_scale, results=None):
"""
Run this phase.
Parameters
----------
pixel_scale
positions
results: autofit.tools.pipeline.ResultsCollection
An object describing the results of the last phase or None if no phase has been exec... | def run(self, positions, pixel_scale, results=None):
"""
Run this phase.
Parameters
----------
pixel_scale
positions
results: autofit.tools.pipeline.ResultsCollection
An object describing the results of the last phase or None if no phase has been exec... | [
"Run",
"this",
"phase",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/pipeline/phase.py#L263-L281 | [
"def",
"run",
"(",
"self",
",",
"positions",
",",
"pixel_scale",
",",
"results",
"=",
"None",
")",
":",
"analysis",
"=",
"self",
".",
"make_analysis",
"(",
"positions",
"=",
"positions",
",",
"pixel_scale",
"=",
"pixel_scale",
",",
"results",
"=",
"results... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | PhasePositions.make_analysis | Create an lens object. Also calls the prior passing and lens_data modifying functions to allow child
classes to change the behaviour of the phase.
Parameters
----------
pixel_scale
positions
results: autofit.tools.pipeline.ResultsCollection
The result from th... | autolens/pipeline/phase.py | def make_analysis(self, positions, pixel_scale, results=None):
"""
Create an lens object. Also calls the prior passing and lens_data modifying functions to allow child
classes to change the behaviour of the phase.
Parameters
----------
pixel_scale
positions
... | def make_analysis(self, positions, pixel_scale, results=None):
"""
Create an lens object. Also calls the prior passing and lens_data modifying functions to allow child
classes to change the behaviour of the phase.
Parameters
----------
pixel_scale
positions
... | [
"Create",
"an",
"lens",
"object",
".",
"Also",
"calls",
"the",
"prior",
"passing",
"and",
"lens_data",
"modifying",
"functions",
"to",
"allow",
"child",
"classes",
"to",
"change",
"the",
"behaviour",
"of",
"the",
"phase",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/pipeline/phase.py#L283-L303 | [
"def",
"make_analysis",
"(",
"self",
",",
"positions",
",",
"pixel_scale",
",",
"results",
"=",
"None",
")",
":",
"self",
".",
"pass_priors",
"(",
"results",
")",
"analysis",
"=",
"self",
".",
"__class__",
".",
"Analysis",
"(",
"positions",
"=",
"positions... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | PhaseImaging.run | Run this phase.
Parameters
----------
positions
mask: Mask
The default masks passed in by the pipeline
results: autofit.tools.pipeline.ResultsCollection
An object describing the results of the last phase or None if no phase has been executed
data:... | autolens/pipeline/phase.py | def run(self, data, results=None, mask=None, positions=None):
"""
Run this phase.
Parameters
----------
positions
mask: Mask
The default masks passed in by the pipeline
results: autofit.tools.pipeline.ResultsCollection
An object describing... | def run(self, data, results=None, mask=None, positions=None):
"""
Run this phase.
Parameters
----------
positions
mask: Mask
The default masks passed in by the pipeline
results: autofit.tools.pipeline.ResultsCollection
An object describing... | [
"Run",
"this",
"phase",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/pipeline/phase.py#L414-L437 | [
"def",
"run",
"(",
"self",
",",
"data",
",",
"results",
"=",
"None",
",",
"mask",
"=",
"None",
",",
"positions",
"=",
"None",
")",
":",
"analysis",
"=",
"self",
".",
"make_analysis",
"(",
"data",
"=",
"data",
",",
"results",
"=",
"results",
",",
"m... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | PhaseImaging.make_analysis | Create an lens object. Also calls the prior passing and lens_data modifying functions to allow child
classes to change the behaviour of the phase.
Parameters
----------
positions
mask: Mask
The default masks passed in by the pipeline
data: im.CCD
... | autolens/pipeline/phase.py | def make_analysis(self, data, results=None, mask=None, positions=None):
"""
Create an lens object. Also calls the prior passing and lens_data modifying functions to allow child
classes to change the behaviour of the phase.
Parameters
----------
positions
mask: Ma... | def make_analysis(self, data, results=None, mask=None, positions=None):
"""
Create an lens object. Also calls the prior passing and lens_data modifying functions to allow child
classes to change the behaviour of the phase.
Parameters
----------
positions
mask: Ma... | [
"Create",
"an",
"lens",
"object",
".",
"Also",
"calls",
"the",
"prior",
"passing",
"and",
"lens_data",
"modifying",
"functions",
"to",
"allow",
"child",
"classes",
"to",
"change",
"the",
"behaviour",
"of",
"the",
"phase",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/pipeline/phase.py#L439-L487 | [
"def",
"make_analysis",
"(",
"self",
",",
"data",
",",
"results",
"=",
"None",
",",
"mask",
"=",
"None",
",",
"positions",
"=",
"None",
")",
":",
"mask",
"=",
"setup_phase_mask",
"(",
"data",
"=",
"data",
",",
"mask",
"=",
"mask",
",",
"mask_function",... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | GalaxyFitPhase.run | Run this phase.
Parameters
----------
galaxy_data
mask: Mask
The default masks passed in by the pipeline
results: autofit.tools.pipeline.ResultsCollection
An object describing the results of the last phase or None if no phase has been executed
Re... | autolens/pipeline/phase.py | def run(self, galaxy_data, results=None, mask=None):
"""
Run this phase.
Parameters
----------
galaxy_data
mask: Mask
The default masks passed in by the pipeline
results: autofit.tools.pipeline.ResultsCollection
An object describing the re... | def run(self, galaxy_data, results=None, mask=None):
"""
Run this phase.
Parameters
----------
galaxy_data
mask: Mask
The default masks passed in by the pipeline
results: autofit.tools.pipeline.ResultsCollection
An object describing the re... | [
"Run",
"this",
"phase",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/pipeline/phase.py#L1031-L1051 | [
"def",
"run",
"(",
"self",
",",
"galaxy_data",
",",
"results",
"=",
"None",
",",
"mask",
"=",
"None",
")",
":",
"analysis",
"=",
"self",
".",
"make_analysis",
"(",
"galaxy_data",
"=",
"galaxy_data",
",",
"results",
"=",
"results",
",",
"mask",
"=",
"ma... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | GalaxyFitPhase.make_analysis | Create an lens object. Also calls the prior passing and lens_data modifying functions to allow child
classes to change the behaviour of the phase.
Parameters
----------
galaxy_data
mask: Mask
The default masks passed in by the pipeline
results: autofit.tools.... | autolens/pipeline/phase.py | def make_analysis(self, galaxy_data, results=None, mask=None):
"""
Create an lens object. Also calls the prior passing and lens_data modifying functions to allow child
classes to change the behaviour of the phase.
Parameters
----------
galaxy_data
mask: Mask
... | def make_analysis(self, galaxy_data, results=None, mask=None):
"""
Create an lens object. Also calls the prior passing and lens_data modifying functions to allow child
classes to change the behaviour of the phase.
Parameters
----------
galaxy_data
mask: Mask
... | [
"Create",
"an",
"lens",
"object",
".",
"Also",
"calls",
"the",
"prior",
"passing",
"and",
"lens_data",
"modifying",
"functions",
"to",
"allow",
"child",
"classes",
"to",
"change",
"the",
"behaviour",
"of",
"the",
"phase",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/pipeline/phase.py#L1053-L1106 | [
"def",
"make_analysis",
"(",
"self",
",",
"galaxy_data",
",",
"results",
"=",
"None",
",",
"mask",
"=",
"None",
")",
":",
"mask",
"=",
"setup_phase_mask",
"(",
"data",
"=",
"galaxy_data",
"[",
"0",
"]",
",",
"mask",
"=",
"mask",
",",
"mask_function",
"... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | HyperGalaxyPhase.run | Run a fit for each galaxy from the previous phase.
Parameters
----------
data: LensData
results: ResultsCollection
Results from all previous phases
mask: Mask
The mask
positions
Returns
-------
results: HyperGalaxyResults
... | autolens/pipeline/phase.py | def run(self, data, results=None, mask=None, positions=None):
"""
Run a fit for each galaxy from the previous phase.
Parameters
----------
data: LensData
results: ResultsCollection
Results from all previous phases
mask: Mask
The mask
... | def run(self, data, results=None, mask=None, positions=None):
"""
Run a fit for each galaxy from the previous phase.
Parameters
----------
data: LensData
results: ResultsCollection
Results from all previous phases
mask: Mask
The mask
... | [
"Run",
"a",
"fit",
"for",
"each",
"galaxy",
"from",
"the",
"previous",
"phase",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/pipeline/phase.py#L1485-L1517 | [
"def",
"run",
"(",
"self",
",",
"data",
",",
"results",
"=",
"None",
",",
"mask",
"=",
"None",
",",
"positions",
"=",
"None",
")",
":",
"model_image",
"=",
"results",
".",
"last",
".",
"unmasked_model_image",
"galaxy_tuples",
"=",
"results",
".",
"last",... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | map_1d_indexes_to_2d_indexes_for_shape | For pixels on a 2D array of shape (rows, colums), map an array of 1D pixel indexes to 2D pixel indexes.
Indexing is defined from the top-left corner rightwards and downwards, whereby the top-left pixel on the 2D array
corresponds to index 0, the pixel to its right pixel 1, and so on.
For a 2D array of sha... | autolens/data/array/util/mapping_util.py | def map_1d_indexes_to_2d_indexes_for_shape(indexes_1d, shape):
"""For pixels on a 2D array of shape (rows, colums), map an array of 1D pixel indexes to 2D pixel indexes.
Indexing is defined from the top-left corner rightwards and downwards, whereby the top-left pixel on the 2D array
corresponds to index 0,... | def map_1d_indexes_to_2d_indexes_for_shape(indexes_1d, shape):
"""For pixels on a 2D array of shape (rows, colums), map an array of 1D pixel indexes to 2D pixel indexes.
Indexing is defined from the top-left corner rightwards and downwards, whereby the top-left pixel on the 2D array
corresponds to index 0,... | [
"For",
"pixels",
"on",
"a",
"2D",
"array",
"of",
"shape",
"(",
"rows",
"colums",
")",
"map",
"an",
"array",
"of",
"1D",
"pixel",
"indexes",
"to",
"2D",
"pixel",
"indexes",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/array/util/mapping_util.py#L13-L49 | [
"def",
"map_1d_indexes_to_2d_indexes_for_shape",
"(",
"indexes_1d",
",",
"shape",
")",
":",
"indexes_2d",
"=",
"np",
".",
"zeros",
"(",
"(",
"indexes_1d",
".",
"shape",
"[",
"0",
"]",
",",
"2",
")",
")",
"for",
"i",
",",
"index_1d",
"in",
"enumerate",
"(... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | map_2d_indexes_to_1d_indexes_for_shape | For pixels on a 2D array of shape (rows, colums), map an array of 2D pixel indexes to 1D pixel indexes.
Indexing is defined from the top-left corner rightwards and downwards, whereby the top-left pixel on the 2D array
corresponds to index 0, the pixel to its right pixel 1, and so on.
For a 2D array of sha... | autolens/data/array/util/mapping_util.py | def map_2d_indexes_to_1d_indexes_for_shape(indexes_2d, shape):
"""For pixels on a 2D array of shape (rows, colums), map an array of 2D pixel indexes to 1D pixel indexes.
Indexing is defined from the top-left corner rightwards and downwards, whereby the top-left pixel on the 2D array
corresponds to index 0,... | def map_2d_indexes_to_1d_indexes_for_shape(indexes_2d, shape):
"""For pixels on a 2D array of shape (rows, colums), map an array of 2D pixel indexes to 1D pixel indexes.
Indexing is defined from the top-left corner rightwards and downwards, whereby the top-left pixel on the 2D array
corresponds to index 0,... | [
"For",
"pixels",
"on",
"a",
"2D",
"array",
"of",
"shape",
"(",
"rows",
"colums",
")",
"map",
"an",
"array",
"of",
"2D",
"pixel",
"indexes",
"to",
"1D",
"pixel",
"indexes",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/array/util/mapping_util.py#L53-L88 | [
"def",
"map_2d_indexes_to_1d_indexes_for_shape",
"(",
"indexes_2d",
",",
"shape",
")",
":",
"indexes_1d",
"=",
"np",
".",
"zeros",
"(",
"indexes_2d",
".",
"shape",
"[",
"0",
"]",
")",
"for",
"i",
"in",
"range",
"(",
"indexes_2d",
".",
"shape",
"[",
"0",
... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | sub_to_regular_from_mask | For pixels on a 2D array of shape (rows, colums), compute a 1D array which, for every unmasked pixel on
this 2D array, maps the 1D sub-pixel indexes to their 1D pixel indexes.
For example, the following mappings from sub-pixels to 2D array pixels are:
- sub_to_regular[0] = 0 -> The first sub-pixel maps to... | autolens/data/array/util/mapping_util.py | def sub_to_regular_from_mask(mask, sub_grid_size):
""""For pixels on a 2D array of shape (rows, colums), compute a 1D array which, for every unmasked pixel on
this 2D array, maps the 1D sub-pixel indexes to their 1D pixel indexes.
For example, the following mappings from sub-pixels to 2D array pixels are:
... | def sub_to_regular_from_mask(mask, sub_grid_size):
""""For pixels on a 2D array of shape (rows, colums), compute a 1D array which, for every unmasked pixel on
this 2D array, maps the 1D sub-pixel indexes to their 1D pixel indexes.
For example, the following mappings from sub-pixels to 2D array pixels are:
... | [
"For",
"pixels",
"on",
"a",
"2D",
"array",
"of",
"shape",
"(",
"rows",
"colums",
")",
"compute",
"a",
"1D",
"array",
"which",
"for",
"every",
"unmasked",
"pixel",
"on",
"this",
"2D",
"array",
"maps",
"the",
"1D",
"sub",
"-",
"pixel",
"indexes",
"to",
... | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/array/util/mapping_util.py#L92-L143 | [
"def",
"sub_to_regular_from_mask",
"(",
"mask",
",",
"sub_grid_size",
")",
":",
"total_sub_pixels",
"=",
"mask_util",
".",
"total_sub_pixels_from_mask_and_sub_grid_size",
"(",
"mask",
"=",
"mask",
",",
"sub_grid_size",
"=",
"sub_grid_size",
")",
"sub_to_regular",
"=",
... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | map_2d_array_to_masked_1d_array_from_array_2d_and_mask | For a 2D array and mask, map the values of all unmasked pixels to a 1D array.
The pixel coordinate origin is at the top left corner of the 2D array and goes right-wards and downwards, such
that for an array of shape (3,3) where all pixels are unmasked:
- pixel [0,0] of the 2D array will correspond to inde... | autolens/data/array/util/mapping_util.py | def map_2d_array_to_masked_1d_array_from_array_2d_and_mask(mask, array_2d):
"""For a 2D array and mask, map the values of all unmasked pixels to a 1D array.
The pixel coordinate origin is at the top left corner of the 2D array and goes right-wards and downwards, such
that for an array of shape (3,3) where ... | def map_2d_array_to_masked_1d_array_from_array_2d_and_mask(mask, array_2d):
"""For a 2D array and mask, map the values of all unmasked pixels to a 1D array.
The pixel coordinate origin is at the top left corner of the 2D array and goes right-wards and downwards, such
that for an array of shape (3,3) where ... | [
"For",
"a",
"2D",
"array",
"and",
"mask",
"map",
"the",
"values",
"of",
"all",
"unmasked",
"pixels",
"to",
"a",
"1D",
"array",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/array/util/mapping_util.py#L147-L193 | [
"def",
"map_2d_array_to_masked_1d_array_from_array_2d_and_mask",
"(",
"mask",
",",
"array_2d",
")",
":",
"total_image_pixels",
"=",
"mask_util",
".",
"total_regular_pixels_from_mask",
"(",
"mask",
")",
"array_1d",
"=",
"np",
".",
"zeros",
"(",
"shape",
"=",
"total_ima... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | map_masked_1d_array_to_2d_array_from_array_1d_shape_and_one_to_two | For a 1D array that was computed by mapping unmasked values from a 2D array of shape (rows, columns), map its \
values back to the original 2D array where masked values are set to zero.
This uses a 1D array 'one_to_two' where each index gives the 2D pixel indexes of the 1D array's unmasked pixels, \
for ex... | autolens/data/array/util/mapping_util.py | def map_masked_1d_array_to_2d_array_from_array_1d_shape_and_one_to_two(array_1d, shape, one_to_two):
"""For a 1D array that was computed by mapping unmasked values from a 2D array of shape (rows, columns), map its \
values back to the original 2D array where masked values are set to zero.
This uses a 1D ar... | def map_masked_1d_array_to_2d_array_from_array_1d_shape_and_one_to_two(array_1d, shape, one_to_two):
"""For a 1D array that was computed by mapping unmasked values from a 2D array of shape (rows, columns), map its \
values back to the original 2D array where masked values are set to zero.
This uses a 1D ar... | [
"For",
"a",
"1D",
"array",
"that",
"was",
"computed",
"by",
"mapping",
"unmasked",
"values",
"from",
"a",
"2D",
"array",
"of",
"shape",
"(",
"rows",
"columns",
")",
"map",
"its",
"\\",
"values",
"back",
"to",
"the",
"original",
"2D",
"array",
"where",
... | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/array/util/mapping_util.py#L197-L237 | [
"def",
"map_masked_1d_array_to_2d_array_from_array_1d_shape_and_one_to_two",
"(",
"array_1d",
",",
"shape",
",",
"one_to_two",
")",
":",
"array_2d",
"=",
"np",
".",
"zeros",
"(",
"shape",
")",
"for",
"index",
"in",
"range",
"(",
"len",
"(",
"one_to_two",
")",
")... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | map_unmasked_1d_array_to_2d_array_from_array_1d_and_shape | For a 1D array that was flattened from a 2D array of shape (rows, columns), map its values back to the \
original 2D array.
The pixel coordinate origin is at the top left corner of the 2D array and goes right-wards and downwards, such
that for an array of shape (3,3):
- pixel 0 of the 1D array will co... | autolens/data/array/util/mapping_util.py | def map_unmasked_1d_array_to_2d_array_from_array_1d_and_shape(array_1d, shape):
"""For a 1D array that was flattened from a 2D array of shape (rows, columns), map its values back to the \
original 2D array.
The pixel coordinate origin is at the top left corner of the 2D array and goes right-wards and downw... | def map_unmasked_1d_array_to_2d_array_from_array_1d_and_shape(array_1d, shape):
"""For a 1D array that was flattened from a 2D array of shape (rows, columns), map its values back to the \
original 2D array.
The pixel coordinate origin is at the top left corner of the 2D array and goes right-wards and downw... | [
"For",
"a",
"1D",
"array",
"that",
"was",
"flattened",
"from",
"a",
"2D",
"array",
"of",
"shape",
"(",
"rows",
"columns",
")",
"map",
"its",
"values",
"back",
"to",
"the",
"\\",
"original",
"2D",
"array",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/array/util/mapping_util.py#L241-L282 | [
"def",
"map_unmasked_1d_array_to_2d_array_from_array_1d_and_shape",
"(",
"array_1d",
",",
"shape",
")",
":",
"array_2d",
"=",
"np",
".",
"zeros",
"(",
"shape",
")",
"index",
"=",
"0",
"for",
"y",
"in",
"range",
"(",
"shape",
"[",
"0",
"]",
")",
":",
"for",... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | sparse_to_unmasked_sparse_from_mask_and_pixel_centres | Determine the mapping between every masked pixelization-grid pixel and pixelization-grid pixel. This is
performed by checking whether each pixelization-grid pixel is within the regular-masks, and mapping the indexes.
Parameters
-----------
total_sparse_pixels : int
The total number of pixels in... | autolens/data/array/util/mapping_util.py | def sparse_to_unmasked_sparse_from_mask_and_pixel_centres(total_sparse_pixels, mask,
unmasked_sparse_grid_pixel_centres):
"""Determine the mapping between every masked pixelization-grid pixel and pixelization-grid pixel. This is
performed by checking whe... | def sparse_to_unmasked_sparse_from_mask_and_pixel_centres(total_sparse_pixels, mask,
unmasked_sparse_grid_pixel_centres):
"""Determine the mapping between every masked pixelization-grid pixel and pixelization-grid pixel. This is
performed by checking whe... | [
"Determine",
"the",
"mapping",
"between",
"every",
"masked",
"pixelization",
"-",
"grid",
"pixel",
"and",
"pixelization",
"-",
"grid",
"pixel",
".",
"This",
"is",
"performed",
"by",
"checking",
"whether",
"each",
"pixelization",
"-",
"grid",
"pixel",
"is",
"wi... | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/array/util/mapping_util.py#L286-L314 | [
"def",
"sparse_to_unmasked_sparse_from_mask_and_pixel_centres",
"(",
"total_sparse_pixels",
",",
"mask",
",",
"unmasked_sparse_grid_pixel_centres",
")",
":",
"pix_to_full_pix",
"=",
"np",
".",
"zeros",
"(",
"total_sparse_pixels",
")",
"pixel_index",
"=",
"0",
"for",
"full... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | unmasked_sparse_to_sparse_from_mask_and_pixel_centres | Determine the mapping between every pixelization-grid pixel and masked pixelization-grid pixel. This is
performed by checking whether each pixelization-grid pixel is within the regular-masks, and mapping the indexes.
Pixelization pixels are paired with the next masked pixel index. This may mean that a pixel is... | autolens/data/array/util/mapping_util.py | def unmasked_sparse_to_sparse_from_mask_and_pixel_centres(mask, unmasked_sparse_grid_pixel_centres,
total_sparse_pixels):
"""Determine the mapping between every pixelization-grid pixel and masked pixelization-grid pixel. This is
performed by checking whe... | def unmasked_sparse_to_sparse_from_mask_and_pixel_centres(mask, unmasked_sparse_grid_pixel_centres,
total_sparse_pixels):
"""Determine the mapping between every pixelization-grid pixel and masked pixelization-grid pixel. This is
performed by checking whe... | [
"Determine",
"the",
"mapping",
"between",
"every",
"pixelization",
"-",
"grid",
"pixel",
"and",
"masked",
"pixelization",
"-",
"grid",
"pixel",
".",
"This",
"is",
"performed",
"by",
"checking",
"whether",
"each",
"pixelization",
"-",
"grid",
"pixel",
"is",
"wi... | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/array/util/mapping_util.py#L318-L353 | [
"def",
"unmasked_sparse_to_sparse_from_mask_and_pixel_centres",
"(",
"mask",
",",
"unmasked_sparse_grid_pixel_centres",
",",
"total_sparse_pixels",
")",
":",
"total_unmasked_sparse_pixels",
"=",
"unmasked_sparse_grid_pixel_centres",
".",
"shape",
"[",
"0",
"]",
"unmasked_sparse_t... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | regular_to_sparse_from_sparse_mappings | Using the mapping between the regular-grid and unmasked pixelization grid, compute the mapping between each regular
pixel and the masked pixelization grid.
Parameters
-----------
regular_to_unmasked_sparse : ndarray
The index mapping between every regular-pixel and masked pixelization pixel.
... | autolens/data/array/util/mapping_util.py | def regular_to_sparse_from_sparse_mappings(regular_to_unmasked_sparse, unmasked_sparse_to_sparse):
"""Using the mapping between the regular-grid and unmasked pixelization grid, compute the mapping between each regular
pixel and the masked pixelization grid.
Parameters
-----------
regular_to_unmaske... | def regular_to_sparse_from_sparse_mappings(regular_to_unmasked_sparse, unmasked_sparse_to_sparse):
"""Using the mapping between the regular-grid and unmasked pixelization grid, compute the mapping between each regular
pixel and the masked pixelization grid.
Parameters
-----------
regular_to_unmaske... | [
"Using",
"the",
"mapping",
"between",
"the",
"regular",
"-",
"grid",
"and",
"unmasked",
"pixelization",
"grid",
"compute",
"the",
"mapping",
"between",
"each",
"regular",
"pixel",
"and",
"the",
"masked",
"pixelization",
"grid",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/array/util/mapping_util.py#L357-L377 | [
"def",
"regular_to_sparse_from_sparse_mappings",
"(",
"regular_to_unmasked_sparse",
",",
"unmasked_sparse_to_sparse",
")",
":",
"total_regular_pixels",
"=",
"regular_to_unmasked_sparse",
".",
"shape",
"[",
"0",
"]",
"regular_to_sparse",
"=",
"np",
".",
"zeros",
"(",
"tota... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | sparse_grid_from_unmasked_sparse_grid | Use the central arc-second coordinate of every unmasked pixelization grid's pixels and mapping between each
pixelization pixel and unmasked pixelization pixel to compute the central arc-second coordinate of every masked
pixelization grid pixel.
Parameters
-----------
unmasked_sparse_grid : ndarray
... | autolens/data/array/util/mapping_util.py | def sparse_grid_from_unmasked_sparse_grid(unmasked_sparse_grid, sparse_to_unmasked_sparse):
"""Use the central arc-second coordinate of every unmasked pixelization grid's pixels and mapping between each
pixelization pixel and unmasked pixelization pixel to compute the central arc-second coordinate of every mask... | def sparse_grid_from_unmasked_sparse_grid(unmasked_sparse_grid, sparse_to_unmasked_sparse):
"""Use the central arc-second coordinate of every unmasked pixelization grid's pixels and mapping between each
pixelization pixel and unmasked pixelization pixel to compute the central arc-second coordinate of every mask... | [
"Use",
"the",
"central",
"arc",
"-",
"second",
"coordinate",
"of",
"every",
"unmasked",
"pixelization",
"grid",
"s",
"pixels",
"and",
"mapping",
"between",
"each",
"pixelization",
"pixel",
"and",
"unmasked",
"pixelization",
"pixel",
"to",
"compute",
"the",
"cent... | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/array/util/mapping_util.py#L381-L401 | [
"def",
"sparse_grid_from_unmasked_sparse_grid",
"(",
"unmasked_sparse_grid",
",",
"sparse_to_unmasked_sparse",
")",
":",
"total_pix_pixels",
"=",
"sparse_to_unmasked_sparse",
".",
"shape",
"[",
"0",
"]",
"pix_grid",
"=",
"np",
".",
"zeros",
"(",
"(",
"total_pix_pixels",... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | extracted_array_2d_from_array_2d_and_coordinates | Resize an array to a new size by extracting a sub-set of the array.
The extracted input coordinates use NumPy convention, such that the upper values should be specified as +1 the \
dimensions of the extracted array.
In the example below, an array of size (5,5) is extracted using the coordinates y0=1, y1=4... | autolens/data/array/util/array_util.py | def extracted_array_2d_from_array_2d_and_coordinates(array_2d, y0, y1, x0, x1):
"""Resize an array to a new size by extracting a sub-set of the array.
The extracted input coordinates use NumPy convention, such that the upper values should be specified as +1 the \
dimensions of the extracted array.
In ... | def extracted_array_2d_from_array_2d_and_coordinates(array_2d, y0, y1, x0, x1):
"""Resize an array to a new size by extracting a sub-set of the array.
The extracted input coordinates use NumPy convention, such that the upper values should be specified as +1 the \
dimensions of the extracted array.
In ... | [
"Resize",
"an",
"array",
"to",
"a",
"new",
"size",
"by",
"extracting",
"a",
"sub",
"-",
"set",
"of",
"the",
"array",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/array/util/array_util.py#L59-L100 | [
"def",
"extracted_array_2d_from_array_2d_and_coordinates",
"(",
"array_2d",
",",
"y0",
",",
"y1",
",",
"x0",
",",
"x1",
")",
":",
"new_shape",
"=",
"(",
"y1",
"-",
"y0",
",",
"x1",
"-",
"x0",
")",
"resized_array",
"=",
"np",
".",
"zeros",
"(",
"shape",
... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | resized_array_2d_from_array_2d_and_resized_shape | Resize an array to a new size around a central pixel.
If the origin (e.g. the central pixel) of the resized array is not specified, the central pixel of the array is \
calculated automatically. For example, a (5,5) array's central pixel is (2,2). For even dimensions the central \
pixel is assumed to be the... | autolens/data/array/util/array_util.py | def resized_array_2d_from_array_2d_and_resized_shape(array_2d, resized_shape, origin=(-1, -1), pad_value=0.0):
"""Resize an array to a new size around a central pixel.
If the origin (e.g. the central pixel) of the resized array is not specified, the central pixel of the array is \
calculated automatically.... | def resized_array_2d_from_array_2d_and_resized_shape(array_2d, resized_shape, origin=(-1, -1), pad_value=0.0):
"""Resize an array to a new size around a central pixel.
If the origin (e.g. the central pixel) of the resized array is not specified, the central pixel of the array is \
calculated automatically.... | [
"Resize",
"an",
"array",
"to",
"a",
"new",
"size",
"around",
"a",
"central",
"pixel",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/array/util/array_util.py#L104-L176 | [
"def",
"resized_array_2d_from_array_2d_and_resized_shape",
"(",
"array_2d",
",",
"resized_shape",
",",
"origin",
"=",
"(",
"-",
"1",
",",
"-",
"1",
")",
",",
"pad_value",
"=",
"0.0",
")",
":",
"y_is_even",
"=",
"int",
"(",
"array_2d",
".",
"shape",
"[",
"0... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | bin_up_array_2d_using_mean | Bin up an array to coarser resolution, by binning up groups of pixels and using their mean value to determine \
the value of the new pixel.
If an array of shape (8,8) is input and the bin up size is 2, this would return a new array of size (4,4) where \
every pixel was the mean of each collection of 2x2 p... | autolens/data/array/util/array_util.py | def bin_up_array_2d_using_mean(array_2d, bin_up_factor):
"""Bin up an array to coarser resolution, by binning up groups of pixels and using their mean value to determine \
the value of the new pixel.
If an array of shape (8,8) is input and the bin up size is 2, this would return a new array of size (4,4) ... | def bin_up_array_2d_using_mean(array_2d, bin_up_factor):
"""Bin up an array to coarser resolution, by binning up groups of pixels and using their mean value to determine \
the value of the new pixel.
If an array of shape (8,8) is input and the bin up size is 2, this would return a new array of size (4,4) ... | [
"Bin",
"up",
"an",
"array",
"to",
"coarser",
"resolution",
"by",
"binning",
"up",
"groups",
"of",
"pixels",
"and",
"using",
"their",
"mean",
"value",
"to",
"determine",
"\\",
"the",
"value",
"of",
"the",
"new",
"pixel",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/array/util/array_util.py#L210-L257 | [
"def",
"bin_up_array_2d_using_mean",
"(",
"array_2d",
",",
"bin_up_factor",
")",
":",
"padded_array_2d",
"=",
"pad_2d_array_for_binning_up_with_bin_up_factor",
"(",
"array_2d",
"=",
"array_2d",
",",
"bin_up_factor",
"=",
"bin_up_factor",
")",
"binned_array_2d",
"=",
"np",... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | numpy_array_2d_to_fits | Write a 2D NumPy array to a .fits file.
Before outputting a NumPy array, the array is flipped upside-down using np.flipud. This is so that the arrays \
appear the same orientation as .fits files loaded in DS9.
Parameters
----------
array_2d : ndarray
The 2D array that is written to fits.
... | autolens/data/array/util/array_util.py | def numpy_array_2d_to_fits(array_2d, file_path, overwrite=False):
"""Write a 2D NumPy array to a .fits file.
Before outputting a NumPy array, the array is flipped upside-down using np.flipud. This is so that the arrays \
appear the same orientation as .fits files loaded in DS9.
Parameters
--------... | def numpy_array_2d_to_fits(array_2d, file_path, overwrite=False):
"""Write a 2D NumPy array to a .fits file.
Before outputting a NumPy array, the array is flipped upside-down using np.flipud. This is so that the arrays \
appear the same orientation as .fits files loaded in DS9.
Parameters
--------... | [
"Write",
"a",
"2D",
"NumPy",
"array",
"to",
"a",
".",
"fits",
"file",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/array/util/array_util.py#L359-L389 | [
"def",
"numpy_array_2d_to_fits",
"(",
"array_2d",
",",
"file_path",
",",
"overwrite",
"=",
"False",
")",
":",
"if",
"overwrite",
"and",
"os",
".",
"path",
".",
"exists",
"(",
"file_path",
")",
":",
"os",
".",
"remove",
"(",
"file_path",
")",
"new_hdr",
"... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | numpy_array_2d_from_fits | Read a 2D NumPy array to a .fits file.
After loading the NumPy array, the array is flipped upside-down using np.flipud. This is so that the arrays \
appear the same orientation as .fits files loaded in DS9.
Parameters
----------
file_path : str
The full path of the file that is loaded, inc... | autolens/data/array/util/array_util.py | def numpy_array_2d_from_fits(file_path, hdu):
"""Read a 2D NumPy array to a .fits file.
After loading the NumPy array, the array is flipped upside-down using np.flipud. This is so that the arrays \
appear the same orientation as .fits files loaded in DS9.
Parameters
----------
file_path : str
... | def numpy_array_2d_from_fits(file_path, hdu):
"""Read a 2D NumPy array to a .fits file.
After loading the NumPy array, the array is flipped upside-down using np.flipud. This is so that the arrays \
appear the same orientation as .fits files loaded in DS9.
Parameters
----------
file_path : str
... | [
"Read",
"a",
"2D",
"NumPy",
"array",
"to",
"a",
".",
"fits",
"file",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/data/array/util/array_util.py#L392-L415 | [
"def",
"numpy_array_2d_from_fits",
"(",
"file_path",
",",
"hdu",
")",
":",
"hdu_list",
"=",
"fits",
".",
"open",
"(",
"file_path",
")",
"return",
"np",
".",
"flipud",
"(",
"np",
".",
"array",
"(",
"hdu_list",
"[",
"hdu",
"]",
".",
"data",
")",
")"
] | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | plot_lens_subtracted_image | Plot the model image of a specific plane of a lens fit.
Set *autolens.datas.array.plotters.array_plotters* for a description of all input parameters not described below.
Parameters
-----------
fit : datas.fitting.fitting.AbstractFitter
The fit to the datas, which includes a list of every model... | autolens/lens/plotters/lens_plotter_util.py | def plot_lens_subtracted_image(
fit, mask=None, extract_array_from_mask=False, zoom_around_mask=False, positions=None, as_subplot=False,
units='arcsec', kpc_per_arcsec=None, figsize=(7, 7), aspect='square',
cmap='jet', norm='linear', norm_min=None, norm_max=None, linthresh=0.05, linscale=0.01,
... | def plot_lens_subtracted_image(
fit, mask=None, extract_array_from_mask=False, zoom_around_mask=False, positions=None, as_subplot=False,
units='arcsec', kpc_per_arcsec=None, figsize=(7, 7), aspect='square',
cmap='jet', norm='linear', norm_min=None, norm_max=None, linthresh=0.05, linscale=0.01,
... | [
"Plot",
"the",
"model",
"image",
"of",
"a",
"specific",
"plane",
"of",
"a",
"lens",
"fit",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/lens/plotters/lens_plotter_util.py#L134-L173 | [
"def",
"plot_lens_subtracted_image",
"(",
"fit",
",",
"mask",
"=",
"None",
",",
"extract_array_from_mask",
"=",
"False",
",",
"zoom_around_mask",
"=",
"False",
",",
"positions",
"=",
"None",
",",
"as_subplot",
"=",
"False",
",",
"units",
"=",
"'arcsec'",
",",
... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | plot_model_image_of_planes | Plot the model image of a specific plane of a lens fit.
Set *autolens.datas.array.plotters.array_plotters* for a description of all input parameters not described below.
Parameters
-----------
fit : datas.fitting.fitting.AbstractFitter
The fit to the datas, which includes a list of every model... | autolens/lens/plotters/lens_plotter_util.py | def plot_model_image_of_planes(
fit, plot_foreground=False, plot_source=False, mask=None, extract_array_from_mask=False, zoom_around_mask=False,
positions=None, plot_mass_profile_centres=True, as_subplot=False,
units='arcsec', kpc_per_arcsec=None, figsize=(7, 7), aspect='square',
cmap='j... | def plot_model_image_of_planes(
fit, plot_foreground=False, plot_source=False, mask=None, extract_array_from_mask=False, zoom_around_mask=False,
positions=None, plot_mass_profile_centres=True, as_subplot=False,
units='arcsec', kpc_per_arcsec=None, figsize=(7, 7), aspect='square',
cmap='j... | [
"Plot",
"the",
"model",
"image",
"of",
"a",
"specific",
"plane",
"of",
"a",
"lens",
"fit",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/lens/plotters/lens_plotter_util.py#L175-L222 | [
"def",
"plot_model_image_of_planes",
"(",
"fit",
",",
"plot_foreground",
"=",
"False",
",",
"plot_source",
"=",
"False",
",",
"mask",
"=",
"None",
",",
"extract_array_from_mask",
"=",
"False",
",",
"zoom_around_mask",
"=",
"False",
",",
"positions",
"=",
"None",... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | check_tracer_for_light_profile | If none of the tracer's galaxies have a light profile, it image-plane image cannot be computed. This wrapper \
makes this property return *None*.
Parameters
----------
func : (self) -> Object
A property function that requires galaxies to have a mass profile. | autolens/lens/ray_tracing.py | def check_tracer_for_light_profile(func):
"""If none of the tracer's galaxies have a light profile, it image-plane image cannot be computed. This wrapper \
makes this property return *None*.
Parameters
----------
func : (self) -> Object
A property function that requires galaxies to have a m... | def check_tracer_for_light_profile(func):
"""If none of the tracer's galaxies have a light profile, it image-plane image cannot be computed. This wrapper \
makes this property return *None*.
Parameters
----------
func : (self) -> Object
A property function that requires galaxies to have a m... | [
"If",
"none",
"of",
"the",
"tracer",
"s",
"galaxies",
"have",
"a",
"light",
"profile",
"it",
"image",
"-",
"plane",
"image",
"cannot",
"be",
"computed",
".",
"This",
"wrapper",
"\\",
"makes",
"this",
"property",
"return",
"*",
"None",
"*",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/lens/ray_tracing.py#L15-L43 | [
"def",
"check_tracer_for_light_profile",
"(",
"func",
")",
":",
"@",
"wraps",
"(",
"func",
")",
"def",
"wrapper",
"(",
"self",
")",
":",
"\"\"\"\n\n Parameters\n ----------\n self\n\n Returns\n -------\n A value or coordinate in the sam... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | check_tracer_for_mass_profile | If none of the tracer's galaxies have a mass profile, it surface density, potential and deflections cannot \
be computed. This wrapper makes these properties return *None*.
Parameters
----------
func : (self) -> Object
A property function that requires galaxies to have a mass profile. | autolens/lens/ray_tracing.py | def check_tracer_for_mass_profile(func):
"""If none of the tracer's galaxies have a mass profile, it surface density, potential and deflections cannot \
be computed. This wrapper makes these properties return *None*.
Parameters
----------
func : (self) -> Object
A property function that req... | def check_tracer_for_mass_profile(func):
"""If none of the tracer's galaxies have a mass profile, it surface density, potential and deflections cannot \
be computed. This wrapper makes these properties return *None*.
Parameters
----------
func : (self) -> Object
A property function that req... | [
"If",
"none",
"of",
"the",
"tracer",
"s",
"galaxies",
"have",
"a",
"mass",
"profile",
"it",
"surface",
"density",
"potential",
"and",
"deflections",
"cannot",
"\\",
"be",
"computed",
".",
"This",
"wrapper",
"makes",
"these",
"properties",
"return",
"*",
"Non... | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/lens/ray_tracing.py#L46-L74 | [
"def",
"check_tracer_for_mass_profile",
"(",
"func",
")",
":",
"@",
"wraps",
"(",
"func",
")",
"def",
"wrapper",
"(",
"self",
")",
":",
"\"\"\"\n\n Parameters\n ----------\n self\n\n Returns\n -------\n A value or coordinate in the same... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | AbstractTracer.grid_at_redshift_from_image_plane_grid_and_redshift | For an input grid of (y,x) arc-second image-plane coordinates, ray-trace the coordinates to any redshift in \
the strong lens configuration.
This is performed using multi-plane ray-tracing and the existing redshifts and planes of the tracer. However, \
any redshift can be input even if a plane ... | autolens/lens/ray_tracing.py | def grid_at_redshift_from_image_plane_grid_and_redshift(self, image_plane_grid, redshift):
"""For an input grid of (y,x) arc-second image-plane coordinates, ray-trace the coordinates to any redshift in \
the strong lens configuration.
This is performed using multi-plane ray-tracing and the exis... | def grid_at_redshift_from_image_plane_grid_and_redshift(self, image_plane_grid, redshift):
"""For an input grid of (y,x) arc-second image-plane coordinates, ray-trace the coordinates to any redshift in \
the strong lens configuration.
This is performed using multi-plane ray-tracing and the exis... | [
"For",
"an",
"input",
"grid",
"of",
"(",
"y",
"x",
")",
"arc",
"-",
"second",
"image",
"-",
"plane",
"coordinates",
"ray",
"-",
"trace",
"the",
"coordinates",
"to",
"any",
"redshift",
"in",
"\\",
"the",
"strong",
"lens",
"configuration",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/lens/ray_tracing.py#L266-L317 | [
"def",
"grid_at_redshift_from_image_plane_grid_and_redshift",
"(",
"self",
",",
"image_plane_grid",
",",
"redshift",
")",
":",
"# TODO : We need to come up with a better abstraction for multi-plane lensing 0_0",
"image_plane_grid_stack",
"=",
"grids",
".",
"GridStack",
"(",
"regula... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
valid | ConvolverMappingMatrix.convolve_mapping_matrix | For a given inversion mapping matrix, convolve every pixel's mapped regular with the PSF kernel.
A mapping matrix provides non-zero entries in all elements which map two pixels to one another
(see *inversions.mappers*).
For example, lets take an regular which is masked using a 'cross' of 5 pix... | autolens/model/inversion/convolution.py | def convolve_mapping_matrix(self, mapping_matrix):
"""For a given inversion mapping matrix, convolve every pixel's mapped regular with the PSF kernel.
A mapping matrix provides non-zero entries in all elements which map two pixels to one another
(see *inversions.mappers*).
For example,... | def convolve_mapping_matrix(self, mapping_matrix):
"""For a given inversion mapping matrix, convolve every pixel's mapped regular with the PSF kernel.
A mapping matrix provides non-zero entries in all elements which map two pixels to one another
(see *inversions.mappers*).
For example,... | [
"For",
"a",
"given",
"inversion",
"mapping",
"matrix",
"convolve",
"every",
"pixel",
"s",
"mapped",
"regular",
"with",
"the",
"PSF",
"kernel",
"."
] | Jammy2211/PyAutoLens | python | https://github.com/Jammy2211/PyAutoLens/blob/91e50369c7a9c048c83d217625578b72423cd5a7/autolens/model/inversion/convolution.py#L23-L95 | [
"def",
"convolve_mapping_matrix",
"(",
"self",
",",
"mapping_matrix",
")",
":",
"return",
"self",
".",
"convolve_matrix_jit",
"(",
"mapping_matrix",
",",
"self",
".",
"image_frame_indexes",
",",
"self",
".",
"image_frame_psfs",
",",
"self",
".",
"image_frame_lengths... | 91e50369c7a9c048c83d217625578b72423cd5a7 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.