Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
7bcff46
Add calculation-without-measured-data implementation plan
AndrewSazonov Jun 9, 2026
421a9f2
Promote calculation-without-measured-data ADR to accepted
AndrewSazonov Jun 9, 2026
1af7796
Add data_range category package
AndrewSazonov Jun 9, 2026
afc0b9d
Expose data_range on experiment items
AndrewSazonov Jun 9, 2026
0c0f88e
Add derived sinθ/λ and d-spacing views to data_range
AndrewSazonov Jun 9, 2026
b0cd2c9
Guard data_range and subsume measured_range
AndrewSazonov Jun 9, 2026
4a9f265
Generate powder calculation grid from data_range
AndrewSazonov Jun 9, 2026
8eeab50
Add calc-without-data guards for single crystal and total
AndrewSazonov Jun 9, 2026
314cac3
Show background and bragg for calculated-only patterns
AndrewSazonov Jun 9, 2026
1a667b2
Document data_range and calculated-only workflow
AndrewSazonov Jun 9, 2026
5065d38
Reach Phase 1 review gate
AndrewSazonov Jun 9, 2026
a0a055f
Return live descriptors from data_range axis getters
AndrewSazonov Jun 9, 2026
dbf89dc
Omit data_range from CIF when measured data is present
AndrewSazonov Jun 9, 2026
8ff449f
Rebuild generated grid when data_range changes
AndrewSazonov Jun 9, 2026
960c551
Raise a clear error for an inverted data_range grid
AndrewSazonov Jun 9, 2026
a01b0b3
Use floor semantics so the grid stays within x_max
AndrewSazonov Jun 9, 2026
2b02dc1
Cap default CWL 2theta range below the backscattering limit
AndrewSazonov Jun 9, 2026
8120626
Reject fitting an experiment without measured data
AndrewSazonov Jun 9, 2026
06a9a78
Write finite placeholders for cryspy calc-only measured loop
AndrewSazonov Jun 9, 2026
ac44af5
Render background on calculated-only patterns
AndrewSazonov Jun 9, 2026
15738fb
Skip CIF data loop for a generated calc-only grid
AndrewSazonov Jun 9, 2026
933fb95
Align ADR decision 8 with the deferred Bragg row
AndrewSazonov Jun 9, 2026
3f7b43d
Update suggested PR text to shipped calc-only behaviour
AndrewSazonov Jun 9, 2026
6b6e3d8
Consolidate the has-measured-data predicate on the experiment
AndrewSazonov Jun 9, 2026
189d238
Judge measured-data existence on unfiltered points
AndrewSazonov Jun 9, 2026
80fda8d
Judge total-scattering measured data on unfiltered points
AndrewSazonov Jun 9, 2026
90744e1
Add bkg legend color to the ASCII plotter
AndrewSazonov Jun 9, 2026
3f1f05b
Add calculate-without-measured-data tutorials and docs
AndrewSazonov Jun 9, 2026
1df50ed
Set d-to-TOF Zero offset in NCAF verification page
AndrewSazonov Jun 10, 2026
674c137
Render the Bragg-peaks panel for calculated-only patterns
AndrewSazonov Jun 10, 2026
bbd900a
Use consistent FullProf Zero for TOF verification, drop .sub
AndrewSazonov Jun 10, 2026
767e427
Remove orphaned FullProf .sub files from verification suite
AndrewSazonov Jun 10, 2026
a598e8b
Add fullprof_version helper and v8.40 .sum version sources
AndrewSazonov Jun 10, 2026
307db57
Restrict pattern comparison to non-excluded regions
AndrewSazonov Jun 10, 2026
04c5045
Add fullprof_label helper for one-line legend labels
AndrewSazonov Jun 10, 2026
c664cfb
Show FullProf version and excluded regions in TOF pages
AndrewSazonov Jun 10, 2026
29bb22b
Refine ed-28 TOF calculation-without-data tutorial
AndrewSazonov Jun 10, 2026
acc153a
Update notebooks
AndrewSazonov Jun 10, 2026
4e50446
Prune FullProf verification projects to needed files
AndrewSazonov Jun 10, 2026
94695df
Set calculator type first in verification comparisons
AndrewSazonov Jun 10, 2026
d0966a7
Stop emitting blank JS theme probe during report save
AndrewSazonov Jun 10, 2026
36d49d3
Force recompute so structure edits reflect on calculate
AndrewSazonov Jun 10, 2026
ed2fe97
Update tutorials
AndrewSazonov Jun 10, 2026
d3c4994
Remove outdated section on calculating patterns without measured data
AndrewSazonov Jun 10, 2026
89cb3a6
Update agreement tolerances and test cases for improved accuracy
AndrewSazonov Jun 10, 2026
2b67449
Apply sentinel default on CIF load without re-validating
AndrewSazonov Jun 10, 2026
678bd3c
Add support for β-tensor anisotropic displacement parameters
AndrewSazonov Jun 10, 2026
c156515
Refresh Without Measured Data tutorials section
AndrewSazonov Jun 10, 2026
e607891
Apply pixi run fix auto-fixes
AndrewSazonov Jun 10, 2026
0ed8cc3
Wrap long doc comments to satisfy lint
AndrewSazonov Jun 10, 2026
8558823
Document _require_measured_data argument
AndrewSazonov Jun 10, 2026
91833a4
Format docs with prettier and regenerate package diagrams
AndrewSazonov Jun 10, 2026
1f3201e
Add unit tests for the data_range category
AndrewSazonov Jun 10, 2026
2e086c9
Serialize NaN numeric values as the CIF unknown marker
AndrewSazonov Jun 10, 2026
0695296
Update experiment-base tests for data_range-backed range
AndrewSazonov Jun 10, 2026
e0d6cff
Update display tests for calc-only pattern API
AndrewSazonov Jun 10, 2026
f62e796
Combine None/NaN CIF unknown-marker branches
AndrewSazonov Jun 10, 2026
12780a4
Add calc-only matrix integration tests for both engines
AndrewSazonov Jun 10, 2026
22a2a02
Mark Phase 2 verification complete in plan
AndrewSazonov Jun 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Status

