Skip to content

Add a warning that MultiPlaneConvergence cannot be reused #492

@ntessore

Description

@ntessore

Which Section of the Documentation Needs Improving?

https://glass.readthedocs.io/stable/reference/lensing.html#glass.MultiPlaneConvergence

What Can be Improved About This Section

We should add a warning to the documentation which states that MultiPlaneConvergence instances cannot be reused across multiple simulations (because the iterative computation tracks state internally).

How to Improve This Section

We could also add a code example, basically https://glass.readthedocs.io/stable/examples/1-basic/lensing.html with everything unrelated blanked out:

# create an instance for iterative lensing
# WARNING: do not reuse for multiple simulations
convergence = glass.MultiPlaneConvergence(cosmo)

# simulation loop
for i, delta in enumerate(matter):

    # add lensing plane from the window function of this shell
    convergence.add_window(delta, shells[i])

    # get convergence map
    kappa = convergence.kappa

Metadata

Metadata

Labels

documentationImprovements or additions to documentation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions