Introduction
This is the Rolling Hough Transform, described in Clark, Peek, & Putman 2014, ApJ 789, 82 (arXiv:1312.1338).
The RHT is a machine vision code that measures linear intensity as a function of orientation in images. The RHT was used to discover that diffuse neutral hydrogen features in the Milky Way are very well aligned with the interstellar magnetic field (Clark, Peek, & Putman 2014, Clark et al. 2015).
This code is written and maintained by Susan E Clark, with contributions from lots of wonderful users. Special thanks to Rutger Jaspers for recent improvements. Please feel free to get in touch with any questions, and please create pull requests to suggest improvements.
Included is a modified RHT which distinguishes between pixels located at theta, and at theta+pi, in polar coordinates centered on any given image pixel. This is achieved by searching along radii with twice the dtheta of the diameters searched in the RHT. This Transform is still in development.
Requirements
To run the RHT you'll need numpy, scipy, and astropy (for reading fits files).
Instructions For Use (interactive python environment)
-
The RHT now supports Python 3. Ensure your Python Environment is as up-to-date as possible and contains the required imports. The code has been tested on both Windows and Mac operating systems.
python --version //Currently Supports Python 2.7 and Python 3
-
Ensure you are able to import the package:
import rht
-
Run the RHT for individual files or directories, given a number of parameters. Output will be placed alongside the input files in the .fits format, with a record of the parameters that created it:
rht.main()
Runs the RHT, after asking for user input, with default parametersrht.main('filepath')
Runs the RHT for a given image or within a given directory with default parametersrht.main('filepath', flag=value, param=value)
Runs with some flag set to a boolean and some param set to a number -
Explanation of
rht.main()
Flags and ParametersFlags:
force=False
: If True, forcefully overwrites existing RHT data with same parameter values.
drht=False
: If True, runs the directional RHT, which returns output on a full, rather than half, polar domain.Parameters:
wlen=55.0
: Set window diameter in pixels.
smr=11.0
: Set smoothing radius in pixels.
frac=0.70
: Set theta power threshold.
Instructions For Use (Terminal)
Command Line Argument Format:
python rht.py filename.fits arg1 arg2 ... argn
For a list of possible arguments, run
python rht.py --help
Your first argument must be the .fits file to run the RHT on. After that you may assign any number of the following arguments:
Flags:
'-f', '--force'
: Force overwrite RHT output run with same parameters.
'-d', '--drht'
: Compute Directional RHT (full polar domain).
Params:
'-w', '--wlen' =value
: Sets window diameter
'-s', '--smr' =value
: Sets smoothing radius
'-t', '--thresh' =value
: Sets theta power threshold
Other Information
Input: .fits file
Output: .fits file containing two HDUs:
[0] RHT backprojection, or an image of RHT intensity integrated over all thetas.
1 coordinates in image space, and R(theta) for each image coordinate
The RHT is more expensive the larger your window length.
Publications that use the RHT
Please get in touch if you have a publication that you'd like to add to the list!
- Koch & Rosolowsky 2015, Filament identification through mathematical morphology
- Malinen et al. 2016, Matching dust emission structures and magnetic field in high-latitude cloud L1642: comparing Herschel and Planck maps
- Panopoulou, Psaradaki, & Tassis 2016, The magnetic field and dust filaments in the Polaris Flare
- Inoue & Inutsuka 2016, Formation of HI Clouds in Shock-compressed Interstellar Medium: Physical Origin of Angular Correlation Between Filamentary Structure and Magnetic Field
- Asensio et al. 2017, Inference of the chromospheric magnetic field orientation in the Ca ii 8542 Å line fibrils
Attribution
If use of the RHT results in a publication, please cite Clark, Peek, & Putman 2014, ApJ 789, 82
The RHT was originally developed by Susan Clark, Josh Peek, and Mary Putman, and modifications to this code were made by Columbia University undergraduate Lowell Schudel.