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 short Python script that reproduces a selection on the original TIME-TAG file and writes a copy of it (<rootname>_tagsel.fits) with columns added: selection flags, the corrected positions (XCORR, YCORR) and positions in each reference frame, and the weights. The script calls timetag_explorer.tagsel.make_tagsel and names the exact package version to install (see CHANGELOG.md).

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)
tagsel what a selection script runs: the flags, corrected positions and weights it writes into _tagsel.fits
gdcorr the geometric distortion polynomial (placeholder coefficients for now)
vignette the experimental vignetting model (two sensitivity ramps; F25SRF2 only; off by default)
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.6.1

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.6.1
File Size Uploaded Provenance Actions
timetag_explorer-1.6.1.tar.gz 70.5 kB With provenance Details for timetag_explorer-1.6.1.tar.gz

Built distribution (wheel)

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

Total release size: 131.4 kB

Release files / timetag_explorer-1.6.1.tar.gz

Download URL timetag_explorer-1.6.1.tar.gz
Size 70.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a861e2433dd848f6084d8984d14206127aacc609876444b02c32ee12257666ab
BLAKE2b-256 checksum
How to use checksums
c60c29b394cf3a9859fbbb67fb46b80db549f6e344d7dd0edd3f0f4cef221d28
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 31, 2026.

Transparency log

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

Download URL timetag_explorer-1.6.1-py3-none-any.whl
Size 60.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0fafc67a1ef08509165cc0627839ce43e3f8c3965d027ae181d61a764df102c3
BLAKE2b-256 checksum
How to use checksums
87b50ad747d2400517104eeeab8c5eeac09ad9b7162b97db676d372018d7b417
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 31, 2026.

Transparency log

Security for timetag-explorer 1.6.1

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.6.1.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 31, 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