Releases: CompPhysLab/SVETlANNa
Releases · CompPhysLab/SVETlANNa
v2.0.1
long-awaited v2.0
This release includes many breaking changes aimed at a better API and long-term support
Breaking changes:
- new
SimulationParametersAPI (thanks to @ChS23) - Renamed axes from
(H, W)to(y, x)(W and H can still be used but with warnings) - Removed
tensor_dotandmulacross the library and replaced them withSimulationParameters.cast - Replaced
sim_params.axes.xwithsim_params.x ConstrainedParameterwas refactored, it can break old checkpoints if used- Redesigned
SpatialLightModulatorAPI:mask_functionargument replaced withlut_function- Added
QuantizerFromStepFunctionwithone_step_tanhandone_step_cos
- Removed
response_parametersargument fromNonlinearElement; users must now usePartialWithParameters - Removed
BoundedParameteralias, now it isConstrainedParameter fresnelpropagator has been removed- Renamed propagator from
AS,RStoASM,RSC(ASandRScan still be used but with warnings) - Removed
clerkmodule
Known issues
phase_retrieval_problemwill not work, as the new free space is under heavy development
New features
- Added
PartialWithParameters, removed internalFunctionModule - Added Hermite–Gaussian modes (thanks to @antoshkabest)
- Added
THzandas_(attoseconds) tounits.ureg - Advanced free-space propagation methods with zero-padding: zpASM and zpRSC
- Updated colors in
show_stepwise_forward
Simulation Parameters:
- Added API for creating
SimulationParameterswithout a dictionary:SimulationParameters(x=..., y=..., wavelength=..., …) - Methods similar to
torch.Tensorwere added:clone()andequal() - Now each element has its own instance of
SimulationParameters(cloned on init to prevent unintended sharing) - Added
cast()method with shape validation and LRU caching SimulationParametersnow inherits fromnn.Module, enabling automatic device transfer via PyTorch's module tree- Added comprehensive axes management:
add_axis(),remove_axis(),reorder()
Elements:
- Elements rewritten to use the new
SimulationParametersAPI (usingcast) - Lenses, apertures, and diffractive layers now share a unified API: property
transmission_functioninstead of a mix of methods and properties - Added support for
svetlanna.ParameterinNonlinearElement
Dev Tools & Quality:
- black, Flake8, mypy added to the pipeline
- Created dedicated test folders:
tests/elements,tests/wavefront - Added global fixtures in tests:
sim_params_simple, which generates differentSimulationParametersdevice_simple, which iterates over devices (cpu,mps,cuda) and skips if a device is not available (seeconftest.py)
v1.0.4
v1.0.3
v1.0.2
Subfolder bug fix
v1.0.1 Update README.md
First release
Update README.md Add online documentation link