Metadata-Version: 2.4
Name: radiation_unit_conversion
Version: 0.1
Summary: Convert between different radiation units
Project-URL: Repository, https://github.com/nenasedk/radiation_unit_conversion/tree/main
Project-URL: Issues, https://github.com/nenasedk/radiation_unit_conversion/issues
Project-URL: Changelog, https://github.com/nenasedk/radiation_unit_conversion/blob/main/CHANGELOG.md
Author-email: Evert Nasedkin <nasedkinevert@gmail.com>
License: Copyright (c) 2024 Evert Nasedkin
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Astronomy
Requires-Python: >=3.9
Requires-Dist: astropy
Requires-Dist: numpy
Provides-Extra: test
Requires-Dist: build; extra == 'test'
Requires-Dist: pytest; extra == 'test'
Requires-Dist: pytest-cov; extra == 'test'
Description-Content-Type: text/x-rst

=========================
radiation_unit_conversion
=========================

**An easy-to-use Python package for converting between different radiation units**

Implementing the `STScI units page <https://www.stsci.edu/~strolger/docs/UNITS.txt>`_, 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.
