A simple python library with an astropy unit for λ/D
Project description
lod_unit
This is set up to make it easy to keep coronagraph information in λ/D space with an astropy unit called lod
("Lambda Over D"). Convert into angular units (or vise versa) with an astropy Equivalency relationship lod_eq
.
Installation
pip install lod_unit
Use
Typical use will look like
import astropy.units as u
from lod_unit.lod_unit import lod, lod_eq
diam = 10*u.m
lam = 500*u.nm
separation_lod = 3 * lod
separation_lod.to(u.arcsec, lod_eq(lam, diam))
>> <Quantity 0.03093972 arcsec>
separations_as = [0.1, 0.5, 1]*u.arcsec
separations_as.to(lod, lod_eq(lam, diam))
>> <Quantity [ 9.69627362, 48.48136811, 96.96273622] λ/D>
Hey Corey, why did you spend so much time on this package?
This was a testing ground for me to set up different GitHub tools on the assumption no one would notice.
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
lod_unit-1.4.2.tar.gz
(36.9 kB
view hashes)
Built Distribution
Close
Hashes for lod_unit-1.4.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4045075bc73d8ad07934913398e07693f690b44c3ad82a3cec8097ee1ddb717 |
|
MD5 | 61e88cf0c272b54da3549f748e04be83 |
|
BLAKE2b-256 | 321b8d610f8f03133be6e92202a8b776b5d78ca3e1a9bc04d395d0c15e714471 |