-
Notifications
You must be signed in to change notification settings - Fork 35
Description
I am trying to run autolens for pretty much the first time. IT looks to be a great package. Congratulations! At present I am working my way through the tutorials.
I seem to have run into some issues, which may be API related and may be due to deprecated features in autolens and would like clarification and/or toreport a bug/bugs.
For reference I am running Ubuntu 20.04 and pip-installed autolens. I am running absolutely standard Jupyter notebooks on my own machine (basically cut-and-paste versions of yours plus "notes to self"), intended for later adaptation and not using Binder.
I have however run your examples in Binder and they run. The copied code has thrown errors when run locally.
To be specific:
In the example labelled "galaxies" the tracer example given:
tracer = al.Tracer.from_galaxies(
galaxies=[lens_galaxy, source_galaxy], cosmology: ag.cosmo.LensingCosmology = ag.cosmo.Planck15()
)
doesn't want to run: erroring on the cosmology. However removing the cosmology a workaround seems to be to default the cosmology so:
tracer = al.Tracer.from_galaxies(
galaxies=[lens_galaxy, source_galaxy]
)
runs "just fine"
In the examples under Lensing (Extending Objects)
bulge=al.lmp.EllSersic(
centre=(0.0, 0.0),
axis_ratio=0.9,
angle=45.0,
intensity=0.5,
effective_radius=0.3,
sersic_index=2.5,
mass_to_light_ratio=0.3,
)
errors with the message:
#---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
/tmp/ipykernel_5436/3811423805.py in
1 lens_galaxy_0 = al.Galaxy(
2 redshift=0.5,
----> 3 bulge=al.lmp.EllSersic(
4 centre=(0.0, 0.0),
5 axis_ratio=0.9,
TypeError: EllSersic.init() got an unexpected keyword argument 'axis_ratio'
I can't find anything in the manual referring to al.lmp... (which I assume refers to a light and mass profile library). So I can't actually see what the parameters should be.
As a result I want to raise two issues:
- The lack of an API makes it difficult to debug code.
- There is a question as to whether there is an issue with using local Jupyter Notebooks, rather than Binder.
Any comments that you can give greatly appreciated.