7 from __future__
import print_function
10 from opals
import pyDM
13 def DM_histogram(filename):
15 dm = pyDM.Datamanager.load(filename,
True,
False)
19 print(
"Unable to open ODM '" + filename +
"'")
22 f = pyDM.AddInfoLayoutFactory()
23 f.addColumn(pyDM.ColumnSemantic.EchoNumber)
24 layout = f.getLayout()
26 print(
"Compute histogram of attribute 'EchoNumber'")
27 histoSet = dm.getHistogramSet(layout)
29 for histo
in histoSet.histograms():
30 for value, count
in histo.values():
31 print(value,
"=", count)
36 if len(sys.argv) == 1:
37 print(
"ODM parameter missing")
40 DM_histogram(sys.argv[1])