Usage
Configuring variables
mirar has several options for execution. You can pass some of these as arguments, but some e.g tokens or passwords are best included as environment variables.
You can find a full list of variables in env.example:
# This is a sample .env file.
# Duplicate this file as .env in the root of the project
# and update the environment variables to match your
# desired config.
# Data directories
RAW_DATA_DIR=/path/to/dir
OUTPUT_DATA_DIR=/path/to/dir
REF_IMG_DIR=/path/to/dir
# Credentials for postgres
DB_USER=<some user like winterdrp>
DB_PWD= <a secure password perhaps>
# Admin credentials for postgres user account creation
PG_ADMIN_USER = <a postgres admin user, often 'postgres' by default on most systems>
PG_ADMIN_PWD = <password for the user>
# Used by DataframeWriter
kowalski_user=<username>
kowalski_pwd=<password>
# Used by SendToFritz
FRITZ_TOKEN=<token>
FRITZ_AUTHID=<id>
# Used as default user for ssh/rsyncing in winterdrp/downloader
SSH_USER=<user>
# Set up emailing
WATCHDOG_EMAIL = <email_address>
WATCHDOG_EMAIL_PASSWORD = <password>
WATCHDOG_EMAIL_RECIPIENTS = <target email address>
# Set maximum number of CPUs to use, with a default of half the available total
MAX_N_CPU = <integer number of CPUs>
# Set whether to store images in cache, with a default of true
USE_WINTER_CACHE = <boolean>
You can set these variables in the command line:
export RAW_DATA_DIR=/home/astronomer/rawdata
Running the code
You can execute mirar via the command line:
python -m mirar -p name-of-pipeline -n night-to-reduce
One example is the following:
python -m mirar -p summer
How can you know which pipelines are available? You can check the documentation here: mirar.pipelines package. Alternatively, you can check via the code:
>>> from mirar.pipelines import Pipeline
>>> print(sorted([x for x in Pipeline.pipelines.keys()]))
['sedmv2', 'summer', 'winter', 'wirc']
>>> print(sorted([x for x in Pipeline.pipelines.keys()]))
['sedmv2', 'summer', 'winter', 'wirc']