Proposed.
Accepted.

## Date

Expand Down Expand Up @@ -40,11 +40,11 @@ how a saved project with no measured block should restore from the CLI.

Two existing decisions frame the solution:

- [Unified Pattern View](../accepted/pattern-display-unification.md)
already establishes that `pattern()` renders whatever the project
state supports. "Only calculated data is available" should simply be
one more supported state; today the display gates instead require
measured data before background or Bragg can appear.
- [Unified Pattern View](pattern-display-unification.md) already
establishes that `pattern()` renders whatever the project state
supports. "Only calculated data is available" should simply be one
more supported state; today the display gates instead require measured
data before background or Bragg can appear.
- The IUCr powder and core dictionaries already model an evenly-spaced
scan **by range**: `_pd_meas.2theta_range_{min,max,inc}` and
`_pd_proc.2theta_range_{min,max,inc}` are defined to be used "in place
Expand All @@ -65,10 +65,10 @@ scan exists.
(`CwlDataRange`, `TofDataRange`, `ScDataRange`) and exposed uniformly
as `experiment.data_range`. It is fixed by the experiment type, so it
has **no** `type` selector — the same treatment
[Switchable Category API](../accepted/switchable-category-api.md)
prescribes for fixed, single-type categories, and the same pattern
`instrument` already uses for its per-beam-mode classes
([Immutable Experiment Type](../accepted/immutable-experiment-type.md)).
[Switchable Category API](switchable-category-api.md) prescribes for
fixed, single-type categories, and the same pattern `instrument`
already uses for its per-beam-mode classes
([Immutable Experiment Type](immutable-experiment-type.md)).

2. **Stored truth is the natural input axis (writable).** The values a
user sets and that serialise to CIF are the experiment's own axis:
Expand Down Expand Up @@ -96,8 +96,8 @@ scan exists.
crystal has bounds but no step.

