Docs · Exporting data

Exporting Photon Ledger data

Photon Ledger keeps a tidy index of every sub-frame it scans. You can take that index out of the app and into anywhere else you work — spreadsheets, notebooks, BI dashboards, or your own scripts — via CSV export.

Photon Ledger keeps a tidy index of every sub-frame it scans. You can take that index out of the app in two ways: as a CSV (frames, sessions, or totals) for spreadsheets, notebooks, BI dashboards, or AstroBin acquisition fields; or as a Folder Export that copies the lights and matching DARK / BIAS / FLAT frames for a target+rig into a PixInsight WBPP-ready tree.

What you can export

Everything in PL is built on the same underlying index of FITS headers. Three views of that index are useful outside the app:

  • Frame-level metadata — one row per sub-frame. Path, target, filter, exposure, image type, date, instrument, telescope, focal length, binning, gain, sensor temperature. The full grain.
  • Session-level summaries — one row per (target, filter, night). Frame count and total exposure rolled up to a session, useful for log-book-style records.
  • Aggregate totals — one row per (target, filter). Total integration hours, total frames, first and last seen. The headline numbers you'd quote on AstroBin or in a write-up.

All three are derived from the same source, so they always agree with each other and with the in-app dashboard.

CSV export

From the Dashboard, choose Export › CSV and pick one of the three pre-built reports (Frames, Sessions, Totals). PL writes a file with stable column headers, RFC 4180 quoting (double-quote any field containing a comma, newline, or quote), and UTF-8 encoding without a BOM. The header row is always the first line.

The Frames report can get large — expect roughly one row per sub-frame in your archive. The Sessions and Totals reports are dramatically smaller and are usually what you want for sharing.

Sample CSV schemas

Column names below are illustrative — see the in-app exporter for the authoritative schema, which may add or rename fields over time.

Frames CSV

ColumnTypical content
pathAbsolute or archive-relative path to the FITS file
targetFrom OBJECT (e.g. M81)
filterFrom FILTER (e.g. Ha, L, R)
exposure_sFrom EXPTIME, in seconds
image_typeFrom IMAGETYP (Light / Flat / Dark / Bias)
date_obs_utcFrom DATE-OBS, ISO 8601 UTC
instrumeFrom INSTRUME (camera)
telescopFrom TELESCOP (OTA)
focallenFrom FOCALLEN, in mm
xbinningFrom XBINNING
gainFrom GAIN
ccd_tempFrom CCD-TEMP, in °C
ColumnTypical content
pathAbsolute or archive-relative path to the FITS file
light_dirDeepest common ancestor directory of the lights this row covers. Designed for piping directly into PixInsight WBPP or AstroBin acquisition fields.
targetFrom OBJECT (e.g. M81)
filterFrom FILTER (e.g. Ha, L, R)
exposure_sFrom EXPTIME, in seconds
image_typeFrom IMAGETYP (Light / Flat / Dark / Bias)
date_obs_utcFrom DATE-OBS, ISO 8601 UTC
instrumeFrom INSTRUME (camera)
telescopFrom TELESCOP (OTA)
focallenFrom FOCALLEN, in mm
xbinningFrom XBINNING
gainFrom GAIN
ccd_tempFrom CCD-TEMP, in °C

Sessions CSV

ColumnTypical content
session_dateLocal astronomical night (YYYY-MM-DD)
targetTarget name
filterFilter name
frame_countNumber of light frames for this (target, filter, night)
total_exposure_sSum of EXPTIME across those frames
instrumeCamera used (or list, if mixed)
telescopTelescope used (or list, if mixed)

Totals CSV

ColumnTypical content
targetTarget name
filterFilter name
total_hoursTotal integration in hours (decimal)
frame_countTotal light-frame count
first_seenEarliest DATE-OBS for this pair
last_seenLatest DATE-OBS for this pair

Folder Export

From the Dashboard, choose Export › Folder, pick a target, pick the equipment setup you shot it with, then pick a destination drive. Photon Ledger copies every light plus the matching DARK / BIAS / FLAT frames into a PixInsight WBPP-friendly layout:

<dest>/<Target> - <Camera> - <Telescope>/
  Lights/<Filter>/...
  Darks/...
  Flats/<Filter>/...
  Bias/...

Cal matching is configurable per export. Strict mode requires exact EXPTIME / GAIN / OFFSET / XBINNING for darks; exact filter + binning for flats; gain + binning for biases. Loose mode allows ±10% on exposure time and ignores offset.

If your darks and biases live in a separate library (the __DarkLibraries__ / DarkLibrary_Home/300s_g100 pattern), point the DARK and BIAS source pickers at those folders. Files in the chosen folder are matched against your indexed frames first; on miss, the app reads the FITS header from disk and treats the result as a first-class match candidate. You don't need to pre-scan a cal library to use it.

Full reference: Folder Export documentation →

Integrating with external tools

  • Pandas — df = pd.read_csv("totals.csv") and you're done. Numeric columns parse straight to float/int; pass parse_dates=["date_obs_utc"] to get real datetime64s.
  • Excel / Numbers / LibreOffice — double-click the CSV. Column types are typically inferred correctly. If your locale uses comma as the decimal separator, import via the data wizard and pick UTF-8 + comma delimiter.
  • Grafana, Metabase, Superset — most BI tools can ingest a CSV directly or via a staging table. Load the Frames or Sessions CSV and build panels from there.
  • AstroBin — export Totals as CSV and copy the relevant target, filter, frame_count, total_hours rows into AstroBin's acquisition fields when you publish an image.

Related reading