Welcome to scrappy's documentation
Scrappy is a collection of tools used to generate Faraday spectra for various independent lines of sight across an extragalactic source. At its tail end, Scrappy generates plots to be used with PolarVis, an interactive, web-based visualisation tool that displays RM-synthesis data products corresponding to individual lines-of-sight.
Requirements
Requires Python 3.10 or more, running on a Linux (Ubuntu) machine. This has not yet been tested on Windows or other Unix environment.
Installation
Since this tool is not yet available on PyPi, installation is done by running
# If using SSH
pip install git+git@github.com:Mulan-94/scrappy.git
# If using HTTPS
pip install git+https://github.com/Mulan-94/scrappy.git
Another option is cloning scrappy to your local machine and then installing it
# Select SSH or HTTPS clone appropriately
git clone git@github.com:Mulan-94/scrappy.git
# Install scrappy in editable to keep up with the bleeding edge
pip install -e scrappy
Getting started
Scrappy consists of a pipeline script, [showrunner.sh
][./showrunner], which performs multiple steps to achieve this end goal. This bash script CAN and SHOULD be modified to suit one's needs. The general variables that can be tweaked are located in the env-vars
file. To avail the files required for showrunner.sh
, they should be initialised using the following command:
scrappy -i
When ready, the pipeline showrunner.sh
is run as:
./showrunner.sh -run
Its help is accessible as: ./showrunner -h
. There is additionally an option to run the individual functions in the pipeline by themselves using the syntax ./showrunner.sh functionName
. For example to run the 'makeDirs' function:
./showrunner.sh makeDirs
Furthermore, the Scrappy package hosts other tools that perform some intermediate processing steps. The Scrappy package consists of multiple scripts, which can be viewed using
scrappy -h
All these scripts are in use within the showrunner
. They are:
sc-houdini
: to generate masks.sc-los
: to generate the independent lines-of-sight (LoS).sc-losrm
: to perform RM-synthesis + RM-CLEAN on the LoS generated bysc-los
.sc-rmmap
: to generate, among other things, an RM map.sc-bokehplot
: to generate interactive plots for the LoS. These are for integration with PolarVis.sc-ifit
: a rudimentary script for fitting Taylor polynomials to Stokes \(\mathit{I}\).
Each of the scripts has a help text that is accessible via the -h
flag. Please consult the help menu for more information on the parameters required to run the individual scripts. More information is also availed in their specific pages on this documentation.
Help Menu
The result of running Scrappy's help function is as follows.
usage: scrappy [-v] [-h] [-i] [-f] [-p]
options:
-v, --version Show scrappy version number and exit
-h, --help
This is a collection of python scripts that perform some RM related
tasks, and geared towards (but not limited to) generating files to be used
with polarvis: https://github.com/Mulan-94/polarvis
The following command line tools are available and help accesible via: sc-los -h
sc-losrm -h
sc-rmmap -h
sc-bokehplot -h
sc-ifit -h
sc-beam-plot -h
sc-houdini -h
scrappy -h
sc-depol -h
-i, --initialize Set up files required to run the showrunner. It will not run without those files
-f, --force Force overwrite of the files required for showrunner in case they
already exist in the current directory.
-p, --pica Initialise some pica files specifically
Addendum
This project began as a custom script for Pictor A field but can now support any field provided a source mask is given. Parts of the RM-synthesis tools availed in this script evolved from those by Lerato Baidoo @sebokolodi and have been modified to suit our needs.