pypsg


Namepypsg JSON
Version 0.3.1 PyPI version JSON
download
home_pageNone
SummaryA Python package for accessing the Planetary System Generator.
upload_time2024-04-26 03:38:15
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseMIT 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.
keywords astronomy exoplanet planet spectroscopy psg
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ``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

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pypsg",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": "Ted Johnson <ted.johnson@unlv.edu>",
    "keywords": "astronomy, exoplanet, planet, spectroscopy, PSG",
    "author": null,
    "author_email": "Ted Johnson <ted.johnson@unlv.edu>",
    "download_url": "https://files.pythonhosted.org/packages/e2/3d/be2a983e70c50f84fec01d6982f78244432c8c40ccb71d4956fe9552a157/pypsg-0.3.1.tar.gz",
    "platform": null,
    "description": "``PyPSG``\n=========\n\nA Python wrapper for the Planetary Spectrum Generator.\n\nThe goal of this package is to make PSG more accessible to\nnew users, but still be powerfull enough that expert users\nwill find it useful.\n\nIn the simplest use case, users can create a PSG config file from scratch\nusing the ``PyConfig`` class.\n\n\n.. code-block:: python\n\n\n    import pypsg\n\n    cfg = pypsg.cfg.PyConfig(\n        target=pypsg.cfg.Target(object='Exoplanet',name='Proxima Cen b')\n        )\n    print(cfg.content)\n\n.. code-block:: none\n    \n    b'<OBJECT-NAME>Proxima Cen b\\n<OBJECT>Exoplanet'\n\nWe can then call PSG with our setup.\n\n.. code-block:: python\n\n    psg = pypsg.APICall(\n            cfg=cfg,\n            output_type='rad',\n        )\n    response = psg()\n\n\n\n\n\nNow let's take a look at the rad file we get back.\nThe ``PyRad`` class inherits from ``astropy.table.QTable``.\n\n.. code-block:: python\n\n    rad = response.rad\n\n    rad\n\n.. code-block:: none\n\n    Wave/freq     Total          Object       Reflected       Thermal    \n        um    W / (sr um m2) W / (sr um m2) W / (sr um m2) W / (sr um m2)\n    float64     float64        float64        float64        float64    \n    --------- -------------- -------------- -------------- --------------\n        1.0      231.99203        231.992        231.992    1.76851e-13\n        1.1      184.89523        184.895        184.895    8.59289e-12\n        ...            ...            ...            ...            ...\n        1.8       45.45587        45.4559        45.4559    1.69172e-05\n        1.9      38.276023         38.276         38.276    5.24737e-05\n",
    "bugtrack_url": null,
    "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. ",
    "summary": "A Python package for accessing the Planetary System Generator.",
    "version": "0.3.1",
    "project_urls": {
        "Issues": "https://github.com/tedjohnson12/pypsg/issues",
        "Repository": "https://github.com/tedjohnson12/pypsg"
    },
    "split_keywords": [
        "astronomy",
        " exoplanet",
        " planet",
        " spectroscopy",
        " psg"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b15e5f9126c54d89693d4dc19ea7e98698756d08ea16dae6a654bf5c9410db5e",
                "md5": "a22921573759dcbcb5e56932f6f1986e",
                "sha256": "f2be8fdb84807be1ec10d76a508395b51a9905e6eb570319cf082b0e5b73a717"
            },
            "downloads": -1,
            "filename": "pypsg-0.3.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a22921573759dcbcb5e56932f6f1986e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 55912,
            "upload_time": "2024-04-26T03:38:13",
            "upload_time_iso_8601": "2024-04-26T03:38:13.135772Z",
            "url": "https://files.pythonhosted.org/packages/b1/5e/5f9126c54d89693d4dc19ea7e98698756d08ea16dae6a654bf5c9410db5e/pypsg-0.3.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e23dbe2a983e70c50f84fec01d6982f78244432c8c40ccb71d4956fe9552a157",
                "md5": "26870d00df43ab3e35a4b0d906247a19",
                "sha256": "b4ba3661c689371f2eddc6629618babae7a5d0bdb8780382de15b5c0e3b8e8e6"
            },
            "downloads": -1,
            "filename": "pypsg-0.3.1.tar.gz",
            "has_sig": false,
            "md5_digest": "26870d00df43ab3e35a4b0d906247a19",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 53084,
            "upload_time": "2024-04-26T03:38:15",
            "upload_time_iso_8601": "2024-04-26T03:38:15.054816Z",
            "url": "https://files.pythonhosted.org/packages/e2/3d/be2a983e70c50f84fec01d6982f78244432c8c40ccb71d4956fe9552a157/pypsg-0.3.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-26 03:38:15",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "tedjohnson12",
    "github_project": "pypsg",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pypsg"
}
        
Elapsed time: 0.23648s