Physics-Ellipsometry-VASE
view release on metacpan or search on metacpan
with automatic eV/nm unit handling and interpolation
- **Circular Delta residuals** â proper handling of the 0°/360° wrap in the
Levenberg-Marquardt objective function
- **Parameter bounds & vary/fix** (`VASE::Parameter`) â logit-transformed
bounded optimisation, fixed-parameter support
- **Global optimiser** (`VASE::Optimizer`) â Differential Evolution
(DE/rand/1/bin) and grid search for initial parameter estimation
- **Weighted fitting** â uses measured uncertainties (sigma) from Woollam files
- **Numerical Jacobian** â configurable finite-difference step with minimum
absolute floor
- **Plotting** â multi-angle colour-coded overlays via PDL::Graphics::Gnuplot
## Installation
From source:
```bash
perl Makefile.PL
make
make test
make install
lib/Physics/Ellipsometry/VASE.pm view on Meta::CPAN
my $delta_data = $data->((3),:)->flat;
my $delta_model = $y_fit->slice("$npts:" . (2*$npts-1));
my $diff = $delta_model - $delta_data;
$delta_model -= 360.0 * rint($diff / 360.0);
}
my $chi2 = sum(($y_data - $y_fit)**2)->sclr;
return sqrt($chi2 / (2*$npts - $nparams));
}
# Plot raw data with model fit overlay
sub plot {
my ($self, $fit_params, %opts) = @_;
require PDL::Graphics::Gnuplot;
my $data = $self->{data};
my $model = $self->{model};
my $wavelength = $data->((0),:)->flat;
my $angles = $data->((1),:)->flat;
my $psi_data = $data->((2),:)->flat;
( run in 0.681 second using v1.01-cache-2.11-cpan-600a1bdf6e4 )