autolens_workspace
autolens_workspace copied to clipboard
Tutorial 5 - Raytracing Caustics
Hi, I am just visiting the Caustics section of howtolens in tutorial 5. I'm not sure what I'm supposed to be seeing but I don't think it plots anything other than the tangential critical cure. The code looks like this:
include = aplt.Include2D( tangential_critical_curves=True, tangential_caustics=True, radial_critical_curves=True, radial_caustics=True, ) tracer_plotter = aplt.TracerPlotter(tracer=tracer, grid=image_plane_grid)
I'm wondering if the tracer_plotter should look like this:
tracer_plotter = aplt.TracerPlotter(tracer=tracer, grid=image_plane_grid, include_2d=include)
That said, even with that change I'm not seeing anything other than the tangential (black) critical curve. When I set the tangential_critical_curves to false, it only displays the grid (no curves/ lines)?
I need to update this tutorial to be clearer (free time is not something I have much of right now lol), however I think the solution is basically that:
-
The tangential caustic will become visible if you make the
Isothermal
profile ellitipcal (e.g. by inputtingell_comps=(0.1, 0.1)
. -
A radial critical curve does not form for
slope > 2.0
so you would need to use aPowerLaw
withslope < 2.0
to see one.
Hi Sam,
Recommend you git pull
all your repos to the new versions and redownload the autolens_workspace
:
https://github.com/Jammy2211/PyAutoLens/releases/tag/2023.9.18.4
I didn't actually have time to fix this caustics issue yet, but I updated some tutorials in chapter_2
which updating to the new ones will make them more useful!
Thank you.
I am about to start chapter 2 so this will be very helpful!
Great, there are still a few bugs / issues with the chapter, for example:
- Some fits may converge on incorrect solutions because I used slightly too low
n_live
. - Tutorial 5 has a code snippet that doesnt do what it should.
I'm trying to polish this all up but not got much time, but feel free to ask any questions here if something doesnt feel quite right as its probably something I'm fixing!
Currently encountered an issue with Chapter 2 tut 1, when it tries to do the fit:
Traceback (most recent call last): File "/Users/sam/anaconda3/envs/autolens/lib/python3.10/multiprocessing/pool.py", line 125, in worker result = (True, func(*args, **kwds)) File "/Users/sam/anaconda3/envs/autolens/lib/python3.10/multiprocessing/pool.py", line 48, in mapstar return list(map(*args)) File "/Users/sam/anaconda3/envs/autolens/lib/python3.10/site-packages/autofit/non_linear/parallel/sneaky.py", line 384, in fitness_cache return FunctionCache.fitness(x, *FunctionCache.fitness_args, AttributeError: type object 'FunctionCache' has no attribute 'fitness'
I also needed to upgrade threadpoolctl because by default 2.2.0 was installed, and needed an additional function called 'wrap', which was added in version 3.0.0. :)
I'm just seeing if I can fix it on my end, but looks like it's a bug within PyAutoFit (or a library it depends on).
It does seem to be working on a different environment (switched from my mac to linux).
I switched environments to a fresh WSL2 environment from my macbook (I still had to update threadpoolctl), but it works now. I wonder if I needed to update my conda.