Skip to content

Getting started tutorial

jeipollack edited this page Apr 2, 2023 · 24 revisions

Welcome to the WaveDiff tutorial!

This tutorial serves as a walk-through guide of how to set up runs of WaveDiff with different configuration settings.

Basic Execution

The WaveDiff pipeline is launched and managed by the wf_psf/run.py script.

A list of command-line arguments can be displayed using the --help option:

> python wf_psf/run.py --help
usage: run.py [-h] --conffile CONFFILE --repodir REPODIR --outputdir OUTPUTDIR

optional arguments:
  -h, --help            show this help message and exit
  --conffile CONFFILE, -c CONFFILE
                        a configuration file containing program settings.
  --repodir REPODIR, -r REPODIR
                        the path of the code repository directory.
  --outputdir OUTPUTDIR, -o OUTPUTDIR
                        the path of the output directory.

There are three arguments, which the user should specify when launching the pipeline.

The first argument: --confile CONFFILE specifies the path to the configuration file storing the parameter options for running the pipeline.

The second argument: --repodir REPODIR is the path to the wf-psf repository.

The third argument: --outputdir OUTPUTDIR is used to set the path to the output directory, which stores the WaveDiff results.

To run WaveDiff, use the following command:

> python wf_psf/run.py -c /path/to/config/file -r /path/to/wf-psf -o /path/to/output/dir

You can test this now using the configuration file configs.yaml provided in the subdirectory config inside the wf-psf repository. Launching this script will initiate training of the semi parametric DataDriven PSF model. The outputs will be stored in a directory called wf-outputs located in path specified with the argument -o.

Next, we describe to some detail the configuration file structures and content.

Configuration

The WaveDiff pipeline features three main packages which are used sequentially to train PSF models, perform metrics evaluations, and generate plots for the various metrics. There is, however, a fourth package which is used to simulate stellar PSFs which is then provided as as input data in the training procedure. To configure WaveDiff for a particular run or a set of runs, the user specifies the processing step(s) by setting the values of the associated configuration variables {pipeline_task}_conf in the master configs.yaml file:

---
  training_conf: config/training_config.yaml
  metrics_conf: config/metrics_config.yaml
  plotting_conf: config/plotting_config.yaml
  

and providing the corresponding configuration files. Each configuration file contains only those parameters required for the specific pipeline task.

The input configuration files into WaveDiff are constructed using YAML (Yet Another Markup Language), while for logging we use the ini file syntax. The complete config directory tree is shown below

config
├── configs.yaml
├── logging.conf
├── metrics_config.yaml
├── plotting_config.yaml
└── training_config.yaml

As WaveDiff is currently undergoing a refactoring, only the training part of the pipeline is functional. Therefore, the code will only activate the training part of the pipeline.

Training Configuration

We now review the parameter arguments in the training_config.yaml.

Clone this wiki locally