Plugins

The SlyPI package uses plugins to provide functionality for different numerical simulations, or really any other outside software. The plugins largely handle differences in file formats between different simulations and software. The following plugins are available for SlyPI.

User interaction with plugins is handled by command line arguments passed through SlyPI and onto the plugin. As a result, plugin authors must not use command line arguments with the same or even prefix matched names of the SlyPI, or SlyPI utility arguments. Any such arguments will be interpreted incorrectly and will likely fail.

To see the availble options for a SlyPI plugin, call the plugin directly with --help option, as in:

python -m slypi.ensemble.plugins.ps --help

Parameter Space

The Parameter Space plugin supports output that can be used to create Parameter Space models in Slycat. The plugin can be called from the table.py utility using the --expand option. The command line options for the plugin are given below.

python -m slypi.ensemble.plugins.ps --help
usage: ps.py [-h] [--num-coords NUM_COORDS] [--remove-expand-col]
             [--include-original-index] [--binary] [--auto-correlate]
             [--scale]

The parameter space plugin provides the ability to convert dimension reduction
results to Slycat Parameter Space format.

options:
  -h, --help            show this help message and exit
  --num-coords NUM_COORDS
                        Number of coordinates from input files to include in
                        .csv output file.
  --remove-expand-col   Remove the expanded column when writing out parameter
                        space file.
  --include-original-index
                        Add original (repeated) index to expanded output .csv
                        file.
  --binary              Converts field variable to binary by clipping anything
                        less than 0 to 0 and anyting greater than 0 to 1.
  --auto-correlate      Performs auto-correlation as a pre-processing for
                        dimension reduction (note this option requires the
                        --binary flag to be used).
  --scale               Scale values to [-0.5,0.5].

VideoSwarm

The VideoSwarm plugin provides output support for the files required to create a VideoSwarm model in Slycat. The plugin can be called from the table.py utlity. The command line options for the VideoSwarm plugin are shown below.

python -m slypi.ensemble.plugins.vs --help
usage: vs.py [-h] [--remove-expand-col] [--video-fps VIDEO_FPS] [--binary]
             [--auto-correlate] [--scale]

The videoswarm plugin provides the ability to convert time-aligned dimension
reduction algorithms to Slycat VideoSwarm format.

options:
  -h, --help            show this help message and exit
  --remove-expand-col   Remove the expanded column when writing out videoswarm
                        files.
  --video-fps VIDEO_FPS
                        Video frames per second, must be > 0, defaults to 25.
  --binary              Converts field variable to binary by clipping anything
                        less than 0 to 0 and anyting greater than 0 to 1.
  --auto-correlate      Performs auto-correlation as a pre-processing for
                        dimension reduction (note this option requires the
                        --binary flag to be used).
  --scale               Scale values to [-0.5,0.5].

Convert

The convert plugin provides support for converting between various file formats. In particular, it supports creating .mp4 format movies readable by Slycat.

python -m slypi.ensemble.plugins.convert --help
usage: convert.py [-h] [--suffix SUFFIX] [--binary]
                  [--color-scale COLOR_SCALE COLOR_SCALE]
                  [--output-format OUTPUT_FORMAT]
                  [--output-quality OUTPUT_QUALITY] [--video-fps VIDEO_FPS]
                  [--write-raw-video]

The convert plugin provides support for the converting between different file
formats.

options:
  -h, --help            show this help message and exit
  --suffix SUFFIX       Suffix to describe output file(s), e.g. "--suffix
                        phase_field". The suffix name is included in the name
                        of any output file.
  --binary              Converts field variable to binary by clipping anything
                        less than 0 to 0 and anyting greater than 0 to 1.
  --color-scale COLOR_SCALE COLOR_SCALE
                        Gives the color scale for the field variable when
                        creating jpg or mp4, e.g. "--color-scale 0 1" for min
                        color value of 0 and max color value of 1. Note that
                        values above and below the color scale are
                        automatically clipped.
  --output-format OUTPUT_FORMAT
                        The output format options recognized by the convert
                        plugin include: "npy" -- saves the field variable for
                        a single timestep to a numpy array; "sim.npy" -- saves
                        the field variable for every timestep in a simulation
                        to a 3D numpy array; "rd.npy" -- saves the reduced
                        dimensional representation to a numpy array (can be
                        either a time step matrix or a 3D full simulation
                        matrix); "jpg" -- saves a .jpg image of the field
                        variable for a single timestep; "mp4" -- saves a .mp4
                        movie of the field variable for every timestep in a
                        simulation.
  --output-quality OUTPUT_QUALITY
                        Quality of jpg image, as a number between 1 and 95
                        (only relevant if outputing images, defaults to 95).
  --video-fps VIDEO_FPS
                        Number of frames per second for video creation,
                        defaults to 25).
  --write-raw-video     Create a video using the provided images unprocessed.