Skip to main content

A Python package for accessing the Planetary System Generator.

Project description

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.

import pypsg

cfg = pypsg.cfg.PyConfig(
    target=pypsg.cfg.Target(object='Exoplanet',name='Proxima Cen b')
    )
print(cfg.content)
b'<OBJECT-NAME>Proxima Cen b\n<OBJECT>Exoplanet'

We can then call PSG with our setup.

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.

rad = response.rad

rad
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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pypsg-0.1.1.tar.gz (28.7 kB view details)

Uploaded Source

Built Distribution

pypsg-0.1.1-py3-none-any.whl (29.7 kB view details)

Uploaded Python 3

File details

Details for the file pypsg-0.1.1.tar.gz.

File metadata

  • Download URL: pypsg-0.1.1.tar.gz
  • Upload date:
  • Size: 28.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for pypsg-0.1.1.tar.gz
Algorithm Hash digest
SHA256 bdee10a39fc7d1f27faed1b4b1ae530e92abb3ea78c66eddc5636a0d315dae48
MD5 fb423d37a472e3715295222e35882458
BLAKE2b-256 c1691a4e3362554cbf2b60053a7e6a65271ece99252ecfb3522368e0a687c727

See more details on using hashes here.

File details

Details for the file pypsg-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pypsg-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 29.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for pypsg-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c6a3755641d5c29813f67b1d2b1bbeb464974fc99cd07c93ad908a134b21ee5b
MD5 9fdee1974c7acd03de5995d5c38d2404
BLAKE2b-256 0da4dc345bee70f9660d971c9eebb51ad7f72df0feea6a8a03e1b2680cf5f2f9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page