Template Matching

Template Matching

Analysis of the structure of 2D maps

In the paper Juvela (2016) we applied template matching analysis to the study of 2D images of interstellar clouds. The code was written in Python, using the pyOpenCL interface to the OpenCL libraries. The programs calculate the significance of the detection of structures matching the selected template and the estimated position angles of those structures.

Below is an example of the surface brightness map of the Musca cloud observed with the Herschel satellite. When analysed with the template-matching method, using a template for elongated structures, the method will extract different structures depending on the physical scale of the selected template.

The figure below shows one example of the maps for the significance of elongated structures located at a given spatial scale. The video file scale_animation.avi shows the significance maps and the position-angle maps for different sizes of the template.

The following image compares results from the template matching analysis and RHT analysis in the case of the cloud LDN 1642. With suitable selection of parameter values, the results are quite similar between the two methods. The original image is shown on the left and the following columns correspond to two RHT and two template-matching (TM) runs with different parameter values. The upper frames show the “significance” maps, the lower frames the estimated position angles of the structures.

The results of the template-matching algorithm will be different not only depending on the size scale selected for the pattern but also depending on how the data are normalised. One can run the analysis based on the absolute intensity values, to emphasize the brightest regions (like TM2 above). Alternatively, one can apply normalisation to the data under the template, to extract equally structures in regions of low and high intensity (like TM1 above).

References: Juvela M.: Pattern matching methods for the analysis of interstellar cloud structure, 2016, A&A 593, A58 . The program for template-matching calculations can be found at [github]{https://github.com/mjuvela/ISM}, in the TM subdirectory.