Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
151 commits
Select commit Hold shift + click to select a range
c2c0f92
added errors and snr to fit plootter
Jammy2211 Oct 25, 2024
e9a009e
interferometer
Jammy2211 Oct 25, 2024
98d4134
black
Jammy2211 Oct 28, 2024
90d705d
Merge pull request #313 from Jammy2211/feature/pix_errors_snr
Jammy2211 Oct 28, 2024
89d7b09
sensitivity visuals
Jammy2211 Oct 31, 2024
f9a9bc2
improve sensitivity plot
Jammy2211 Oct 31, 2024
3de2ed3
sensitivity
Jammy2211 Nov 1, 2024
0934168
visualks sensitivity
Jammy2211 Nov 1, 2024
a062098
use CoordinateArrayTriangles in test
rhayes777 Nov 1, 2024
506c31c
update extended
rhayes777 Nov 1, 2024
e7d4291
update default
rhayes777 Nov 1, 2024
f40d3ae
method for visualisation
rhayes777 Nov 1, 2024
579e273
use coordinate array triangles in more tests
rhayes777 Nov 1, 2024
2c39ff1
respect default
rhayes777 Nov 1, 2024
8399500
fix plotter
Jammy2211 Nov 4, 2024
12b4dc2
fix some plotters
Jammy2211 Nov 5, 2024
577773e
fix agg extra galaxies
Jammy2211 Nov 5, 2024
54987dd
version
Jammy2211 Nov 6, 2024
1acb99c
imporvements to plot
Jammy2211 Nov 6, 2024
57e7046
Visualizer now implemented in Analysis
Jammy2211 Nov 6, 2024
2f6cae3
config
Jammy2211 Nov 6, 2024
b9b373f
unit test
Jammy2211 Nov 6, 2024
893d35b
all tsts
Jammy2211 Nov 6, 2024
c78d06c
Merge pull request #315 from Jammy2211/feature/point_visualization_basic
Jammy2211 Nov 6, 2024
5ffdd68
edit
Jammy2211 Nov 6, 2024
f3f9f89
Merge branch 'feature/point_visualization_basic' into main
Jammy2211 Nov 6, 2024
5a08070
optional neighbor order to include neighborhood
rhayes777 Nov 8, 2024
9b2fa7a
make filter less severe as it tends to cut neighbors
rhayes777 Nov 8, 2024
0a93055
rename to neighbor degree for clarity
rhayes777 Nov 8, 2024
08fc81f
fix
rhayes777 Nov 8, 2024
40f73c2
point plot
Jammy2211 Nov 8, 2024
97814bc
change test to use tracer
rhayes777 Nov 8, 2024
8e791d7
use the new jax coordinate array triangles
rhayes777 Nov 8, 2024
3b8bdf5
filtering no longer necessary
rhayes777 Nov 8, 2024
4ff4257
neighbor degree fix
rhayes777 Nov 11, 2024
4e500b5
Merge branch 'main' into feature/coordinate_array_integration
rhayes777 Nov 11, 2024
023d823
Merge pull request #316 from Jammy2211/feature/coordinate_array_integ…
rhayes777 Nov 11, 2024
af954a7
merge/removeclose filtering
rhayes777 Nov 11, 2024
4bca4df
Merge pull request #318 from Jammy2211/feature/coordinate_array_main
rhayes777 Nov 11, 2024
8eec724
pass neighbor rank arg
rhayes777 Nov 11, 2024
6ab46b1
for_limits_and_scale
rhayes777 Nov 11, 2024
19a1125
Merge pull request #319 from Jammy2211/feature/array_testing
Jammy2211 Nov 11, 2024
283d59c
method switches to ShapeSolver if one image
Jammy2211 Nov 11, 2024
8055110
hit wall on shapesolver API but most of way there
Jammy2211 Nov 11, 2024
8cd2b37
multiple image calculation for single images
Jammy2211 Nov 11, 2024
3555dd6
fix test where output was flipped or changed
Jammy2211 Nov 11, 2024
f2ad520
Merge pull request #322 from Jammy2211/feature/single_image_positions
Jammy2211 Nov 11, 2024
465c625
b,ack
Jammy2211 Nov 13, 2024
4515e3a
'Updated version in __init__ to 2024.11.13.2
rhayes777 Nov 13, 2024
c28eb8e
DelaunayDrawer
Jammy2211 Nov 14, 2024
51fcb22
delaunay vmax not reset
Jammy2211 Nov 18, 2024
44ad37e
add_poisson_noise -> add_poisson_noise_to_data
Jammy2211 Nov 18, 2024
09c0354
docstring
Jammy2211 Nov 18, 2024
516d248
Merge pull request #324 from Jammy2211/feature/disable_noise
Jammy2211 Nov 18, 2024
aee94b5
Merge branch 'main' into feature/delaunay_visual
Jammy2211 Nov 18, 2024
396b733
Merge pull request #323 from Jammy2211/feature/delaunay_visual
Jammy2211 Nov 18, 2024
5d9ffe5
errors -> reconstruction_noise_map
Jammy2211 Nov 20, 2024
d93c420
Merge pull request #325 from Jammy2211/feature/inversion_noise_map
Jammy2211 Nov 20, 2024
24af25e
function to compare triangle results
rhayes777 Nov 22, 2024
72ef8bc
optionally specify step number
rhayes777 Nov 22, 2024
e9e12e4
format
rhayes777 Nov 22, 2024
20fe9f4
working through testing...
rhayes777 Nov 22, 2024
26f1265
isolate jax example again
rhayes777 Nov 22, 2024
fd5d268
compute source triangles rather than filter in a method
rhayes777 Nov 22, 2024
492d368
source triangles
rhayes777 Nov 22, 2024
d995cd2
more plotting options
rhayes777 Nov 22, 2024
4e9912c
more changes for testign - demonstrating differences between vertices…
rhayes777 Nov 22, 2024
722087d
fix code crash due to single multple image
Jammy2211 Nov 22, 2024
18804da
fix agg
Jammy2211 Nov 24, 2024
574e37e
docstring
Jammy2211 Nov 26, 2024
7aa4b6d
Merge pull request #326 from Jammy2211/feature/positions_lh_mass_centre
Jammy2211 Nov 26, 2024
e8db9e2
clean up steps
rhayes777 Nov 29, 2024
6f960f6
Merge branch 'main' into feature/array_testing
rhayes777 Nov 29, 2024
af58a00
moved array triangles into package and added more abstract class
rhayes777 Nov 29, 2024
70e96ec
also move coordinate array to package
rhayes777 Nov 29, 2024
04e0043
use CoordinateArrayTriangles by default
rhayes777 Nov 29, 2024
cdbdba1
fix import order
rhayes777 Dec 2, 2024
3e6dfda
all tracer tests pass
Jammy2211 Dec 15, 2024
f8356b0
to inversion works
Jammy2211 Dec 15, 2024
98a73de
remove grid non uniform
Jammy2211 Dec 15, 2024
4536c53
fix test_simulate_and_fiT-imaging
Jammy2211 Dec 15, 2024
f2682e7
fix interferometer trests
Jammy2211 Dec 15, 2024
a1838d6
fix preloads
Jammy2211 Dec 15, 2024
e4a20aa
fix test_operate
Jammy2211 Dec 15, 2024
8598e8e
horrible refactor nearly done
Jammy2211 Dec 15, 2024
859cb17
remove config nonsense
Jammy2211 Dec 15, 2024
630f15c
uniform -> lp
Jammy2211 Dec 15, 2024
bd40158
add over sample to util
Jammy2211 Dec 15, 2024
d876f51
Merge pull request #328 from Jammy2211/feature/triangle_array_typing
rhayes777 Dec 16, 2024
196a44a
simplify grid over sampled API
Jammy2211 Dec 16, 2024
133083c
simplify API
Jammy2211 Dec 16, 2024
5c42d81
remove max containing size from solver
rhayes777 Dec 16, 2024
a0bb93b
Merge branch 'main' into feature/over_sampling_refactor
Jammy2211 Dec 18, 2024
e81bae0
remove Grid2DIRregularUniform
Jammy2211 Dec 18, 2024
e99d806
fix jax
Jammy2211 Dec 18, 2024
ee4d7c9
git puMerge branch 'main' into feature/over_sampling_refactor
Jammy2211 Dec 18, 2024
6df27cb
remove OverSamplingDataset
Jammy2211 Dec 20, 2024
17b7369
comment failing test
rhayes777 Jan 8, 2025
4cb5101
extracted code from andrew messages
rhayes777 Jan 8, 2025
253a23a
remove other implementations
rhayes777 Jan 8, 2025
f229bcc
created a class to use andrews implementation
rhayes777 Jan 8, 2025
a8c9017
docs
rhayes777 Jan 8, 2025
a58c2d5
pull out values for individual permutations
rhayes777 Jan 8, 2025
949a388
working implementation that deals with nans
rhayes777 Jan 8, 2025
62f7c54
should more model positions give a higher likelihood?
rhayes777 Jan 8, 2025
07f27f6
test jitting
rhayes777 Jan 8, 2025
9bc05aa
Merge pull request #332 from Jammy2211/feature/over_sampling_refactor
Jammy2211 Jan 15, 2025
8bd18ea
Merge pull request #329 from Jammy2211/feature/max_containing_size
rhayes777 Jan 17, 2025
5cf510c
Merge pull request #331 from Jammy2211/feature/andrew_implementation
rhayes777 Jan 17, 2025
b470745
'Updated version in __init__ to 2025.1.18.7
rhayes777 Jan 18, 2025
f8985ba
changes for merge
Jammy2211 Jan 22, 2025
eda1097
merge complete
Jammy2211 Jan 22, 2025
6b7fb13
merge with more recent main change
Jammy2211 Jan 22, 2025
f2e2e13
split up fluxes into another abstract fir class
Jammy2211 Jan 29, 2025
b019cad
move max separaion out of fit
Jammy2211 Jan 29, 2025
0e14636
source chi squared docstrong
Jammy2211 Jan 29, 2025
a2945b2
lots more docstrings
Jammy2211 Jan 29, 2025
66908c9
fix pair all unit tests
Jammy2211 Jan 29, 2025
5aa29ad
clean up
Jammy2211 Jan 29, 2025
1b42c5d
fix unit tests
Jammy2211 Jan 29, 2025
b94d1c1
plotter docstrings
Jammy2211 Jan 29, 2025
ad39c58
Analysis docstrings
Jammy2211 Jan 29, 2025
a5cf93d
fix self.magnifications_at_positions**-2.0 to use to thw power MINUS …
Jammy2211 Jan 29, 2025
722e0c3
magnification factor on noise normalization
Jammy2211 Jan 30, 2025
dc52044
remove during analysi from unit tests
Jammy2211 Feb 19, 2025
d335a8c
remove use of subfolders
Jammy2211 Feb 19, 2025
8140b09
clean up base plotter interfasce
Jammy2211 Feb 19, 2025
f716ab2
unitt est
Jammy2211 Feb 19, 2025
0697c4e
fit imaging plotter interface
Jammy2211 Feb 19, 2025
dcaad0d
interferometer
Jammy2211 Feb 19, 2025
04308dc
point plotter interface
Jammy2211 Feb 19, 2025
7a3559d
imaging unit testts
Jammy2211 Feb 19, 2025
8032abb
interferometer unit tests
Jammy2211 Feb 19, 2025
170de6c
point unit tests
Jammy2211 Feb 19, 2025
55f66c4
interface clean with unit tests passing
Jammy2211 Feb 19, 2025
71db6ef
during analysis removed
Jammy2211 Feb 19, 2025
0fef956
tracer.fits output
Jammy2211 Feb 20, 2025
b6f5077
model_galaxy_images.fits
Jammy2211 Feb 20, 2025
76ec528
fit.fits
Jammy2211 Feb 20, 2025
446dc4c
interferometer fits files
Jammy2211 Feb 20, 2025
2e0be5b
black
Jammy2211 Feb 20, 2025
cae8739
review
Jammy2211 Feb 20, 2025
6d1e01d
Merge pull request #334 from Jammy2211/feature/point_redesign
Jammy2211 Feb 20, 2025
0522cd8
Merge branch 'main' into feature/images_refactor
Jammy2211 Feb 20, 2025
ef09565
fix unit test
Jammy2211 Feb 20, 2025
5657d9d
merge main
Jammy2211 Feb 20, 2025
4cbc4b5
docstrings
Jammy2211 Feb 21, 2025
f831141
Merge pull request #335 from Jammy2211/feature/images_refactor
Jammy2211 Feb 21, 2025
2e75b9f
update sensitivity plotter
Jammy2211 Feb 25, 2025
8c128ec
Merge branch 'main' into feature/jax_merge
Jammy2211 Mar 13, 2025
a34ec87
Merge pull request #333 from Jammy2211/feature/jax_merge
Jammy2211 Mar 13, 2025
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
198 changes: 99 additions & 99 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,99 +1,99 @@
name: Tests

