Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

The Point Mass Lens

Authors
Affiliations
NTNU---Norwegian University of Science and Technology
NTNU---Norwegian University of Science and Technology

This demo will demonstrate that the different simulation modes for Point Mass lenses are consistent. It may be useful also to look at Pointmass Demo which also includes the closed form simulators in CosmoSim v3.1.

Preparation

CosmoSim version: 3.4.0

Raytrace

We can define the configuration as a dict using the nested (TOML) structure.

<Figure size 640x480 with 1 Axes>

Roulette

[GenericSim] init (verbose=2) ...
[SimImage] init (verbose=2) ...
[getSource] src=SersicSphere, ltprf0=None, verbose=2
[getSource] Lightprofile: SersicSphere LightProfileSpec.Sersic
[SphericalSource] constructor done
getSource() returns
[getLens] Point Mass Amplitudes
[getLens] instantiated PointMass
[initSim] XY 11.01 0.31
[Source] Constructor Source (Superclass)
[SphericalSource] SERSIC
[Lens] init Lens (Superclass)
[PsiFunctionLens] init PsiFunctionLens
[SimulatorModel] instantiating
Instantiating RouletteModel ... 
[SimulatorModel::setSource] setting source
[SimulatorModel::setNterms] 10 -> 10
[SimulatorModel::update] Lens: PointMass
[PointMass::getXi] [11.01, 0.31] -> [51.8151, 1.45892]
[setNu] etaOffset set to zero.
[SimulatorModel::update] Done updateApparentAbs()
[SimulatorModel::update] thread section
[Source::getImage()]
[SimulatorModel::updateInner()] eta=[11.01, 0.31]
[SimulatorModel::updateInner()] xi=[51.8151, 1.45892]; eta=[11.01, 0.31]; etaOffset=[0, 0]
[SimulatorModel::updateInner()] nu=[51.8151, 1.45892]
[calculateAlphaBeta] [[51.8151, 1.45892]] ... 
[PsiFunctionLens.calculateAlphaBeta()] 10; 46 - [51.8151, 1.45892]
[PsiFunctionLens.calculateAlphaBeta()] done
[calculateAlphaBeta] done
[SimulatorModel::parallelDistort] 4 threads (maskMode=0)
[SimulatorModel::parallelDistort] etaOffset=[0, 0]; nu=[51.8151, 1.45892]; eta[11.01, 0.31]; referenceXi=[51.8151, 1.45892]
[SimulatorModel] No mask 
[SimulatorModel::parallelDistort] lower=0; rng=512; rng1=128
[SimulatorModel::distort] refXi=[51.8151, 1.45892] begin=0; end=128
[SimulatorModel::distort] refXi=[51.8151, 1.45892] begin=128; end=256
[SimulatorModel::distort] refXi=[[SimulatorModel::distort] refXi=[51.8151, 1.45892] begin=256; end=51.8151384, 
1.45892] begin=384; end=512
Time to update(): 157 milliseconds
[Simulator] Centre Point (48.08,0.12) (Centre of Luminence in Planar Co-ordinates)
[getImage] centring from parameters: None
[crop] cropsize=256
<Figure size 1500x500 with 3 Axes>

This looks perfect inside the convergence ring, as it should.

Sampling

[SimulatorModel::getDistorted()]
[setDebug] 0
<Figure size 1500x500 with 3 Axes>
<Figure size 1500x500 with 3 Axes>

Closure

Each lens model can be simulated in four different ways. We can use raytrace, which is exact, or the roulette formalism. In addition to the direct implementation of analytic derivation of the lens potential, it is also possible to use a sampled model, where the lens potential is sampled and the distortion and roulette amplitudes are computed by numeric differentiation. The present demo show that these are consistent for point mass lenses.