Skip to content

Commit

Permalink
GIT: Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
laborleben committed May 16, 2018
2 parents f286c95 + d1c77e7 commit c07b4ff
Show file tree
Hide file tree
Showing 125 changed files with 747,732 additions and 4,953 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ firmware/mmc3_8chip_eth/vivado/*
firmware/mmc3_8chip_multi_tx_eth/vivado/*
!firmware/mmc3_8chip_multi_tx_eth/vivado/*.xpr

# MMC3 8chip with multi TX SHIP firmware
firmware/mmc3_8_chip_multi_tx_eth_SHIP/vivado/*
!firmware/mmc3_8_chip_multi_tx_eth_SHIP/vivado/*.xpr

# Simulation output
firmware/mio/cosim/sim_build
firmware/mio/cosim/sim_build.zip
9 changes: 5 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ python:

branches:
only:
- master
- development

notifications:
Expand Down Expand Up @@ -38,13 +37,15 @@ install:
- conda update --yes conda
- conda update --yes --all
- conda info -a
- conda create --yes -n test-environment python=$TRAVIS_PYTHON_VERSION bitarray cython ipython matplotlib mock nose numba numpy pyserial pytables pyyaml pyzmq scipy sphinx
- conda create --yes -n test-environment python=$TRAVIS_PYTHON_VERSION bitarray cython ipython matplotlib mock nose numba numpy pyqt pyserial pytables pyyaml pyzmq qtpy scipy
- source activate test-environment
- pip install progressbar-latest pyvisa pyvisa-py git+https://github.com/pyqtgraph/[email protected]
- pip install pyusb
- pip install pySiLibUSB
- if [ "$TRAVIS_BRANCH" == "master" ]; then pip install 'basil_daq>=2.4.9,<3.0.0' git+https://github.com/SiLab-Bonn/pyBAR_fei4_interpreter@development 'pixel_clusterizer>=3.1,<3.2'; fi
- if [ "$TRAVIS_BRANCH" == "development" ]; then pip install 'basil_daq>=2.4.9,<3.0.0' git+https://github.com/SiLab-Bonn/pyBAR_fei4_interpreter@development 'pixel_clusterizer>=3.1,<3.2'; fi
- pip install 'basil_daq>=2.4.12,<3.0.0'
#- pip install git+https://github.com/SiLab-Bonn/basil@development
- pip install git+https://github.com/SiLab-Bonn/pyBAR_fei4_interpreter@development
- pip install 'pixel_clusterizer>=3.1,<3.2'
# Install pyBAR
- python setup.py develop

Expand Down
3 changes: 2 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
include README.* VERSION LICENSE.txt requirements.txt
include pybar/*.yaml pybar/*.bit
include pybar/*.yaml
recursive-include examples *
recursive-include firmware *
recursive-include pybar/config *
recursive-include pybar/firmware *
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

# pyBAR [![Code Status](https://landscape.io/github/SiLab-Bonn/pyBAR/master/landscape.svg?style=flat)](https://landscape.io/github/SiLab-Bonn/pyBAR/master) [![Build Status](https://travis-ci.org/SiLab-Bonn/pyBAR.svg?branch=master)](https://travis-ci.org/SiLab-Bonn/pyBAR) [![Build Status](https://ci.appveyor.com/api/projects/status/github/SiLab-Bonn/pyBAR?svg=true)](https://ci.appveyor.com/project/DavidLP/pybar-71xwl)
# pyBAR [![Code Status](https://landscape.io/github/SiLab-Bonn/pyBAR/development/landscape.svg?style=flat)](https://landscape.io/github/SiLab-Bonn/pyBAR/development) [![Build Status](https://travis-ci.org/SiLab-Bonn/pyBAR.svg?branch=development)](https://travis-ci.org/SiLab-Bonn/pyBAR/branches) [![Build Status](https://ci.appveyor.com/api/projects/status/github/SiLab-Bonn/pyBAR?branch=development&svg=true)](https://ci.appveyor.com/project/laborleben/pybar-71xwl?branch=development)

pyBAR - Bonn ATLAS Readout in Python

Expand Down Expand Up @@ -41,12 +41,12 @@ The following packages are required for pyBAR's core functionality:

For full functionality, the following additional packages are required:
```
ipython mock nose pyqtgraph pyserial pyvisa pyvisa-py pyzmq sphinx vitables
ipython mock nose pyqtgraph pyserial pyvisa pyvisa-py pyzmq vitables
```

Run the **following commands** to install the packages:
```
conda install python=2.7 bitarray contextlib2 cython ipython matplotlib mock nose numba numpy pyserial pytables pyyaml pyzmq scipy sphinx
conda install python=2.7 bitarray contextlib2 cython ipython matplotlib mock nose numba numpy pyqt pyserial pytables pyyaml pyzmq qtpy scipy
pip install progressbar-latest pyvisa pyvisa-py git+https://github.com/pyqtgraph/[email protected]
```
Expand All @@ -56,9 +56,9 @@ On Windows, the `pywin32` package is required:
conda install pywin32
```

[Basil](https://github.com/SiLab-Bonn/basil) (>=2.4.9,<3.0.0) is required:
[Basil](https://github.com/SiLab-Bonn/basil) (>=2.4.12,<3.0.0) is required:
```
pip install 'basil_daq>=2.4.9,<3.0.0'
pip install 'basil_daq>=2.4.12,<3.0.0'
```

[pyBAR FEI4 Interpreter](https://github.com/SiLab-Bonn/pyBAR_fei4_interpreter) (>=1.3.0) is required:
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.2
3.1.0.dev0
5 changes: 3 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,15 @@ install:
- conda update conda --yes
- conda update --all --yes
- conda info -a
- conda install --yes bitarray cython ipython matplotlib mock nose numba numpy pyserial pytables pyyaml pyzmq scipy sphinx
- conda install --yes bitarray cython ipython matplotlib mock nose numba numpy pyqt pyserial pytables pyyaml pyzmq qtpy scipy
- conda install --yes pywin32
- pip install progressbar-latest pyvisa pyvisa-py git+https://github.com/pyqtgraph/[email protected] #git+https://github.com/uvemas/ViTables@develop
# test packages required for USB interface
- pip install pyusb
- pip install pySiLibUSB
# pyBAR installation including additional specific packages
- pip install 'basil_daq>=2.4.9,<3.0.0'
- pip install 'basil_daq>=2.4.12,<3.0.0'
#- pip install git+https://github.com/SiLab-Bonn/basil@development
- pip install git+https://github.com/SiLab-Bonn/pyBAR_fei4_interpreter@development
- pip install 'pixel_clusterizer>=3.1,<3.2'
- python.exe setup.py develop
Expand Down
25 changes: 12 additions & 13 deletions examples/example_tdc/example_tdc.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,17 @@

from pybar.run_manager import RunManager # importing run manager
from pybar.scans.scan_iv import IVScan
from pybar.scans.scan_init import InitScan
from pybar.scans.test_register import RegisterTest
from pybar.scans.scan_digital import DigitalScan
from pybar.scans.scan_analog import AnalogScan
from pybar.scans.tune_fei4 import Fei4Tuning
from pybar.scans.tune_stuck_pixel import StuckPixelScan
from pybar.scans.tune_stuck_pixel import StuckPixelTuning
from pybar.scans.scan_threshold_fast import FastThresholdScan
from pybar.scans.tune_noise_occupancy import NoiseOccupancyTuning
from pybar.scans.calibrate_plsr_dac import PlsrDacScan
from pybar.scans.calibrate_hit_or import HitOrCalibration
from pybar.scans.scan_ext_trigger import ExtTriggerScan
from pybar.fei4.register_utils import make_box_pixel_mask_from_col_row, parse_global_config
from pybar.fei4.register_utils import make_box_pixel_mask_from_col_row
import pybar.scans.analyze_source_scan_tdc_data as tdc_analysis


Expand Down Expand Up @@ -106,7 +105,7 @@ def plot_landau(source_scan_filename, tdc_hists, target_threshold, fit_range=(13
plt.clf()
plt.grid()
x_fit_range = np.logical_and(charge > fit_range[0], charge < fit_range[1])
coeff, err = fit_landau_bootstrap(charge[x_fit_range], count[x_fit_range], p0 = (7000, np.std(charge[x_fit_range]), 150, np.amax(count[x_fit_range])), yerr=count_error[x_fit_range], n_iterations=100)
coeff, err = fit_landau_bootstrap(charge[x_fit_range], count[x_fit_range], p0=(7000, np.std(charge[x_fit_range]), 150, np.amax(count[x_fit_range])), yerr=count_error[x_fit_range], n_iterations=100)
plt.bar(charge, count, width=charge[1] - charge[0], color='blue', label='data')
plt.plot(charge[x_fit_range], landau.langau(charge[x_fit_range], *coeff), 'r-')
plt.plot([target_threshold_charge, target_threshold_charge], [plt.ylim()[0], plt.ylim()[1]], 'b--', linewidth=2, label='Threshold $%d$ e' % target_threshold_charge)
Expand All @@ -128,8 +127,8 @@ def plot_landau(source_scan_filename, tdc_hists, target_threshold, fit_range=(13

# TDC measurements
plsr_dacs = [target_threshold, 40, 50, 60, 80, 100, 120, 150, 200, 250, 300, 350, 400, 500, 600, 700, 800] # PlsrDAC range for TDC calibration, should start at threshold
col_span = [55, 75]#[50, 78] # pixel column range to use in TDC scans
row_span = [125, 225]#[20, 315] # pixel row range to use in TDC scans
col_span = [55, 75] # [50, 78] # pixel column range to use in TDC scans
row_span = [125, 225] # [20, 315] # pixel row range to use in TDC scans
tdc_pixel = make_box_pixel_mask_from_col_row(column=[col_span[0], col_span[1]], row=[row_span[0], row_span[1]]) # edge pixel are not used in analysis

runmngr = RunManager('configuration.yaml')
Expand All @@ -150,18 +149,18 @@ def plot_landau(source_scan_filename, tdc_hists, target_threshold, fit_range=(13
runmngr.run_run(run=Fei4Tuning, run_conf={'target_threshold': target_threshold, 'target_tot': target_tot, 'target_charge': target_charge}, catch_exception=False)
runmngr.run_run(run=AnalogScan, run_conf={'scan_parameters': [('PlsrDAC', target_charge)]})
runmngr.run_run(run=FastThresholdScan)
runmngr.run_run(run=StuckPixelScan)
runmngr.run_run(run=StuckPixelTuning)
runmngr.run_run(run=NoiseOccupancyTuning, run_conf={'occupancy_limit': 1000, 'n_triggers': 10000000}) # high occupancy limit to work with strong Sr-90 source
runmngr.run_run(run=PlsrDacScan, run_conf={"colpr_address": range(25, 39)})

# TDC calibration
runmngr.run_run(run=HitOrCalibration, run_conf={
'reset_rx_on_error': True,
"pixels": (np.dstack(np.where(tdc_pixel == 1))+ 1).tolist()[0],
"scan_parameters": [('column', None),
('row', None),
('PlsrDAC', plsr_dacs)]
})
'reset_rx_on_error': True,
"pixels": (np.dstack(np.where(tdc_pixel == 1)) + 1).tolist()[0],
"scan_parameters": [('column', None),
('row', None),
('PlsrDAC', plsr_dacs)]
})
calibration_filename = runmngr.current_run.output_filename + '_calibration.h5'

# Scintillator trigger source scan
Expand Down
2 changes: 1 addition & 1 deletion examples/example_tuning_script/example_tuning_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
print 'Status:', status

# masking noisy and hot pixels
status = runmngr.run_run(run=StuckPixelScan, run_conf=run_conf)
status = runmngr.run_run(run=StuckPixelTuning, run_conf=run_conf)
print 'Status:', status

status = runmngr.run_run(run=NoiseOccupancyTuning, run_conf=run_conf)
Expand Down
Loading

0 comments on commit c07b4ff

Please sign in to comment.