Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagepy
themeRDark
run = 21
exp = 'xppx47019'
ffb = True

# if 'drp' in socket.gethostname():
#     p = Path('/cds/data/drpsrcf/{}/{}/scratch/hdf5/smalldata'.format(exp[:3], exp))
# else:
#     p = Path('/cds/data/psdm/{}/{}/hdf5/smalldata/'.format(exp[:3], exp))
# #     p = Path('/cds/data/psdm/{}/{}/scratch/ffb/hdf5/smalldata/'.format(exp[:3], exp))
# print(p.exists())

# it = p.glob('{}_Run{:04d}*'.format(exp,run))
# try: f = next(it)
# except: print('No files found at this path.')

# print(f)
# print('\n')

f = Path('./example_ccm_2d_scan.h5') # only for example. Comment or delete later

rr = tables.File(f).root
h5 = h5py.File(f)
print('\n'.join(h5.keys()))

The commented block should be uncommented whenever actual data are being analyzed.