Closed bramgibs closed 5 years ago
what about moving:
## Import data.
proj = dx.exchange.read_aps_13bm(files[1], format = 'netcdf4')
## Import flat field files.
flat1 = dx.exchange.read_aps_13bm(files[0], format = 'netcdf4')
flat2 = dx.exchange.read_aps_13bm(files[2], format = 'netcdf4')
flat = np.concatenate((flat1, flat2), axis = 0)
## Import setup file that has dark.
setup = glob.glob('*.setup')
setup = open(setup[0], 'r')
setup_data = setup.readlines()
result = {}
for line in setup_data:
words = line[:-1].split(':',1)
result[words[0].lower()] = words[1]
## Create array for dark.
dark = float(result['dark_current'])
dark = flat*0+dark
## Set data collection angles from proj.
theta = tp.angles(proj.shape[0])
in the read_aps_13bm and have read_aps_13bm return tomo, flat, dark, theta?
this way read_aps_13bm will work as read_aps_32id and its use will be the same for users running at both beamline
Great idea. I have updated my code accordingly.
great! Thanks
Created example for APS 13-BM reconstruction that saves exported data as float32 .volume file.