Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
repos:
# https://pycqa.github.io/isort/docs/configuration/black_compatibility.html#integration-with-pre-commit
- repo: https://github.com/pycqa/isort
rev: 7.0.0
rev: 9.0.0a3
hooks:
- id: isort
args: ["--profile", "black", "--filter-files"]
- repo: https://github.com/psf/black
rev: 25.12.0
rev: 26.5.0
hooks:
- id: black
args: ["--line-length=100"]
Expand Down
8 changes: 2 additions & 6 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ cff-version: 1.2.0
message: If you use this software, please cite it using these metadata.
title: "Eventdisplay Release Tests"
# doi: 10.5281/zenodo.3559075
version: 4.91.0
date-released: 2024-11-30
version: 4.92.0
date-released: 2026-05-18
keywords:
- "gamma-ray astronomy"
- "astronomy software"
Expand All @@ -19,7 +19,3 @@ authors:
family-names: Maier
affiliation: DESY
orcid: https://orcid.org/0000-0001-9868-4700
- given-names: M.
family-names: Nievas
- given-names: S.
family-names: Patel
31 changes: 31 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Welcome to the Eventdisplay contributing guidelines

You are very welcome to contribute to Eventdisplay!

## Reporting Issues

Please try to be as concise as possible when reporting issue. Whenever possible add a small code example and a clear description of the problem.

Report your system configuration by pasting the output of the following command to the issue:

```console
make config
```

## Contributing Code

Best to contact the developers first or to open an issue describe the new development before starting a larger project.

Eventdisplay is an old project and without strict coding guidelines. Please provide reasonable structured and readable code.

## Contributing Documentation

