showrunner.sh
A Bash-based pipeline taking in sub-band Stokes images and generates various spectrapolarimetric analysis and visualisation data products.
This script is availed by initialising Scrappy in an output directory of choice as:
scrappy -i
There's also a -f
option in case of the need to overwrite the initial files. Running the above command avails the following files:
env-vars
: containing pipeline-specific environment variables to be modified.bk_plots.yml
: a configuration file forsc-bokehplot
.showrunner.sh
: the pipeline script.
Showrunner must be accorded execution permissions in order to run. This can be done by:
chmod +x showrunner.sh
There are three options for running showrunner.sh
:
./showrunner.sh -h
: to get the help menu../showrunner.sh -run
: to run the entire pipeline.
The third option is 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
Setup
This pipeline runs within the Linux shell environment. It has been tested using:
- Ubuntu 22.04
- Python 3.10
- Bash 5.1.16
Software
Disparate software -- both native to Linux and external Python software -- are used within this pipeline to achieve its goals. The following table summarises the software used (including scrappy).
Software | Tool | Description |
---|---|---|
montagePy | fitsheader | Read FITS headers |
owlcat | fitstool.py | Creating Stokes cubes |
spimple | spimple-imconv | Image convolution to the same beam |
spimple-spifit | Spectral index fitting | |
scrappy | sc-beam-plot | Channel auto-selection and beam dimension plotting |
sc-rmmap | Generate per-pixel RM maps among other things | |
sc-los | Generate independent LoS | |
sc-los-rm | Perform RM-synthesis on LoS from scrappy | |
sc-bokehplots | Generate interactive plots for the LoS | |
sc-houdini | Generate simple image masks given input images | |
Native Linux | cp | Copy files and folders |
ls | Listing files and folders | |
sed | For some text processing | |
mv | Moving and renaming files | |
rm | Deleting files and folders | |
rename(.ul) | Batch file renaming |
Output Directory Structure
After a complete run, this pipeline results in an output directory structure similar to the one below.
├── masks # Location of the generated FITS masks
├── products
│ ├── conv-selection-cubes # Location of the selected sub-band images' cubes convolved to the same resolution
│ ├── original-cubes # Location of the full band images' cubes
│ ├── selection-cubes # Location of selected images' cubes
| ├── scrap-outputs # Outputs from Los data generators
│ │ ├── bokeh-plots # Interactive plots generated by sc-bokeh-plots from sc-los-rm
│ │ ├── los-data # LoS data outputs generated by sc-los
│ │ ├── los-rm-data # LoS data outputs generated by sc-los-rm
│ │ ├── los-rm-data-plots # Static plots generated by sc-los-rm
│ │ └── regions # Location of region files autoselected by sc-los
│ └── spi-fitting # Location of the spectral index fitter outputs
├── relevant-images # Location of the selected images
└── relevant-images-conv # Location of the singular sub-band images convolved to the same resolution