diff --git a/calibrationSuite/argumentParser.py b/calibrationSuite/argumentParser.py index f104f95..0d9d530 100644 --- a/calibrationSuite/argumentParser.py +++ b/calibrationSuite/argumentParser.py @@ -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, ..." ) diff --git a/calibrationSuite/detectorInfo.py b/calibrationSuite/detectorInfo.py index a80f720..e18c261 100644 --- a/calibrationSuite/detectorInfo.py +++ b/calibrationSuite/detectorInfo.py @@ -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)) @@ -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): @@ -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 + diff --git a/suite_scripts/CalcNoiseAndMean.py b/suite_scripts/CalcNoiseAndMean.py index ce26d99..37612d1 100755 --- a/suite_scripts/CalcNoiseAndMean.py +++ b/suite_scripts/CalcNoiseAndMean.py @@ -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()