cms-gem-daq-project / gem-plotting-tools

Repository for GEM commissioning plotting tools
GNU General Public License v3.0
1 stars 26 forks source link

improvements to anaDACScan.py: replace out-of-range DAC values, improve handling of whitespace/newlines in calibration file #162

Closed AndrewLevin closed 5 years ago

AndrewLevin commented 5 years ago

These are two unrelated but simple improvements to the anaDACScan.py script.

Description

Currently, anaDACScan.py will just warn the user when the fitted nominal DAC values are below 0 or above the maximum range of the register. This PR replaces the out-of-range nominal DAC values with 0 or the maximum value, in addition to printing a warning.

Currently, the handling of the calibration file would fail if a tab or multiple spaces separated the columns. This can be fixed very easily.

Types of changes

Motivation and Context

The replacement of out-of-range nominal DAC values was requested by @bdorney in a gemctp7user PR https://github.com/cms-gem-daq-project/gemctp7user/pull/37#pullrequestreview-168729078.

The issue with the calibration file handling was obvious.

How Has This Been Tested?

I have run the updated script successfully on DAC scan data on gem904daq01.

Screenshots (if appropriate):

Checklist:

AndrewLevin commented 5 years ago

changed