libpypsg


Namelibpypsg JSON
Version 0.4.0 PyPI version JSON
download
home_pageNone
SummaryA Python library for accessing the Planetary System Generator.
upload_time2024-08-03 19:42:42
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
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.
            ``libpypsg``
============

A Python library to interact with the Planetary Spectrum Generator.

The goal of this package is to make PSG more accessible to
new users, but still be powerful 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 libpypsg

    cfg = libpypsg.cfg.PyConfig(
        target=libpypsg.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 = libpypsg.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": "libpypsg",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "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/27/d7/526dcde5972eb5731716d6ecafed097fe3c849982211e8692ff169d6c075/libpypsg-0.4.0.tar.gz",
    "platform": null,
    "description": "``libpypsg``\n============\n\nA Python library to interact with the Planetary Spectrum Generator.\n\nThe goal of this package is to make PSG more accessible to\nnew users, but still be powerful 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 libpypsg\n\n    cfg = libpypsg.cfg.PyConfig(\n        target=libpypsg.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 = libpypsg.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 library for accessing the Planetary System Generator.",
    "version": "0.4.0",
    "project_urls": {
        "Issues": "https://github.com/tedjohnson12/libpypsg/issues",
        "Repository": "https://github.com/tedjohnson12/libpypsg"
    },
    "split_keywords": [
        "astronomy",
        " exoplanet",
        " planet",
        " spectroscopy",
        " psg"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dfa91502007696b9d3309aadc34d87acf310f2f521fb5b7d6922cb46759cd3ed",
                "md5": "1225c963b70a2541a740bf067e54f472",
                "sha256": "09d17ec574a02566d395ac4f1760f9ab191312451e04db3afaac3565dfeb095a"
            },
            "downloads": -1,
            "filename": "libpypsg-0.4.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1225c963b70a2541a740bf067e54f472",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 58034,
            "upload_time": "2024-08-03T19:42:40",
            "upload_time_iso_8601": "2024-08-03T19:42:40.827697Z",
            "url": "https://files.pythonhosted.org/packages/df/a9/1502007696b9d3309aadc34d87acf310f2f521fb5b7d6922cb46759cd3ed/libpypsg-0.4.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "27d7526dcde5972eb5731716d6ecafed097fe3c849982211e8692ff169d6c075",
                "md5": "f24907136d8669608afeb080ea34fdc6",
                "sha256": "afa3c371d2666b3f0007b5d8bf622c674cab98a9744b03fc42464a661b535948"
            },
            "downloads": -1,
            "filename": "libpypsg-0.4.0.tar.gz",
            "has_sig": false,
            "md5_digest": "f24907136d8669608afeb080ea34fdc6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 54406,
            "upload_time": "2024-08-03T19:42:42",
            "upload_time_iso_8601": "2024-08-03T19:42:42.720470Z",
            "url": "https://files.pythonhosted.org/packages/27/d7/526dcde5972eb5731716d6ecafed097fe3c849982211e8692ff169d6c075/libpypsg-0.4.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-03 19:42:42",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "tedjohnson12",
    "github_project": "libpypsg",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "libpypsg"
}
        
Elapsed time: 5.03579s