Skip to content

Commit

Permalink
Merge pull request #76 from slaclab/rixsCCD
Browse files Browse the repository at this point in the history
Rixs ccd
  • Loading branch information
philiph-slac authored Apr 2, 2024
2 parents fc39b86 + 93f4013 commit 7f0b28b
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 7 deletions.
1 change: 1 addition & 0 deletions calibrationSuite/argumentParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ def __init__(self):
self.parser.add_argument("-c", "--camera", type=int, help="camera.n")
self.parser.add_argument("-p", "--path", type=str, help="the base path to the output directory")
self.parser.add_argument("-n", "--nModules", type=int, help="nModules")
self.parser.add_argument("--mode", type=str, help="detector mode (1d, 2d, ...?") ## might be discoverable otherwise
self.parser.add_argument(
"-d", "--detType", type=str, default="", help="Epix100, Epix10ka, Epix10kaQuad, Epix10ka2M, ..."
)
Expand Down
19 changes: 14 additions & 5 deletions calibrationSuite/detectorInfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def __init__(self, detType):
self.nRowsPerBank = -1
self.dimension = -1

knownTypes = ['epixhr', 'epixM', 'rixsCCD']
knownTypes = ['epixhr', 'epixM', 'archon']
if detType not in knownTypes:
raise Exception("type %s not in known types" % (detType, knownTypes))

Expand All @@ -31,7 +31,7 @@ def __init__(self, detType):
self.setup_epixhr()
elif detType == 'epixM':
self.setup_epixM()
elif detType == 'rixsCCD':
elif detType == 'archon':
self.setup_rixsCCD()

def setNModules(self, n):
Expand All @@ -57,6 +57,15 @@ def setup_epixM(self, version=0):
#todo: setup detector here
temp = 0 #make python happy

def setup_rixsCCD(self, version=0):
#todo: setup detector here
temp = 0 #make python happy
def setup_rixsCCD(self, mode='1d', version=0):
self.nTestPixelsPerBank = 36
self.nBanks = 16
self.nCols = 4800 - self.nBanks*self.nTestPixelsPerBank
self.preferredCommonMode = 'rixsCCDTestPixelSubtraction'
if mode == '1d':
self.nRows = 300
self.clusterShape = [1,5] ## might be [1,3]
else:
self.nRows = 1200
self.clusterShape = [3,5] ## maybe

4 changes: 2 additions & 2 deletions suite_scripts/CalcNoiseAndMean.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ def __init__(self):
continue
for i, p in enumerate(cn.singlePixels):
try:
statsArray[i].accumulate(np.double(frames), frames[p[1], p[2]])
statsArray[i].accumulate(np.double(frames), frames[p[1:]])
except:
statsArray[i] = Stats(frames.shape)
statsArray[i].accumulate(np.double(frames), frames[p[1], p[2]])
statsArray[i].accumulate(np.double(frames), frames[p[1:]])
stats = statsArray[2] ## only matters for cross-correlation
noise = stats.rms()
means = stats.mean()
Expand Down

0 comments on commit 7f0b28b

Please sign in to comment.