Configuration Reference¶
This is the canonical reference for CLI JSON5 parameters.
Conventions¶
- Wavelengths accept meters or nanometers:
- values
> 1e-6are interpreted as nanometers and converted to meters S_i_hatcan have length 2 or 3:[S1_hat, S2_hat]or[S1_hat, S2_hat, S3_hat]- Stress map default order is
[sigma_xx, sigma_yy, sigma_xy]
Parameter Precedence¶
image-to-stress¶
- Input source: either
folderNameorinput_filenameis required - If
calibration_fileis set: - missing
C,S_i_hat,wavelengthsare filled from the profile - blank correction is applied
- For output path precedence:
- if
output_filenameexists in JSON, it takes precedence over CLI--output
stress-to-image¶
- Optional
p_filenameloads fallback parameters from a second JSON5 file - Precedence order:
- explicit keys in current params
- fallback keys from
p_filename - calibration profile values (
C,S_i_hat,wavelengths) ifcalibration_fileis set
image-to-stress Keys¶
Required (directly or via calibration):
thicknesswavelengthsCS_i_hat- plus one input source:
folderNameorinput_filename
Common optional keys:
output_filenamecrop:[x1, x2, y1, y2]binningdebug
Seeding keys:
seeding.n_maxseeding.sigma_max
Disorder Correction keys:
Optional block correction:
correction.enabled: boolean (defaultfalse)correction.order_param: float, [0, 1] (order parameter |m|)correction.N: float (number of grain encounters)correction.d: float (particle diameter, used to estimate N if N is missing)
Optimisation keys:
knot_spacingspline_degreeboundary_mask_fileboundary_values_filesboundary_weightregularisation_weight(aliasregularization_weight)regularisation_orderexternal_potential_fileexternal_potential_gradient([dVdx, dVdy])max_iterationstoleranceverbosedebug
Not supported:
solverglobal_solverglobal_mean_stress
stress-to-image Keys¶
Required:
stress_filename(legacy alias:s_filename)thickness(legacy alias:t)wavelengths(legacy alias:lambda_light)C
Optional:
S_i_hatcalibration_filestress_order:xx_yy_xy(default) orxy_yy_xx(legacy)scatteringoutput_filenamep_filename(fallback param file)
demosaic-raw CLI Flags¶
- positional:
input_file --width(default4096)--height(default3000)--dtype(uint8oruint16)--output-prefix--format(tifforpng)--all(recursive processing)--mode(auto,single,average,series)--average-method(meanormedian)--start(frame start index, inclusive)--stop(frame stop index, exclusive)--step(frame stride, default1)
Notes:
--mode autochooses:singlefor a.rawinput fileaveragefor a recording directory- Recording directory mode expects
0000000/frame*.raw. - Metadata is auto-loaded from
recordingMetadata.jsonwhen available.
calibrate-photoelastimetry Keys¶
Required:
method:brazilian_diskorcoupon_testwavelengthsthicknessgeometry(method-specific)load_steps
Method-specific required geometry:
brazilian_disk:radius_mm,radius_px,center_pxcoupon_test:gauge_roi_px,coupon_width_m
Common optional keys:
dark_frame_file+blank_frame_file(both or neither)fit.max_points,fit.seed,fit.loss,fit.f_scale,fit.max_nfevfit.initial_C,fit.prior_weight,fit.c_relative_boundsoutput_profile,output_report,output_diagnostics
Required fit key:
fit.S_i_hatas an explicit 3-component fixed source state[S1_hat, S2_hat, S3_hat]
fit.S_i_hat is treated as a fixed source state during calibration; the
optimiser only fits C. Calibration does not provide a default S_i_hat.
Load step input notes:
- Each
load_steps[i].image_filemay be either: - a demosaiced stack (
[H, W, n_wavelengths, 4]), or - a raw frame (
.raw) with nearbyrecordingMetadata.json - Raw calibration inputs are demosaiced internally to
[H, W, 3, 4]using channelsR, G1, B.
calibrate-photoelastimetry CLI Flags¶
- positional:
json_filename --interactive(launch click-based geometry wizard)--save-config <path>(write updated config after interactive geometry selection)