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.
Release files for radiation-unit-conversion 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| radiation_unit_conversion-0.1.tar.gz | 10.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| radiation_unit_conversion-0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.1 kB
Release files / radiation_unit_conversion-0.1.tar.gz
| Download URL | radiation_unit_conversion-0.1.tar.gz |
|---|---|
| Size | 10.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
77b10055d70bc8fdb008b15b581ccd4de470228c40857877805369cf68a1ee33
|
|
BLAKE2b-256 checksum How to use checksums |
bde76c829ac3ae01102af73cf33b56f225553615c90abbbd48259a72cec7d5b2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.5
|
Release files / radiation_unit_conversion-0.1-py3-none-any.whl
| Download URL | radiation_unit_conversion-0.1-py3-none-any.whl |
|---|---|
| Size | 7.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3831f423e6d413079ace9792f330e3506cf63d12416993bc4f63ae473db14b85
|
|
BLAKE2b-256 checksum How to use checksums |
079971e255e8a2ff34ab6ff1b9bec4a72be440cf5b6dabdc9c3228bfa68208eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.5
|