Modeling atomic physics of laser guide stars
Project description
pyLGS
pyLGS performs simulations of the atomic physics of cw, modulated, and pulsed laser guide stars. The effects of the full atomic structure, atomic velocity distribution, one or multiple pump fields, the geomagnetic field, velocity-changing and spin-randomizing collisions, and atomic recoil are all taken into account.
Installation
pyLGS uses the CVODE library from the SUNDIALS package, with scikits.odes as the Python interface. Before installing pyLGS you may need to install SUNDIALS, as described in the scikits.odes and SUNDIALS documentation. pyLGS is tested with SUNDIALS version 6.5.1.
pip install pylgs
How to use
Import the package:
from pylgs.lgssystem import LGSSystem
List available atomic systems for an LGS model:
LGSSystem.names()
['NaD1', 'Na330', 'NaD2', 'NaD2_Repump', 'NaD1_Toy']
Choose an atomic system and set values for parameters that will not be varied:
lgs = LGSSystem(
'NaD2_Repump',
{
'EllipticityDegrees1': 45.,
'PolarizationAngleDegrees1': 0,
'DetuningHz1': 1.0832e9,
'LaserWidthHz1': 10.0e6,
'EllipticityDegrees2': 45.,
'PolarizationAngleDegrees2': 0,
'DetuningHz2': -6.268e8 + 1.e8,
'LaserWidthHz2': 10.0e6,
'MagneticZenithDegrees': 45.,
'MagneticAzimuthDegrees': 45.,
'SDampingCollisionRatePerS': 4081.63,
'BeamTransitRatePerS': 131.944,
'VccRatePerS': 28571.,
'TemperatureK': 185.,
'RecoilParameter': 1
}
)
Define sample values for the varying parameters:
params = {'IntensitySI1': 5., 'IntensitySI2': 46., 'BFieldG': 0.5}
Build a steady-state model with adaptively refined velocity groups based on the sample parameters:
model = lgs.adaptive_stationary_model(params)
Solve the model for the steady state using the sample parameters:
sol = model.solve(params)
Find the total return flux:
model.total_flux(sol).item()
7709.051827675756
Plot the return flux as a function of atomic velocity:
model.flux_distribution(sol).visualize()
Plot the ground and excited state populations as a function of atomic velocity:
model.level_population_distribution(sol).visualize()
Plot the real and imaginary parts of all density-matrix elements:
model.velocity_normalize(sol).visualize(line_width=1)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pylgs-0.0.1.tar.gz
.
File metadata
- Download URL: pylgs-0.0.1.tar.gz
- Upload date:
- Size: 298.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a3b1473e82a33f1d4fae961d82315ce4c1afd3041da4c1d544d710c90669b1e |
|
MD5 | 6e9a80935e5d20e212201e636ad0db15 |
|
BLAKE2b-256 | 796b3e1c6d08e534c215153d94d88b2149064e8d64e6803f9232aa35c05be03e |
File details
Details for the file pylgs-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: pylgs-0.0.1-py3-none-any.whl
- Upload date:
- Size: 57.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 75fd9d454d680e3bdf699e6d1316ab22119097afa8c9cafecbadd103856d6009 |
|
MD5 | f945168005c404804f4e3455361bcaef |
|
BLAKE2b-256 | 66f7b22b2b121ec3bc449146b391d08b6972c8862485f65303f077947cea987b |