Skip to content

Commit

Permalink
Merge pull request #9 from SiLab-Bonn/development
Browse files Browse the repository at this point in the history
GIT: merge Development
  • Loading branch information
DavidLP authored Jan 12, 2017
2 parents f5a2530 + 478c59c commit 69cc280
Show file tree
Hide file tree
Showing 140 changed files with 10,085 additions and 4,361 deletions.
7 changes: 6 additions & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,9 @@ exclude_lines =

omit =
*/__init__.py
tests/*
testbeam_analysis/testing/*
testbeam_analysis/converter/*
testbeam_analysis/tools/residuals.py
testbeam_analysis/tools/test_tools.py
testbeam_analysis/tools/deprecated.py
testbeam_analysis/tools/data_selection.py
14 changes: 3 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ data_clusterizer.cpp
# PyDev files
.project
.pydevproject
# Examples output data
examples/data/output*
# Example data
TestBeamData_FEI4_DUT0_cluster.h5
TestBeamData_FEI4_DUT1_cluster.h5
Expand All @@ -69,14 +71,4 @@ Correlation.h5
TrackCandidates.h5
Tracklets.h5
Tracklets_corr.h5
Tracks.h5
tmp
*.h5
!data/
!test_hit_analysis/
!test_track_analysis/
!test_result_analysis/
!test_correlation_fixing/
*.pdf
*tmp*.*
.coverage*
Tracks.h5
15 changes: 8 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
language: python
python:
- 2.7
- 3.4
- 3.5

sudo: false

branches:
only:
- master
addons:
apt:
packages:
- gfortran

notifications:
email:
Expand All @@ -29,8 +30,8 @@ before_install:
- export PATH="$HOME/miniconda/bin:$PATH"
- conda update --yes conda
- conda info -a
- conda install --yes numpy cython pytables scipy matplotlib pandas nose
- pip install progressbar-latest xvfbwrapper coverage coveralls
- conda install --yes numpy cython pytables scipy matplotlib nose numba mock
- pip install progressbar-latest xvfbwrapper coverage coveralls pixel_clusterizer pykalman pylandau
- python setup.py develop

# Run test
Expand All @@ -40,7 +41,7 @@ script:
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
touch $HOME/miniconda/lib/python2.7/site-packages/converage.pth && printf "import coverage; coverage.process_startup()" > $HOME/miniconda/lib/python2.7/site-packages/converage.pth;
else
touch $HOME/miniconda/lib/python3.4/site-packages/converage.pth && printf "import coverage; coverage.process_startup()" > $HOME/miniconda/lib/python3.4/site-packages/converage.pth;
touch $HOME/miniconda/lib/python3.5/site-packages/converage.pth && printf "import coverage; coverage.process_startup()" > $HOME/miniconda/lib/python3.5/site-packages/converage.pth;
fi
- nosetests --with-coverage --cover-package=testbeam_analysis

Expand Down
5 changes: 2 additions & 3 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
include LICENSE
include README.*
include requirements.*
#recursive-include docs *
recursive-include examples *
recursive-include tests *
include requirements_docs.*
recursive-include docs *
recursive-include testbeam_analysis *
36 changes: 0 additions & 36 deletions README.md

This file was deleted.

68 changes: 68 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
===============================================
Introduction
===============================================

|travis-status| |appveyor-status| |rtd-status| |coverage|

Testbeam analysis is a simple analysis of pixel-sensor data in particle beams. All steps of a complete analysis
are implemented with a few independent python functions. If you want to understand the basics of telescope data
reconstruction this code might help.
If you want to have something fancy to account for thick devices in combination with low energetic beams
use e.g. _EUTelescope_. Depending on the setup a resolution that is only ~ 15% worse can be archieved with this code.
For a quick first impression check the examples in the documentation.

In future releases it is forseen to make the code more readable and to implement a Kalman Filter to have the best
possible track fit results.

Installation
============
You have to have Python 2/3 with the following modules installed:
- cython
- tables
- scipy
- matplotlib
- numba

If you are new to Python please look at the installation guide in the wiki.
Since it is recommended to change example files according to your needs you should install the module with

.. code-block:: bash
python setup.py develop
This does not copy the code to a new location, but just links to it.
Uninstall:

.. code-block:: bash
pip uninstall testbeam_analysis
Example usage
==============
Check the examples folder with data and examples of a Mimosa26 and a FE-I4 telescope analysis.
Run eutelescope_example.py or fei4_telescope_example.py in the example folder and check the text output to
the console as well as the plot and data files that are created to understand what is going on.
In the examples folder type e.g.:

.. code-block:: bash
python fei4_telescope_example.py
.. |travis-status| image:: https://travis-ci.org/SiLab-Bonn/testbeam_analysis.svg?branch=development
:target: https://travis-ci.org/SiLab-Bonn/testbeam_analysis
:alt: Build status

.. |appveyor-status| image:: https://ci.appveyor.com/api/projects/status/github/SiLab-Bonn/testbeam_analysis
:target: https://ci.appveyor.com/project/DavidLP/testbeam-analysis
:alt: Build status

.. |rtd-status| image:: https://readthedocs.org/projects/testbeam_analysis/badge/?version=latest
:target: http://testbeam_analysis.rtfd.org
:alt: Documentation

.. |coverage| image:: https://coveralls.io/repos/SiLab-Bonn/testbeam_analysis/badge.svg?branch=development
:target: https://coveralls.io/github/SiLab-Bonn/testbeam_analysis?branch=development
:alt: Coverage


7 changes: 3 additions & 4 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,15 @@ environment:
- PYTHON: 2.7

platform:
- x86
- x64

init:
- "ECHO %PYTHON%"
- ps: Start-FileDownload 'http://download.microsoft.com/download/7/9/6/796EF2E4-801B-4FC4-AB28-B59FBF6D907B/VCForPython27.msi' C:\VCForPython27.msi; echo "Done"
- cmd: msiexec /i C:\VCForPython27.msi /quiet /qn
- set PATH=C:\Miniconda;C:\Miniconda\Scripts;%PATH% # miniconda is already installed on appveyor: https://github.com/appveyor/ci/issues/359
- conda install --yes numpy cython pytables scipy matplotlib pandas nose
- pip install progressbar-latest
- set PATH=C:\Miniconda-x64;C:\Miniconda-x64\\Scripts;%PATH% # Miniconda is already installed on appveyor: https://github.com/appveyor/ci/issues/359
- conda install --yes numpy cython pytables scipy matplotlib nose numba mock
- pip install progressbar-latest pixel_clusterizer pykalman pylandau
- conda info -a
- conda list

Expand Down
33 changes: 33 additions & 0 deletions docs/Examples.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
.. toctree::
:numbered:

Examples
********

There are plenty of examples available that cover different setups.
These examples are a good starting point to get to know `Testbeam Analysis`.

ATLAS FE-I4 telescope
=====================
.. automodule:: testbeam_analysis.examples.fei4_telescope
.. image:: _static/example_fei4/CorrelationColumn.png
.. image:: _static/example_fei4/CorrelationRow.png

Original correlation :download:`pdf output <_static/example_fei4/Correlation.pdf>`

.. image:: _static/example_fei4/AlignmentCorrSlice.png
.. image:: _static/example_fei4/AlignmentCorrFit.png

Original pre-alignment :download:`pdf output <_static/example_fei4/Prealignment.pdf>`

.. image:: _static/example_fei4/Track_chi2.png

Original track fitting :download:`pdf output <_static/example_fei4/Correlation.pdf>`

.. image:: _static/example_fei4/EventMonitor.png

Original event plot :download:`pdf output <_static/example_fei4/Event.pdf>`

.. image:: _static/example_fei4/Efficiency.png

Original efficiency :download:`pdf output <_static/example_fei4/Efficiency.pdf>`
Loading

0 comments on commit 69cc280

Please sign in to comment.