Solid Angle Utils
A python-package to help with solid angles.
install
pip install solid_angle_utils
simple conversion of units
Inspired by numpy rad2deg and deg2rad.
import solid_angle_utils
a_sr = solid_angle_utils.squaredeg2sr(10)
print(a)
0.0030461741978670856
a_sqdeg = solid_angle_utils.sr2squaredeg(a_sr)
print(a_sqdeg)
10.0
Cones
Convert solid angle to half angle, and the other way around.
import solid_angle_utils
cone_sa = solid_angle_utils.cone.solid_angle(half_angle_rad=0.1)
0.031389755322205774
cone_ha = solid_angle_utils.cone.half_angle(solid_angle_sr=cone_sa)
0.0999999
solid_angle_utils.cone.half_angle_space(0, 0.1, 3)
array([0. , 0.07069594, 0.1 ])
Triangles
Estimate the solid angle of a spherical triangle.
import solid_angle_utils
import numpy as np
x, y, z = np.eye(3)
full_sphere_solid_angle = 4 * np.pi
triangle_solid_angle = solid_angle_utils.triangle.solid_angle(
v0=x, v1=y, v2=z
)
print("Expect 1/8: ", triangle_solid_angle/full_sphere_solid_angle)
Metadata
Release files for solid-angle-utils 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| solid_angle_utils-0.1.2.tar.gz | 6.8 kB | Without provenance | Details for solid_angle_utils-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| solid_angle_utils-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for solid_angle_utils-0.1.2-py3-none-any.whl |
Total release size: 14.2 kB
Release files / solid_angle_utils-0.1.2.tar.gz
| Download URL | solid_angle_utils-0.1.2.tar.gz |
|---|---|
| Size | 6.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b33d3cf7311ece773a406d4d589171ea01e3fd51b1bc3dfae6c8814f0ce734af
|
|
BLAKE2b-256 checksum How to use checksums |
a881e293287ab692db127d3f88d2779910e99a12b9378a7e42c290ddecaf521c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.4
|
Release files / solid_angle_utils-0.1.2-py3-none-any.whl
| Download URL | solid_angle_utils-0.1.2-py3-none-any.whl |
|---|---|
| Size | 7.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7e7800a810e6c7f28a15c92f29e10d5036859cd999f67a28546b7ca0e11f6cda
|
|
BLAKE2b-256 checksum How to use checksums |
8db7f739168e15762132099e7d926590f0992ac40a58b1617956260b6e726866
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.4
|
Security for solid-angle-utils 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.