Skip to content

Commit aef92cb

Browse files
author
Benedikt Daurer
committed
Changed basic examples as synthax of some analysis/plotting functions have been changed already
1 parent f51213b commit aef92cb

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

examples/basic/correlation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ def onEvent(evt):
7272
analysis.event.printProcessingRate()
7373

7474
# Simple hit finding (counting the number of lit pixels)
75-
analysis.hitfinding.countLitPixels(evt, "photonPixelDetectors", "CCD",
75+
analysis.hitfinding.countLitPixels(evt, evt["photonPixelDetectors"]["CCD"],
7676
aduThreshold=10, hitscoreThreshold=100)
7777

7878
# Extract boolean (hit or miss)
@@ -91,4 +91,4 @@ def onEvent(evt):
9191

9292
# Plot heat map of hitrate as function of injector position
9393
plotting.correlation.plotMeanMap(evt["parameters"]['injectorX'], evt["parameters"]['injectorY'],
94-
evt["analysis"]["hitrate"].data, plotid='hitrateMeanMap', **hitmapParams)
94+
evt["analysis"]["hitrate"].data, name='hitrateMeanMap', **hitmapParams)

examples/basic/detector.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ def onEvent(evt):
5151
analysis.pixel_detector.printStatistics(evt["photonPixelDetectors"])
5252

5353
# Count Nr. of Photons
54-
analysis.pixel_detector.totalNrPhotons(evt, "photonPixelDetectors", "CCD")
55-
plotting.line.plotHistory(evt["analysis"]["nrPhotons - CCD"], label='Nr of photons / frame', history=50)
54+
analysis.pixel_detector.totalNrPhotons(evt, evt["photonPixelDetectors"]["CCD"], outkey="nrPhotons")
55+
plotting.line.plotHistory(evt["analysis"]["nrPhotons"], label='Nr of photons / frame', history=50)
5656

5757
# Detector histogram
5858
plotting.line.plotHistogram(evt["photonPixelDetectors"]["CCD"], **histogramCCD)

examples/basic/hitfinding.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def onEvent(evt):
4141
analysis.event.printProcessingRate()
4242

4343
# Simple hit finding (counting the number of lit pixels)
44-
analysis.hitfinding.countLitPixels(evt, "photonPixelDetectors", "CCD", aduThreshold=10, hitscoreThreshold=100)
44+
analysis.hitfinding.countLitPixels(evt, evt["photonPixelDetectors"]["CCD"], aduThreshold=10, hitscoreThreshold=100)
4545

4646
# Extract boolean (hit or miss)
4747
hit = evt["analysis"]["isHit"].data

0 commit comments

Comments
 (0)