Skip to content

XFEL small molecule improvements#1143

Open
dwpaley wants to merge 19 commits intocctbx:masterfrom
dwpaley:smx_small_cell_processing
Open

XFEL small molecule improvements#1143
dwpaley wants to merge 19 commits intocctbx:masterfrom
dwpaley:smx_small_cell_processing

Conversation

@dwpaley
Copy link
Copy Markdown
Contributor

@dwpaley dwpaley commented Apr 6, 2026

New development work from January 2026 mail-in beamtime.

  • Enable reflection subsampling for small_cell indexing
  • Add two methods for distance refinement from spotfinder powder data. This is to enable automatic (and more accurate) calibration from a LaB6 standard. The simple (and effective) way is to add a d_target setting to cctbx.xfel.powder_from_spots, triggering a 1d grid search for detector distance corrections. A second experimental way is cctbx.xfel.powder_refine_geometry, which performs a least-squares refinement of detector displacements and tilts.

dwpaley and others added 17 commits March 20, 2026 20:24
Brings in the following enhancements from smx_beamtime:
- New clustering tools (cluster2, index2)
- Geometry refinement capabilities
- Cake plot preparation utilities
- Reflection subsampling and clustering in small_cell indexing
- Various powder plotting enhancements

These changes enable advanced small-cell crystallography workflows
including geometry refinement and multi-stage clustering.
This script is no longer needed and has been superseded by other tools.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
These experimental indexing and clustering algorithms are specific to the
smx_findexer workflow and have been moved to that dedicated branch.

The smx_small_cell_processing branch now contains only general small-cell
features:
- geometry_refiner.py: Geometry refinement functionality
- powder_refine_geometry.py: Powder-based geometry refinement tool
- powder_util.py: General powder pattern utilities
- small_cell.py: Core small-cell processing with reflection subsampling

The experimental clustering/indexing algorithms (cluster2.py, index2.py)
are now on the smx_findexer branch along with the smx_statistics worker
that supports them.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…ents

This allows users to stop plotting after a specified number of experiments,
useful when working with large datasets.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Remove the superseded angle_histogram feature entirely: the angle() and
create_pairwise_plots() top-level functions, the per-experiment and
per-reflection angle accumulation code, and the post-loop histogram plot.
Also remove import itertools (only used by that code) and the duplicate
import numpy as np.

Fix n_max off-by-one: change i>n_max to i>=n_max so that n_max=10
processes exactly 10 experiments (indices 0-9).
@dwpaley dwpaley requested review from dwmoreau and phyy-nx April 6, 2026 17:14
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 this pull request may close these issues.

1 participant