Skip to content

Commit

Permalink
BUG: minor fixes related to new class structure
Browse files Browse the repository at this point in the history
  • Loading branch information
nstelter-slac committed Apr 26, 2024
1 parent 945278c commit 45d0733
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
13 changes: 7 additions & 6 deletions calibrationSuite/psanaBase.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ def setupPsana(self):
def get_ds(self, run=None):
if run is None:
run = self.run
if psanaBaseNum == 1:
return DataSource("exp=%s:run=%d:smd" % (self.exp, run))
else:
if psanaBaseNum == 2:
return DataSource(exp=self.exp, run=run, intg_det=self.experimentHash['detectorType'], max_events=self.maxNevents)

else:
return DataSource("exp=%s:run=%d:smd" % (self.exp, run))

def isKicked(self, evt):
if psanaBaseNum == 2:
allcodes = self.getEventCodes(evt)
Expand All @@ -93,9 +93,9 @@ def getFlux(self, evt):

def getEvt(self):
if psanaBaseNum == 2:
return self.getEvtPsana2
return self.getEvtPsana2()
else:
return self.getEvtPsana1
return self.getEvtPsana1()

def getStepGen(self):
if psanaBaseNum == 2:
Expand All @@ -120,6 +120,7 @@ def getScanValue(self, step=-1, useStringInfo=False):
# for psana1, where we don't specify a step arg
if step == -1: #psana1
return self.controlData().pvControls()[0].value()

##print(self.step_value(step),self.step_docstring(step),useStringInfo)
if useStringInfo:
payload = self.step_docstring(step)
Expand Down
3 changes: 2 additions & 1 deletion calibrationSuite/suiteBase.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ def setupValuesFromArgs(self):
self.location = self.args.location
self.maxNevents = self.args.maxNevents
self.skipNevents = self.args.skipNevents
self.path = self.args.path
if self.outputDir == None:
self.outputDir = self.args.path

# if set, output folders will be relative to OUTPUT_ROOT
# if not, they will be relative to the current script file
Expand Down

0 comments on commit 45d0733

Please sign in to comment.