-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #120 from VERITAS-Observatory/0.2.0-dev
Refactoring and cleanup of code; improved performance for Eventdisplay
- Loading branch information
Showing
50 changed files
with
2,382 additions
and
1,977 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
--- | ||
name: CI | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.8] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install conda dependencies | ||
env: | ||
PYTHON_VERSION: ${{ matrix.python-version }} | ||
run: | | ||
source $CONDA/etc/profile.d/conda.sh | ||
conda config --set always_yes yes --set changeps1 no | ||
conda update -q conda | ||
conda install -c conda-forge mamba | ||
mamba env create -n v2dl3ED -f environment-eventdisplay.yml | ||
conda activate v2dl3ED | ||
conda info | ||
- name: flake8 | ||
shell: bash -leo pipefail {0} | ||
run: | | ||
source $CONDA/etc/profile.d/conda.sh | ||
conda activate v2dl3ED | ||
conda install flake8 | ||
#flake8 . --count --exit-zero --max-line-length=90 --ignore=E203,W503 --select=W504 --show-source --statistics | ||
flake8 . --count --select=E9,F63,F7,F82 --ignore=E203,W503 --show-source --statistics | ||
flake8 . --count --exit-zero --max-complexity=25 --ignore=E203,W503 --max-line-length=127 --statistics | ||
- name: pytest | ||
shell: bash -leo pipefail {0} | ||
env: | ||
PYTHONPATH: . | ||
run: | | ||
source $CONDA/etc/profile.d/conda.sh | ||
conda activate v2dl3ED | ||
pytest . | ||
- name: download test data | ||
run: | | ||
./download_data_for_tests.sh | ||
- name: V2Dl3-Eventdisplay | ||
shell: bash -leo pipefail {0} | ||
env: | ||
PYTHONPATH: . | ||
run: | | ||
source $CONDA/etc/profile.d/conda.sh | ||
conda activate v2dl3ED | ||
# point-like tests | ||
python pyV2DL3/script/v2dl3_for_Eventdisplay.py \ | ||
-f ./64080.anasum.root \ | ||
./effArea-v486-auxv01-CARE_June2020-Cut-NTel2-PointSource-Moderate-TMVA-BDT-GEO-V6_2012_2013a-ATM62-T1234-testCI.root \ | ||
test-pointlike-CI.fits.gz | ||
python notebooks/eventdisplay-testing/compareFitsFiles.py \ | ||
-f ED-0.2.0-pointlike-CI.fits.gz test-pointlike-CI.fits.gz \ | ||
-d test-pointlike.log | ||
cat test-pointlike.log | ||
# full-enclosure tests | ||
python pyV2DL3/script/v2dl3_for_Eventdisplay.py --full-enclosure \ | ||
-f ./64080.anasum.root \ | ||
./effArea-v486-auxv01-CARE_June2020-Cut-NTel2-PointSource-Moderate-TMVA-BDT-GEO-V6_2012_2013a-ATM62-T1234-testCI.root \ | ||
test-full-enclosure-CI.fits.gz | ||
python notebooks/eventdisplay-testing/compareFitsFiles.py \ | ||
-f ED-0.2.0-fullenclosure-CI.fits.gz test-full-enclosure-CI.fits.gz \ | ||
-d test-full-enclosure.log | ||
cat test-full-enclosure.log | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
BSD 3-Clause License | ||
|
||
Copyright (c) 2019, 2020, 2021 V2DL3 Developers | ||
All rights reserved. | ||
|
||
Redistribution and use in source and binary forms, with or without | ||
modification, are permitted provided that the following conditions are met: | ||
|
||
1. Redistributions of source code must retain the above copyright notice, this | ||
list of conditions and the following disclaimer. | ||
|
||
2. Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
|
||
3. Neither the name of the copyright holder nor the names of its | ||
contributors may be used to endorse or promote products derived from | ||
this software without specific prior written permission. | ||
|
||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
wget https://desycloud.desy.de/index.php/s/K5PkymyEJkFa46t/download/64080.anasum.root | ||
wget https://desycloud.desy.de/index.php/s/Ete9eC3Z448bXwd/download/effArea-v486-auxv01-CARE_June2020-Cut-NTel2-PointSource-Moderate-TMVA-BDT-GEO-V6_2012_2013a-ATM62-T1234-testCI.root | ||
wget https://desycloud.desy.de/index.php/s/cHQXEcNeN2ojFfR/download/ED-0.2.0-pointlike-CI.fits.gz | ||
wget https://desycloud.desy.de/index.php/s/4rF8r27QmpqmGQZ/download/ED-0.2.0-fullenclosure-CI.fits.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# installation: | ||
# create: conda env create -f environment-eventdisplay.yml | ||
# activate: conda activate v2dl3ED | ||
# | ||
name: v2dl3ED | ||
channels: | ||
- astropy | ||
- conda-forge | ||
dependencies: | ||
- astropy>=4.0 | ||
- click | ||
- numpy>=1.13 | ||
- pytest | ||
- python>=3.8 | ||
- pyyaml | ||
- scipy | ||
- uproot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,7 @@ dependencies: | |
- numpy>=1.13 | ||
- pandas | ||
- pkgconfig | ||
- pytest | ||
- python>=3.8 | ||
- pyyaml | ||
- root | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Example notebooks on how to use V2DL3 and gammpay | ||
|
||
Running those notebook requires gammapy and jupyter installed. | ||
|
||
Do so by running: | ||
`` | ||
conda env create -f environment.yml | ||
conda activate v2dl3_examples | ||
``` | ||
Oops, something went wrong.