Metadata-Version: 2.1
Name: pypsg
Version: 0.2.2
Summary: A Python package for accessing the Planetary System Generator.
Author-email: Ted Johnson <ted.johnson@unlv.edu>
Maintainer-email: Ted Johnson <ted.johnson@unlv.edu>
License: MIT License
        
        Copyright (c) 2023 Ted Johnson
        
        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.
        
Project-URL: Repository, https://github.com/tedjohnson12/pypsg
Project-URL: Issues, https://github.com/tedjohnson12/pypsg/issues
Keywords: astronomy,exoplanet,planet,spectroscopy,PSG
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Astronomy
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/x-rst
License-File: LICENSE
Requires-Dist: astropy
Requires-Dist: numpy
Requires-Dist: requests
Requires-Dist: docker
Requires-Dist: python-dateutil
Requires-Dist: netCDF4
Provides-Extra: plot
Requires-Dist: matplotlib; extra == "plot"
Provides-Extra: dev
Requires-Dist: pytest; extra == "dev"
Requires-Dist: pep8; extra == "dev"
Requires-Dist: furo==2023.9.10; extra == "dev"
Requires-Dist: numpydoc; extra == "dev"
Requires-Dist: sphinx; extra == "dev"
Requires-Dist: sphinx-automodapi; extra == "dev"
Requires-Dist: sphinx-gallery; extra == "dev"
Requires-Dist: sphinxcontrib-bibtex; extra == "dev"
Requires-Dist: sphinxcontrib-napoleon; extra == "dev"
Requires-Dist: sphinxcontrib-bibtex; extra == "dev"

``PyPSG``
=========

A Python wrapper for the Planetary Spectrum Generator.

The goal of this package is to make PSG more accessible to
new users, but still be powerfull enough that expert users
will find it useful.

In the simplest use case, users can create a PSG config file from scratch
using the ``PyConfig`` class.


.. code-block:: python


    import pypsg

    cfg = pypsg.cfg.PyConfig(
        target=pypsg.cfg.Target(object='Exoplanet',name='Proxima Cen b')
        )
    print(cfg.content)

.. code-block:: none
    
    b'<OBJECT-NAME>Proxima Cen b\n<OBJECT>Exoplanet'

We can then call PSG with our setup.

.. code-block:: python

    psg = pypsg.APICall(
            cfg=cfg,
            output_type='rad',
        )
    response = psg()





Now let's take a look at the rad file we get back.
The ``PyRad`` class inherits from ``astropy.table.QTable``.

.. code-block:: python

    rad = response.rad

    rad

.. code-block:: none

    Wave/freq     Total          Object       Reflected       Thermal    
        um    W / (sr um m2) W / (sr um m2) W / (sr um m2) W / (sr um m2)
    float64     float64        float64        float64        float64    
    --------- -------------- -------------- -------------- --------------
        1.0      231.99203        231.992        231.992    1.76851e-13
        1.1      184.89523        184.895        184.895    8.59289e-12
        ...            ...            ...            ...            ...
        1.8       45.45587        45.4559        45.4559    1.69172e-05
        1.9      38.276023         38.276         38.276    5.24737e-05
