XENON1T / pax

The XENON1T raw data processor [deprecated]

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deprecated matplotlib function in PatternFitter

pelssers opened this issue · comments

I recently had to install Pax in a Python 3.5 environment. The problem I encountered was that in the PatternFitter we use the matplotlib module _cntr which is deprecated since matplotlib 2.2.0.

We used this module instead of matplotlibs contour() function because it traces contours without making an actual plot. To work with the latest matplotlib we need to rewrite this part of PatternFitter using matplotlibs contour() function.

@pelssers Would you like to fix it with a PR, maybe that helps to understand what's the issue :)

It seems we're using _cntr to find an array of (x,y) pairs describing the contour (https://github.com/XENON1T/pax/blob/master/pax/PatternFitter.py#L268). We could use http://scikit-image.org/docs/dev/api/skimage.measure.html#skimage.measure.find_contours from scikit-image to do it instead; it might even simplify the code. I'm fine with adding scikit-image as a dependency.