general_tools#
This is the main module you will be calling when using SNAIL. It contains all of the auxiliary functions that allow you to generate a beam and calculate the harmonic response from it.
- class general_tools.config[source]#
Bases:
objectThis is the class that stores all of the information on laser and target properties, as well as calculation parameters. By default has parallelization enabled, however, if you want to use a single core version which only requires numpy, set config.parallel to False.
- parallel = True#
- general_tools.generate_pulse(config)[source]#
Generates the driving pulse, forces the user to set a pulse type, currently supports pulse types:
Constant - A constant envelope
Gaussian - Gaussian beam with no cutoff
Super Gaussian - Gaussian with a faster decline
Cos Squared - Cos squared envelope
- Parameters:
config (class) –
Calculation_cycles
Points per cycle
Pulse duration
Pulse shape
- Returns:
The electric field amplitude over time, same size as t
- Return type:
driving_field (array)
- general_tools.generate_t(config)[source]#
A function to generate the time axis in SAU, using the number of cycles
- general_tools.sau_convert(value, quantity, target, config)[source]#
- Converts between standard SI units and atomic units, currently supports:
e - Electric field u - Energy s - Length a - Area vol - Volume v - velocity
- Parameters:
value (float) – The quantity to convert.
quantity – The physical parameter that is being converted, e.g. e for electric field.
target (string) – ‘si’ to convert to standard units and ‘sau’ to convert to scaled atomic units.
config (class) – The config containing at least the wavelength
- Returns:
Value converted to the corresponding unit system.
- Return type:
float