Template Matching

Analysis of the structure of 2D maps

This page includes the code used in the paper Juvela (2016) for pattern matching analysis of 2D images of interstellar clouds. The code is written in Python, using the pyOpenCL interface to the OpenCL libraries. If these have been installed, simple tests can be run

 python2 CP.py and python2 PM.py.

These scripts include comments regarding the parameters of the routines and they both produce FITS images of significance and position angles. When investigating the results, one should start by masking all pixels with low significance values. For more details, see the paper and the comments in the scripts.

Here is one example of matching the ‘FIL’ template to a Herschel surface brightness image. The first figure shows the input data and the animation in scale_animation.avi the resulting image of significance and the distribution of recovered position angles as a function of the scale.

The code:

    • PM-2016-07-07.zip
      • Added the possibility to use non-square templates.
      • added option AAVE to the routine PatternMatch).
    • PM.zip
      • First version (2016-04-15).


    • Juvela M.: Pattern matching methods for the analysis of
      interstellar cloud structure, 2016, A&A 593, A58