Documentation is always incomplete and contributions are welcome - either to the markdown-based documentation in this repository or on the [VERITAS wiki page](https://veritas.sao.arizona.edu/wiki/Eventdisplay_Manual).

## Authorship and Credits

We distinguish between "Contributors" and "Authors" to ensure fair credit:

* **Contributors:** Every person who contributes code or documentation is a contributor. You will be automatically credited in our git history, see the [Contributors](https://github.com/VERITAS-Observatory/EventDisplay_ReleaseTests_code/graphs/contributors?all=1) GitHub page.
* **Authors:** Authors are individuals who have made substantial or sustained contributions to the project. Authorship recognizes contributions and requires individuals to take responsibility for the project.
Authors are listed in the [CITATION.cff](CITATION.cff) file.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 3-Clause License

Copyright (c) 2022-2025 Eventdisplay Developers & Gernot Maier (DESY).
Copyright (c) 2022-2026 Eventdisplay Developers & Gernot Maier (DESY).
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ dependencies:
- pre-commit
- towncrier

# cheatsheet
# cheat sheet
# create: conda env create -f environment.yml
# activate: conda activate eventdisplay-release-tests
# update (conda/mamba): conda env update -f environment.yml --prune
Expand Down
11 changes: 5 additions & 6 deletions release_tests/montecarlo/irf_plotting/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
# IRF plotting

**in development - not working yet**
plot effective areas and angular resolution for all points in parameter space

Goal: plot effective areas and angular resolution for all points in parameter space
use `irf_plotting.sh`, but note some hardwired values.

Note: only skeleton yet, missing is the loop over the full parameter space

## Usage
e.g.

```console
root -l -q -b 'plot_effectiveAreas.C'
```
./irf_plotting.sh /afs/ifh.de/group/cta/scratch/maierg/EVNDISP/EVNDISP-400/GITHUB_Eventdisplay/EventDisplay_Release_v492/runparameter/V6.AP.runparameter.dat
```
22 changes: 13 additions & 9 deletions release_tests/montecarlo/irf_plotting/irf_plotting.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,13 @@ fi

#### TEMP FIXED VALUES
CUT="NTel3-PointSource-Hard-TMVA-BDT"
CUT="NTel2-PointSource-Moderate-TMVA-BDT"
CUT="NTel2-PointSource-Soft-TMVA-BDT"
CUT="NTel2-PointSource-Moderate-TMVA-BDT"
CUT="NTel2-PointSource-Moderate"
# Comparision plots - version and simtype hardwired
COMPAREVERSION="v490"
COMPARESIMTYPE="CARE_June2020"
# Comparison plots - version and simtype hardwired
COMPAREVERSION="v492"
COMPARESIMTYPE="CARE_202404"
COMPARECUT="NTel2-PointSource-ModerateXGB"
#### (END TEMP FIXED VALUES)

# Analysis type
Expand Down Expand Up @@ -71,7 +72,7 @@ do
fi
for A in "${ATMO[@]}"
do
if [[ ${E} == "V6_2023_2024w" ]] && [[ ${A} == "61" ]]; then
if [[ ${E} == "V6_2016_2017" ]] && [[ ${A} == "61" ]]; then
IRFDIR="${DDIR}/${E}_ATM${A}_gamma/EffectiveAreas_Cut-${CUT}_DISP"
IRFFILE="EffArea-${SIMTYPE}-${E}-ID0-Ze${Z}deg-${W}wob-${N}-Cut-${CUT}"
echo "IRFDIR $IRFDIR"
Expand All @@ -80,11 +81,14 @@ do
COMP_IRFDIR=${IRFDIR//"$VERSION"/"$COMPAREVERSION"}
COMP_IRFDIR=${COMP_IRFDIR//"$SIMTYPE"/"$COMPARESIMTYPE"}
COMP_IRFFILE=${IRFFILE//"$SIMTYPE"/"$COMPARESIMTYPE"}
echo "IRFDIR (comparision): $COMP_IRFDIR"
echo "IRFFILE (comparision): $COMP_IRFFILE"
root -l -q -b "plot_irf.C(\"${IRFDIR}\",\"${IRFFILE}\",\"${E}\",\"${A}\",\"${CUT}\",\"${Z}\",\"${W}\",\"${N}\",\"${ODIR}\", \"${COMP_IRFDIR}\",\"${COMP_IRFFILE}\")"
# compare TMVA with XGB file
COMP_IRFDIR=${COMP_IRFDIR//"$CUT"/"$COMPARECUT"}
COMP_IRFFILE=${COMP_IRFFILE//"$CUT"/"$COMPARECUT"}
echo "COMPIRFDIR (comparison): $COMP_IRFDIR"
echo "COMPIRFFILE (comparison): $COMP_IRFFILE"
root -l -q -b "plot_irf.C(\"${IRFDIR}\",\"${IRFFILE}\",\"${E}\",\"${A}\",\"${CUT}\",\"${Z}\",\"${W}\",\"${N}\",\"${MCAZ}\",\"${ODIR}\", \"${COMP_IRFDIR}\",\"${COMP_IRFFILE}\")"
else
root -l -q -b "plot_irf.C(\"${IRFDIR}\",\"${IRFFILE}\",\"${E}\",\"${A}\",\"${CUT}\",\"${Z}\",\"${W}\",\"${N}\",\"${ODIR}\")"
root -l -q -b "plot_irf.C(\"${IRFDIR}\",\"${IRFFILE}\",\"${E}\",\"${A}\",\"${CUT}\",\"${Z}\",\"${W}\",\"${N}\",\"${MCAZ}\",\"${ODIR}\")"
fi
fi
done
Expand Down
52 changes: 0 additions & 52 deletions release_tests/montecarlo/irf_plotting/plot_effectiveAreas.C

This file was deleted.

21 changes: 15 additions & 6 deletions release_tests/montecarlo/irf_plotting/plot_irf.C
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,19 @@
#include <string>
#include <vector>

#include "TImage.h"

R__LOAD_LIBRARY($EVNDISPSYS/lib/libVAnaSum.so);

void printCanvas( TCanvas *c, string iName, string oDir )
{
string iSuffix = ".pdf";
string iSuffix = ".png";
if( c )
{
string iPrintName = iName + iSuffix;
c->SetCanvasSize(c->GetWw()*2, c->GetWh()*2);
c->Modified();
c->Update();
c->Print( (oDir+"/"+iPrintName).c_str() );
}
}
Expand All @@ -32,21 +37,24 @@ void plot_irf(
string ze = "20",
string woff = "0.5",
string nsb = "200",
string az = "0",
string odir = "./figures/",
string IRFDirectory_compare = "",
string IRFFile_compare = ""
)
{
float base_index = 1.5;

VPlotInstrumentResponseFunction a;
a.addInstrumentResponseData(
(IRFDirectory+"/"+IRFFile+".root").c_str(),
atoi(ze.c_str()), atof(woff.c_str()), 0, 1.6, atoi(nsb.c_str()), "A_MC",
atoi(ze.c_str()), atof(woff.c_str()), atoi(az.c_str()), base_index, atoi(nsb.c_str()), "A_MC",
-99, -99, -99, 1.5 );
if( IRFDirectory_compare.size() > 0 && IRFFile.size() > 0 )
{
a.addInstrumentResponseData(
(IRFDirectory_compare+"/"+IRFFile_compare+".root").c_str(),
atoi(ze.c_str()), atof(woff.c_str()), 0, 1.6, atoi(nsb.c_str()), "A_MC",
atoi(ze.c_str()), atof(woff.c_str()), atoi(az.c_str()), base_index, atoi(nsb.c_str()), "A_MC",
-99, -99, -99, 1.5 );
}
Comment thread
GernotMaier marked this conversation as resolved.
a.setPlottingAxis( "energy_Lin", "X", false, 0.05, 100., "energy [TeV]" );
Expand Down Expand Up @@ -109,26 +117,27 @@ void plot_irf(
c = a.plotEnergyReconstructionBias("mean", -0.4, 0.4);
printCanvas( c, "EBias_"+IRFFile, odir);

/*
// plot comparision of 4 and 3-telescope effective areas
VPlotInstrumentResponseFunction b;
b.addInstrumentResponseData(
(IRFDirectory+"/"+IRFFile+".root").c_str(),
atoi(ze.c_str()), atof(woff.c_str()), 0, 1.6, atoi(nsb.c_str()), "A_MC",
atoi(ze.c_str()), atof(woff.c_str()), 0, base_index, atoi(nsb.c_str()), "A_MC",
-99, -99, -99, 1.5 );
for( unsigned int i = 2; i <=5; i++ )
{
string IRFFile3Tel = IRFFile;
IRFFile3Tel.replace(IRFFile3Tel.find("ID0"), 3, "ID" + std::to_string(i) );
b.addInstrumentResponseData(
(IRFDirectory+"/"+IRFFile3Tel+".root").c_str(),
atoi(ze.c_str()), atof(woff.c_str()), 0, 1.6, atoi(nsb.c_str()), "A_MC",
atoi(ze.c_str()), atof(woff.c_str()), 0, base_index, atoi(nsb.c_str()), "A_MC",
-99, -99, -99, 1.5 );
}
b.setPlottingAxis( "energy_Lin", "X", false, 0.05, 100., "energy [TeV]" );
c = b.plotEffectiveArea( 1.e3, 5.e5 );
printCanvas( c, "EffArea3Tel_"+IRFFile, odir);

c = b.plotEffectiveAreaRatio( 0, 0., 2. );
printCanvas( c, "EffArea3TelRatio_"+IRFFile, odir);
printCanvas( c, "EffArea3TelRatio_"+IRFFile, odir); */

}
2 changes: 1 addition & 1 deletion release_tests/sources/Crab/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Parameters required for the analysis are all listed in parameter files. This inc
- object to be analyzed
- ...

Most important parameter files are:
Most important parameter files are (examples for v491):

- [AP StdHV V6](https://github.com/VERITAS-Observatory/EventDisplay_Release_v491/blob/main/runparameter/V6.AP.runparameter.dat)
- [AP RedHV V6](https://github.com/VERITAS-Observatory/EventDisplay_Release_v491/blob/main/runparameter/V6redHV.AP.runparameter.dat)
Expand Down
59 changes: 59 additions & 0 deletions release_tests/sources/Crab/runlist_releaseTestingV6.dat
Original file line number Diff line number Diff line change
Expand Up @@ -969,3 +969,62 @@
110899
110999
111000
111332
111425
112774
112797
112799
112810
112829
112831
112854
112855
112870
112905
112906
112926
112927
112973
113073
113074
113224
113298
113299
113303
113352
113375
113515
113637
113689
113704
113710
113724
113749
113790
113830
113840
113841
113842
113877
113878
113879
113880
113881
113882
113883
113884
113885
113886
113887
113888
113890
113891
113892
113893
113894
113895
113896
113897
113963
113994
113995
29 changes: 29 additions & 0 deletions release_tests/sources/Crab/runlist_releaseTestingV6redHV.dat
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
107016
107019
107038
107099
107417
107418
107463
Expand All @@ -103,3 +104,31 @@
107857
107859
107861
107882
109598
109599
109600
109601
109624
109625
109626
110078
110381
110466
110467
110482
110483
110488
110770
110771
110772
111168
111169
111247
112981
113001
113594
113619
113658
113711
113989
Loading
Loading