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
Release history Release notifications | RSS feed
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.4.0.tar.gz
(54.4 kB
view details)
Built Distribution
libpypsg-0.4.0-py3-none-any.whl
(58.0 kB
view details)
File details
Details for the file libpypsg-0.4.0.tar.gz
.
File metadata
- Download URL: libpypsg-0.4.0.tar.gz
- Upload date:
- Size: 54.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | afa3c371d2666b3f0007b5d8bf622c674cab98a9744b03fc42464a661b535948 |
|
MD5 | f24907136d8669608afeb080ea34fdc6 |
|
BLAKE2b-256 | 27d7526dcde5972eb5731716d6ecafed097fe3c849982211e8692ff169d6c075 |
File details
Details for the file libpypsg-0.4.0-py3-none-any.whl
.
File metadata
- Download URL: libpypsg-0.4.0-py3-none-any.whl
- Upload date:
- Size: 58.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09d17ec574a02566d395ac4f1760f9ab191312451e04db3afaac3565dfeb095a |
|
MD5 | 1225c963b70a2541a740bf067e54f472 |
|
BLAKE2b-256 | dfa91502007696b9d3309aadc34d87acf310f2f521fb5b7d6922cb46759cd3ed |