5. **Writable, guarded by measurement.** Following
[Guarded Public Properties](../accepted/guarded-public-properties.md),
the `data_range` axis attributes are writable public properties. The
[Guarded Public Properties](guarded-public-properties.md), the
`data_range` axis attributes are writable public properties. The
setter raises when a measured scan is present, because then the range
is an _observed_ property of the data rather than an input; the
getter returns the measured-derived range in that case (subsuming
Expand All @@ -118,21 +118,24 @@ scan exists.
serialisable category rather than a method call.

8. **Display extends the unified view.** Building on
[Unified Pattern View](../accepted/pattern-display-unification.md),
`background` and `bragg` become available with calculated-only data —
the measured-data requirement in their availability gates is dropped.
"No measurement" is represented as _absent_ intensities (not a
[Unified Pattern View](pattern-display-unification.md), `background`
and `bragg` become available with calculated-only data — the
measured-data requirement in their availability gates is dropped. "No
measurement" is represented as _absent_ intensities (not a
zero-filled array), so no phantom measured curve or residual is
drawn. A calc-only powder view is the calculated curve plus
background on the main panel and a Bragg row; a calc-only
single-crystal view shows per-reflection calculated intensities.
drawn. A calc-only powder view is a two-panel plot: the calculated
curve plus background on the main panel and a Bragg-peaks row. The
composite renderer treats the measured series as optional, so the
same figure machinery serves both the measured and calculated-only
cases (the residual row, which needs a measured scan, is simply
absent). A calc-only single-crystal view shows per-reflection
calculated intensities.

9. **CIF mapping.** CWL bounds reuse the standard
`_pd_meas.2theta_range_{min,max,inc}`. TOF, single-crystal, and the
sinθ/λ–d bounds have no standard range tag, so custom tags are chosen
in line with
[IUCr CIF Tag Alignment](../accepted/iucr-cif-tag-alignment.md) and
[Python and CIF Category Correspondence](../accepted/python-cif-category-correspondence.md).
in line with [IUCr CIF Tag Alignment](iucr-cif-tag-alignment.md) and
[Python and CIF Category Correspondence](python-cif-category-correspondence.md).

## Consequences

Expand Down Expand Up @@ -164,7 +167,7 @@ scan exists.
`refln` reciprocal coordinates.
- **An input/output split** — a writable "requested range" input plus a
read-only derived output — mirroring
[Minimizer Input/Output Split](../accepted/minimizer-input-output-split.md).
[Minimizer Input/Output Split](minimizer-input-output-split.md).
Rejected as heavier than needed here; a single guarded writable
property covers both roles.
- **A `simulate(x_min, x_max, x_step)` method.** Rejected: the range is
Expand Down
29 changes: 29 additions & 0 deletions docs/dev/adrs/accepted/type-neutral-adp-parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,32 @@ sibling collection and synchronize it from `atom_sites`.
Parameter object identity remains stable across ADP type switches.
Serialization and calculator code can branch on `adp_type` without
replacing public parameter objects.

## Extension (2026-06-10): β-tensor support

The dimensionless **β tensor** — the third standard anisotropic ADP
convention (FullProf, SHELX-era data, cryspy's internal representation)
— is added as a first-class `adp_type` value, `beta`, reusing the same
type-neutral `adp_11`…`adp_23` objects. This keeps the core decision
intact: parameter object identity is still stable across a switch to or
from `beta`. Implications specific to β:

- **No isotropic form.** `beta` always implies anisotropic; there is no
`adp_iso` β counterpart.
- **Cell-dependent conversion.** Unlike the scalar `B = 8π²U`, the β↔U
transform depends on the reciprocal cell: `β_ij = 2π²·U_ij·a*_i·a*_j`.
Type switches to/from `beta` therefore require the parent structure's
`cell`; with no reachable cell the switch raises rather than producing
wrong values.
- **Dimensionless units.** β components carry no `Ų` unit. The stored
Parameter keeps a single declared unit; the display layer suppresses
the unit when `adp_type == 'beta'` rather than mutating parameter
metadata.
- **Negative off-diagonals.** Off-diagonal components (any convention, β
included) may be negative; the aniso off-diagonal validator allows
negatives.
- **CIF.** `_atom_site_aniso.beta_11`…`beta_23` join the existing
`B_ij`/`U_ij` tag lists; the writer's ADP-family grouping gains a
`beta` family.

Plan: [`adp-beta-tensor.md`](../../plans/adp-beta-tensor.md).
2 changes: 1 addition & 1 deletion docs/dev/adrs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ folders.
| Documentation | Suggestion | Documentation CI and Build Verification | Proposes strict MkDocs builds, API-derived docs, snippet smoke tests, link checks, and prose/spelling checks. | [`documentation-ci-build.md`](suggestions/documentation-ci-build.md) |
| Experiment model | Accepted | Immutable Experiment Type | Makes experiment type axes creation-time state rather than mutable runtime state. | [`immutable-experiment-type.md`](accepted/immutable-experiment-type.md) |
| Experiment model | Accepted | Automatic Line-Segment Background Estimation | Detects line-segment background control points from the measured pattern, peak-insensitive and editable. | [`background-auto-estimate.md`](accepted/background-auto-estimate.md) |
| Experiment model | Suggestion | Calculation Without Measured Data | Adds a writable `data_range` category so a structure-only experiment is calculable and plottable without loaded data. | [`calculation-without-measured-data.md`](suggestions/calculation-without-measured-data.md) |
| Experiment model | Accepted | Calculation Without Measured Data | Adds a writable `data_range` category so a structure-only experiment is calculable and plottable without loaded data. | [`calculation-without-measured-data.md`](accepted/calculation-without-measured-data.md) |
| Factories | Accepted | Factory Contracts and Metadata | Standardizes factory construction, metadata, compatibility, and registration behavior. | [`factory-contracts.md`](accepted/factory-contracts.md) |
| Naming | Accepted | Factory Tag Naming | Defines canonical factory tag style and standard abbreviations. | [`factory-tag-naming.md`](accepted/factory-tag-naming.md) |
| Persistence | Accepted | Free-Flag CIF Encoding | Encodes fit free/fixed state through CIF uncertainty syntax instead of a separate free list. | [`free-flag-cif-encoding.md`](accepted/free-flag-cif-encoding.md) |
Expand Down
12 changes: 12 additions & 0 deletions docs/dev/package-structure/full.md
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,18 @@
│ │ │ │ ├── 🏷️ class TotalDataPoint
│ │ │ │ ├── 🏷️ class TotalDataBase
│ │ │ │ └── 🏷️ class TotalData
│ │ │ ├── 📁 data_range
│ │ │ │ ├── 📄 __init__.py
│ │ │ │ ├── 📄 base.py
│ │ │ │ │ └── 🏷️ class DataRangeBase
│ │ │ │ ├── 📄 cwl.py
│ │ │ │ │ └── 🏷️ class CwlPdDataRange
│ │ │ │ ├── 📄 factory.py
│ │ │ │ │ └── 🏷️ class DataRangeFactory
│ │ │ │ ├── 📄 sc.py
│ │ │ │ │ └── 🏷️ class ScDataRange
│ │ │ │ └── 📄 tof.py
│ │ │ │ └── 🏷️ class TofPdDataRange
│ │ │ ├── 📁 diffrn
│ │ │ │ ├── 📄 __init__.py
│ │ │ │ ├── 📄 default.py
Expand Down
7 changes: 7 additions & 0 deletions docs/dev/package-structure/short.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,13 @@
│ │ │ │ ├── 📄 bragg_pd.py
│ │ │ │ ├── 📄 factory.py
│ │ │ │ └── 📄 total_pd.py
│ │ │ ├── 📁 data_range
│ │ │ │ ├── 📄 __init__.py
│ │ │ │ ├── 📄 base.py
│ │ │ │ ├── 📄 cwl.py
│ │ │ │ ├── 📄 factory.py
│ │ │ │ ├── 📄 sc.py
│ │ │ │ └── 📄 tof.py
│ │ │ ├── 📁 diffrn
│ │ │ │ ├── 📄 __init__.py
│ │ │ │ ├── 📄 default.py
Expand Down
Loading
Loading