Commit 7dd523c5 authored by Gustavo Pinzon's avatar Gustavo Pinzon
Browse files

Modifications to findHistogramPeaks()

parent ca1afd3a
Pipeline #67049 passed with stages
in 27 minutes and 9 seconds
...@@ -95,10 +95,12 @@ def findHistogramPeaks(image, valley1=20000, valley2=[], phases=2, gaussianFit=F ...@@ -95,10 +95,12 @@ def findHistogramPeaks(image, valley1=20000, valley2=[], phases=2, gaussianFit=F
greyPhase1= totalgreylevel[totalgreylevel<=valley1] greyPhase1= totalgreylevel[totalgreylevel<=valley1]
countsPhase1 = totalCounts[0:greyPhase1.shape[0]] countsPhase1 = totalCounts[0:greyPhase1.shape[0]]
peakPhase1 = greyPhase1[countsPhase1==countsPhase1.max()] peakPhase1 = greyPhase1[numpy.argmax(countsPhase1)]
# peakPhase1 = greyPhase1[countsPhase1==countsPhase1.max()]
greyPhase2= totalgreylevel[totalgreylevel>=valley1] greyPhase2= totalgreylevel[totalgreylevel>=valley1]
countsPhase2 = totalCounts[(bins-greyPhase2.shape[0]):bins] countsPhase2 = totalCounts[(bins-greyPhase2.shape[0]):bins]
peakPhase2 = greyPhase2[countsPhase2==countsPhase2.max()] peakPhase2 = greyPhase2[numpy.argmax(countsPhase2)]
# peakPhase2 = greyPhase2[countsPhase2==countsPhase2.max()]
if gaussianFit: if gaussianFit:
try: #Lets try to make the fitting try: #Lets try to make the fitting
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment