XENON1T / pax

The XENON1T raw data processor [deprecated]
BSD 3-Clause "New" or "Revised" License
16 stars 15 forks source link

Allow import failure for matplotlib._cntr #734

Closed JelleAalbers closed 5 years ago

JelleAalbers commented 5 years ago

This is a workaround for #703. Currently pax does not run with matplotlib > 2.2.0 due to using the private matplotlib function _cntr that has been removed. This will allow pax to import and run even with a newer matplotlib -- although a warning message will be printed, since confidence tuples from TopPatternFit position reconstruction cannot be produced.

The main use of this is making pax import-able in more up-to-date python environments, such as those used for pax->strax format conversion. Alternatively you could monkeypatch matplotlib to achieve this:

import matplotlib
matplotlib._cntr = None
import pax
JelleAalbers commented 5 years ago

@feigaodm Any objections to this? It would enable pax to be run in more up-to-date python environments.