PyPSG
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 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 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
Metadata
Release files for pypsg 0.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pypsg-0.3.2.tar.gz | 54.4 kB | Without provenance | Details for pypsg-0.3.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pypsg-0.3.2-py3-none-any.whl | Python 3 | none | any | Details for pypsg-0.3.2-py3-none-any.whl |
Total release size: 112.4 kB
Release files / pypsg-0.3.2.tar.gz
| Download URL | pypsg-0.3.2.tar.gz |
|---|---|
| Size | 54.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c71a44393cd30cbb86f57a8183e77fbe17e9efac8ab1c37fc01bd02e3586798a
|
|
BLAKE2b-256 checksum How to use checksums |
1cb59daec528196bc61560b7efc783697627b2979ee12e53b55375ae8661b8c4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / pypsg-0.3.2-py3-none-any.whl
| Download URL | pypsg-0.3.2-py3-none-any.whl |
|---|---|
| Size | 57.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d2dcf4e12352ce7429dff26f4a02e48c8e94dcf075ff546066d09601e08a85dc
|
|
BLAKE2b-256 checksum How to use checksums |
391479f3d699da093b4e9ac3c3c9d9d31ff1485539bb4934d7b8d6704fd7afe0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Security for pypsg 0.3.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.