Closed bramgibs closed 6 years ago
This problem was on my end. My python was pointing to the previous version of dxchange.
@bramgibs I think your conda environment is still using the earlier dxchange version. Make sure you install the new dxchange. For this you can do a "python set up install" from within the dxchange home directory
@bramgibs great!
@decarlof Not what is going on here. When I merge dxchange master into my fork, read_aps_13bm now returns "ValueError: too many values to unpack (expected 4)". I replicated this issue with the example doc as well.
I decided to debug with the rec_aps_13bm.py example. I took the netcdf4 method from exchange and placed into rec_aps_13bm as a separate method. If I change 'slc = (proj, sino)' to slc = None' in the method, it passes the data just fine. If I change that in dxchange.exchange and pass to dxchange, I receive the same ValueError. Thoughts?
!/usr/bin/env python
-- coding: utf-8 --
""" TomoPy example script to reconstruct the APS 13-BM tomography data as original netcdf files. To use, change fname to just the file name (e.g. 'sample[2].nc' would be 'sample'. Reconstructed dataset will be saved as float32 netcdf3. """ import glob import numpy as np import tomopy as tp import dxchange as dx import dxchange.reader as dxreader
from netCDF4 import Dataset
if name == 'main':
Set path (without file suffix) to the micro-CT data to reconstruct.
proj, flat, dark, theta = dx.exchange.read_aps_13bm(fname, format = 'netcdf4')