Skip to main content

Collection of useful calculations for optics and more.

Project description

physicsbox

Collection of useful calculations for optics and more. Intended to be a little toolbox/swiss army knife for everyday Python tasks for physists.

Requirements

  • numpy
  • scipy
  • (optional) numba to speed up OAP calculations

Installation

Since the package is still under development, I recommend to clone this git repository to your local machine and install the package in "develop" mode via pip.

  • git clone https://gitlab.lrz.de/cala-public/packages/physicsbox.git
  • cd physicsbox
  • pip install -e . where the -e installs in develop mode and . executes the setup.py in the current folder

If you make improvements to the package or want to download more recent commits, you can now just use git push/pull as usual.

Features

So far, the package contains the following submodules:

  • .units which defines constants like m=1, mm=1e-3 and so on to use in your code
  • .utils contains some coordinate system handling that can be used to plot e.g. an image to scale easily
  • .optics for
    • laser pulse calculations (power, energy, focus size etc. by typical formulas)
    • Gaussian pulse (in time and space) function definitions for 1d, 2d, 3d Gauss calculations
  • .relativity is pretty basic so far, only contains a few formulas for relativistic energy/momentum etc.
  • .wavefronts contains classes for reconstructing a wavefront from Shack-Hartmann images (see examples for use)
  • .oap contains a class for vectorial calculation of the focus of an off-axis parabolic mirror
  • Check out the examples for some things that this package is intended for.

Contributing

  • This started out as a private little helper project, if you have any suggestions just contact me.
  • If you wish to make improvements or add new examples/ features, best create a new branch and a merge request.
    • This avoids headaches just in case I have uncommited/unpublished changes in my local copy somewhere.

Project responsible

Leonard Doyle, leonard.doyle@physik.uni-muenchen.de

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

physicsbox-0.4.1.tar.gz (53.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

physicsbox-0.4.1-py3-none-any.whl (63.5 kB view details)

Uploaded Python 3

File details

Details for the file physicsbox-0.4.1.tar.gz.

File metadata

  • Download URL: physicsbox-0.4.1.tar.gz
  • Upload date:
  • Size: 53.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for physicsbox-0.4.1.tar.gz
Algorithm Hash digest
SHA256 574a0b5efe9708e7a2183633717e00b7112e18890b99fdaed875d346d45e6f8f
MD5 fd4a2e411154a7f59e9ffc0a4a4c9741
BLAKE2b-256 9ea2f55825531d744c7de2994accd735d49cc8aefa91f3452bcfe14bdf661497

See more details on using hashes here.

File details

Details for the file physicsbox-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: physicsbox-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 63.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for physicsbox-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b59fe209c1e831116b695fb813715ef6602f011f2462187627465be6c2ee6ffd
MD5 4a32cf9f9b559afe88c7f5093cc125fb
BLAKE2b-256 7e39de8399928c0e2a33c79f88a9f15f954c9abf769248c7a85abb5c04afe6bf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page