RIMS converter tools
Converters for RIMS work.
This module contains converters that are conventient when working with RIMS data, etc.
Import as:
power_after_window(power, passes=1, transmittance=0.96)
Calculate power after a laser passes through a window.
Going through a window will reduce the power by transmittance**2 per pass. This is because of the following:
S1 S2
laser | |
--------|-------|--------
| |
window
As the simplified drawing shows, the window has an entrance and an exit surface,
at which the laser loses in each case transmittance of its total power.
Surfaces are labeled S1 and S2.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
power
|
Any
|
Initial power |
required |
passes
|
int
|
Number of passes through a window. |
1
|
transmittance
|
float
|
Transmittance of the window, defaults to 0.96. |
0.96
|
Returns:
| Type | Description |
|---|---|
Any
|
Power after the |
Source code in src/rttools/rims/converters.py
power_to_irradiance(power, rep_rate, beam_size, beam_dt)
Calculate irradiance from beam power and characteristics.
Take the users beam parameters and calculate the irradiance for saturation curves. All parameters can be passed as floats or as pint quantities. Standard units as given below are assumed if no quantities are provided.
:Example:
>>> power = 811 * ureg.mW
>>> rep_rate = 1000 * ureg.Hz
>>> beam_size = (1.5, 1.6) * ureg.mm
>>> beam_dt = 1.355e-8 * ureg.s
>>> power_to_irradiance(power, rep_rate, beam_size, beam_dt)
<Quantity(3175268.36, 'watt / centimeter ** 2')>
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
power
|
Union[float, Quantity]
|
Beam power (defaults to mW) |
required |
rep_rate
|
Union[float, Quantity]
|
Repetition rate of laser (defaults to Hz) |
required |
beam_size
|
Union[list, tuple, ArrayLike, Union[float, Quantity]]
|
Tuple of beam diameters or float of diameters if equal (defaults to mm for individual entries). |
required |
beam_dt
|
Union[float, Quantity]
|
Pulse width (defaults to ns) |
required |
Returns:
| Type | Description |
|---|---|
Quantity
|
Unitful irradiance (W/cm^2) |