Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

suitcase.tiff_series and suitcase.tiff_stack do not export tiff images #39

Open
st3107 opened this issue Sep 2, 2020 · 1 comment
Open

Comments

@st3107
Copy link

st3107 commented Sep 2, 2020

I was trying to use suitcase.tiff_series to export the tiff images of diffraction data in the workstation xf28id1-ws6.

from databroker import catalog
import suitcase.tiff_stack
import suitcase.tiff_series
db = catalog['xpd']
run = db['e2b7d9c5-38a9-4787-9cae-4d7e18d02697']
docs = run.canonical(fill="yes")
suitcase.tiff_stack.export(docs, '.')
suitcase.tiff_series.export(docs, '.')

No tiff files were generated. I also tried other run, the result was the same. I could make sure that there is a diffraction image with key "pe1_image" in the "data".

@danielballan
Copy link
Member

These "suitcases" infer whether or not they should export a given column (a.k.a. "field") based on its dimensionality.

for field in doc['data']:
for img in doc['data'][field]:
# Check that the data is 2D or 3D; if not ignore it.
data_key = descriptor['data_keys'][field]
ndim = len(data_key['shape'] or [])
if data_key['dtype'] == 'array' and 1 < ndim < 4:
# there is data to be written so
# create a file for this stream and field
# if one does not exist yet

If you are running this locally, would it be possible to add some prints to investigate what dimensionality it is seeing here? We should add some logging to make it convenient to investigate in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants