Convert between different radiation units
Project description
An easy-to-use Python package for converting between different radiation units
Implementing the STScI units page, since astropy doesn’t like to easily convert between radiation units.
Example
Using astropy units:
import numpy as np import astropy.units as u import radiation_unit_conversion.units as units flambda_spectrum = np.linspace(1,10,10) * u.W/u.m**2/u.micron wavelength = np.linspace(1,5,10) * u.micron fnu_spectrum = units.conversion(in_flux=flambda_spectrum, output_units='Jy', in_wavelength=wavelength)
Without using astropy units:
import numpy as np import radiation_unit_conversion.units as units flambda_spectrum = np.linspace(1,10,10) # W/m^2/micron wavelength = np.linspace(1,5,10) # micron fnu_spectrum = units.conversion(in_flux=flambda_spectrum, output_units='Jy', in_unit='W/m2/um', in_wavelength=wavelength, in_wavelength_units='um')
License
Copyright 2024 Madeline Lam and Evert Nasedkin
radiation_unit_conversion is available under the MIT license. See the LICENSE file for more information.
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 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 radiation_unit_conversion-0.1.tar.gz.
File metadata
- Download URL: radiation_unit_conversion-0.1.tar.gz
- Upload date:
- Size: 10.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
77b10055d70bc8fdb008b15b581ccd4de470228c40857877805369cf68a1ee33
|
|
| MD5 |
26c99fac957640fc50a9deb41685819d
|
|
| BLAKE2b-256 |
bde76c829ac3ae01102af73cf33b56f225553615c90abbbd48259a72cec7d5b2
|
File details
Details for the file radiation_unit_conversion-0.1-py3-none-any.whl.
File metadata
- Download URL: radiation_unit_conversion-0.1-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3831f423e6d413079ace9792f330e3506cf63d12416993bc4f63ae473db14b85
|
|
| MD5 |
1914660464fe9cb2f274badf518686eb
|
|
| BLAKE2b-256 |
079971e255e8a2ff34ab6ff1b9bec4a72be440cf5b6dabdc9c3228bfa68208eb
|