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

DataBlockFactory broken for single images #336

Closed
phyy-nx opened this issue Mar 16, 2021 · 2 comments · Fixed by #570
Closed

DataBlockFactory broken for single images #336

phyy-nx opened this issue Mar 16, 2021 · 2 comments · Fixed by #570

Comments

@phyy-nx
Copy link
Contributor

phyy-nx commented Mar 16, 2021

Regression from 1049af2 and found by an xfel regression test.

This code snippet reproduces the error:

import libtbx.load_env
import os
from dxtbx.datablock import DataBlockFactory

dials_regression = libtbx.env.find_in_repositories(relative_path="dials_regression",
                      test=os.path.isdir)

path = os.path.join(dials_regression, 'image_examples', 'LCLS_cspad_nexus', 'idx-20130301060858401.cbf')
datablocks_cbf = DataBlockFactory.from_filenames([path])
datablock_cbf = datablocks_cbf[0]
imageset_cbf = datablock_cbf.extract_imagesets()[0]
assert imageset_cbf.get_detector(0) is not None

Note I'm about to check in a re-write of the xfel_regression test that found the issue to use ExperimentListFactory instead of DataBlockFactory. That will fix the current cctbx_project test failures.

Possible routes forward:

  • Put above test into an xfailing test, fix the underlying problem, remove the xfailing flag
  • Fully deprecate DataBlocks, obviating this issue.
@phyy-nx
Copy link
Contributor Author

phyy-nx commented Mar 16, 2021

Re-write checked into xfel_regression to use ExperimentListFactory instead of DataBlockFactory (link)

@graeme-winter
Copy link
Collaborator

graeme-winter commented Mar 16, 2021

+1 for retire datablocks properly

but should probably add an xfailing tests and assess how hard to fix meantimes

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

Successfully merging a pull request may close this issue.

2 participants