on: [push, pull_request]

jobs:
unittest:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9, '3.10', '3.11', '3.12']
steps:
- name: Checkout PyAutoConf
uses: actions/checkout@v2
with:
repository: rhayes777/PyAutoConf
path: PyAutoConf
- name: Checkout PyAutoFit
uses: actions/checkout@v2
with:
repository: rhayes777/PyAutoFit
path: PyAutoFit
- name: Checkout PyAutoArray
uses: actions/checkout@v2
with:
repository: Jammy2211/PyAutoArray
path: PyAutoArray
- name: Checkout PyAutoGalaxy
uses: actions/checkout@v2
with:
repository: Jammy2211/PyAutoGalaxy
path: PyAutoGalaxy
- name: Checkout PyAutoLens
uses: actions/checkout@v2
with:
path: PyAutoLens
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Extract branch name
shell: bash
run: |
cd PyAutoLens
echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- name: Change to same branch if exists in deps
shell: bash
run: |
export PACKAGES=("PyAutoConf" "PyAutoArray" "PyAutoFit" "PyAutoGalaxy")
export BRANCH="${{ steps.extract_branch.outputs.branch }}"
for PACKAGE in ${PACKAGES[@]}; do
pushd $PACKAGE
export existed_in_remote=$(git ls-remote --heads origin ${BRANCH})

