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.3.tar.gz
.
File metadata
- Download URL: pylgs-0.0.3.tar.gz
- Upload date:
- Size: 296.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 058bd5fc0c600362bb6091a6e4bd199a83ee386cb3b111c3ba71b2970abb3f69 |
|
MD5 | 8a3ede93fc8806418c6a3bc3f4460e41 |
|
BLAKE2b-256 | 34e8fd1020959d7de5b4b9bb27e3e66bbf950a69ff7eabe37724996894433aad |
File details
Details for the file pylgs-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: pylgs-0.0.3-py3-none-any.whl
- Upload date:
- Size: 317.6 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 | 367d07ffec2b2e27c862b50bdf133b3183e190c69c1c325bd13939255f5415ae |
|
MD5 | a30718137da0f5563e748cbb4af369e9 |
|
BLAKE2b-256 | ea56374f327d8823a6c1081b71bd92e05dd45409ebe3cfcdb5c709cb2c790336 |