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

Bug Report: calibrateThrDac.py fails when running without an optional argument #145

Closed brentstone closed 6 years ago

brentstone commented 6 years ago

The script macros/calibrateThrDac.py takes an optional argument '--listOfVFATs'. However, when the script is called without this argument, an error appears.

Brief summary of issue

Types of issue

Expected Behavior

The code should run normally and produce an output that looks like (this example uses a random vfatmap file):

vfatN cal_thr_m cal_thr_m_err cal_thr_b cal_thr_b_err noise noise_err -1 0.187049665973 0.012130477648 -0.902492512847 1.03784201715 0.603345206993 0.0 0 0.18369495808 0.00475990788012 -1.67339573993 0.3720276651 0.48812818729 0.0 1 0.209734295952 0.00410357886531 -1.78971876265 0.374053396714 0.430014980641 0.0 2 0.17799988794 0.00512733988643 -0.612880404258 0.418189972325 0.389952495223 0.0 3 0.173156244071 0.00525381322749 -1.29314644699 0.502731789025 0.69790988574 0.0 4 0.198585392433 0.0067146973569 -0.758489931974 0.603348962192 0.481894326004 0.0 5 4.82359584806e-07 1.42373374827e-07 5.02221450062e-05 1.33936953101e-05 0.0 0.0 6 0.309242885829 0.0120498001711 -4.52380232871 0.762313120076 1.1097997314 0.0 7 0.191833893707 0.00383026099247 -1.11689488843 0.347829716201 0.76955896637 0.0 8 0.195033373815 0.00383152931996 -1.54681688798 0.344108561047 0.350938770666 0.0 9 0.184663716053 0.0032845231648 -0.844525833187 0.297867249871 0.376032952726 0.0 10 0.218164517689 0.00420504475008 -1.70989590454 0.377618931061 0.471587221168 0.0 11 0.170373511612 0.00338088269068 -0.986382217409 0.304204056902 0.654486057769 0.0 12 4.82359584806e-07 1.42373374827e-07 5.02221450062e-05 1.33936953101e-05 0.0 0.0 13 0.186306626633 0.00373026922097 -1.64157297938 0.323953182657 0.52432803957 0.0 14 0.181563001693 0.00415743825686 -0.804327035075 0.358288525642 0.537875313103 0.0 15 0.19104253272 0.00403820133495 -1.53483629377 0.352309786558 0.768032594677 0.0 16 0.16507769778 0.0048635027988 -1.23087860381 0.434282671284 -30000.0 0.0 17 0.170784447742 0.00582970536101 -0.359878234307 0.65303498442 0.418627844168 0.0 18 0.290085753964 0.0194882958473 1.72929418128 1.86963668692 1.00963918534 0.0 19 0.192007676695 0.00463582256773 -0.81784593459 0.365771032392 0.734403856011 0.0 20 0.18322636267 0.00620383558435 -0.858298930905 0.503761648995 -30000.0 0.0 21 -0.776376939859 0.0032481389397 176.819743789 0.324878440987 -0.921160251871 0.0 22 0.237933543077 0.012859260681 -0.348133963561 0.799686230383 0.810141799547 0.0 23 0.18576546476 0.0041505828723 -1.3814852117 0.331535674057 0.537137330373 0.0 Your calibration file is located in:

/home/bstone/bigdisk/elog//calFile__GE11-X-S-CERN-0003.txt

You can find all ROOT objects in:

/home/bstone/bigdisk/elog//calFile_GE11-X-S-CERN-0003_.root

You can find all plots in:

/home/bstone/bigdisk/elog/

Done

Current Behavior

(py2.7)[bstone@gem904daq01 src]$ calibrateThrDac.py /afs/cern.ch/user/b/bstone/public/listOfScanDates_armCal_Coffin.txt --fitRange=20,150 Traceback (most recent call last): File "/home/bstone/bigdisk/src/venv/cc7/py2.7/lib/python2.7/site-packages/gempython/gemplotting/macros/calibrateThrDac.py", line 121, in mapVFATPos2VFATSN[vfat]['serialNum'] = array_vfatData[array_vfatData['vfatN'] == vfat] ValueError: setting an array element with a sequence.

Steps to Reproduce (for bugs)

  1. Ensure the correct version is installed with pip install /afs/cern.ch/user/d/dorney/public/v3Hack/gempython_gemplotting-1.0.0.tar.gz inside the venv
  2. Can then call calibrateThrDac.py from within venv

Possible Solution (for bugs)

Context (for feature requests)

Your Environment