Skip to content

Cleaned notebooks, added instructions for different scattering geomet… - #110

Merged
JGoodrichBNL merged 4 commits into
mainfrom
unify_pipelines
Oct 13, 2026
Merged

JGoodrichBNL merged 4 commits into
mainfrom
unify_pipelines

Conversation

@JGoodrichBNL

Copy link
Copy Markdown
Contributor

…ries, and fixed WAXS isointensity ROI bugs

Copilot AI balanced review requested due to automatic review settings October 13, 2026 19:38

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Surface recipe labels can produce incorrect downstream q-z profile counts, and one documentation link is broken.

1 open finding
What changed in this PR

Adds configurable surface-scattering ROIs, fixes WAXS percentile masking, documents geometry setup, and cleans notebook outputs.

Changes:

  • Added JSON-based GI-SAXS/GI-WAXS ROI editing and reprojection.
  • Restricted WAXS percentiles to valid pixels with regression tests.
  • Added geometry guidance and stripped notebook outputs.
File Description
pyCHX/​_xpcs_pipeline_geometry.py Adds surface ROI recipe loading and WAXS fix.
pyCHX/​tests/​test_xpcs_pipeline_geometry.py Tests WAXS and surface ROI behavior.
pipelines/​XPCS_auto.ipynb Integrates surface ROI recipes.
pipelines/​old_pipelines/​XPCS_SAXS_auto.ipynb Removes notebook metadata noise.
pipelines/​notes/​beam_center_position_issue.md Documents beam-center offsets.
pipelines/​masking_and_rois/​Detector_Masks_Add_Pixels.ipynb Clears outputs and execution state.
pipelines/​masking_and_rois/​Auto_ROI_Mask_Generator.ipynb Clears outputs and execution state.
pipelines/​GEOMETRY_AND_ROI_SETUP.md Adds geometry and ROI setup instructions.

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread pyCHX/_xpcs_pipeline_geometry.py Outdated
Copilot AI balanced review requested due to automatic review settings October 13, 2026 20:18

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Base ROI validation prevents removing labels that overlap newly masked pixels, and one documentation link is broken.

1 open finding
Previously missed (1)

In code that hasn't changed since last review

Medium severity Validate ROI after removing labels

pyCHX/​_xpcs_pipeline_geometry.py:374

The base ROI is validated against the current mask before remove_labels is applied. As a result, a recipe cannot remove a legacy label that now intersects a masked pixel—the loader raises before deleting it—even though the final ROI would be valid. Load the base without mask validation here; the final validate_roi call already checks every retained/new label against mask.

🧠 Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 13, 2026 20:33

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Arbitrary surface boxes are converted into synthetic regular bins for downstream GI-SAXS profiles.

1 open finding
1 resolved since last review

🧠 Review effort: Balanced

Comment thread pipelines/XPCS_auto.ipynb Outdated
Copilot AI balanced review requested due to automatic review settings October 13, 2026 21:20

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Scientific ROI reprojection and profile changes warrant final validation against representative beamline data.

0 open findings

1 resolved since last review

🧠 Review effort: Balanced

@JGoodrichBNL
JGoodrichBNL merged commit f6b2117 into main Oct 13, 2026
26 checks passed
@JGoodrichBNL
JGoodrichBNL deleted the unify_pipelines branch October 13, 2026 21:26
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.

2 participants