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.2.2.tar.gz (51.6 kB view details)

Uploaded Source

Built Distribution

pypsg-0.2.2-py3-none-any.whl (52.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pypsg-0.2.2.tar.gz
Algorithm Hash digest
SHA256 3dadb90dfc5c6b1933ff8563010d6d0830c9f1b0d11a6a48e6377e2747a70785
MD5 c1e1ee9d9d2c4617aa96b5595c6e2524
BLAKE2b-256 215c68428a3984516d51576374975c0fdf621a92b85a0cb540f437a0189ff04d

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pypsg-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 e990b4b663b34b2f886b70c6de571c87bf99827617320c3152fb881f719bfca0
MD5 6cc632ff646a1622d7d238bc844ba3e9
BLAKE2b-256 20dc0edf4ecc086a226fc2b45cc847e0b2ed32ee320c8dfbfd08846b258ce6b9

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