We follow the method in [1]} based on Marching square algorithm and Friend of Friends algorithm to identify contours surrounding connected regions and holes in the excursion set.
Since our field is dicretized into pixels, we shall use \({\cal {W}}_1\)  for a polygon [2]} given by:
\(({\cal {W}}_1)_{ab}= \sum _{a,b} |\vec{e_{ab}}|^{-1} \vec{e}_{ab} \otimes \vec{e}_{ab},\) 
