Point Spread Function calculations for fluorescence microscopy
Project description
Psf is a Python library to calculate Point Spread Functions (PSF) for fluorescence microscopy.
The psf library is no longer actively developed.
- Author:
- License:
BSD 3-Clause
- Version:
2024.4.24
Quickstart
Install the psf package and all dependencies from the Python Package Index:
python -m pip install -U psf[all]
See Examples for using the programming interface.
Source code and support are available on GitHub.
Requirements
This revision was tested with the following requirements and dependencies (other versions may work):
CPython 3.9.13, 3.10.11, 3.11.9, 3.12.3
NumPy 1.26.4
Matplotlib 3.8.4 (optional for plotting)
Revisions
2024.4.24
Support NumPy 2.
2024.1.6
Change PSF.TYPES from dict to set (breaking).
2023.4.26
Use enums.
Derive Dimensions from UserDict.
Add type hints.
Convert to Google style docstrings.
Drop support for Python 3.8 and numpy < 1.21 (NEP29).
2022.9.26
Fix setup.py.
2022.9.12
Remove support for Python 3.7 (NEP 29).
Update metadata.
2021.6.6
Remove support for Python 3.6 (NEP 29).
2020.1.1
Remove support for Python 2.7 and 3.5.
Update copyright.
2019.10.14
Support Python 3.8.
2019.4.22
Fix setup requirements.
Fix compiler warning.
References
Electromagnetic diffraction in optical systems. II. Structure of the image field in an aplanatic system. B Richards and E Wolf. Proc R Soc Lond A, 253 (1274), 358-379, 1959.
Focal volume optics and experimental artifacts in confocal fluorescence correlation spectroscopy. S T Hess, W W Webb. Biophys J (83) 2300-17, 2002.
Electromagnetic description of image formation in confocal fluorescence microscopy. T D Viser, S H Wiersma. J Opt Soc Am A (11) 599-608, 1994.
Photon counting histogram: one-photon excitation. B Huang, T D Perroud, R N Zare. Chem Phys Chem (5), 1523-31, 2004. Supporting information: Calculation of the observation volume profile.
Gaussian approximations of fluorescence microscope point-spread function models. B Zhang, J Zerubia, J C Olivo-Marin. Appl. Optics (46) 1819-29, 2007.
The SVI-wiki on 3D microscopy, deconvolution, visualization and analysis. https://svi.nl/NyquistRate
Examples
>>> import psf >>> args = dict( ... shape=(32, 32), ... dims=(4, 4), ... ex_wavelen=488, ... em_wavelen=520, ... num_aperture=1.2, ... refr_index=1.333, ... pinhole_radius=0.55, ... pinhole_shape='round' ... ) >>> obsvol = psf.PSF(psf.GAUSSIAN | psf.CONFOCAL, **args) >>> obsvol.sigma.ou (2.588..., 1.370...) >>> obsvol = psf.PSF(psf.ISOTROPIC | psf.CONFOCAL, **args) >>> print(obsvol, end='') PSF ISOTROPIC|CONFOCAL shape: (32, 32) pixel dimensions: (4.00, 4.00) um, (55.64, 61.80) ou, (8.06, 8.06) au excitation wavelength: 488.0 nm emission wavelength: 520.0 nm numeric aperture: 1.20 refractive index: 1.33 half cone angle: 64.19 deg magnification: 1.00 underfilling: 1.00 pinhole radius: 0.550 um, 8.498 ou, 1.1086 au, 4.40 px computing time: ... ms >>> obsvol[0, :3] array([1. , 0.51071, 0.04397]) >>> # write the image plane to file >>> obsvol.slice(0).tofile('_test_slice.bin') >>> # write a full 3D PSF volume to file >>> obsvol.volume().tofile('_test_volume.bin')
Refer to psf_example.py in the source distribution for more examples.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for psf-2024.4.24-cp312-cp312-win_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 062312e061ac751d2819c9068d6aec3a9465bd16d4ea265e223b12b48ceead05 |
|
MD5 | dbfc8d227a6c14b0af76eee8186afd40 |
|
BLAKE2b-256 | a7757ba349d1f3a03e53d1275776a67446441c29ce1093ed55b9ffa134c0630c |
Hashes for psf-2024.4.24-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8b9be034f0d7262b49dfdca651912e442d6548f25582b701defa497de0e3558b |
|
MD5 | b5b2c790b60eedb7ab46962e2d4c47ae |
|
BLAKE2b-256 | 2310764ab9becbfb95a885a1d354295ecece3c55ada6c05b2e9e0e99d4c9871e |
Hashes for psf-2024.4.24-cp312-cp312-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c9e8461672549cde40e0ac47bda7ace4b9cbe80fa3aa801ba1d628ce455c62c |
|
MD5 | 8b2dc931d10a2a9a6d87426ed1e48878 |
|
BLAKE2b-256 | 5f962e6639070e6b4f16245b4d3d8080ec2c8b92a020feb224ce9e4e774195b4 |
Hashes for psf-2024.4.24-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 865af6f437d40d59f0ce986d0d85044478adde4e937ba67637a97489cb0053b0 |
|
MD5 | d23d45ad2245ce1174ba87187542bffe |
|
BLAKE2b-256 | ed32fe104d5c2d965f806a35943d39506ab9a4360725ae60336db7fe2ce2f681 |
Hashes for psf-2024.4.24-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60a57cb548df9ca1ee589c2a205f0353e8a45ddf3169de1a538ffeb7a60986fe |
|
MD5 | f993201b66b305128b3bf9cb50be0e38 |
|
BLAKE2b-256 | 8646f3a6fc007c4c921a433558e0dbdc31198c5750ebdc569b62f53b03615c37 |
Hashes for psf-2024.4.24-cp312-cp312-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cdeffdba12eb13a077b17243cf34c46fcaafaaeca6331d7f0471959e4cff6db4 |
|
MD5 | d9cc33efd2bff13fc4372f9a63c78b7d |
|
BLAKE2b-256 | 093806ad291df2185cfc306cb46cff33aa6c4b654e600375862eb0d04051919d |
Hashes for psf-2024.4.24-cp311-cp311-win_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 884d8c3bee3d3ddad6606f3e364d8ab4db5b62e03bf8e64f482bd89ee8a46cbe |
|
MD5 | 829249b1179b37ea91f1c94fcee92a00 |
|
BLAKE2b-256 | eaf4c585ab8026098f0f1eae4e094d84e2da45301a3931ef4c66ad16a14274b2 |
Hashes for psf-2024.4.24-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82eb231d440bc084f93811823a5a7493d5d9c9e442f914956c67de8b51f4ac90 |
|
MD5 | 94f070b579a4014c848bae3a6ed074ce |
|
BLAKE2b-256 | d36403d22f0ec934a9bb36b01f2fe8993e100fa78daae7961588d58c0571a26a |
Hashes for psf-2024.4.24-cp311-cp311-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d47928e042d87ce3ee2f53451834011a9bf8ca10bfc2bf95293ee8c478d04c2 |
|
MD5 | c21e65bc258eaf221b4f909b5dcb57f3 |
|
BLAKE2b-256 | 452144c2d11f83faf3dea8f7da0103c802850696f75453861e22a643ed01b947 |
Hashes for psf-2024.4.24-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ceb4b2036c6d72ed60d8bef2893977f75963e1f31a857d280c5247c404160d71 |
|
MD5 | e8fc3e450316866a332bc9955959a253 |
|
BLAKE2b-256 | 9a0fec5db4cbac4b6050f9b0fc003beb7af5121890ab7716aae2ffb30deafcde |
Hashes for psf-2024.4.24-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 84d59bbfcdd08efe5cb4e138d5ee8ba5ae1c16cc9094c8bce1faeff3e977bc67 |
|
MD5 | b39cdcd6dc35944da0eb679ff9517848 |
|
BLAKE2b-256 | 444f57b7bec2958b913750263ed08f644c21160dbadf46784da3dd6cfcdcf39a |
Hashes for psf-2024.4.24-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 95086083ff8cb947267becc9424666698b5610df2b1474bee8c16bd34e20b590 |
|
MD5 | 279870d414a1fc46255c944acd00bcb6 |
|
BLAKE2b-256 | ed183a5405e88b546a6a931255f9c84bfe900dffd7af6aa7e47a45c657ccbe01 |
Hashes for psf-2024.4.24-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06c0136843f83ba80a91352f3599976c9d25ab0372ca4e4f55b45b4db5d69da6 |
|
MD5 | 04a4707267fb379e469514d5159d150c |
|
BLAKE2b-256 | 763d9527a358ce6ce62aa705854be2c4d1cecdaa4b26b508cb15159542760d19 |
Hashes for psf-2024.4.24-cp310-cp310-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62362710f4048b310db487681ce9f6f25609d28552901fc08ac37bcc36ad143a |
|
MD5 | a8f8fe4ab4cf780d60cfaadd1f7fe8bd |
|
BLAKE2b-256 | 04999708f0e58ca2820a907b23a3cf63229af3527675f4484cbc571e58903d32 |
Hashes for psf-2024.4.24-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f24572bb9358cd84061c3836003bde56cf6f992a4082acc5f3ee354a6bc230f |
|
MD5 | 2c9536af717ae5052ab0d8a92313ad1a |
|
BLAKE2b-256 | 331b54471aae8f0563c5716661a6eb512960b277750583f640b32105ab449bb8 |
Hashes for psf-2024.4.24-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32b02ff718f88e548dc69c77febabce65fbcd5295a55fab974d2469ed915bc3f |
|
MD5 | 844d6d1e4858ae3e62d2d04b7589dd38 |
|
BLAKE2b-256 | 486bc97c7171b2cfdb612f3aed58b86667f348f5859a0cd1a79d200bc85203d8 |
Hashes for psf-2024.4.24-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d3484300f602d1ba3c6b94b3bcc44d0a611c0605a8b5e8b3fdc55578d065d9c0 |
|
MD5 | 6a0b0b3ffc850db6b09aa1e9e41b139b |
|
BLAKE2b-256 | de17e14b17577dd7ce1c3face6affb4bcaf93190d66764e6def5ea257a03f184 |
Hashes for psf-2024.4.24-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | af43b445e4feccd8a5fee9ccf1282902646467ae36911a29fa8044f5fae78a93 |
|
MD5 | 628a6e9ca26164c14200c49ea3b04ffc |
|
BLAKE2b-256 | ab18ee947b8512c42f0be5a8db0e9b5bf0f82d28b6a61f42ba2e983142c898e5 |
Hashes for psf-2024.4.24-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d351b882441ca3efdf94b29870e272026bf46fb9e858b461a3a5573337aefae |
|
MD5 | f1ce13739ade76d62feaa2f52f1244d3 |
|
BLAKE2b-256 | c0d8951de90c4359214444318e9caafabeaa6fd491258a6e3efc9115e7c73fe0 |
Hashes for psf-2024.4.24-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e70c04f213571c81ff5b2c323a75b212e289912b668e69164e7be1ca8a0223dd |
|
MD5 | d78c05322eff7d1556bea8c8bb5ed8fb |
|
BLAKE2b-256 | 929dc4d62947293c422d3d18cc88a1ab2354844455b512993f7d231ea0130c5e |
Hashes for psf-2024.4.24-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e69ab130294a31f710296ef1dd09fdedca67cf82dc7cfb68c040c3b26590f719 |
|
MD5 | 51d668767925ab01f65583d9fc28f38a |
|
BLAKE2b-256 | dd2096b7ced9229956487b8759725186305c154de8cbedde62aeefb091f35793 |
Hashes for psf-2024.4.24-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2615d4f9fec1dbf0b2e9f82f3376194e2d0a943a8af8d5b48928448cd62ca51 |
|
MD5 | c0600b7fde23b444fb0f8ef95dadc31b |
|
BLAKE2b-256 | 7e0f523d870bc100d19643029b398d88e0a4ec06c30d8f8d2ac9365d03d1f8cc |