rydiqule.doppler_utils.doppler_classes¶
- rydiqule.doppler_utils.doppler_classes(method: UniformMethod | IsoPopMethod | SplitMethod | DirectMethod | None = None) ndarray [source]¶
Defines which velocity classes to sample for doppler averaging.
These are defined in units of the most probable speed of the Maxwell-Boltzmann distribution.
Note
To avoid issues, optical detunings should not leave densely sampled velocity classes. To avoid artifacts, the density of points should provide >~10 points over the narrowest absorptive feature. The default is a decent first guess, but for many problems the sampling mesh should be adjusted.
- Parameters:
method (dict) –
Specifies method to use and any control parameters. Must contain the key
"method"
with one of the following options. Each method has suboptions that also need to be specified. Valid options are:"uniform"
: Defines a uniformly spaced, dense grid. Configuration parameters include:"width_doppler"
: Float that specifies one-sided width of gaussian distribution to average over, in units of most probable speed. Defaults to 2.0."n_uniform"
: Int that specifies how many points to use. Defaults to 1601.
"isopop"
: Defines a grid with uniform population in each interval. This method highly emphasises physics happening near the 0 velocity class. If stuff is happening for non-zero velocity classes, it is likely to alias it unlessn_isopop
is large. See Ref [1] for details. Configuration parameters include:"n_isopop"
: Int that specifies how many points to use. Defaults to 400.
"split"
: Defines a grid with a dense central spacing and wide spacing wings. This method provides a decent compromise between uniform and isopop. It uses fewer points than uniform, but also works well for non-zero velocity class models (like Autler-Townes splittings). This is the default meshing method. Configuration parameters include:"width_doppler"
: Float that specifies one-sided width of coarse grided portion of the gaussian distribution. Units are in most probable speed. Defaults to 2.0."width_coherent"
: Float that specifies one-sided width of fine grided portion of gaussian distribution. Units are in most probable speed. Defaults to 0.4."n_doppler"
: Int that specifies how many points to use for the coarse grid. Note that points of the coarse grid that fall within the fine grid are dropped. Default is 201."n_coherent"
: Int that specifies how many points to use for the fine grid. Default is 401.
Note
For the “split” method, a union of 2 samplings is taken, so the number of total points will not necessary be equal to the sum of
"n_coherent"
and"n_doppler"
."direct"
: Use the supplied 1-D numpy array to build the mesh."doppler_velocities"
: Mandatory parameter that holds the 1-D numpy array to use when building the mesh grids. Given in units of most probably speed.
- Returns:
1-D array of velocities to be sampled.
- Return type:
Examples
The defaults will sample more densely near the center of the distribution, (the “split” method) with a total of 561 classes.
>>> classes = rq.doppler_utils.doppler_classes() #use the default values >>> print(classes.shape) (561,)
Specifying “uniform” with no additional arguments produces 1601 evenly spaced classes by default.
>>> m = {"method":"uniform"} >>> classes = rq.doppler_utils.doppler_classes(method=m) >>> print(classes.shape) (1601,)
Further specifying the number of points allows more dense or sparse sampling of the velocity distribution.
>>> m = {"method":"uniform", "n_uniform":801} >>> classes = rq.doppler_utils.doppler_classes(method=m) >>> print(classes.shape) (801,)
The “split” method also has further specifications
>>> m = {"method":"split", "n_coherent":301, "n_doppler":501} >>> classes = rq.doppler_utils.doppler_classes(method=m) >>> print(classes.shape) (701,)
References