Skip to content

Commit d514d4b

Browse files
authored
Merge pull request #381 from Jammy2211/feature/remove_mapper_valued
feature/remove_mapper_valued
2 parents 658a17b + 300cef0 commit d514d4b

8 files changed

Lines changed: 44 additions & 50 deletions

File tree

CONTRIBUTING.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
## Community Guidelines
2+
3+
We strive to maintain a welcoming, respectful, and inclusive community. All contributors—whether opening issues, submitting pull requests, reviewing code, or participating in discussions—are expected to follow these guidelines.
4+
5+
- Be respectful and considerate of others.
6+
- Assume good intent and be patient, especially with newcomers.
7+
- Keep feedback constructive and focused on the work, not the person.
8+
- Communicate clearly and professionally.
9+
- Respect maintainers’ time and decisions.
10+
11+
Harassment, discrimination, or abusive behavior of any kind will not be tolerated.
12+
13+
This project follows our [Code of Conduct](CODE_OF_CONDUCT.md). By participating, you agree to uphold it.
14+
15+
### Reporting concerns
16+
If you experience or witness behavior that violates these guidelines or the Code of Conduct, please contact the project maintainers privately.
17+
18+
119
# Contributing
220

321
Contributions are welcome and greatly appreciated!

README.rst

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,19 +59,19 @@ The following links are useful for new starters:
5959

6060
- `The PyAutoLens readthedocs <https://pyautolens.readthedocs.io/en/latest>`_: which includes `an overview of PyAutoLens's core features <https://pyautolens.readthedocs.io/en/latest/overview/overview_1_start_here.html>`_, `a new user starting guide <https://pyautolens.readthedocs.io/en/latest/overview/overview_2_new_user_guide.html>`_ and `an installation guide <https://pyautolens.readthedocs.io/en/latest/installation/overview.html>`_.
6161

62-
- `The introduction Jupyter Notebook on Binder <https://mybinder.org/v2/gh/Jammy2211/autolens_workspace/release?filepath=start_here.ipynb>`_: try **PyAutoLens** in a web browser (without installation).
62+
- `The introduction Jupyter Notebook on Google Colab <https://colab.research.google.com/github/Jammy2211/autolens_workspace/blob/release/start_here.ipynb>`_: try **PyAutoLens** in a web browser (without installation).
6363

6464
- `The autolens_workspace GitHub repository <https://github.com/Jammy2211/autolens_workspace>`_: example scripts and the HowToLens Jupyter notebook lectures.
6565

66-
Support
67-
-------
66+
Community & Support
67+
-------------------
6868

69-
Support for installation issues, help with lens modeling and using **PyAutoLens** is available by
70-
`raising an issue on the GitHub issues page <https://github.com/Jammy2211/PyAutoLens/issues>`_.
69+
Support for **PyAutoLens** is available via our Slack workspace, where the community shares updates, discusses
70+
gravitational lensing analysis, and helps troubleshoot problems.
7171

