ZTF’s internal scheduling and logging system, SkyVision, records every completed exposure — field ID, filter, program, pointing coordinates, exposure time, and Julian date — in nightly observing logs. TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/MickaelRigault/ztfquery/llms.txt
Use this file to discover all available pages before exploring further.
ztfquery.skyvision module downloads these logs from skyvision.caltech.edu, caches them as CSV files under $ZTFDATA/skyvision/, and exposes the data through the CompletedLog class with a rich set of filtering and visualisation methods.
Access to SkyVision requires the ZTF collaboration password. Store it with
ztfquery.io.set_account("skyvision", username=..., password=...) before making any requests.CompletedLog Class
CompletedLog is the primary interface for working with ZTF observing logs. Each instance wraps a pandas DataFrame (.data) containing the cleaned, standardised log entries for one or more nights.
Loading logs for a single night
Loading logs for multiple nights
Pass a list of date strings tofrom_date to load several non-contiguous nights into a single CompletedLog:
Loading a contiguous date range
Start date in
YYYY-MM-DD format.End date in
YYYY-MM-DD format. None means through yesterday.The .data DataFrame
logs.data is a cleaned pandas DataFrame. Each row is one completed exposure.
| Column | Type | Description |
|---|---|---|
datetime | str | ISO 8601 timestamp of the observation (YYYY-MM-DDTHH:MM:SS.sss) |
date | str | UT date (YYYY-MM-DD) |
exptime | float | Exposure time in seconds |
totalexptime | float | Exposure time plus readout/setup overhead |
fid | int | Filter ID: 1 = ztf:g, 2 = ztf:r, 3 = ztf:i |
field | int | ZTF field ID |
pid | float | Program ID: 1 = MSIP, 2 = Partners, 3 = Caltech |
ra | str | Boresight right ascension (sexagesimal) |
dec | str | Boresight declination (sexagesimal) |
totaltime | float | Total time including overheads |
obsjd | float | Julian date of the observation |
Methods
Visualising observed fields
Filtering by field ID
pid, fid, startdate, and enddate allow further narrowing.
Example output across a date range:
Filtering by sky position
pid, fid, and date-range filters as get_when_field_observed.
Counting observations by program or filter
get_count groups logs.data by the named column and returns a Series of observation counts. Pass fid to restrict to a single filter.
Generic filtered access
get_filtered supports field, fid, pid, startdate, enddate, grid, and query arguments and returns a filtered pandas DataFrame.
Bulk Downloading
For analyses spanning months or years, download all available logs in parallel before creatingCompletedLog objects:
First night to download, in
YYYY-MM-DD format.Log type to download. Currently
"completed" (science queue) and "qa" (quality-assurance) are supported.Number of parallel download workers. Setting this to 4 or higher significantly reduces total download time for large date ranges.
nprocess=4.