Skip to content

rietx 1.7.0

Choose a tag to compare

@yue-here yue-here released this 08 Oct 21:53
· 7483 commits to main since this release
a9eaebb

rietx 1.7.0

This release carries everything that reached main in the five days after 1.6.0, 89 merged pull requests.
It is the first weekly cut.
Four additions are the largest.
rietx figures now show in Jupyter, and five executed tutorial notebooks ship with the repository.
write_topas_inp writes a whole input TOPAS runs, with the fit's free set and its ties, and the TOPAS reader reads them back.
Rigid bodies arrive as a provisional first piece.
And Atom.biso has no default bound, as in FullProf, TOPAS and GSAS-II.

Five changes move numbers an unchanged script prints, each only where it applies.
A displacement parameter is no longer stopped at 0 or 25 Ų.
An ion label without its digit (Na+, Cl-) scatters as the ion, where 1.6.0 computed the neutral atom.
The GSAS and GSAS-II readers and writers convert the Gaussian U, V and W as the variance those programs state.
A phase is judged present only when its scale is 3σ from zero.
And a magnetic phase in a centred parent keeps reflections 1.6.0 dropped.
On the 11-BM NAC example every figure README quotes is unchanged.
About 45 rows of VALIDATION.md moved, and it quotes the figures the 1.7.0 tree gives.
On the IUCr round-robin sample 1, for one, the worst weight-fraction error is 4.97 wt % where 1.6.0 gave 5.13.
Everything that changes what 1.6.0 code gets back is in Upgrading.

Install

pip install --upgrade rietx

Upgrading

Code to check

Code written against 1.6.0 runs unaltered, with the exceptions in this list.

  • schemas.structure.BISO_BOUNDS, biso_bounds and biso_widening_diagnostic are gone.
  • rietx.crystallography.magnetic.irreps and .modes moved to rietx.crystallography.representation.irreps and .modes.
    The old paths raise ModuleNotFoundError.
    Both are internal modules, but 1.6.0 shipped them.
  • print(x) and str(x) on a schema give a new form (below), and so does history.summary().
    Code that parsed either text needs the change.
  • capabilities().schema_version is 0.43.
    0.42 adds RefinementState.free_declared, and 0.43 adds Phase.rigid_bodies.
    A document that carries a rigid body is refused by a build older than 1.7.0.
  • pip install rietx now installs matplotlib (>=3.10.5), so figures work on a base install.
    The install grows by about 58 MB.
    The viz extra is empty and still accepted, so pip install "rietx[viz]" keeps working.
    An environment on a matplotlib older than 3.10.5 is upgraded.
  • A new notebooks extra (ipykernel, nbclient, nbformat) runs notebooks headless.
    Using rietx in a notebook does not need it.
    The docs extra gains myst-nb.
  • examples/fap_lab.py is gone.
    examples/tutorials/02_simple_rietveld.py and its notebook replace it.

A default that changes: Atom.biso has no bound

Atom.biso was bounded at 0–25 Ų by default. It is now unbounded, as in
FullProf, TOPAS and GSAS-II.

  • A stage holds B wherever the fitted range cannot separate it from the phase's scale, and reports SCALE_B_INSEPARABLE.
  • BISO_NEGATIVE warns on a negative B, and BISO_UNUSUALLY_LARGE on one past the phase's melting estimate.
  • A bound you pass on a Parameter still binds.
  • A model saved before this keeps the bounds stored with it.

Measured on the IUCr round-robin mixtures over their full range, the largest
change in a weight fraction is 0.03 wt%. Over 20–40° the bounded fit was closer
to the weighed truth for 34 fractions and the unbounded fit for 10. Every
unbounded B below −1 Ų there fired BISO_NEGATIVE.

What a printed object looks like

print(x) and str(x) on a rietx schema give an indented tree with one line
per parameter. They used to give pydantic's field=value line. A long list or
array prints as a count and a range in repr too, so a pattern's repr fell from
79 607 characters to 171 on the FAP tutorial file. The values are unchanged and
are read from the fields.

rietx index prints the same lines as before. Its text now lives on
IndexingResult, so print(result) gives it in a script.

history.summary() keeps a straight run of stages in one column and indents
only the branches of a fork. It indented every stage before, so a long history
ran off the screen.

Diagnostics to check