72-
We also offer support on the **PyAutoLens** `Slack channel <https://pyautolens.slack.com/>`_, where we also provide the
73-
latest updates on **PyAutoLens**. Slack is invitation-only, so if you'd like to join send
74-
an `email <https://github.com/Jammy2211>`_ requesting an invite.
72+
Slack is invitation-only. If you’d like to join, please send an email requesting an invite.
73+
74+
For installation issues, bug reports, or feature requests, please raise an issue on the [GitHub issues page](https://github.com/Jammy2211/PyAutoLens/issues).
7575

7676
HowToLens
7777
---------
@@ -80,4 +80,16 @@ For users less familiar with gravitational lensing, Bayesian inference and scien
8080
you may wish to read through the **HowToLens** lectures. These teach you the basic principles of gravitational lensing
8181
and Bayesian inference, with the content pitched at undergraduate level and above.
8282

83-
A complete overview of the lectures `is provided on the HowToLens readthedocs page <https://pyautolens.readthedocs.io/en/latest/howtolens/howtolens.html>`_
83+
A complete overview of the lectures `is provided on the HowToLens readthedocs page <https://pyautolens.readthedocs.io/en/latest/howtolens/howtolens.html>`_
84+
85+
Citations
86+
---------
87+
88+
Information on how to cite **PyAutoLens** in publications can be found `on the citations page <https://github.com/Jammy2211/PyAutoLens/blob/main/CITATIONS.rst>`_.
89+
90+
Contributing
91+
------------
92+
93+
Information on how to contribute to **PyAutoLens** can be found `on the contributing page <https://github.com/Jammy2211/PyAutoLens/blob/main/CONTRIBUTING.md>`_.
94+
95+
Hands on support for contributions is available via our Slack workspace, again please email to request an invite.

autolens/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
from autoarray.mask.derive.zoom_2d import Zoom2D
1717
from autoarray.operators.over_sampling.over_sampler import OverSampler # noqa
1818
from autoarray.inversion.inversion.dataset_interface import DatasetInterface
19-
from autoarray.inversion.inversion.mapper_valued import MapperValued
2019
from autoarray.inversion.pixelization import image_mesh
2120
from autoarray.inversion.pixelization import mesh
2221
from autoarray.inversion import regularization as reg

autolens/analysis/result.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -385,11 +385,5 @@ def source_plane_inversion_centre_from(
385385
mapper_index = 0
386386

387387
inversion = self.max_log_likelihood_fit.inversion
388-
mapper = inversion.cls_list_from(cls=aa.AbstractMapper)[mapper_index]
389388

390-
mapper_valued = aa.MapperValued(
391-
values=inversion.reconstruction_dict[mapper],
392-
mapper=mapper,
393-
)
394-
395-
return mapper_valued.max_pixel_centre
389+
return inversion.max_pixel_centre(mapper_index=mapper_index)

autolens/imaging/plot/fit_imaging_plotters.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,6 @@ def figures_2d_of_planes(
182182
plane_signal_to_noise_map: bool = False,
183183
use_source_vmax: bool = False,
184184
zoom_to_brightest: bool = True,
185-
interpolate_to_uniform: bool = False,
186185
remove_critical_caustic: bool = False,
187186
):
188187
"""
@@ -224,9 +223,6 @@ def figures_2d_of_planes(
224223
zoom_to_brightest
225224
For images not in the image-plane (e.g. the `plane_image`), whether to automatically zoom the plot to
226225
the brightest regions of the galaxies being plotted as opposed to the full extent of the grid.
227-
interpolate_to_uniform
228-
If `True`, the mapper's reconstruction is interpolated to a uniform grid before plotting, for example
229-
meaning that an irregular Delaunay grid can be plotted as a uniform grid.
230226
remove_critical_caustic
231227
Whether to remove critical curves and caustics from the plot.
232228
"""
@@ -319,7 +315,6 @@ def figures_2d_of_planes(
319315
pixelization_index=0,
320316
reconstruction=True,
321317
zoom_to_brightest=zoom_to_brightest,
322-
interpolate_to_uniform=interpolate_to_uniform,
323318
)
324319

325320
if use_source_vmax:
@@ -341,7 +336,6 @@ def figures_2d_of_planes(
341336
pixelization_index=0,
342337
reconstruction_noise_map=True,
343338
zoom_to_brightest=zoom_to_brightest,
344-
interpolate_to_uniform=interpolate_to_uniform,
345339
)
346340

347341
if plane_signal_to_noise_map:
@@ -357,7 +351,6 @@ def figures_2d_of_planes(
357351
pixelization_index=0,
358352
signal_to_noise_map=True,
359353
zoom_to_brightest=zoom_to_brightest,
360-
interpolate_to_uniform=interpolate_to_uniform,
361354
)
362355

363356
def subplot(
@@ -786,12 +779,8 @@ def subplot_mappings_of_plane(
786779
mapper = inversion_plotter.inversion.cls_list_from(
787780
cls=aa.AbstractMapper
788781
)[0]
789-
mapper_valued = aa.MapperValued(
790-
values=inversion_plotter.inversion.reconstruction_dict[mapper],
791-
mapper=mapper,
792-
)
793782

794-
pix_indexes = mapper_valued.max_pixel_list_from(
783+
pix_indexes = inversion_plotter.inversion.max_pixel_list_from(
795784
total_pixels=total_pixels, filter_neighbors=True
796785
)
797786

autolens/interferometer/plot/fit_interferometer_plotters.py

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,6 @@ def figures_2d_of_planes(
302302
plane_noise_map: bool = False,
303303
plane_signal_to_noise_map: bool = False,
304304
zoom_to_brightest: bool = True,
305-
interpolate_to_uniform: bool = False,
306305
):
307306
"""
308307
Plots images representing each individual `Plane` in the fit's `Tracer` in 2D, which are computed via the
@@ -333,9 +332,6 @@ def figures_2d_of_planes(
333332
zoom_to_brightest
334333
For images not in the image-plane (e.g. the `plane_image`), whether to automatically zoom the plot to
335334
the brightest regions of the galaxies being plotted as opposed to the full extent of the grid.
336-
interpolate_to_uniform
337-
If `True`, the mapper's reconstruction is interpolated to a uniform grid before plotting, for example
338-
meaning that an irregular Delaunay grid can be plotted as a uniform grid.
339335
"""
340336
if plane_image:
341337
if not self.tracer.planes[plane_index].has(cls=aa.Pixelization):
@@ -354,7 +350,6 @@ def figures_2d_of_planes(
354350
pixelization_index=0,
355351
reconstruction=True,
356352
zoom_to_brightest=zoom_to_brightest,
357-
interpolate_to_uniform=interpolate_to_uniform,
358353
)
359354

360355
if plane_noise_map:
@@ -367,7 +362,6 @@ def figures_2d_of_planes(
367362
pixelization_index=0,
368363
reconstruction_noise_map=True,
369364
zoom_to_brightest=zoom_to_brightest,
370-
interpolate_to_uniform=interpolate_to_uniform,
371365
)
372366

373367
if plane_signal_to_noise_map:
@@ -380,7 +374,6 @@ def figures_2d_of_planes(
380374
pixelization_index=0,
381375
signal_to_noise_map=True,
382376
zoom_to_brightest=zoom_to_brightest,
383-
interpolate_to_uniform=interpolate_to_uniform,
384377
)
385378

386379
def subplot_fit(self):
@@ -462,12 +455,7 @@ def subplot_mappings_of_plane(
462455
"total_mappings_pixels"
463456
]
464457

465-
mapper = inversion_plotter.inversion.cls_list_from(cls=aa.AbstractMapper)[0]
466-
mapper_valued = aa.MapperValued(
467-
values=inversion_plotter.inversion.reconstruction_dict[mapper],
468-
mapper=mapper,
469-
)
470-
pix_indexes = mapper_valued.max_pixel_list_from(
458+
pix_indexes = inversion_plotter.inversion.max_pixel_list_from(
471459
total_pixels=total_pixels, filter_neighbors=True
472460
)
473461

docs/installation/overview.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Overview
66
**PyAutoLens** requires Python 3.9 - 3.12 and support the Linux, MacOS and Windows operating systems.
77

88
**PyAutoLens** can be installed via the Python distribution `Anaconda <https://www.anaconda.com/>`_ or using
9-
`Pypi <https://pypi.org/>`_ to ``pip install`` **PyAutoLens** into your Python distribution.
9+
`Pypi <https://pypi.org/>`_ to ``pip install autolens`` into your Python distribution.
1010

1111
We recommend Anaconda as it manages the installation of many major libraries (e.g. numpy, scipy,
1212
matplotlib, etc.) making installation more straight forward. Windows users must use Anaconda.

test_autolens/analysis/test_result.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -108,16 +108,10 @@ def test__source_plane_inversion_centre(analysis_imaging_7x7):
108108
)
109109

110110
inversion = result.max_log_likelihood_fit.inversion
111-
mapper = inversion.cls_list_from(cls=al.AbstractMapper)[0]
112-
113-
mapper_valued = al.MapperValued(
114-
values=inversion.reconstruction_dict[mapper],
115-
mapper=mapper,
116-
)
117111

118112
assert (
119113
result.source_plane_inversion_centre_from().in_list[0]
120-
== mapper_valued.max_pixel_centre.in_list[0]
114+
== inversion.max_pixel_centre().in_list[0]
121115
)
122116

123117
lens = al.Galaxy(redshift=0.5, light=al.lp.SersicSph(intensity=1.0))

0 commit comments

Comments
 (0)