This projects contains a source of ZTF Data Releases light curve viewer developed by the SNAD team.
Both production and development versions can be started via Docker compose using docker-compose.yml
and docker-compose.dev.yml
correspondingly.
Current production configuration assumes that there is a Docker proxy
network shared with jwilder/nginx-proxy
which proxies the webserver to the outer world.
Also, this configuration require secret.env
file containing secret environment variables, such as API keys.
Environment variables to configure the server, see default values in config.py
:
CACHE_TYPE
: cache type, specifyredis
to use redis server, ormemory
to use in-process cacheUNAVAILABLE_CATALOGS_CACHE_TYPE
: unavailable catalog cache type, specifyredis
to use redis server, ormemory
to use in-process cacheREDIS_URL
: redis server addressLC_API_URL
: SNAD ZTF database API addressAKB_API_URL
: knowledge database addressFEATURES_API_URL
: feature extraction service addressOGLE_III_API_URL
: SNAD OGLE III mirror addressZTF_PERIODIC_API_URL
: SNAD mirror of the ZTF periodic variables catalogTNS_API_URL
: SNAD mirror of the TNSZTF_FITS_PROXY_URL
: address of SNAD proxy for ZTF FITSJS9_URL
: address of full-functional JS9 viewer supportingJS9.LoadProxy
You could run a development version of the server at http://127.0.0.1:8050
using docker-compose.dev.yml
file:
docker compose -f docker-compose.yml -f docker-compose.dev.yml up --build
This will run Dash/Flask server in debug mode and will reload the server on code changes if you mount the source code directory ztf_viewer
as a volume:
docker compose -f docker-compose.yml -f docker-compose.dev.yml -f docker-compose.dev.local.yml up --build
The server can be run locally without Docker in debug mode.
# Configure Python virtual environment
python3 -m venv ~/.virtualenv/ztf-viewer
source ~/.virtualenv/ztf-viewer/bin/activate
# Install the package
python -m pip install -e .
# Run webserver
CACHE_TYPE="memory" UNAVAILABLE_CATALOGS_CACHE_TYPE="memory" python -m ztf_viewer
Go to the url specified in the command line output, it should be something like http://localhost:8050/ Some features like FITS viewer wouldn't work.
- SNAD catalog
- SNAD ZTF DR API gives HTTP access to SNAD ClickHouse installation of ZTF DR light curve database. Source code: https://github.com/snad-space/snad-ztf-db
- SNAD Light-curve feature API is a HTTP service to extract light-curve features using
light-curve-feature
Rust crate. Source code: https://github.com/snad-space/web-light-curve-features - SNAD OGLE-III metadata API provides cone search within OGLE-III variable star catalog. Source code: https://github.com/snad-space/snad-ogle3
- SNAD ZTF Periodic Catalog API provides cone search within ZTF Catalog of Periodic Variable Stars. Source code: https://github.com/snad-space/ztf-periodic-catalog-db
- SNAD Transient Name Server API provides cone search within TNS. Source code: https://github.com/snad-space/snad-tns
- SNAD ZTF FITS Proxy is a FITS image service used by the embedded JS9 FITS viewer. Source code: https://github.com/snad-space/ztf-fits-proxy
- SNAD Anomaly Knowledge Base is an internal database for experts. Source code: https://github.com/snad-space/akb-backend (private)
- NASA/IPAC Infrared Science Archive is a original source of ZTF FITS files
- Vizier is used to access various catalogs
- Simbad is used for both cone search and identifier queries
- Astrocats are used for cone search
- Astro-Colibri is used for multi-messenger events code search