Commit 2b7c8ba3 authored by Yan Zhaojun's avatar Yan Zhaojun
Browse files

debug

parent 61484640
Pipeline #4414 passed with stage
in 0 seconds
......@@ -3447,43 +3447,43 @@ class MCIsimulator():
data[i,-j-1,] -= overload
sum += overload
else:
#loop over each column, as bleeding is modelled column-wise
for i, column in enumerate(data.T):
sum = 0.
for j, value in enumerate(column):
#first round - from bottom to top (need to half the bleeding)
overload = value - self.information['fullwellcapacity']
if overload > 0.:
overload /= 2.
#self.image[j, i] -= overload
data[j, i] -= overload
sum += overload
elif sum > 0.:
if -overload > sum:
overload = -sum
#self.image[j, i] -= overload
data[j, i] -= overload
sum += overload
################################
for i, column in enumerate(data.T):
sum = 0.
for j, value in enumerate(column[::-1]):
#second round - from top to bottom (bleeding was half'd already, so now full)
overload = value - self.information['fullwellcapacity']
if overload > 0.:
#self.image[-j-1, i] -= overload
data[-j-1, i] -= overload
sum += overload
elif sum > 0.:
if -overload > sum:
overload = -sum
#self.image[-j-1, i] -= overload
data[-j-1, i] -= overload
sum += overload
# else:
# #loop over each column, as bleeding is modelled column-wise
# for i, column in enumerate(data.T):
# sum = 0.
# for j, value in enumerate(column):
# #first round - from bottom to top (need to half the bleeding)
# overload = value - self.information['fullwellcapacity']
# if overload > 0.:
# overload /= 2.
# #self.image[j, i] -= overload
# data[j, i] -= overload
# sum += overload
# elif sum > 0.:
# if -overload > sum:
# overload = -sum
# #self.image[j, i] -= overload
# data[j, i] -= overload
# sum += overload
# ################################
# for i, column in enumerate(data.T):
# sum = 0.
# for j, value in enumerate(column[::-1]):
# #second round - from top to bottom (bleeding was half'd already, so now full)
# overload = value - self.information['fullwellcapacity']
# if overload > 0.:
# #self.image[-j-1, i] -= overload
# data[-j-1, i] -= overload
# sum += overload
# elif sum > 0.:
# if -overload > sum:
# overload = -sum
# #self.image[-j-1, i] -= overload
# data[-j-1, i] -= overload
# sum += overload
######print('Applying column bleeding finished.......')
return data
......@@ -5216,11 +5216,11 @@ class MCIsimulator():
print('applyPRNUeffect')
####################################################################
# if self.source in sourcelist:
# if self.cosmicRays:
if self.source in sourcelist:
if self.cosmicRays:
# self.addCosmicRays()
# print('addCosmicRays finisth')
self.addCosmicRays()
print('addCosmicRays finisth')
##################################################
if self.skyback:
......
Supports Markdown
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