Branch on Diagnostic.code, never on its text, and these changes pass you by.

  • Refinement.hold_floating_origin() holds one coordinate along each direction a polar group's origin floats in (P 6₃ m c: z), and floating_origin_basis(group) returns those directions.
    It reports ORIGIN_FIXED_ON_POLAR_AXIS for each phase it held, and ORIGIN_NOT_FIXED where a direction has no free coordinate to hold.
    Opt-in: nothing is held unless it is called, so a fit that frees every coordinate of a polar group still has its flat direction, as in 1.6.0.
  • A phase on rhombohedral axes (R -3 c:R) is written in hexagonal axes by write_fullprof_pcr and write_gsas2_phase_cif, and reported by FULLPROF_RHOMBOHEDRAL_RESTATED and GSAS2_CIF_RHOMBOHEDRAL_RESTATED.
    1.6.0 wrote the rhombohedral cell under R -3 c, which FullProf reads as hexagonal (5.42 5.42 5.42 90 90 120, a different crystal of three times the volume), and GSAS-II's CIF import refused the file.
    The restatement holds every cell edge and coordinate and divides the scale by 9, so predict() on it equals the original's.
  • BISO_BOUND_WIDENED is gone. Readers keep a file's B whatever its value, so there is no bound to widen.
  • SCALE_B_INSEPARABLE fires on a phase with fewer reflections in range than scale and displacement parameters, not only on one d-spacing. It covers anisotropic sites, and a joint fit now runs it.
  • A B that reached the 0 floor reported BOUND_HIT. Below zero it now reports BISO_NEGATIVE.
  • INDEX_PRIOR_USED is a warning where a declared prior lies outside the search's axis box.
    Its suggestion names the SearchSpec(max_d_axis=…) or min_d_axis to pass.
    A prior still never widens the box itself.
  • STAGE_PATH_NOT_FREE is new, a warning. A stage naming a literal phase path that the model locks or ties by symmetry used to free nothing in silence.
    The measured case is an atom coordinate on a special position, phases.0.atoms.2.x. Its suggestion names the path to free, phases.0.atoms.2.dof.* for a coordinate.
  • STAGE_FREES_MAGNETIC_WIDTH_WITH_MOMENT fires only where the magnetic width starts at 0.0.
    1.6.0 also fired on a converged fit refitted in one stage, which is the third step of the order the message itself prescribes.
  • CELL_RUNAWAY can now say a phase's cell was restored.
    Where pulling each escaped cell parameter back to its window would leave a cell with no volume, every free cell parameter of the phase returns to the cell the stage started with.
    1.6.0 pulled three escaped triclinic angles onto a corner, and Refinement.fit raised DegenerateCellError.
  • INDEX_DATA_INSUFFICIENT names an undeclared instrument first when index_pattern is given the instrument a fitted peak list was picked with.
    assess_peak_list(peaks, instrument=…) takes it too, and only an abstention's suggestion changes.
  • INDEX_SUPERCELL_REFUTED says the cell is ranked below its parent, not directly below it.
  • SPECIES_FALLBACK_NEUTRAL no longer fires on Y3+, nor on a digitless one-charge ion the table holds.
    It used to call Na+ and the others absent from the table, and that was wrong.
    It still fires on Fe+ and on the other ions no table carries.
  • The four foreign writers no longer refuse an ion label. 1.6.0 refused Cu+ in all four, GSAS-I's .EXP included.
    Each now writes the atom rietx computed, in its program's spelling: Cu+ is Cu+1 in TOPAS, CU+1 in FullProf and GSAS, Cu1+ in a GSAS-II CIF.
    Where rietx computes an ion as its neutral atom (Fe+), the file states the neutral atom and the writer reports it:
    TOPAS_SPECIES_WRITTEN_NEUTRAL, FULLPROF_SPECIES_WRITTEN_NEUTRAL (X-ray files only), GSAS_EXP_SPECIES_WRITTEN_NEUTRAL and GSAS2_CIF_SPECIES_WRITTEN_NEUTRAL.
    write_topas_inp and write_fullprof_pcr take diagnostics= for it, as the GSAS writers already did.
    An isotope a file has no place for is still refused.
  • write_topas_inp writes origin choice 1 as TOPAS's own S suffix (Fd-3mS), where 1.6.0 wrote F d -3 m:1 and TOPAS stopped with "Space group not found".
    A site within 1e-4 of a special position is written on it (x 0.3333333333333333, not the stored 0.3333), so TOPAS generates the atoms rietx computes with.
    1.6.0's rounded ICSD coordinates made TOPAS read the site as general: 12 positions for ZnO's two.
    The stored coordinate is unchanged.
  • write_topas_inp's str states a phase's size and strain widths and its Stephens anisotropic-strain block as lor_fwhm/gauss_fwhm equations, and names what it still cannot state, TOPAS_FIELD_NOT_WRITTEN: the magnetic-only widths, extinction and preferred orientation.
    1.6.0 wrote the phase without any of them and said nothing; a phase at every identity writes the same file.
  • write_topas_inp writes a moment component the site symmetry forces to zero as held (mlx ! 0.0).
    1.6.0 gave all three components the moment's refine flag, and TOPAS stopped with "Magnetic moment mlx of site Mn cannot be refined as it has no derivative".
    read_topas_inp still gives all three components the flag any one carries.
  • Structure.from_cif reads a site whose own symmetry images sit closer than 0.02 Å on the special position they collapse to (CIF_SITE_TWINS_MERGED).
    A site within 0.02 Å of an image of an earlier site of the same species, whose occupancies sum above 1, is dropped (CIF_SITE_LISTED_TWICE); a file where they disagree otherwise is refused by name.
    1.6.0 read both as extra atoms: a 6h site printed as (0.828, 0.657, ¼) gave 12 atoms, and gives 6 now. Split sites are untouched.
  • structure_from_cif names the fault in a malformed file, with the line and the edit that fixes it: a byte that is not UTF-8, typographic quotes, an unclosed quote, a lost leading _.
    A NaN cell parameter, coordinate or occupancy is refused with its tag, site and value.
    No file that read in 1.6.0 reads differently.
  • A magCIF moment printed short of its site's symmetry relation is put on it where a point of the allowed subspace lies within half a unit in the last printed place of each component (CIF_MAGNETIC_MOMENT_ON_ALLOWED, info).
    1.6.0 refused such a file. Three MAGNDATA files that were refused now read, each moved by at most 4.5e-4 μ_B.

