Skip to main content

A Python library for accessing the Planetary System Generator.

Project description

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.

import libpypsg

cfg = libpypsg.cfg.PyConfig(
    target=libpypsg.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 = 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.

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

libpypsg-0.5.0.tar.gz (55.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

libpypsg-0.5.0-py3-none-any.whl (58.6 kB view details)

Uploaded Python 3

File details

Details for the file libpypsg-0.5.0.tar.gz.

File metadata

  • Download URL: libpypsg-0.5.0.tar.gz
  • Upload date:
  • Size: 55.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for libpypsg-0.5.0.tar.gz
Algorithm Hash digest
SHA256 e4706cb5fb7772934779606fa4234cd8b7dfbfd20844f37b03cd935b9ae03640
MD5 bf4ab6ff700e657b3a6c7c77b0c4d757
BLAKE2b-256 7e666b2a755fb3082ef37da356a58ec0a9674e7b699db7f990279bf5378b1d5a

See more details on using hashes here.

Provenance

The following attestation bundles were made for libpypsg-0.5.0.tar.gz:

Publisher: publish-to-pypi.yml on tedjohnson12/libpypsg

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file libpypsg-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: libpypsg-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 58.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for libpypsg-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f5a7dbaa0e0e1a34cf19d92b9a3b4ed66e7c958b29d26bfaa38b87ff83969e67
MD5 0752bb1cedcbaeddd02c5c73259bc129
BLAKE2b-256 1e49241e6f07f193c5d3c5308a2baa9d04e4667142b14421372f2ebb656dd020

See more details on using hashes here.

Provenance

The following attestation bundles were made for libpypsg-0.5.0-py3-none-any.whl:

Publisher: publish-to-pypi.yml on tedjohnson12/libpypsg

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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