Skip to content

XinRefinement v1.6.1 — Pattern interaction toolbar and license information

Choose a tag to compare

@PolyXRD PolyXRD released this 09 Nov 02:34
· 47 commits to master since this release

XinRefinement v1.6.1 — Pattern interaction toolbar and license information

Baseline v1.6.0 | Theme: give the pattern an operating console. v1.6.0 solved "how to present results", but the pattern itself was still read-only—only matplotlib's built-in row of English icons, squeezed below the canvas; zooming into an angle range meant scroll-wheel trial and error, measuring a peak position meant screenshot comparison. This release has six minor UI tweaks and adds full copyright and license information to the help page.

Numerics unchanged: golden 50/50 still 3.4074156640940005, CLI/API behavior bit-identical.

Download

File Size SHA256
XinRefinement-1.6.1-setup.exe 75.8 MB 34cb1288a16d282e1aa87d8a9446e40996225c92a5dcffd9a5cfa92dcef49b9d

Release installer (includes registration mechanism, zh/en/ja trilingual install UI). The internal evaluation portable package (XinRefinement-internal-1.6.1-portable.zip, 114.2 MB, sha256 64afe606ebc5f6bd11811a243dad16dec54f76bace9c607dbbe04324f29658de) is for internal acceptance only and is not published with this Release.

The change at a glance

v1.6.0 v1.6.1
Quick-icon position Squeezed below the pattern, chip 36 Moved above the pattern, chip 30 (one size smaller)
Pattern operations Only matplotlib's built-in pan/zoom Added a 9-key dedicated toolbar: reset / horizontal box / vertical box / rectangle box / pan left / pan right / zoom in / zoom out / crosshair
Measure peak position Compare with a ruler after screenshot Crosshair red vertical line follows the cursor reading (angle + intensity), right-click to drop a manual peak position, right-click again to delete
Status bar "internal evaluation build" Right-aligned, small, grey Centered, one size larger, red bold
Bottom-left title "Refinement Log (run-code)" "Refinement Log"
Help menu Only "About…" (one-line summary) Added "Copyright & License…", opening a full license text dialog
Step gears All same color Eight colors to distinguish (one color per step + tooltip)

Main Changes

1. Pattern toolbar (9 keys)

Layout: middle column top-to-bottom = matplotlib navigation bar → pattern toolbar → pattern canvas.

# Button Behavior
① Original pattern Restore initial viewport (including d-mode reversed axis direction)
② Horizontal box Drag an angle interval, changes horizontal axis only
③ Vertical box Drag an intensity interval, changes vertical axis only
④ Rectangle box Drag a rectangle, changes both axes
⑤ Pan left Viewport moves left by 1/4 width
⑥ Pan right Viewport moves right by 1/4 width
⑦ Zoom in Anchored at viewport center, zoom in stepwise
⑧ Zoom out Same as above reversed
⑨ Crosshair Red vertical line follows mouse, top-right shows 2θ = …° · I = …; right-click drops a manual peak position

Key points:

  • ②③④ are three clearly-divided tools, not "box-select presses both axes": when only pressing the horizontal axis, the vertical axis auto-fits the current viewport, otherwise zooming a weak peak still gets flattened by the whole-pattern's highest peak, looking like the button did nothing.
  • ⑤⑥⑦⑧ are discrete operations: pan by a fixed fraction of viewport width, zoom anchored at viewport center, not taking mouse position (clicking the button, where the mouse is has no semantics).
  • ⑨ manual peak positions shown as red dashed line + vertical angle label; right-click again within 0.25° of a drop point deletes it. The vertical line disappears after exiting the crosshair tool, manual peak positions are kept. When switching patterns (loading new data), both are cleared together—keeping the previous sample's annotations is more misleading than none.
  • Pattern operations and matplotlib's built-in pan/zoom are mutually exclusive (two drag systems fight for the same mouse event); click the same button again to exit, returning the original axis-click semantics.

2. Navigation bar shrunk one size and moved above the pattern

NavigationToolbar2QT moved from below the canvas to above, chip 36 → 30, iconSize 24 → 20, color scheme unchanged. So the two rows of "pattern operations" sit together, no need to search across the canvas.

3. Status bar "internal evaluation build" centered, larger, red bold

  • AlignRight → AlignCenter, font size +1 and bold, color #d32f2f.
  • Still on the status bar's permanent section: crosshair reading and axis hints both output via statusBar().showMessage(); ordinary widgets get temporarily pushed out, only the permanent section survives.

4. Bottom-left only writes "Refinement Log"

Title drops "(run-code)", synced across zh/en/ja. Window behavior unchanged.

5. Copyright & license in the help page

  • Help menu adds "Copyright & License…" (above "About…", with a separator), opening LicenseDialog: license summary + read-only full text (monospace, scrollable).
  • The "About" dialog also gets the same button entry.
  • Full text is read from disk at runtime (licenses/LICENSE / licenses/LICENSE-CN), not duplicated in code—the two texts would inevitably drift. The source tree points to the two repository-root files; the installer bundles them via the packaging script; when not found, it prompts "license file missing" rather than failing to open the dialog.

6. Step gears in eight colors

Zero / background / scale / unit cell / peak shape / coordinates / microstructure / temperature factor each a color, font size 16 bold, tooltip gives the step name. Color is only recognition aid, not encoding state (whether run, whether converged still read elsewhere), avoiding the misreading "red means failed".

Validation

  • Full regression 527 cases: 527 passed / 0 failed / 0 skipped, EXIT=0 (v1.6.0 was 512, added tests/test_v161_gui.py 15 cases).
  • golden CLI Rwp 50/50 3.4074156640940005 unchanged, confirming this release did not touch the engine.
  • Canvas behavior measured offscreen: xlim (5.0, 89.98) → zoom out to (26.245, 68.735) → pan right 1/4 → (36.8675, 79.3575) → reset back to (5.0, 89.98); horizontal box-select drag 20→40 gives (20.0, 40.0) and the rubber band disappears on release; crosshair at 25.3° reads 2θ = 25.300° · I = 39728, right-click produces [25.3], right-click again returns [].
  • Built-artifact check: XinRefinementCLI.exe --version = XinRefinement 1.6.1; frozen package's _internal/licenses/ confirmed to contain LICENSE (2411 B) and LICENSE-CN (1887 B), so the license dialog in the installed build reads the full text, not just the summary.

Known Limitations

  • Sample 7 still not meeting the bar (+3.39 pt, cristobalite near-amorphous broad-packet starting-point problem), this release did not touch the engine.
  • Pattern operations are a view-layer feature: zoom/pan/crosshair/manual peak positions do not enter the results table, do not enter the report, do not participate in fitting, and are not saved to the project file.
  • Unit-cell component checkboxes only affect the cell step; the profile step's joint refinement still releases fully by crystal system (same as v1.6.0).

Installation and Registration

Same as v1.6.0: installer embeds zh/en/ja trilingual UI, registration code interoperable with the XinMatch family (%APPDATA%\PolyXRD\Registration\XinRefinement.json). Internal evaluation build needs no registration or install, marked in red in the status bar.

License

This software uses the MIT license (LICENSE / LICENSE-CN, viewable in full from the help menu). Built-in crystal structure data comes from COD (CC0) and ICSD-derived public literature, containing no PDF cards or ICDD data.