Numbers that move

  • Structure.from_cif reads a displacement parameter or an occupancy the file states as zero as zero.
    1.6.0 read _atom_site_B_iso_or_equiv 0.000 as absent and gave 0.5 Ų, and an occupancy of 0 as 1.
    A CIF whose B sits at the floor, as a refinement against a flat background often leaves it, now keeps it.
  • A site the CIF gives a multiplicity for (_atom_site_symmetry_multiplicity, or the number in _atom_site_Wyckoff_symbol) is moved onto the special position that gives it, where one lies within 1e-3 of the quoted coordinates.
    1.6.0 read an oxygen quoted as 6e with x + y = 1.5002 as a general position, twelve oxygens where the file has six.
    SITE_SNAPPED_TO_SPECIAL_POSITION names each site it moved, and the new CIF_SITE_MULTIPLICITY_DISAGREES one it could not.
  • Every fit that frees biso without a bound of its own can move: B is no longer stopped at 0 or 25 Ų, and the solver's steps change once B has no bound.
  • A phase is held and reported by PHASE_UNCONSTRAINED unless its scale is 3σ from zero against counting noise.
    1.6.0 asked whether one point of the phase's curve rose above 1σ, which a scale fitted to pure noise passes, and the fit then moved that phase's cell to wherever the noise peaked.
    Over 20 fits of a blank frame, 9 read the phase as seen in 1.6.0, with cells off by up to 0.02 Å, and 1 does now.
    A planted scale of 6e-8 is seen in 5 of 8 fits (6 of 8 before), and one of 1.2e-7 or more in 16 of 16, as before.
    Joint fits, Le Bail and Pawley keep the old screen.
  • capabilities().indexing_thresholds_version is 1.7.
    The four changes below it are why: duplicate_line, no_intensity, a supercell ranked above its parent, and INDEX_PRIOR_USED as a warning.
    A stored indexing answer stamped 1.6 was made under the old rules.
  • pick_peaks flags duplicate_line on a component that sits on a line a neighbouring group already fitted better, and takes it out of PeakList.usable().
    On the IUCr round-robin lab patterns, 4–35 components are flagged where any are.
    A usable count, an INDEX_IMPURITY_LINES count and a pair-measured shift can all move.
  • pick_peaks flags no_intensity on a component whose fitted intensity is under 1σ of its own esd, and PeakList.usable() drops it.
    1.6.0 flagged only a component at its zero-intensity bound.
    On a steeply falling background that left false lines at I/σ 0.33–0.38, and index_pattern returned no cubic cell for forward-modelled silicon.
    On the 16 IUCr round-robin lab patterns it drops 6 of 798 usable lines, and 1 of 136 on the fluorapatite pattern.
  • A reported supercell whose extra lines are seen above chance, on lines its parent cannot index, now ranks directly above that parent.
    SupercellCheck gains n_seen_unexplained.
    On the certified corundum pattern this keeps the true cell first, ahead of its c/2 subcell.
    Two pseudo-tetragonal LaB₆ descriptions that read supported over their half-volume rival read undecided, since every extra line they see lies on the rival's. No refuted verdict moved.
  • An X-ray species written as a one-charge ion without its digit now scatters as that ion.
    Na+, K+, Li+, Ag+, Cu+, Cl- and F- read as the table's Na1+, K1+ and so on, the spelling pymatgen writes.
    1.6.0 computed the neutral atom for each, so f₀ at s = 0 moves by one electron per site, and less at higher angle.
    An X-ray fit of a structure labelled this way moves with it: occupancies, displacement parameters and phase fractions.
    Fe+ and any other one-charge ion with no table row still computes as the neutral atom.
  • Y3+ scatters as Y³⁺, from International Tables Vol. C (2004) Table 6.1.1.4.
    1.6.0 computed neutral Y for it, 39 electrons against the ion's 36.
    The fit holds for sinθ/λ ≤ 2 Å⁻¹ (largest error 0.005 e), and past it drifts below the free atom.
    So from 2.149 Å⁻¹, where the fit meets neutral Y, Y3+ computes as neutral Y, as International Tables advises.
    Only a wavelength under 0.5 Å reaches that range.
  • write_gsas2_instprm and read_gsas2_instprm convert the Gaussian terms U, V and W as GSAS-II's variance, not as a FWHM².
    1.6.0 wrote profile.u/v/w × 10⁴, so GSAS-II drew a Gaussian √(8 ln 2) = 2.35 times wider than the one rietx fitted.
    An .instprm from 1.6.0 carries values 8 ln 2 too large; one read from GSAS-II now has profile.u/v/w 8 ln 2 times larger than before.
    read_gsas2_gpx is unchanged: its Gsas2Term.degrees stays the variance GSAS-II states.
  • read_gsas_prm and write_gsas_prm convert GU, GV and GW as GSAS-I's Gaussian variance, not as a FWHM², and rietx compare seeds its GSAS-I protocol the same way.
    1.6.0 read a .prm Gaussian 2.35 times too narrow and wrote one 2.35 times too wide.
    A .prm written by 1.6.0 carries GU GV GW 8 ln 2 too large; one read from GSAS-I now has profile.u/v/w 8 ln 2 times larger than before.
    For a .EXP, rietx.io.projects.gsas.gaussian_fwhm_squared_degrees(term) gives the FWHM² that profile.u/v/w hold, while GsasProfileTerm.degrees still states the variance.
  • A bond or angle restraint with no op_index finds the nearest image whatever cell the stored coordinates sit in.
    1.6.0 searched one cell either side of 0, so coordinates outside [0, 1), or a molecule kept whole across a cell edge, could freeze a distant image and pull to the wrong neighbour.
    In the reported P2₁ case one structure stored three ways gave 2.0, 2.0 and 5.39 Å.
  • magnetic_reflections keeps a magnetic reflection when some member of its parent Laue orbit passes the magnetic group's own pure translations.
    1.6.0 tested only the listed representative against the parent's centrings, which dropped every magnetic reflection of a primitive magnetic lattice inside a centred parent, and whole orbits of the fcc type-I antiferromagnet.
    A fit or predict() of such a phase moves.
    On 20 MAGNDATA entries, 1.6.0 disagreed with each entry's own P1 restatement by 0.5–32 % of the pattern maximum, and now agrees to 8e-13.
  • solve_magnetic names the class (and the propagation vector, off Γ) in each MOMENT_PAIR_DEGENERATE message on the solution.
    1.6.0 collected the pairs of every class tried under the same two parameter paths, so a pair found for a rival read as the winner's.
  • Refinement.fix_special_positions() clears vary on every coordinate of a fully fixed special position and returns their paths.
    Without it the first parameters() or fit() still refuses, as in 1.6.0; the refusal now names the method.
  • Refinement.set_vary(path, False) keeps a path fixed that the model itself declares vary=True, also when it was the last free path.
    1.6.0 read the empty free set as "nothing declared yet" and went back to the model's vary flags.
    So parameters() reported the path free again, the next set_vary, hold or tie folded it back into the free set, and run_stage refined it.
    A checkout of a node whose free set is empty restores it empty when that node declared one; RefinementState.free_declared records which.
  • The FCJ quadrature is sized from parameter values, whether or not the parameter is free.
    A model with a fixed positive S/L and H/L under 0.02, or a fixed magnetic width under 0.1, now gets floored quadrature where it used to get none, or fewer nodes than a free one.
    Its prediction moves, by 2.7e-4 of the range on the LaB6 recipe (S/L = 2.5e-4).
    The cost moves too: that case goes from 0 to 64 nodes per reflection.
    GSAS imports with a small SH/L are the common source.
    A model at an axial ratio of exactly 0 is unchanged: free against fixed still differs there, by 1.7e-4 of the peak (#774).
  • Phase.extinction declares its unit, µm² (the squared mosaic-block size), and its help gives a typical range of 0.1–100.
    1.6.0's help said "up to 1e-4". No fit moves, and a model saved before keeps unit: null.

In a notebook

  • A rietx figure now shows in Jupyter. Before, every figure displayed as <Figure size …> text. The first plot also switched the kernel to Agg, so a later plt.show() drew nothing.
  • A bare result.plot() shows the figure once. A trailing ; or an assignment shows nothing.
  • A figure shown in a notebook is encoded for a screen: twice 100 dpi, drawn at its designed width, with a 256-colour palette. The FAP fit figure fell from 194 kB to 52 kB. Files written with path= or savefig keep their dpi.
  • data.plot(model=ref) draws a Refinement's reflection ticks under the pattern before any fit.
  • A Refinement, a result and an indexing result show their tables as HTML. A StructureFigure shows its picture.
  • A PeakList prints one row per peak, with a table in a notebook. It printed fourteen lines a peak before.
  • Five tutorial notebooks are in the repository under examples/tutorials/: a Le Bail quickstart, a staged Rietveld refinement, peaks and indexing, peak shape and microstructure, and sequential fits. They run after pip install rietx, because their data ships in the package. fluorapatite.cif joins the shipped example files for them.
  • The manual renders the five notebooks with their outputs as its Quickstart, at using/quickstart.html. The 11-BM walkthrough that page held moves to using/first-refinement.html. Building the manual now needs myst-nb, which the docs extra installs.

Rigid bodies

Phase.rigid_bodies places a set of a phase's own atoms as one rigid template.
The body's origin and orientation refine, and its atoms' x, y and z become locked rows that carry esds from the exact Jacobian of the placement.
The body keeps its geometry in Å while the cell refines.

  • rietx.crystallography.bodies.body_from_atoms(phase, labels, name) declares a body over atoms already placed, and moves nothing.
    add_body(phase, name, labels, species, template, origin) places a template as new atoms.
  • Free the origin with phases.*.rigid_bodies.*.origin.dof.* and the rotation with phases.*.rigid_bodies.*.rotation.*, or pass rotation_vary=True.
    A linear template has two rotation parameters.
  • ParameterRow.body names the body that owns a row.
    A body atom's coordinate cannot be held or tied, so hold the body's own parameters instead.
  • A table refuses stored atoms that sit more than 1e-6 Å from their body's placement (RIGID_BODY_TEMPLATE_DRIFT), an atom in two bodies (RIGID_BODY_SHARED_ATOM) and, for now, a body whose origin or any of whose atoms sits on a special position (RIGID_BODY_NOT_INVARIANT, naming the atom).
    RIGID_BODY_UNSUPPORTED names a rotation the pattern cannot see.
  • A joint fit's commit now restores every histogram's table when one of them refuses.

Rigid bodies are provisional.
Torsions inside a body, riding hydrogens and a fragment library are still to come, and each may add fields or change what a body refines.
The manual's compatibility page names the types.

TOPAS, FullProf and GSAS files

Writing TOPAS

  • write_topas_inp(..., free=ref) writes the fit's free set and its ties: each free parameter under a name derived from its path (Ba1_x, p0_scale), a tie_equal group as one shared name, any other affine tie as an equation over its source (#722, #721).
    free= also takes a RefinementResult or a list of paths (no ties then).
    A bounded free parameter is written with min and max.
    scale="topas" writes TOPAS's scale, rietx's × 100 for neutrons and × K for X-rays, and says so in the header; it needs instrument=.
    Both constants are held by a TOPAS output in the tests.
    A signed zero is written 0.
  • write_topas_inp(..., instrument=, pattern=) writes a whole input TOPAS runs as it stands: the data beside it as <stem>.xye, the wavelength, neutron_data, LP_Factor, zero and displacement, the background (a P-spline as fit_obj pieces with its smoothing penalty), rietx's TCHZ width laws as pv_fwhm/pv_lor and FCJ axial as Finger_et_al (#732).
    On a neutron pattern a moment-bearing site's species is written as its ion.
    Sabine extinction is written as a scale_pks equation over TOPAS's own |F|², with a factor 100 on a neutron pattern and 1 on an X-ray one; both were measured against TOPAS 6.
    instrument= alone writes the peak shape and the extinction into the str, and pattern= without instrument= raises.
  • A whole input refuses by name what it has no TOPAS statement for: a profile other than TCHZ, a Stephens block, a magnetic-only width, absorption and capillary offsets, transparency, a λ/n harmonic, an extra component, and a time-of-flight source under scale="topas".
    It reports a preferred orientation with r ≠ 1 as TOPAS_FIELD_NOT_WRITTEN, and a free= file reports the magnetic-only widths, extinction and texture the same way.
  • write_topas_inp(..., p1_expand=True) writes every phase as the explicit list of the atoms of its cell, in P 1, each with its own moment, and a magnetic phase as mag_space_group 1.1.
    A k ≠ 0 supercell, a family group TOPAS has no number for and a non-standard setting, all refused before, are written this way.
    rietx.crystallography.magnetic.p1.restate_phase_in_p1 does the restatement, with the forward model's own operations, time reversal and axial rule; predict() on it equals predict() on the original to about 1e-12.
    Every flag in the file is held, so TOPAS refines nothing until you free what you choose.
    It cannot be combined with free=, scale=, instrument= or pattern=, and the restatement refuses a phase with restraints or a Stephens block by name.
  • Without the new keywords, the file differs from 1.6.0's only by the changes listed under Diagnostics to check.

Reading TOPAS back

  • rietx.io.projects.topas.to_structure(..., constraints=TopasConstraints()) reads a TOPAS file's shared names and affine equations back as ties, and apply_ties declares them on a Refinement (#721). Both are in rietx.io.projects.topas_ties.
    A moment stated as one name times a direction comes back as a tie on the moment's DOFs.
  • to_structure(..., scale="rietx") converts TOPAS's scale, ÷ 100 under neutron_data and ÷ K under LP_Factor, and raises on a file that states neither.
    The default reads the scale as the file states it.
  • A "<name> magnetic part" str of mag_only sites, refused before, is merged back into its phase where its scale, cell, space group and sites equal the nuclear str's (TOPAS_MAGNETIC_PART_MERGED).
    The phase terms p<i>_extinction and p<i>_magnetic_lor_* read from their names are reported (TOPAS_PHASE_TERM_READ).
  • TopasModel gains symbols, neutron and lp_factor.

FullProf

write_fullprof_pcr(..., write_zero_shift=True) writes instrument.zero_shift as FullProf's Zero (degrees 2θ, rietx's sign, measured against FullProf 8.20).
Off by default: a non-zero zero shift is still refused, as in 1.6.0.