if [[ -z ${existed_in_remote} ]]; then
echo "Branch $BRANCH did not exist in $PACKAGE"
else
echo "Branch $BRANCH did exist in $PACKAGE"
git fetch
git checkout $BRANCH
fi
popd
done
- name: Install dependencies
run: |
pip3 install --upgrade pip
pip3 install setuptools
pip3 install wheel
pip3 install pytest coverage pytest-cov
pip3 install -r PyAutoConf/requirements.txt
pip3 install -r PyAutoFit/requirements.txt
pip3 install -r PyAutoArray/requirements.txt
pip3 install -r PyAutoArray/optional_requirements.txt
pip3 install -r PyAutoGalaxy/requirements.txt
pip3 install -r PyAutoGalaxy/optional_requirements.txt
pip3 install -r PyAutoLens/requirements.txt
pip3 install -r PyAutoLens/optional_requirements.txt
- name: Run tests
run: |
export ROOT_DIR=`pwd`
export PYTHONPATH=$PYTHONPATH:$ROOT_DIR/PyAutoConf
export PYTHONPATH=$PYTHONPATH:$ROOT_DIR/PyAutoFit
export PYTHONPATH=$PYTHONPATH:$ROOT_DIR/PyAutoArray
export PYTHONPATH=$PYTHONPATH:$ROOT_DIR/PyAutoGalaxy
export PYTHONPATH=$PYTHONPATH:$ROOT_DIR/PyAutoLens
pushd PyAutoLens
pytest --cov autolens --cov-report xml:coverage.xml
- name: Slack send
if: ${{ failure() }}
id: slack
uses: slackapi/slack-github-action@v1.21.0
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
with:
channel-id: C03S98FEDK2
payload: |
{
"text": "${{ github.repository }}/${{ github.ref_name }} (Python ${{ matrix.python-version }}) build result: ${{ job.status }}\n${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
name: Tests
on: [push, pull_request]
jobs:
unittest:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9, '3.10', '3.11', '3.12']
steps:
- name: Checkout PyAutoConf
uses: actions/checkout@v2
with:
repository: rhayes777/PyAutoConf
path: PyAutoConf
- name: Checkout PyAutoFit
uses: actions/checkout@v2
with:
repository: rhayes777/PyAutoFit
path: PyAutoFit
- name: Checkout PyAutoArray
uses: actions/checkout@v2
with:
repository: Jammy2211/PyAutoArray
path: PyAutoArray
- name: Checkout PyAutoGalaxy
uses: actions/checkout@v2
with:
repository: Jammy2211/PyAutoGalaxy
path: PyAutoGalaxy
- name: Checkout PyAutoLens
uses: actions/checkout@v2
with:
path: PyAutoLens
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Extract branch name
shell: bash
run: |
cd PyAutoLens
echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- name: Change to same branch if exists in deps
shell: bash
run: |
export PACKAGES=("PyAutoConf" "PyAutoArray" "PyAutoFit" "PyAutoGalaxy")
export BRANCH="${{ steps.extract_branch.outputs.branch }}"
for PACKAGE in ${PACKAGES[@]}; do
pushd $PACKAGE
export existed_in_remote=$(git ls-remote --heads origin ${BRANCH})
if [[ -z ${existed_in_remote} ]]; then
echo "Branch $BRANCH did not exist in $PACKAGE"
else
echo "Branch $BRANCH did exist in $PACKAGE"
git fetch
git checkout $BRANCH
fi
popd
done
- name: Install dependencies
run: |
pip3 install --upgrade pip
pip3 install setuptools
pip3 install wheel
pip3 install pytest coverage pytest-cov
pip3 install -r PyAutoConf/requirements.txt
pip3 install -r PyAutoFit/requirements.txt
pip3 install -r PyAutoArray/requirements.txt
pip3 install -r PyAutoArray/optional_requirements.txt
pip3 install -r PyAutoGalaxy/requirements.txt
pip3 install -r PyAutoGalaxy/optional_requirements.txt
pip3 install -r PyAutoLens/requirements.txt
pip3 install -r PyAutoLens/optional_requirements.txt
- name: Run tests
run: |
export ROOT_DIR=`pwd`
export PYTHONPATH=$PYTHONPATH:$ROOT_DIR/PyAutoConf
export PYTHONPATH=$PYTHONPATH:$ROOT_DIR/PyAutoFit
export PYTHONPATH=$PYTHONPATH:$ROOT_DIR/PyAutoArray
export PYTHONPATH=$PYTHONPATH:$ROOT_DIR/PyAutoGalaxy
export PYTHONPATH=$PYTHONPATH:$ROOT_DIR/PyAutoLens
pushd PyAutoLens
pytest --cov autolens --cov-report xml:coverage.xml
- name: Slack send
if: ${{ failure() }}
id: slack
uses: slackapi/slack-github-action@v1.21.0
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
with:
channel-id: C03S98FEDK2
payload: |
{
"text": "${{ github.repository }}/${{ github.ref_name }} (Python ${{ matrix.python-version }}) build result: ${{ job.status }}\n${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
}
13 changes: 3 additions & 10 deletions autolens/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,12 @@
from autoarray.dataset.interferometer.dataset import (
Interferometer,
)
from autoarray.dataset.over_sampling import OverSamplingDataset
from autoarray.dataset.grids import GridsInterface
from autoarray.dataset.dataset_model import DatasetModel
from autoarray.mask.mask_1d import Mask1D
from autoarray.mask.mask_2d import Mask2D
from autoarray.operators.convolver import Convolver
from autoarray.operators.over_sampling.uniform import OverSamplingUniform # noqa
from autoarray.operators.over_sampling.uniform import OverSamplerUniform # noqa
from autoarray.operators.over_sampling.iterate import OverSamplingIterate
from autoarray.operators.over_sampling.iterate import OverSamplerIterate
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
Expand All @@ -30,7 +26,6 @@
from autoarray.inversion.pixelization.mappers.mapper_grids import MapperGrids
from autoarray.inversion.pixelization.mappers.factory import mapper_from as Mapper
from autoarray.inversion.pixelization.border_relocator import BorderRelocator
from autoarray.operators.over_sampling.grid_oversampled import Grid2DOverSampled
from autoarray.operators.transformer import TransformerDFT
from autoarray.operators.transformer import TransformerNUFFT
from autoarray.structures.arrays.uniform_1d import Array1D
Expand All @@ -39,8 +34,6 @@
from autoarray.structures.grids.uniform_1d import Grid1D
from autoarray.structures.grids.uniform_2d import Grid2D
from autoarray.structures.grids.irregular_2d import Grid2DIrregular
from autoarray.structures.grids.irregular_2d import Grid2DIrregularUniform
from autoarray.operators.over_sampling.iterate import OverSamplingIterate
from autoarray.structures.mesh.rectangular_2d import Mesh2DRectangular
from autoarray.structures.mesh.voronoi_2d import Mesh2DVoronoi
from autoarray.structures.mesh.delaunay_2d import Mesh2DDelaunay
Expand Down Expand Up @@ -109,7 +102,7 @@
from .point.fit.positions.image.pair_all import FitPositionsImagePairAll
from .point.fit.positions.image.pair_repeat import FitPositionsImagePairRepeat
from .point.fit.positions.source.separations import FitPositionsSource
from .point.fit.positions.source.max_separation import FitPositionsSourceMaxSeparation
from .point.max_separation import SourceMaxSeparation
from .point.model.analysis import AnalysisPoint
from .point.solver import PointSolver
from .point.solver.shape_solver import ShapeSolver
Expand All @@ -123,4 +116,4 @@

