Skip to content

Commit

Permalink
fixed merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
philiph-slac committed Aug 23, 2024
2 parents d82f566 + 99b07b9 commit dbbf6dd
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
5 changes: 5 additions & 0 deletions suite_scripts/AnalyzeH5.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def __init__(self):
self.label = args.label
self.camera = 0
self.seedCut = args.seedCut
self.isTestRun = 'testRun' in args.special

def getFiles(self):
fileNames = self.files.split(",")
Expand Down Expand Up @@ -192,6 +193,10 @@ def analyzeSimpleClusters(self, clusters):
for m in analyzedModules:
modClusters = ancillaryMethods.getMatchedClusters(smallSquareClusters, "module", m)
for i in range(self.rowStart, self.rowStop):
# just do a single row when testing
if self.isTestRun and i > 0:
break

rowModClusters = ancillaryMethods.getMatchedClusters(modClusters, "row", i)

for j in range(self.colStart, self.colStop):
Expand Down
26 changes: 24 additions & 2 deletions tests/test_SuiteScripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ def __init__(self):
"test_histogram_flux_etc",
"test_roi",
"test_search_for_non_switching",
"test_analyze_h5",
]

# lets have the 'real output' folders just be in /suite_scripts
Expand Down Expand Up @@ -458,8 +459,29 @@ def test_HistogramFlux(suite_tester, command, output_dir_name):
suite_tester.test_command(command, output_dir_name)


# this test uses input data from sdf filepath (available on s3df),
# and we remove r102_custers.npy from the correctness comparison b/c this file is around 10gb!
@pytest.mark.parametrize(
"command, output_dir_name",
[
(
[
"bash",
"-c",
"time python AnalyzeH5.py -r 102 -f /sdf/data/lcls/ds/rix/rixx1005922/results/lowFlux/SimpleClusters__c0_r102_n100.h5 -p ./test_analyze_h5 --special testRun && rm ./test_analyze_h5/r102_clusters.npy",
],
"test_analyze_h5",
),
],
)
def test_Analyze_h5(suite_tester, command, output_dir_name):
if not suite_tester.canTestsRun:
pytest.skip("Can only test with psana library on S3DF!")
suite_tester.test_command(command, output_dir_name)


# non-working commands...
"""
'''
@pytest.mark.parametrize("command, output_dir_name", [
(['bash', '-c', 'python persistenceCheck.py -r 102 -d Epix10ka2M --maxNevents 250 -p /test_persistence_check'],
'test_persistence_check'),
Expand All @@ -470,4 +492,4 @@ def test_PersistenceCheck(suite_tester, command, output_dir_name):
if not suite_tester.canTestsRun:
pytest.skip("Can only test with psana library on S3DF!")
suite_tester.test_command(command, output_dir_name)
"""
'''

0 comments on commit dbbf6dd

Please sign in to comment.