Upload files to "/"
This commit is contained in:
@@ -38,6 +38,10 @@ entered by hand, and only the calculated curves are plotted and exported.
|
|||||||
offers only the mechanisms that can change the transmission.
|
offers only the mechanisms that can change the transmission.
|
||||||
- Fitting and simulation run modes. Simulation computes the signal with no
|
- Fitting and simulation run modes. Simulation computes the signal with no
|
||||||
data imported, over a delay range entered in the panel.
|
data imported, over a delay range entered in the panel.
|
||||||
|
- Two interchangeable algorithms. Fresnel propagation carries the exit field to
|
||||||
|
the detector by FFT; the semi-analytical method uses closed-form detector
|
||||||
|
power expressions instead, needing no spatial grid and running about 32x
|
||||||
|
faster, at the cost of holding only to first order in the nonlinear response.
|
||||||
- Optional diagnostic figures showing each mechanism's response function before
|
- Optional diagnostic figures showing each mechanism's response function before
|
||||||
and after convolution, plus the ESA populations and beam transmissions.
|
and after convolution, plus the ESA populations and beam transmissions.
|
||||||
- Export of the data/fit comparison, a full parameter log, and figures at
|
- Export of the data/fit comparison, a full parameter log, and figures at
|
||||||
@@ -71,8 +75,9 @@ right: **Fitting**, **Diagnostics**, and **Parameter log**.
|
|||||||
|
|
||||||
Fitting a measured scan:
|
Fitting a measured scan:
|
||||||
|
|
||||||
1. Under **Operation mode**, choose **Beam deflection** or **Pump probe**, and
|
1. Under **Operation mode**, choose **Beam deflection** or **Pump probe**,
|
||||||
leave the second toggle on **Fitting**.
|
leave the second toggle on **Fitting**, and pick an algorithm on the third:
|
||||||
|
**Fresnel propagation** or the faster **Semi-analytical**.
|
||||||
2. Set the **Data columns** to match your file, and the delimiter.
|
2. Set the **Data columns** to match your file, and the delimiter.
|
||||||
3. Press **Import…** and choose a scan. The plots show the measured data.
|
3. Press **Import…** and choose a scan. The plots show the measured data.
|
||||||
4. Fill in the beam, material and geometry parameters, and configure one or
|
4. Fill in the beam, material and geometry parameters, and configure one or
|
||||||
@@ -83,7 +88,8 @@ Fitting a measured scan:
|
|||||||
Simulating without a measurement:
|
Simulating without a measurement:
|
||||||
|
|
||||||
1. Under **Operation mode**, choose **Simulation**. **Import…** and the data
|
1. Under **Operation mode**, choose **Simulation**. **Import…** and the data
|
||||||
column fields are disabled, and **Fit** becomes **Simulate**.
|
column fields are disabled, and **Fit** becomes **Simulate**. The algorithm
|
||||||
|
toggle works the same way as in Fitting mode.
|
||||||
2. Set `T_d_min` and `T_d_max` in **Simulation parameters** to the delay range
|
2. Set `T_d_min` and `T_d_max` in **Simulation parameters** to the delay range
|
||||||
to compute over. In Fitting mode these come from the imported file, so they
|
to compute over. In Fitting mode these come from the imported file, so they
|
||||||
are editable only here.
|
are editable only here.
|
||||||
@@ -109,7 +115,7 @@ deflection needs three columns and pump probe two; which ones is set in the
|
|||||||
quantity must come from a different column.
|
quantity must come from a different column.
|
||||||
|
|
||||||
| Quantity | Units | Default column | Needed in |
|
| Quantity | Units | Default column | Needed in |
|
||||||
| --- | --- | --- | --- |
|
|----------|------------------------------|----------------|----------------------|
|
||||||
| `τ_d` | fs | 1 | both modes |
|
| `τ_d` | fs | 1 | both modes |
|
||||||
| `ΔE/E` | fractional | 2 | Beam deflection only |
|
| `ΔE/E` | fractional | 2 | Beam deflection only |
|
||||||
| `T` | fractional (1.0 = no change) | 3 | both modes |
|
| `T` | fractional (1.0 = no change) | 3 | both modes |
|
||||||
@@ -122,7 +128,7 @@ to split on any run of whitespace.
|
|||||||
### Data columns (1-indexed)
|
### Data columns (1-indexed)
|
||||||
|
|
||||||
| Variable | Default | Column contents |
|
| Variable | Default | Column contents |
|
||||||
|-------------------|---------|---------------------------------------|
|
|-------------------|---------|---------------------------------|
|
||||||
| `tau_d column` | `1` | Delay column (fs) |
|
| `tau_d column` | `1` | Delay column (fs) |
|
||||||
| `T column` | `3` | Transmission data column |
|
| `T column` | `3` | Transmission data column |
|
||||||
| `DeltaEoE column` | `2` | Deflection data column |
|
| `DeltaEoE column` | `2` | Deflection data column |
|
||||||
@@ -130,74 +136,129 @@ to split on any run of whitespace.
|
|||||||
|
|
||||||
### Operation mode
|
### Operation mode
|
||||||
|
|
||||||
| Option | Effect |
|
Three independent toggles. Any combination is valid.
|
||||||
|-------------------|-------------------------------------------------|
|
|
||||||
| `Beam deflection` | Transmission and deflection, offset probe |
|
| Toggle | Option | Effect |
|
||||||
| `Pump probe` | Transmission only, centered probe |
|
|-------------|-----------------------|--------------------------------------------------|
|
||||||
| `Fitting` | Compare the calculation against an imported scan |
|
| Measurement | `Beam deflection` | Transmission and deflection, offset probe |
|
||||||
| `Simulation` | Calculate without a scan, over an entered range |
|
| | `Pump probe` | Transmission only, centered probe |
|
||||||
|
| Run | `Fitting` | Compare the calculation against an imported scan |
|
||||||
|
| | `Simulation` | Calculate without a scan, over an entered range |
|
||||||
|
| Algorithm | `Fresnel propagation` | Propagate the exit field to the detector by FFT |
|
||||||
|
| | `Semi-analytical` | Closed-form detector power, no spatial grid |
|
||||||
|
|
||||||
|
#### Algorithm
|
||||||
|
|
||||||
|
**Fresnel propagation** is the original method. The field at the exit face is
|
||||||
|
built on an (x, y) grid, propagated to the detector by FFT, and integrated over
|
||||||
|
the detector halves to get the power difference and total at each instant.
|
||||||
|
|
||||||
|
**Semi-analytical** skips the propagation. It evaluates closed-form expressions
|
||||||
|
for the detector power difference `dP` and total `P`, already integrated over
|
||||||
|
the detector plane, then integrates each over time at every delay to get the
|
||||||
|
energy difference `dE` and total `E`. The deflection is `dE/E` and the
|
||||||
|
transmission is `E` normalised. With no spatial grid to size, `X_num` and
|
||||||
|
`X_max` are greyed out; every other parameter, `Delta_n` included, is
|
||||||
|
unaffected. On the four-layer example it runs in 0.11 s against 3.65 s, about
|
||||||
|
**32x faster**.
|
||||||
|
|
||||||
|
The trade-off is that `dP` is **first order in the nonlinear response**, where
|
||||||
|
the Fresnel path keeps every order. The two therefore agree only while the
|
||||||
|
phase is small, which the `eta (peak)` line of the parameter log reports:
|
||||||
|
|
||||||
|
| `eta (peak)` | Peak of `DeltaEoE` displaced by |
|
||||||
|
|--------------|---------------------------------|
|
||||||
|
| 0.14 rad | 0.0003 tau_e |
|
||||||
|
| 1.41 rad | 0.0035 tau_e |
|
||||||
|
| 5.64 rad | 0.077 tau_e |
|
||||||
|
| 14.1 rad | 0.36 tau_e |
|
||||||
|
|
||||||
|
Below roughly 1 rad the two are interchangeable, and the four-layer example sits
|
||||||
|
at 0.049 rad with a correlation of 1.000000 and amplitudes within 0.5%. Above a
|
||||||
|
few rad the semi-analytical curve shifts noticeably and is no longer a
|
||||||
|
substitute. Sample thickness, walk-off and pump absorption do not themselves
|
||||||
|
affect the agreement once `eta (peak)` is held fixed.
|
||||||
|
|
||||||
|
The remaining 0.5% amplitude offset is the on-axis approximation: the Fresnel
|
||||||
|
path attenuates by `exp(-2 a_e^2 Gamma)` across the probe profile, where `a_e`
|
||||||
|
is the pump amplitude profile, while the semi-analytical form uses the on-axis
|
||||||
|
`exp(-2 x_0^2)`.
|
||||||
|
|
||||||
|
One coefficient in `dP`'s absorptive term, `SA_ABSORPTIVE_FACTOR`, is at present
|
||||||
|
fitted against the Fresnel path rather than derived. It is isolated in a single
|
||||||
|
function in `bd_fresnel_core.py`, with the measurements behind it recorded
|
||||||
|
there.
|
||||||
|
|
||||||
|
The transmission needs a reference delay, taken from before the pump arrives.
|
||||||
|
In **Fitting** mode it is the first delay point of the imported scan; in
|
||||||
|
**Simulation** mode it is `min(-3 rho, -3)` tau_e, which follows the walk-off
|
||||||
|
when that is the larger scale and is three pulse widths otherwise, so a thin
|
||||||
|
sample still normalises away from the peak.
|
||||||
|
|
||||||
### Simulation parameters
|
### Simulation parameters
|
||||||
|
|
||||||
| Variable | Default | Column contents |
|
| Variable | Default | Column contents |
|
||||||
|----------------|---------|---------------------------------------|
|
|-----------|---------|-------------------------------------------------|
|
||||||
| `X_num` | `50` | Number of spatial points |
|
| `X_num` | `50` | Number of spatial points, Fresnel only |
|
||||||
| `X_max` | `5.0` | Range of spatial sampling (w_0) |
|
| `X_max` | `5.0` | Range of spatial sampling (w_0_p), Fresnel only |
|
||||||
| `T_num` | `100` | Number of temporal points |
|
| `T_num` | `100` | Number of temporal points |
|
||||||
| `T_max` | `5.0` | Range of temporal sampling (tau_p) |
|
| `T_max` | `5.0` | Range of temporal sampling (tau_e) |
|
||||||
| `T_d_num` | `150` | Number of delay points over range |
|
| `T_d_num` | `150` | Number of delay points over range |
|
||||||
| `T_d_min` | `-5.0` | Delay range start (tau_p), Simulation only |
|
| `T_d_min` | `-5.0` | Delay range start (tau_e), Simulation only |
|
||||||
| `T_d_max` | `5.0` | Delay range end (tau_p), Simulation only |
|
| `T_d_max` | `5.0` | Delay range end (tau_e), Simulation only |
|
||||||
|
|
||||||
|
`X_num` and `X_max` size the spatial grid the Fresnel method propagates, so the
|
||||||
|
semi-analytical method greys them out.
|
||||||
|
|
||||||
### Excitation beam parameters
|
### Excitation beam parameters
|
||||||
|
|
||||||
| Variable | Default | Column contents |
|
| Variable | Default | Column contents |
|
||||||
|----------------|---------|---------------------------------------|
|
|--------------|---------|----------------------------------|
|
||||||
| `E_p` | `1.36` | Excitation pulse energy (uJ) |
|
| `E_e` | `1.36` | Excitation pulse energy (uJ) |
|
||||||
| `tau_p_FWHM` | `55.0` | Excitation pulse duration (fs) |
|
| `tau_e_FWHM` | `55.0` | Excitation pulse duration (fs) |
|
||||||
| `w_0p` | `246.0` | Excitation beam waist (um) |
|
| `w_0_e` | `246.0` | Excitation beam waist (um) |
|
||||||
| `lambda_p` | `800.0` | Excitation pulse wavelength (nm) |
|
| `lambda_e` | `800.0` | Excitation pulse wavelength (nm) |
|
||||||
|
|
||||||
### Probe beam parameters
|
### Probe beam parameters
|
||||||
|
|
||||||
| Variable | Default | Column contents |
|
| Variable | Default | Column contents |
|
||||||
|----------------|---------|---------------------------------------|
|
|--------------|---------|-----------------------------|
|
||||||
| `tau_FWHM` | `60.0` | Probe pulse duration (fs) |
|
| `tau_p_FWHM` | `60.0` | Probe pulse duration (fs) |
|
||||||
| `w_0` | `43.0` | Probe beam waist (um) |
|
| `w_0_p` | `43.0` | Probe beam waist (um) |
|
||||||
| `lambda` | `650.0` | Probe pulse wavelength (nm) |
|
| `lambda_p` | `650.0` | Probe pulse wavelength (nm) |
|
||||||
|
|
||||||
### Material parameters at excitation wavelength
|
### Material parameters at excitation wavelength
|
||||||
|
|
||||||
| Variable | Default | Column contents |
|
| Variable | Default | Column contents |
|
||||||
|----------------|-------------|-----------------------------------|
|
|--------------|-------------|--------------------------------|
|
||||||
| `R_p` | `0.0` | Reflectivity |
|
| `R_e` | `0.0` | Reflectivity |
|
||||||
| `alpha_p` | `0.0` | Linear absorption (cm^-1) |
|
| `alpha_e` | `0.0` | Linear absorption (cm^-1) |
|
||||||
| `n_p` | `1.4533` | Linear index |
|
| `n_e` | `1.4533` | Linear index |
|
||||||
| `dndl_p` | `-0.017284` | First order dispersion (um^-1) |
|
| `dndl_e` | `-0.017284` | First order dispersion (um^-1) |
|
||||||
| `alpha_2d` | `0.0` | 2 photon absorption (e-11 m/W) |
|
| `alpha_2d_e` | `0.0` | 2 photon absorption (e-11 m/W) |
|
||||||
|
|
||||||
### Material parameters at probe wavelength
|
### Material parameters at probe wavelength
|
||||||
|
|
||||||
| Variable | Default | Column contents |
|
| Variable | Default | Column contents |
|
||||||
|----------------|-------------|-----------------------------------|
|
|-----------|-------------|--------------------------------|
|
||||||
| `R` | `0.0` | Reflectivity |
|
| `R_p` | `0.0` | Reflectivity |
|
||||||
| `alpha` | `0.0` | Linear absorption (cm^-1) |
|
| `alpha_p` | `0.0` | Linear absorption (cm^-1) |
|
||||||
| `n` | `1.4565` | Linear index |
|
| `n_p` | `1.4565` | Linear index |
|
||||||
| `dndl` | `-0.027158` | First order dispersion (um^-1) |
|
| `dndl_p` | `-0.027158` | First order dispersion (um^-1) |
|
||||||
|
|
||||||
### Measurement parameters
|
### Measurement parameters
|
||||||
|
|
||||||
| Variable | Default | Column contents |
|
| Variable | Default | Column contents |
|
||||||
|----------------|-------------|-----------------------------------|
|
|----------|---------|-------------------------------|
|
||||||
| `l` | `1.0` | Sample thickness (mm) |
|
| `l` | `1.0` | Sample thickness (mm) |
|
||||||
| `d` | `15.0` | Distance to detector (cm) |
|
| `d` | `15.0` | Distance to detector (cm) |
|
||||||
| `shift` | `0.0` | Temporal shift (fs) |
|
| `shift` | `0.0` | Temporal shift (fs) |
|
||||||
| `x_0` | `0.5` | Displacement of probe (w_0p) |
|
| `x_0` | `0.5` | Displacement of probe (w_0_e) |
|
||||||
|
|
||||||
## Mechanisms
|
## Mechanisms
|
||||||
|
|
||||||
| Mechanism | Parameters |
|
| Mechanism | Parameters |
|
||||||
| --- | --- |
|
|--------------------------------|------------|
|
||||||
| Electronic (both) | 2 |
|
| Electronic (both) | 2 |
|
||||||
| Collisional (NLR) | 3 |
|
| Collisional (NLR) | 3 |
|
||||||
| Librational (NLR) | 4 |
|
| Librational (NLR) | 4 |
|
||||||
@@ -222,7 +283,7 @@ is still empty.
|
|||||||
Exporting to `<name>_fit.txt` also writes, in the same directory:
|
Exporting to `<name>_fit.txt` also writes, in the same directory:
|
||||||
|
|
||||||
| File | Contents |
|
| File | Contents |
|
||||||
| --- | --- |
|
|----------------------------------------|------------------------------------------------------------------------------------------------------------------------------|
|
||||||
| `<name>_fit.txt` | delay, data and fit for `T`, `ΔE/E` and `Δn`; in Pump probe, delay and `T` only. In Simulation, the calculated signals alone |
|
| `<name>_fit.txt` | delay, data and fit for `T`, `ΔE/E` and `Δn`; in Pump probe, delay and `T` only. In Simulation, the calculated signals alone |
|
||||||
| `<name>_fit_log.txt` | every parameter, plus a manifest of the files written |
|
| `<name>_fit_log.txt` | every parameter, plus a manifest of the files written |
|
||||||
| `<name>_fit_combined.jpg` / `.svg` | transmission and deflection, 6.5 in at 300 dpi (Beam deflection) |
|
| `<name>_fit_combined.jpg` / `.svg` | transmission and deflection, 6.5 in at 300 dpi (Beam deflection) |
|
||||||
@@ -245,7 +306,7 @@ path and data column sections are omitted, having nothing to describe.
|
|||||||
## Files
|
## Files
|
||||||
|
|
||||||
| File | Role |
|
| File | Role |
|
||||||
| --- | --- |
|
|------------------------|--------------------------------------------------------------------------------------------------------------------------|
|
||||||
| `bd_fresnel_core.py` | physics: field propagation, mechanism responses, ESA solver, parameter dataclass, settings I/O. No display dependencies. |
|
| `bd_fresnel_core.py` | physics: field propagation, mechanism responses, ESA solver, parameter dataclass, settings I/O. No display dependencies. |
|
||||||
| `bd_fresnel_gui.py` | Tkinter interface, plotting, import/export, logging. Entry point. |
|
| `bd_fresnel_gui.py` | Tkinter interface, plotting, import/export, logging. Entry point. |
|
||||||
| `set_params_dialog.py` | modal dialog for entering one mechanism's parameters. |
|
| `set_params_dialog.py` | modal dialog for entering one mechanism's parameters. |
|
||||||
@@ -254,15 +315,13 @@ path and data column sections are omitted, having nothing to describe.
|
|||||||
|
|
||||||
Please cite the following when using results from this program.
|
Please cite the following when using results from this program.
|
||||||
|
|
||||||
1. Reichert, M., et al. (2014). "Temporal, spectral, and polarization
|
1. M. Reichert, H. Hu, M. R. Ferdinandus, M. Seidel, P. Zhao, T. R. Ensley,
|
||||||
dependence of the nonlinear optical response of carbon disulfide."
|
D. Peceli, J. M. Reed, D. A. Fishman, S. Webster, D. J. Hagan, and
|
||||||
*Optica* **1**(6): 436.
|
E. W. Van Stryland, “Temporal, spectral, and polarization dependence of the
|
||||||
2. Reichert, M., et al. (2014). "Temporal, spectral, and polarization
|
nonlinear optical response of carbon disulfide,” Optica **1**, 436–445 (2014).
|
||||||
dependence of the nonlinear optical response of carbon disulfide:
|
2. M. R. Ferdinandus, H. Hu, M. Reichert, D. J. Hagan, and E. W. Van Stryland,
|
||||||
supplementary material." *Optica* **1**(6): 436.
|
“Beam deflection measurement of time and polarization resolved ultrafast
|
||||||
3. Ferdinandus, M. R., et al. (2013). "Beam deflection measurement of time and
|
nonlinear refraction,” Opt. Lett. **38**, 3518–3521 (2013).
|
||||||
polarization resolved ultrafast nonlinear refraction." *Opt. Lett.*
|
|
||||||
**38**(18): 3518–3521.
|
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
|||||||
@@ -9,4 +9,9 @@
|
|||||||
numpy>=2.0
|
numpy>=2.0
|
||||||
scipy>=1.6
|
scipy>=1.6
|
||||||
matplotlib>=3.4
|
matplotlib>=3.4
|
||||||
|
|
||||||
|
# Optional. Only needed for the pump two-photon absorption term
|
||||||
|
# (alpha_2d_e != 0), which uses the polylogarithm Li_3/2. The core
|
||||||
|
# imports it lazily, so the program runs without it until that term is
|
||||||
|
# used, and then says so.
|
||||||
mpmath>=1.2
|
mpmath>=1.2
|
||||||
|
|||||||
Reference in New Issue
Block a user