conf.instance.register(__file__)

__version__ = "2024.9.21.2"
__version__ = "2025.1.18.7"
29 changes: 16 additions & 13 deletions autolens/aggregator/tracer.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,15 @@ def _tracer_from(
galaxies = instance.galaxies

if hasattr(instance, "extra_galaxies"):
galaxies = galaxies + fit.instance.extra_galaxies
if fit.instance.extra_galaxies is not None:
galaxies = galaxies + fit.instance.extra_galaxies

else:
galaxies = fit.instance.galaxies

if hasattr(fit.instance, "extra_galaxies"):
galaxies = galaxies + fit.instance.extra_galaxies
if fit.instance.extra_galaxies is not None:
galaxies = galaxies + fit.instance.extra_galaxies

try:
cosmology = instance.cosmology
Expand All @@ -56,17 +58,18 @@ def _tracer_from(

tracer = Tracer(galaxies=galaxies, cosmology=cosmology)

if len(fit.children) > 0:
logger.info(
"""
Using database for a fit with multiple summed Analysis objects.

Tracer objects do not fully support this yet (e.g. model parameters which vary over analyses may be incorrect)
so proceed with caution!
"""
)

return [tracer] * len(fit.children)
if fit.children is not None:
if len(fit.children) > 0:
logger.info(
"""
Using database for a fit with multiple summed Analysis objects.

Tracer objects do not fully support this yet (e.g. model parameters which vary over analyses may be incorrect)
so proceed with caution!
"""
)

return [tracer] * len(fit.children)

return [tracer]

Expand Down
Loading
Loading