Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
## Community Guidelines

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.

- Be respectful and considerate of others.
- Assume good intent and be patient, especially with newcomers.
- Keep feedback constructive and focused on the work, not the person.
- Communicate clearly and professionally.
- Respect maintainers’ time and decisions.

Harassment, discrimination, or abusive behavior of any kind will not be tolerated.

This project follows our [Code of Conduct](CODE_OF_CONDUCT.md). By participating, you agree to uphold it.

### Reporting concerns
If you experience or witness behavior that violates these guidelines or the Code of Conduct, please contact the project maintainers privately.


# Contributing

Contributions are welcome and greatly appreciated!
Expand Down
30 changes: 21 additions & 9 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,19 @@ The following links are useful for new starters:

- `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>`_.

- `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).
- `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).

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

Support
-------
Community & Support
-------------------

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

We also offer support on the **PyAutoLens** `Slack channel <https://pyautolens.slack.com/>`_, where we also provide the
latest updates on **PyAutoLens**. Slack is invitation-only, so if you'd like to join send
an `email <https://github.com/Jammy2211>`_ requesting an invite.
Slack is invitation-only. If you’d like to join, please send an email requesting an invite.

For installation issues, bug reports, or feature requests, please raise an issue on the [GitHub issues page](https://github.com/Jammy2211/PyAutoLens/issues).

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

A complete overview of the lectures `is provided on the HowToLens readthedocs page <https://pyautolens.readthedocs.io/en/latest/howtolens/howtolens.html>`_
A complete overview of the lectures `is provided on the HowToLens readthedocs page <https://pyautolens.readthedocs.io/en/latest/howtolens/howtolens.html>`_

Citations
---------

Information on how to cite **PyAutoLens** in publications can be found `on the citations page <https://github.com/Jammy2211/PyAutoLens/blob/main/CITATIONS.rst>`_.

Contributing
------------

Information on how to contribute to **PyAutoLens** can be found `on the contributing page <https://github.com/Jammy2211/PyAutoLens/blob/main/CONTRIBUTING.md>`_.

Hands on support for contributions is available via our Slack workspace, again please email to request an invite.
1 change: 0 additions & 1 deletion autolens/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
from autoarray.mask.derive.zoom_2d import Zoom2D
from autoarray.operators.over_sampling.over_sampler import OverSampler # noqa
from autoarray.inversion.inversion.dataset_interface import DatasetInterface
from autoarray.inversion.inversion.mapper_valued import MapperValued
from autoarray.inversion.pixelization import image_mesh
from autoarray.inversion.pixelization import mesh
from autoarray.inversion import regularization as reg
Expand Down
8 changes: 1 addition & 7 deletions autolens/analysis/result.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,5 @@ def source_plane_inversion_centre_from(
mapper_index = 0

inversion = self.max_log_likelihood_fit.inversion
mapper = inversion.cls_list_from(cls=aa.AbstractMapper)[mapper_index]

mapper_valued = aa.MapperValued(
values=inversion.reconstruction_dict[mapper],
mapper=mapper,
)

return mapper_valued.max_pixel_centre
return inversion.max_pixel_centre(mapper_index=mapper_index)
13 changes: 1 addition & 12 deletions autolens/imaging/plot/fit_imaging_plotters.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ def figures_2d_of_planes(
plane_signal_to_noise_map: bool = False,
use_source_vmax: bool = False,
zoom_to_brightest: bool = True,
interpolate_to_uniform: bool = False,
remove_critical_caustic: bool = False,
):
"""
Expand Down Expand Up @@ -224,9 +223,6 @@ def figures_2d_of_planes(
zoom_to_brightest
For images not in the image-plane (e.g. the `plane_image`), whether to automatically zoom the plot to
the brightest regions of the galaxies being plotted as opposed to the full extent of the grid.
interpolate_to_uniform
If `True`, the mapper's reconstruction is interpolated to a uniform grid before plotting, for example
meaning that an irregular Delaunay grid can be plotted as a uniform grid.
remove_critical_caustic
Whether to remove critical curves and caustics from the plot.
"""
Expand Down Expand Up @@ -319,7 +315,6 @@ def figures_2d_of_planes(
pixelization_index=0,
reconstruction=True,
zoom_to_brightest=zoom_to_brightest,
interpolate_to_uniform=interpolate_to_uniform,
)

if use_source_vmax:
Expand All @@ -341,7 +336,6 @@ def figures_2d_of_planes(
pixelization_index=0,
reconstruction_noise_map=True,
zoom_to_brightest=zoom_to_brightest,
interpolate_to_uniform=interpolate_to_uniform,
)

if plane_signal_to_noise_map:
Expand All @@ -357,7 +351,6 @@ def figures_2d_of_planes(
pixelization_index=0,
signal_to_noise_map=True,
zoom_to_brightest=zoom_to_brightest,
interpolate_to_uniform=interpolate_to_uniform,
)

def subplot(
Expand Down Expand Up @@ -786,12 +779,8 @@ def subplot_mappings_of_plane(
mapper = inversion_plotter.inversion.cls_list_from(
cls=aa.AbstractMapper
)[0]
mapper_valued = aa.MapperValued(
values=inversion_plotter.inversion.reconstruction_dict[mapper],
mapper=mapper,
)

pix_indexes = mapper_valued.max_pixel_list_from(
pix_indexes = inversion_plotter.inversion.max_pixel_list_from(
total_pixels=total_pixels, filter_neighbors=True
)

Expand Down
14 changes: 1 addition & 13 deletions autolens/interferometer/plot/fit_interferometer_plotters.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,6 @@ def figures_2d_of_planes(
plane_noise_map: bool = False,
plane_signal_to_noise_map: bool = False,
zoom_to_brightest: bool = True,
interpolate_to_uniform: bool = False,
):
"""
Plots images representing each individual `Plane` in the fit's `Tracer` in 2D, which are computed via the
Expand Down Expand Up @@ -333,9 +332,6 @@ def figures_2d_of_planes(
zoom_to_brightest
For images not in the image-plane (e.g. the `plane_image`), whether to automatically zoom the plot to
the brightest regions of the galaxies being plotted as opposed to the full extent of the grid.
interpolate_to_uniform
If `True`, the mapper's reconstruction is interpolated to a uniform grid before plotting, for example
meaning that an irregular Delaunay grid can be plotted as a uniform grid.
"""
if plane_image:
if not self.tracer.planes[plane_index].has(cls=aa.Pixelization):
Expand All @@ -354,7 +350,6 @@ def figures_2d_of_planes(
pixelization_index=0,
reconstruction=True,
zoom_to_brightest=zoom_to_brightest,
interpolate_to_uniform=interpolate_to_uniform,
)

if plane_noise_map:
Expand All @@ -367,7 +362,6 @@ def figures_2d_of_planes(
pixelization_index=0,
reconstruction_noise_map=True,
zoom_to_brightest=zoom_to_brightest,
interpolate_to_uniform=interpolate_to_uniform,
)

if plane_signal_to_noise_map:
Expand All @@ -380,7 +374,6 @@ def figures_2d_of_planes(
pixelization_index=0,
signal_to_noise_map=True,
zoom_to_brightest=zoom_to_brightest,
interpolate_to_uniform=interpolate_to_uniform,
)

def subplot_fit(self):
Expand Down Expand Up @@ -462,12 +455,7 @@ def subplot_mappings_of_plane(
"total_mappings_pixels"
]

mapper = inversion_plotter.inversion.cls_list_from(cls=aa.AbstractMapper)[0]
mapper_valued = aa.MapperValued(
values=inversion_plotter.inversion.reconstruction_dict[mapper],
mapper=mapper,
)
pix_indexes = mapper_valued.max_pixel_list_from(
pix_indexes = inversion_plotter.inversion.max_pixel_list_from(
total_pixels=total_pixels, filter_neighbors=True
)

Expand Down
2 changes: 1 addition & 1 deletion docs/installation/overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Overview
**PyAutoLens** requires Python 3.9 - 3.12 and support the Linux, MacOS and Windows operating systems.

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

We recommend Anaconda as it manages the installation of many major libraries (e.g. numpy, scipy,
matplotlib, etc.) making installation more straight forward. Windows users must use Anaconda.
Expand Down
8 changes: 1 addition & 7 deletions test_autolens/analysis/test_result.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,16 +108,10 @@ def test__source_plane_inversion_centre(analysis_imaging_7x7):
)

inversion = result.max_log_likelihood_fit.inversion
mapper = inversion.cls_list_from(cls=al.AbstractMapper)[0]

mapper_valued = al.MapperValued(
values=inversion.reconstruction_dict[mapper],
mapper=mapper,
)

assert (
result.source_plane_inversion_centre_from().in_list[0]
== mapper_valued.max_pixel_centre.in_list[0]
== inversion.max_pixel_centre().in_list[0]
)

lens = al.Galaxy(redshift=0.5, light=al.lp.SersicSph(intensity=1.0))
Expand Down
Loading