Getting started
In this tutorial, a basic example is shown how qspec can assist planning an experiment.
This tutorial is also part of qspec's publication.
The original intention for the development of qspec and probably the most regularly needed application is
the use of basic physical functions without needing to define them in every analysis script.
For example, in a collinear laser spectroscopy (CLS) experiment, where ions are accelerated before they interact
with a laser, the resonant laser frequency is shifted from the rest-frame resonance frequency by the Doppler shift.
This calculation can be easily performed with qspec. In the following example, the laser frequency required for
resonant excitation of accelerated 88Sr+ ions in anticollinear geometry
(alpha = π
) is determined.
import numpy as np import qspec as qs # This imports the analyze, algebra, # physics, stats, and tools modules q = 1 # (e), Ion charge state m = 87.905612253 - q * qs.me_u # (u) [1] # Mass of 87Sr+ U = 20000 # (V), Acceleration voltage # Resonance frequency from NIST database f0 = qs.inv_cm_to_freq(24516.65) # (MHz) [2] # >>> 734990676.5 MHz # Relativistic velocity of 88Sr+ v = qs.v_el(U, q, m) # (m/s) # >>> 209533.6 m/s # The anti-collinear lab. frequency f_laser = qs.doppler(f0, v, qs.pi, return_frame='lab') # (MHz) # >>> 734477149.8 MHz # The differential Doppler shift df_atom = qs.doppler_el_d1(f_laser, qs.pi, U, q, m) # (MHz / V) # >>> +12.84 MHz / V