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, specify redis
to use redis server, or memory
to use in-process cacheUNAVAILABLE_CATALOGS_CACHE_TYPE
: unavailable catalog cache type, specify redis
to use redis server, or memory
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 supporting JS9.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.
light-curve-feature
Rust crate. Source code: https://github.com/snad-space/web-light-curve-features