This package is a python interface for laboratory adaptive optics systems, with a focus on the calibration of deformable mirrors (DMs) and the acquisition of wavefront data using interferometers.
Project description
OptiCalib : adaptive OPTics package for deformable mirrors CALibration
Adaptive Optics Group, INAF - Osservatorio Astrofisico di Arcetri
OptiCalib is a python package which first goal is to make easy deformable mirror's calibration in the laboratory (and not only).
It was born as a general extrapolation of the software built for the control and calibration of the ELT @ M4 adaptive mirror and it's calibration tower, OTT (Optical Test Tower).
Description
The OPTICALIB package serves two main purposes:
-
Making connection to the hardware (interferometers, DMs, ...) easy;
-
Providing routines for Deformable Mirrors calibrations.
The latests, stable, version can be installed from pypi:
pip install opticalib
The in-development version can be installed directly from this repository:
pip install git+"https://github.com/ArcetriAdaptiveOptics/opticalib.git"
But do expect some bugs!
Upon installation, the software will create an entry point script called calpy, which is usefull to set up a specific experiment's environment. Let's say we have an optical bench composed of an interferometer 4D PhaseCam6110 and an Alpao Deformable mirror, say DM820. We can create the experiment's environment just like:
calpy -f ~/alpao_experiment --create
This will create, in the ~/alpao_experiment folder, the package's data folder tree, together with a configuration file in the SysConfig folder. The configuration file, documented in configuration documentation, is where all devices must be specified.
Example usage
Once done with the configuration, we can then start using out instruments:
calpy -f ~/alpao_experiment
# The `calpy` function will automatically import opticalib (with `opt`
# as alias), as well as the `opticalib.dmutils` as dmutils
interf = opt.PhaseCam(6110) # set in the configuration file
dm = opt.AlpaoDm(820) # set in the configuration file
# Having the bench set up and the configuration file set, we can acquire
# an Influence Function by just doing
tn = dmutils.iff_module.iffDataAcquisition(dm, interf) # Optional paramenters
# are `modesList, modesAmplitude, template`, which if not specified are
# read from the configuration file
Documentation
For the API references, check Opticalib API PDF (work in progress...), while for configuration details check configuration documentation.
Simulator data without Git LFS
Simulator data is no longer shipped inside the repository or Python package. All files used by the simulator are fetched on demand and cached locally.
Recommended distribution model
- Keep all simulator assets out of the repository and out of the package.
- Publish those files in an HTTP-accessible location (GitHub Release assets, object storage, institutional web server, Zenodo, ...).
- Let opticalib download missing files on-demand to a local cache directory:
~/.opticalib/OPTData/SimData(or your configured OPTData path).
User configuration
By default, opticalib looks for simulator files under this base URL:
https://github.com/ArcetriAdaptiveOptics/opticalib/releases/download/simdata-v1
To use a custom endpoint, set:
export OPTICALIB_SIMDATA_BASE_URL="https://your-host/path/to/simdata"
You can also override one specific file URL:
export OPTICALIB_SIMDATA_URL_M4_DATA_H5="https://your-host/m4_data.h5"
Optional prefetch
You can pre-download all known simulator files:
from opticalib.simulator import prefetch_simdata
prefetch_simdata()
This avoids runtime downloads when simulators are instantiated.
The repository intentionally does not include the opticalib/simulator/_API/SimData
payload anymore.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file opticalib-1.3.1.tar.gz.
File metadata
- Download URL: opticalib-1.3.1.tar.gz
- Upload date:
- Size: 225.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e77bc5c10e5ffc581a009f5918ba7bf77f096c5f93e2d389aa80f06d6bca4c7d
|
|
| MD5 |
a7a1477ddbde7f9efdfb712ac8ed0b96
|
|
| BLAKE2b-256 |
feeace7f0f80126afbb08c198bfa3d0f96f92ddd4d4a18be208ad4355018055d
|
File details
Details for the file opticalib-1.3.1-py3-none-any.whl.
File metadata
- Download URL: opticalib-1.3.1-py3-none-any.whl
- Upload date:
- Size: 263.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4317143f1da307882435664646e424b2fa04f40634b4fce26856b3a9bc5e8536
|
|
| MD5 |
fa38cc133d003b4ff8932070bf5775ef
|
|
| BLAKE2b-256 |
c97ac39d12eae34cb93d55977195c475a68dad9c5d45271bc71e6cf3745a6763
|