Jammy2211 / autolens_workspace

The PyAutoLens workspace: contains example scripts, datasets and more
https://pyautolens.readthedocs.io/
24 stars 16 forks source link

Chapter4/Tutorial2: Wrong behavior of Visuals2D when mapping between source and image planes #20

Open masolimano opened 3 months ago

masolimano commented 3 months ago

I've been trying to follow Chapter 4 of the HowToLens tutorials and I'm running into a series of issues. The first appears in Tutorial 2, and seems to be a problem of Visuals2D output. To reproduce this issue I first fix a typo in line 75 of the tutorial_2_mappers.py, changing source_plane_data_grid=dataset.grid to source_plane_data_grid=source_plane_grid. Then I continue to run the script. This first output of the mapper plotter looks like this: image The "visuals" are only shown in the right-hand panel, and instead of individual points I get connected curves. Then, I go forward with the tutorial and try to map the central source pixel to the image plane. And instead of finding the points mapping an Einstein cross, they distribute in a roughly straight line very far away from the ring. image Here the point in the source plane is displayed as a red polygon that poorly follows the pixel borders. Any hint of what could be the issue here? I'm running autolens=2024.5.16.0,autoarray=2024.5.16.0 and the 002b411 commit of this repo.

Cheers, MS

Jammy2211 commented 3 months ago

This part of the code is very good at breaking, and indeed is showing problems on my source code build too.

Not totally sure of the issue but if I dig into the source code I'll be able to fix it.

Its definitely a visualization-only issue, so if you go ahead with the tutorials you should be ok, just imagine the plots make sense lol.