diff --git a/README.md b/README.md index f4beb84..5a2bdb3 100644 --- a/README.md +++ b/README.md @@ -141,33 +141,91 @@ The program is split so the physics can be used without the interface: ## Parameters -
-Full parameter list +## Data columns (1-indexed) -**Data columns** — `z_col`, `CA_col`, `OA_col`, `REF_col`, `FREQ_col` (1-indexed) +| Variable | Default | Column contents | +|------------|---------|---------------------------------------| +| `z_col` | `0` | Sample position *z* (mm) | +| `CA_col` | `1` | Closed-aperture detector signal (V) | +| `FREQ_col` | `3` | Frequency / shot-index channel | +| `OA_col` | `4` | Open-aperture detector signal (V) | +| `REF_col` | `7` | Reference detector signal (V) | +| `FREQ_col` | `9` | Lock-in frequency column (V) | -**Processing flags** — `use_ref`, `use_freq`, `flip_z`, `do_norm_OA`, -`do_norm_CA`, and per-channel sign flips for the raw and displayed traces +## Processing flags -**Nonlinear coefficients** — `n_2` (m²/W), `n_3` (m⁴/W²), `n_4` (m⁶/W³), -`alpha_2` (m/W), `alpha_3` (m³/W²), `alpha_4` (m⁵/W³) +| Parameter | Meaning | +|--------------------------------------|-------------------------------------------------------------| +| `use_ref` | Apply the reference-channel correction | +| `use_freq` | Appliy the frequency-channel correction | +| `flip_z` | `1` reverses the sign of the z axis | +| `do_norm_OA`, `do_norm_CA` | Fit and divide out the linear wing baseline | +| `flip_OA`, `flip_CA`, `flip_REF` | Invert a raw channel about its median (`0` or `1`) | +| `flip_OA_disp`, `flip_CA_disp` | Invert the normalized traces about 1 for display/fitting | +| `show_CA` | Plot CA in the right panel; if `False`, plot CA/OA instead | -**z-position offsets** — `Delta_z_OA`, `Delta_z_CA`, `Delta_z_OACA` (mm), to -align each measured curve with the simulated focus +## Nonlinear coefficients -**Sample** — `n` (linear index), `L` (thickness), `T_lin` (linear transmittance) +| Parameter | Meaning | Units | Log units | +|-----------|----------------------------------------|----------|------------| +| `n_2` | 3rd-order nonlinear refractive index | m²/W | cm²/GW | +| `n_3` | 5th-order nonlinear refractive index | m⁴/W² | cm⁴/GW² | +| `n_4` | 7th-order nonlinear refractive index | m⁶/W³ | cm⁶/GW³ | +| `alpha_2` | Two-photon absorption coefficient | m/W | cm/GW | +| `alpha_3` | Three-photon absorption coefficient | m³/W² | cm³/GW² | +| `alpha_4` | Four-photon absorption coefficient | m⁵/W³ | cm⁵/GW³ | -**Laser** — `E` (pulse energy), `lambda_`, `w_0` (waist), `tau_FWHM`, `M2` +## z-position offsets -**Measurement** — `S` (aperture transmittance), `d` (focus-to-aperture distance) +`Delta_z_OA`, `Delta_z_CA`, `Delta_z_OACA` (mm) shift the OA, CA, and CA/OA +z-axes independently so that measured and simulated curves line up when the two +detector arms are not perfectly co-registered. -**Error estimates** — `E_err`, `w_err`, `tau_err`, as fractions, propagated into -the reported uncertainty +## Sample parameters -**Simulation grid** — `z_points`, `r_points`, `r_max`, `t_points`, `t_max`, -`ra_points`, `endpts_percent`, `max_iterations` +| Parameter | Meaning | Units | +|-------------|---------------------------------------------|-------| +| `n` | Linear refractive index | — | +| `L` | Sample thickness | m | +| `T_lin` | Linear transmittance | — | -
+## Laser parameters + +| Parameter | Meaning | Units | +|-------------|---------------------------------------------|-------| +| `E` | Pulse energy | J | +| `lambda` | Wavelength | m | +| `w_0` | Beam waist, HW1/e² of irradiance | m | +| `tau_FWHM` | Pulse duration, FWHM of irradiance | s | +| `M2` | Beam quality parameter M² | — | + +## Measurement parameters + +| Parameter | Meaning | Units | +|-------------|---------------------------------------------|-------| +| `S` | Linear transmission of the aperture | — | +| `d` | Distance from focus to aperture | m | + +## Error estimates + +`E_err`, `w_err`, and `tau_err` are fractional uncertainties on the energy, +waist, and pulse duration; they are combined in quadrature into `Tot_err` and +written to the log as the systematic uncertainty on the extracted coefficients. +— `E_err`, `w_err`, `tau_err`, as fractions, propagated into the reported +uncertainty + +## Simulation grid + +| Parameter | Default | Meaning | +|-------------|---------|-----------------------------------------------------| +| `z_points` | `75` | Number of z-scan points (must be even) | +| `r_points` | `500` | Radial points at the sample | +| `r_max` | `3` | Radial integration limit, in beam radii *w* | +| `t_points` | `50` | Temporal points | +| `t_max` | `3` | Temporal integration limit, in pulse widths *τ* | +| `ra_points` | `50` | Radial points at the closed aperture | +| `endpts_%` | `10` | Percentage of edge points to use for normalization | +| `max_iter` | `100` | Maximum iterations for the parameter refinement | Memory use scales as `r_points x ra_points x t_points x z_points`, so raising the grid resolution raises RAM sharply; the interface shows the estimate as you