Magnetic structures

  • Two candidate magnetic models are now proved powder-inequivalent by a Farkas certificate, where 1.6.0 spent every restart and then called the pair sampled-not (#772).
    When the first fit of one candidate fails to reproduce a draw of the other, a dual problem decides whether it can reproduce it at all.
    The pair is proved-not only where the certificate's lower distance bound clears the caller's rtol.
    PairVerdict gains d, the distance bracket, with witness and dual, and the candidate table prints each proved separation as A ⊄ B d ∈ [lo, hi].
    powder_equivalent, equivalence_classes, powder_relations and analyse take weights=, one positive weight per shell.
    On the cubic known answer (P n -3 m:1, k = (0, 0, ½)), analyse took 133 s in 1.6.0 and takes 53 s.
  • Two candidates whose shell-intensity matrices are related by one orthogonal change of amplitude basis are proved powder-equivalent without a draw (isometry, issue #565 part 3), and every verdict proved for one of them is carried to the other (propagated, with via naming the source). The rank-1 copies of each irrep are the measured case: on the cubic known answer every S1 → S2 direction is now proved, where two were sampled.
    A Farkas certificate (Witness) records kernel_amplitude_ratio, the amplitude bound along the common kernel under which it refutes the draw on the full floating-point stack, and is issued only when that bound is at least one.
  • The candidate table prints domains/arm and domains, from the new CandidateSet.domain_counts().
    1.6.0's column counted conjugate directions, read 1 for every general direction and left out the time-reversed domain. MnO's 15.90 reads 6 per arm and 24 in all, where it read 3.
  • isotropy.candidates(kind="displacive") builds a displacement field's isotropy group with the coset character ε(Δ).
    1.6.0 switched off the magnetic time-reversal rule and stopped there, so it enumerated too few directions and returned parent-lattice groups for some k ≠ 0 sites.
    The perovskite tilt irrep now gives Howard and Stokes's six subgroups.
    Magnetic candidates are unchanged, and analyse still refuses a displacive set.
  • magnetic_supercell on rock salt at k = (½, ½, ½) refuses each of the four MnO candidates with a ValueError naming the cause, on either nuclear_group branch.
    1.6.0 blamed the wrong group for three of them and ended the fourth in a pydantic ValidationError.
    A child cell smaller than the conventional parent cell is refused by name, and the message gives the route by hand: an explicit group= with transform= in a conventional cell.
  • solve_magnetic(tie_to_parent=True) holds a k ≠ 0 trial's child cell at the parent-derived cell and ties the child Biso of each parent atom to one another, for the trial and for its nuclear reference (#724).
    SOLVE_B_TIED_PER_PARENT_SITE (info) on the solution says it was applied.
    Opt-in: the default False leaves the behaviour unchanged.

The isotropy machinery (rietx.crystallography.magnetic.isotropy) and the supercell builder are internal, and may change in any release.

Indexing

determine_extinction_symbol(refine_cell=True)

Frees the cell in the screen's shared profile fit, so a cell off by a few parts in 10⁴ no longer refutes the true class.
Off by default: the cell stays held, as in 1.6.0.

A formula gives a volume window and a check on Z

SearchSpec.from_formula(formula) sets min_volume from Hofmann's (2002) per-element volumes, and with z=… sets max_volume too.
It raises if you also pass min_volume or max_volume, or a z that is not a whole number.
index_pattern(formula=…) reports INDEX_Z_NOT_INTEGER, a warning, on a candidate whose volume implies a number of formula units more than 8 % from a whole one.
It reports and never narrows the search, and temperature= (K, default 298) sets the volumes it reads.

A candidate's cell reads by name

CellCandidate.a … CellCandidate.gamma name the members of cell, and CellCandidate.to_cell() builds a Cell.
Two settings of one lattice, such as a monoclinic prior declared once with an acute and once with an obtuse β, come back as one candidate, and INDEX_PRIOR_USED still names each prior.

Background

auto_background(data, seed=True) starts every P-spline coefficient, or a Chebyshev's constant term, at the 10th percentile of the counts in the fitted range.
Off by default: it starts at zero, as in 1.6.0.
It matters where a pedestal is large against the peaks, because the first Le Bail pass otherwise puts the pedestal into the reflections.
On a synthetic pattern with peaks 22 times the pedestal, a profile_only Le Bail fit gave Rwp 0.0605 from zero and 0.0437 from the seed. At peaks 1000 times the pedestal the two agree.

The agent skill

The skill shipped in the wheel is rewritten, from 29 687 bytes to 16 999.
That fits the 5 000 tokens Claude Code keeps after compaction, which had cut the old body before its abstention rules.
Its worked default now frees the zero alone and converges on FAP.XRA at a = 9.37096(9) Å.
1.6.0's ran lab_bragg_brentano, which frees the zero and the sample displacement together, and on that pattern ended at max_iter with the cell outside GSAS's.
PLAN_INFO's entry for lab_bragg_brentano now says to use it only where something outside the fit pins the zero or the displacement.
A repository's copy is refreshed by running rietx skill --install again.