Xlumina

Latest version: v1.0.0

Safety actively analyzes 682382 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

1.0.0

🐍 System requirements update

- **Python Version**: The project requires Python>=3.10. We suggest to use Python 3.11.
- **JAX Version**: An updated version of JAX is required. Please refer to the installation instructions for the specific version.

❗️ Major new features:

πŸ¦ΎπŸ€– Noise-aware optimization strategy
- Implemented a new robust, noise-aware optimization scheme for simulating real-world experimental conditions.
- The strategy includes imperfections, misalignment, and noise sources in all optical components: including SLMs, wave plates, misalignment, and beam splitters.
- Optimization ncan be run on multiple parallel optical tables using `vmap`, each with randomly sampled noise.
- Detailed explanation of the strategy is available in the project's `README.md`.

πŸ“– New step-by-step guides
- Added `noisy_optimization.ipynb`: A guide on setting up optimization using the new noise-aware scheme.
- Added `noisy_4f_system.ipynb`: A guide on adding noise to optical elements.

✨ New functions in `optical_elements.py`

Optical elements
- `sSLM_with_amplitude`: Implements a super-Spatial Light Modulator (sSLM) with phase and amplitude modulation.
- `jones_sSLM_with_amplitude`: Defines the Jones matrix of super-SLM that modulates both phase and amplitude `sSLM_with_amplitude`.
- `BS_symmetric`: Implements a classical lossy two-mode beam splitter.
- `BS_symmetric_SI`: Implements a classical lossy single-input beam splitter.
- `cylindrical_lens`: Defines a transparent plano-convex cylindrical lens.
- `axicon_lens`: Implements an axicon lens function that produces a Bessel beam.

Optical setups
- `bb_amplitude_and_phase_mod`: Implements a basic building block for general setup construction, containing an sSLM with amplitude and phase modulation and a WP liked by propagation distance z.
- `robust_discovery`: Implements a single-wavelength 3x3 setup for hybrid (topology + optical settings) discovery. Includes noise settings.

Noise simulation
- `shake_setup`: Creates noise for different optical elements on an optical table.
- `shake_setup_jit`: JIT-compilable version of `shake_setup` for use in optimization.

✨ New functions in `toolbox.py`

Image processing
- `image_to_binary_mask`: Converts an image to a binary mask given a threshold.

Mathematical functions
- `gaussian`: Returns a 1D Gaussian distribution.
- `gaussian_2d`: Returns a 2D Gaussian distribution.
- `lorentzian`: Returns a 1D Lorentzian function.
- `lorentzian_2d`: Returns a 2D Lorentzian function.

Data analysis
- `fwhm_1d_fit`: Computes the Full Width at Half Maximum (FWHM) of a 1D array using a fit function (Gaussian or Lorentzian).
- `fwhm_2d_fit`: Computes the FWHM of a 2D array using a fit function (Gaussian or Lorentzian).
- `compute_fwhm`: Calculates the FWHM in 1D or 2D for various field components.

Data Processing
- `MultiHDF5DataLoader`: A class for loading data from multiple HDF5 files, designed for use with JAX. This module is used in `four_f_optimizer.py`.

Minor modifications in `wave_optics.py` and `vectorized_optics.py`:
- Improved readability: print statemets now display time to 4 decimal places.

🚩 Removals and deprecations

Removed functions in `optical_elements.py`:
- Several functions related to optical setups from previous versions of the paper have been removed: `general_setup`, `vSTED`, `sharp_focus` and `xl_setup`.

Removed functions in `loss_functions.py`:
- `small_area`: Fraction of intensity comprised inside the area of a mask.
- `small_area_STED`: Fraction of intensity comprised inside the area of a mask - STED version.

Removed files from `experiments`:
- Several files related to optical setups from previous versions of the paper have been removed: `sharp_focus_optical_table.py`, `sharp_focus_optimizer.py`, `vsted_optical_table.py`, `vsted_optimizer.py`, `xl_optical_table.py` and `xl_optimizer.py`.

Links

Releases

Has known vulnerabilities

Β© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.