Skip to main content

timetag-explorer

Tests PyPI Documentation

The science code behind TIME-TAG Explorer, a web app for exploring HST/STIS FUV TIME-TAG observations (aurorae on Jupiter and Saturn, and other targets that move or vary).

This repository holds only the calculations: reading a TIME-TAG file, the processing steps, the transformations between reference frames and planet maps, the exposure-time maps, and the generator of the standalone "selection scripts". The web server around it (sign-in, pages, plots and mouse selection) is a separate, private project, and this package knows nothing about it. Everything the app computes about the data comes from here, so this is the part that scientific review should look at.

Status: first release, not yet validated. VALIDATION.md lists each step with its reference and its review status. The geometric distortion correction is disabled in this release: gdcorr.py holds placeholder (zero) coefficients until values from a public reference file replace them.

Install

Python 3.11 or newer.

pip install timetag-explorer

To work on the code, clone the repository and pip install -e . in it. Documentation: https://timetag-explorer.readthedocs.io.

A first look

from timetag_explorer import load_dataset, Corrections, Box, describe_selection

ds = load_dataset('od8k57itq_tag.fits')       # a TIME-TAG file from MAST; its _spt.fits file, if next to it, is used too
corr = Corrections(randcorr=True, flatcorr=False, timecorr=True)   # which processing steps are on

edges, rate = ds.light_curve(3.0)                                    # count rate in 3 s bins
image = ds.image(time_sel=(100.0, 250.0), frame='image', corr=corr)     # counts/s per 4x4 hi-res-pixel bin
region = Box(900, 1100, 900, 1100)                                   # detector pixels
edges, region_rate = ds.light_curve(3.0, region=region, corr=corr)
print(describe_selection(ds, corr, 'image', (100.0, 250.0), region))

Rest frames and planet maps (frame='rest', 'planet', 'map_rect', ...) need the exposure's SPT file next to the TIME-TAG file; the planet ones also ask JPL Horizons for positions (through astroquery) and keep the answers in config.HORIZONS_DIR. The flat field is optional: put combined_flat.fits (download; how it was made) where config.FLAT_FILE points, or set the environment variables TAG_EXPLORER_FLAT and TAG_EXPLORER_HORIZONS.

build_selection_script(ds, time_sel, region, frame, corr) returns a standalone Python script that reproduces a selection on the original TIME-TAG file and writes flag columns into a copy of it.

What is where

Module Contents
regions Box, Circle, Polygon: which detector pixels a region holds
frames the processing switches (Corrections), reference frames, header parsing (pointing, slew, WCS)
horizons planet and moon positions from JPL Horizons, and the local cache of them
planet Jupiter and Saturn orientation (IAU rotation model, light time) and the sky / surface / map projections
transforms detector pixels to frames and maps, exposure-time maps, the distortion lookup table
dataset TagDataset: events, slicing in time, binning, light curves, count-rate images
analysis areas, mean brightness and the exposure for a selection
selection_script the generator of selection scripts (and its version, SELVER)
gdcorr the geometric distortion polynomial (placeholder coefficients for now)
constants, config, log shared numbers; file locations; logging

Tests and validation

pip install -e .
for t in tests/test_*.py; do python "$t"; done            # quick: synthetic data, no network
python validation/check_selection_scripts.py OFAP44G5Q    # slow: runs generated scripts on a real exposure (downloads it)

The first set runs on every pull request. The second runs every week on GitHub Actions. See VALIDATION.md for what each step is checked against.

Contributing

Questions and concerns about the science are welcome as issues; proposed changes as pull requests. Please read CONTRIBUTING.md first. Requests for access to the web app go to the address on the app's front page, not here.

AI disclosure

TIME-TAG Explorer, including this science code, was built with AI assistance: the code was written with Claude, Anthropic's AI model (mainly Claude Sonnet 5.5), under human direction. It was developed iteratively, deployed continuously, and checked against expected results at each step. Snippets of previously validated algorithms served as references for the scientific steps, such as the corrections and reference frame transformations. Features still under review, including the planet maps, planet registration, and script generation, are marked experimental. Script generation has not yet been tested by the author. Please check any result you plan to publish against your own analysis. Report problems as issues.

Citing

Use the "Cite this repository" button on GitHub, or CITATION.cff. A DOI will be added once the first release is archived.

License

BSD 3-Clause. See LICENSE.

Metadata

Release files for timetag-explorer 1.2.0

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

Source distribution (sdist)

Source distribution for timetag-explorer 1.2.0
File Size Uploaded Provenance Actions
timetag_explorer-1.2.0.tar.gz 55.7 kB With provenance Details for timetag_explorer-1.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for timetag-explorer 1.2.0
File Interpreter ABI Platform Actions
timetag_explorer-1.2.0-py3-none-any.whl Python 3 none any Details for timetag_explorer-1.2.0-py3-none-any.whl

Total release size: 107.5 kB

Release files / timetag_explorer-1.2.0.tar.gz

Download URL timetag_explorer-1.2.0.tar.gz
Size 55.7 kB
Tags Source
SHA-256 checksum
How to use checksums
815fccac6a427324452ce7400bad09b7f01846d3f78fd4d8bf63e4fa92213b4d
BLAKE2b-256 checksum
How to use checksums
d01465d8578ab03ff90049fe40805f80cdf51cec6572d0b6fcfe67f5af607075
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.

Transparency log

Release files / timetag_explorer-1.2.0-py3-none-any.whl

Download URL timetag_explorer-1.2.0-py3-none-any.whl
Size 51.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8e958d0d9094bec65fff3213901d03c1f0fa8e392b776c3a81d8ca17b64a9597
BLAKE2b-256 checksum
How to use checksums
65711d32ffb33d6ac3f879b150ffae7eb9fd2c374fa0e2e0ffc76c5055b9c666
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.

Transparency log

Security for timetag-explorer 1.2.0

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for timetag_explorer-1.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 30, 2026.

Transparency log

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.

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