Skip to main content

pypi-badge Test status

pandora-fits

Tools to work with fits files from Pandora.

pandora-fits wraps astropy.io.fits.HDUList classes to ensure that files conform to Pandora FITS standards.

The standards are defined using excel files in the src/pandorasat/formats/ folder. Changing these files will change the standards that this tool checks against.

Pandora Detectors

Pandora has two detectors, VISDA and NIRDA. You can read more about each of these in pandora-sat.

Pandora File Levels

Pandora will have the following levels of files for each detector

Level Description
0 Raw data from spacecraft
1 Reorganized raw data, with potential for additional keywords
2 Calibrated image data products
3 Spectral time-series data, ready for science.

Exceptions

pandora-fits will throw exceptions if files are not in the correct format. This includes

  • Files do not have the right number of extensions
  • Extensions are not the correct type
  • Header keywords have the wrong values when compared with the template

Warnings

pandora-fits will log warnings if files are missing keyword headers, but those headers aren't valued in the excel spreadsheet.

Usage

You should treat the pandora-fits objects as though they were astropy.io.fits.HDUList objects. There is one per detector, per file level.

First you can import the correct HDUList object. Note that I am using the logger and setting the logger to the level "ERROR".

from pandorafits.nirda import NIRDALevel0HDUList
from pandorafits import logger
logger.setLevel("ERROR")

We can create a dummy file by passing nothing to the object

hdulist = NIRDALevel0HDUList()
hdulist.info()
Filename: (No file associated with this HDUList)
No.    Name      Ver    Type      Cards   Dimensions   Format
  0  PRIMARY       1 PrimaryHDU      35   ()      
  1  SCIENCE       1 ImageHDU        12   (80, 400, 10)   int16   

This initializes an "empty" file that is compliant with the Pandora scheme. There are several logger "warning" messages that will state that many of the header keywords are not set.

We can write to a file

hdulist.writeto("test.fits", overwrite=True)

We can also read in a file

hdulist = NIRDALevel0HDUList("test.fits")

Finally we can read in an existing HDUList, e.g.

hdulist = fits.HDUList("test.fits")
NIRDALevel0HDUList(hdulist)

Installation

You can install with a git clone, or via PyPI using the command below. Make sure to update to the most recent version.

pip install pandorafits --upgrade

If you need to run the pipeline and use the databasing features you will need to add the optional extras.

pip install "pandorafits[database]" --upgrade

Note if you're working on a windows machine this install might be harder and you should open an issue if you encounter any problems.

Metadata

Release files for pandorafits 0.9.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pandorafits 0.9.5
File Size Uploaded Provenance Actions
pandorafits-0.9.5.tar.gz 253.5 kB Without provenance Details for pandorafits-0.9.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pandorafits 0.9.5
File Interpreter ABI Platform Actions
pandorafits-0.9.5-py3-none-any.whl Python 3 none any Details for pandorafits-0.9.5-py3-none-any.whl

Total release size: 574.9 kB

Release files / pandorafits-0.9.5.tar.gz

Download URL pandorafits-0.9.5.tar.gz
Size 253.5 kB
Tags Source
SHA-256 checksum
How to use checksums
06833e4c99b1bf8222f3c3b12da121fab6028a1d752a9d5a6ee81c6d949a6ed5
BLAKE2b-256 checksum
How to use checksums
272bf9efcbb5097056916ff035465b2d0479ade1cf7fc9f834f05cd6d2e57cac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.2.1 CPython/3.9.13 Darwin/25.6.0

Release files / pandorafits-0.9.5-py3-none-any.whl

Download URL pandorafits-0.9.5-py3-none-any.whl
Size 321.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e905fdd261f67750ce844320963ad56d54ad8145501a86fc1024e2793b750df8
BLAKE2b-256 checksum
How to use checksums
7046558ed01e6a19579550a41d6d31b28d8572659b06f9fb456365257184adb7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.2.1 CPython/3.9.13 Darwin/25.6.0

Security for pandorafits 0.9.5

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.

Release history Release notifications | RSS feed

This release

0.9.5 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page