experiment
Experiment datablock items and their collection.
Modules:
| Name | Description |
|---|---|
categories |
CIF categories composing an experiment datablock. |
collection |
Collection of experiment data blocks. |
item |
Experiment datablock items for Bragg and total scattering. |
Modules
categories
CIF categories composing an experiment datablock.
Modules:
| Name | Description |
|---|---|
absorption |
Sample-absorption correction category (cylindrical Debye-Scherrer). |
background |
Chebyshev and line-segment background categories. |
calculator |
Experiment calculator category exports. |
data |
Measured pattern data categories for powder experiments. |
data_range |
Data-range categories for CWL/TOF powder and single crystal. |
diffrn |
Ambient diffraction conditions category for experiments. |
excluded_regions |
Excluded data regions to omit from pattern fitting. |
experiment_type |
Experiment type category defining the diffraction axes. |
extinction |
Becker-Coppens extinction correction category. |
instrument |
Instrument categories for CWL and TOF powder and single crystal. |
linked_structure |
Linked structure category referencing a sample model by ID. |
linked_structures |
Linked structures category weighting sample models in a pattern. |
peak |
Peak profile categories for CWL, TOF, and total scattering. |
pref_orient |
Preferred-orientation category (March-Dollase) for textured powders. |
refln |
Reflection categories for powder and single-crystal experiments. |
Modules
absorption
Sample-absorption correction category (cylindrical Debye-Scherrer).
Modules:
| Name | Description |
|---|---|
base |
Base class for sample-absorption correction categories. |
cylinder_hewat |
Cylindrical Debye-Scherrer absorption correction (Hewat). |
factory |
Absorption factory — delegates entirely to |
none |
No-op sample-absorption correction (the default). |
Classes
Modules
base
Base class for sample-absorption correction categories.
Classes:
| Name | Description |
|---|---|
AbsorptionBase |
Base class for sample-absorption correction categories. |
AbsorptionBase()
Base class for sample-absorption correction categories.
Methods:
| Name | Description |
|---|---|
from_cif |
Populate parameters from CIF, skipping the active-type selector. |
show_supported |
Print supported types and mark the active one. |
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print parameters, other properties, and methods. |
Attributes:
| Name | Type | Description |
|---|---|---|
type |
str
|
Active factory tag for this category. |
unique_name |
str
|
Fully qualified name: datablock, category, entry. |
parameters |
list
|
All GenericDescriptorBase instances on this item. |
as_cif |
str
|
Return CIF representation of this object. |
type
property
writable
Active factory tag for this category.
unique_name
property
Fully qualified name: datablock, category, entry.
parameters
property
All GenericDescriptorBase instances on this item.
as_cif
property
Return CIF representation of this object.
from_cif(block, idx=0)
Populate parameters from CIF, skipping the active-type selector.
_absorption.type is restored with owner-context validation
by _restore_switchable_types before parameters are loaded.
Re-loading it through the generic descriptor path would set the
public type selector even when the persisted tag was
rejected for the experiment context (for example a CWL-only
cylinder-hewat tag in a time-of-flight file), leaving the
live category and its selector inconsistent. The type descriptor
is therefore intentionally skipped here.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
block
|
object
|
Parsed CIF block to read parameter values from. |
required |
idx
|
int
|
Loop index for the parameter values. |
0
|
show_supported()
Print supported types and mark the active one.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print parameters, other properties, and methods.
cylinder_hewat
Cylindrical Debye-Scherrer absorption correction (Hewat).
Classes:
| Name | Description |
|---|---|
CylinderHewatAbsorption |
Cylindrical Debye-Scherrer absorption correction (Hewat). |
CylinderHewatAbsorption()
Cylindrical Debye-Scherrer absorption correction (Hewat).
Applies the angle-dependent transmission factor
A(θ) = exp(-(1.7133 - 0.0368·sin²θ)·μR
+ (0.0927 + 0.375·sin²θ)·μR²)
for a cylindrical sample, where μR is the linear absorption
coefficient times the sample radius. Validated to four decimals
against FullProf for μR ≲ 1.5; for larger μR a Lobanov form is
preferable (not yet implemented).
Methods:
| Name | Description |
|---|---|
show_supported |
Print supported types and mark the active one. |
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print parameters, other properties, and methods. |
from_cif |
Populate parameters from CIF, skipping the active-type selector. |
Attributes:
| Name | Type | Description |
|---|---|---|
mu_r |
Parameter
|
Absorption coefficient times sample radius (μR). |
type |
str
|
Active factory tag for this category. |
unique_name |
str
|
Fully qualified name: datablock, category, entry. |
parameters |
list
|
All GenericDescriptorBase instances on this item. |
as_cif |
str
|
Return CIF representation of this object. |
mu_r
property
writable
Absorption coefficient times sample radius (μR).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
type
property
writable
Active factory tag for this category.
unique_name
property
Fully qualified name: datablock, category, entry.
parameters
property
All GenericDescriptorBase instances on this item.
as_cif
property
Return CIF representation of this object.
show_supported()
Print supported types and mark the active one.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print parameters, other properties, and methods.
from_cif(block, idx=0)
Populate parameters from CIF, skipping the active-type selector.
_absorption.type is restored with owner-context validation
by _restore_switchable_types before parameters are loaded.
Re-loading it through the generic descriptor path would set the
public type selector even when the persisted tag was
rejected for the experiment context (for example a CWL-only
cylinder-hewat tag in a time-of-flight file), leaving the
live category and its selector inconsistent. The type descriptor
is therefore intentionally skipped here.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
block
|
object
|
Parsed CIF block to read parameter values from. |
required |
idx
|
int
|
Loop index for the parameter values. |
0
|
factory
Absorption factory — delegates entirely to FactoryBase.
Classes:
| Name | Description |
|---|---|
AbsorptionFactory |
Create sample-absorption correction models by tag. |
AbsorptionFactory
Create sample-absorption correction models by tag.
Methods:
| Name | Description |
|---|---|
__init_subclass__ |
Give each subclass its own independent registry and rules. |
register |
Class decorator to register a concrete class. |
supported_tags |
Return list of all supported tags. |
default_tag |
Resolve the default tag for a given experimental context. |
create |
Instantiate a registered class by tag. |
create_default_for |
Instantiate the default class for a given context. |
supported_for |
Return classes matching conditions and/or calculator. |
show_supported |
Pretty-print a table of supported types. |
__init_subclass__(**kwargs)
Give each subclass its own independent registry and rules.
register(klass)
classmethod
Class decorator to register a concrete class.
Usage::
@SomeFactory.register class MyClass(SomeBase): type_info = TypeInfo(...)
Returns the class unmodified.
supported_tags()
classmethod
Return list of all supported tags.
default_tag(**conditions)
classmethod
Resolve the default tag for a given experimental context.
Uses largest-subset matching: the rule whose key is the
biggest subset of the given conditions wins. A rule with an
empty key (frozenset()) acts as a universal fallback.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**conditions
|
object
|
Experimental-axis values, e.g.
|
{}
|
Returns:
| Type | Description |
|---|---|
str
|
The resolved default tag string. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If no rule matches the given conditions. |
create(tag, **kwargs)
classmethod
Instantiate a registered class by tag.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag
|
str
|
|
required |
**kwargs
|
object
|
Forwarded to the class constructor. |
{}
|
Returns:
| Type | Description |
|---|---|
object
|
A new instance of the registered class. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If tag is not in the registry. |
create_default_for(**conditions)
classmethod
Instantiate the default class for a given context.
Combines default_tag(**conditions) with create(tag).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**conditions
|
object
|
Experimental-axis values. |
{}
|
Returns:
| Type | Description |
|---|---|
object
|
A new instance of the default class. |
supported_for(*, calculator=None, sample_form=None, scattering_type=None, beam_mode=None, radiation_probe=None)
classmethod
Return classes matching conditions and/or calculator.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
calculator
|
object
|
Optional |
None
|
sample_form
|
object
|
Optional |
None
|
scattering_type
|
object
|
Optional |
None
|
beam_mode
|
object
|
Optional |
None
|
radiation_probe
|
object
|
Optional |
None
|
Returns:
| Type | Description |
|---|---|
list[type]
|
Classes matching the given conditions. |
show_supported(*, calculator=None, sample_form=None, scattering_type=None, beam_mode=None, radiation_probe=None)
classmethod
Pretty-print a table of supported types.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
calculator
|
object
|
Optional |
None
|
sample_form
|
object
|
Optional |
None
|
scattering_type
|
object
|
Optional |
None
|
beam_mode
|
object
|
Optional |
None
|
radiation_probe
|
object
|
Optional |
None
|
none
No-op sample-absorption correction (the default).
Classes:
| Name | Description |
|---|---|
NoAbsorption |
No sample-absorption correction; the applied factor is unity. |
NoAbsorption()
No sample-absorption correction; the applied factor is unity.
Methods:
| Name | Description |
|---|---|
show_supported |
Print supported types and mark the active one. |
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print parameters, other properties, and methods. |
from_cif |
Populate parameters from CIF, skipping the active-type selector. |
Attributes:
| Name | Type | Description |
|---|---|---|
type |
str
|
Active factory tag for this category. |
unique_name |
str
|
Fully qualified name: datablock, category, entry. |
parameters |
list
|
All GenericDescriptorBase instances on this item. |
as_cif |
str
|
Return CIF representation of this object. |
type
property
writable
Active factory tag for this category.
unique_name
property
Fully qualified name: datablock, category, entry.
parameters
property
All GenericDescriptorBase instances on this item.
as_cif
property
Return CIF representation of this object.
show_supported()
Print supported types and mark the active one.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print parameters, other properties, and methods.
from_cif(block, idx=0)
Populate parameters from CIF, skipping the active-type selector.
_absorption.type is restored with owner-context validation
by _restore_switchable_types before parameters are loaded.
Re-loading it through the generic descriptor path would set the
public type selector even when the persisted tag was
rejected for the experiment context (for example a CWL-only
cylinder-hewat tag in a time-of-flight file), leaving the
live category and its selector inconsistent. The type descriptor
is therefore intentionally skipped here.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
block
|
object
|
Parsed CIF block to read parameter values from. |
required |
idx
|
int
|
Loop index for the parameter values. |
0
|
background
Chebyshev and line-segment background categories.
Modules:
| Name | Description |
|---|---|
base |
Abstract base for switchable powder background categories. |
chebyshev |
Chebyshev polynomial background model. |
enums |
Enumerations for background model types and estimation methods. |
estimate |
Automatic background-curve estimation for powder patterns. |
factory |
Background factory — delegates entirely to |
line_segment |
Line-segment background model. |
Classes
Modules
base
Abstract base for switchable powder background categories.
Classes:
| Name | Description |
|---|---|
BackgroundBase |
Abstract base for background subcategories in experiments. |
BackgroundBase(item_type)
Abstract base for background subcategories in experiments.
Concrete implementations provide parameterized background models and compute background intensities on the experiment grid.
Methods:
| Name | Description |
|---|---|
show |
Print a human-readable view of background components. |
show_supported |
Print supported types and mark the active one. |
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print a summary of public attributes and contained items. |
__getitem__ |
Return an item by name or positional index. |
__setitem__ |
Insert or replace an item under the given identity key. |
__delitem__ |
Delete an item by key or raise |
__contains__ |
Check whether an item with the given key exists. |
__iter__ |
Iterate over items in insertion order. |
__len__ |
Return the number of items in the collection. |
remove |
Remove an item by its key. |
clear |
Remove every item, then mark the parent datablock dirty. |
keys |
Yield keys for all items in insertion order. |
values |
Yield items in insertion order. |
items |
Yield |
from_cif |
Populate this collection from a CIF block. |
add |
Insert or replace a pre-built item into the collection. |
create |
Create a new item with the given attributes and add it. |
Attributes:
| Name | Type | Description |
|---|---|---|
type |
str
|
Active factory tag for this category. |
unique_name |
str | None
|
Return None; collections have no unique name. |
parameters |
list
|
All parameters from all items in this collection. |
as_cif |
str
|
Return CIF representation of this object. |
names |
list[str | None]
|
List of all item keys in the collection. |
scalar_descriptors |
list
|
Collection-level descriptors serialized outside the loop. |
type
property
writable
Active factory tag for this category.
unique_name
property
Return None; collections have no unique name.
parameters
property
All parameters from all items in this collection.
as_cif
property
Return CIF representation of this object.
names
property
List of all item keys in the collection.
scalar_descriptors
property
Collection-level descriptors serialized outside the loop.
show()
abstractmethod
Print a human-readable view of background components.
show_supported()
Print supported types and mark the active one.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print a summary of public attributes and contained items.
__getitem__(key)
Return an item by name or positional index.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key
|
str | int
|
Identity key (str) or zero-based positional index (int). |
required |
Returns:
| Type | Description |
|---|---|
GuardedBase
|
The item matching the given key or index. |
Raises:
| Type | Description |
|---|---|
TypeError
|
If key is neither |
__setitem__(name, item)
Insert or replace an item under the given identity key.
__delitem__(name)
Delete an item by key or raise KeyError if missing.
__contains__(name)
Check whether an item with the given key exists.
__iter__()
Iterate over items in insertion order.
__len__()
Return the number of items in the collection.
remove(name)
Remove an item by its key.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Identity key of the item to remove. |
required |
clear()
Remove every item, then mark the parent datablock dirty.
Layers dirty-marking on :meth:CollectionBase.clear, mirroring
how :meth:add layers it on the base insert.
keys()
Yield keys for all items in insertion order.
values()
Yield items in insertion order.
items()
Yield (key, item) pairs in insertion order.
from_cif(block)
Populate this collection from a CIF block.
add(item)
Insert or replace a pre-built item into the collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
item
|
object
|
A |
required |
create(**kwargs)
Create a new item with the given attributes and add it.
A default instance of the collection's item type is created,
then each keyword argument is applied via setattr.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**kwargs
|
object
|
Attribute names and values for the new item. |
{}
|
chebyshev
Chebyshev polynomial background model.
Provides a collection of polynomial terms and evaluation helpers.
Classes:
| Name | Description |
|---|---|
PolynomialTerm |
Chebyshev polynomial term. |
ChebyshevPolynomialBackground |
Chebyshev polynomial background model. |
PolynomialTerm()
Chebyshev polynomial term.
New public attribute names: order and coef replacing the
longer chebyshev_order / chebyshev_coef. Backward-compatible
aliases are kept so existing serialized data / external code does
not break immediately. Tests should migrate to the short names.
Methods:
| Name | Description |
|---|---|
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print parameters, other properties, and methods. |
from_cif |
Populate this item from a CIF block. |
Attributes:
| Name | Type | Description |
|---|---|---|
id |
StringDescriptor
|
Identifier for this background polynomial term. |
order |
NumericDescriptor
|
Order used in a Chebyshev polynomial background term. |
coef |
Parameter
|
Coefficient used in a Chebyshev polynomial background term. |
unique_name |
str
|
Fully qualified name: datablock, category, entry. |
parameters |
list
|
All GenericDescriptorBase instances on this item. |
as_cif |
str
|
Return CIF representation of this object. |
id
property
writable
Identifier for this background polynomial term.
Reading this property returns the underlying
StringDescriptor object. Assigning to it updates the
parameter value.
order
property
writable
Order used in a Chebyshev polynomial background term.
Reading this property returns the underlying
NumericDescriptor object. Assigning to it updates the
parameter value.
coef
property
writable
Coefficient used in a Chebyshev polynomial background term.
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
unique_name
property
Fully qualified name: datablock, category, entry.
parameters
property
All GenericDescriptorBase instances on this item.
as_cif
property
Return CIF representation of this object.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print parameters, other properties, and methods.
from_cif(block, idx=0)
Populate this item from a CIF block.
ChebyshevPolynomialBackground()
Chebyshev polynomial background model.
Methods:
| Name | Description |
|---|---|
show |
Print a table of polynomial orders and coefficients. |
show_supported |
Print supported types and mark the active one. |
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print a summary of public attributes and contained items. |
__getitem__ |
Return an item by name or positional index. |
__setitem__ |
Insert or replace an item under the given identity key. |
__delitem__ |
Delete an item by key or raise |
__contains__ |
Check whether an item with the given key exists. |
__iter__ |
Iterate over items in insertion order. |
__len__ |
Return the number of items in the collection. |
remove |
Remove an item by its key. |
clear |
Remove every item, then mark the parent datablock dirty. |
keys |
Yield keys for all items in insertion order. |
values |
Yield items in insertion order. |
items |
Yield |
from_cif |
Populate this collection from a CIF block. |
add |
Insert or replace a pre-built item into the collection. |
create |
Create a new item with the given attributes and add it. |
Attributes:
| Name | Type | Description |
|---|---|---|
type |
str
|
Active factory tag for this category. |
unique_name |
str | None
|
Return None; collections have no unique name. |
parameters |
list
|
All parameters from all items in this collection. |
as_cif |
str
|
Return CIF representation of this object. |
names |
list[str | None]
|
List of all item keys in the collection. |
scalar_descriptors |
list
|
Collection-level descriptors serialized outside the loop. |
type
property
writable
Active factory tag for this category.
unique_name
property
Return None; collections have no unique name.
parameters
property
All parameters from all items in this collection.
as_cif
property
Return CIF representation of this object.
names
property
List of all item keys in the collection.
scalar_descriptors
property
Collection-level descriptors serialized outside the loop.
show()
Print a table of polynomial orders and coefficients.
show_supported()
Print supported types and mark the active one.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print a summary of public attributes and contained items.
__getitem__(key)
Return an item by name or positional index.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key
|
str | int
|
Identity key (str) or zero-based positional index (int). |
required |
Returns:
| Type | Description |
|---|---|
GuardedBase
|
The item matching the given key or index. |
Raises:
| Type | Description |
|---|---|
TypeError
|
If key is neither |
__setitem__(name, item)
Insert or replace an item under the given identity key.
__delitem__(name)
Delete an item by key or raise KeyError if missing.
__contains__(name)
Check whether an item with the given key exists.
__iter__()
Iterate over items in insertion order.
__len__()
Return the number of items in the collection.
remove(name)
Remove an item by its key.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Identity key of the item to remove. |
required |
clear()
Remove every item, then mark the parent datablock dirty.
Layers dirty-marking on :meth:CollectionBase.clear, mirroring
how :meth:add layers it on the base insert.
keys()
Yield keys for all items in insertion order.
values()
Yield items in insertion order.
items()
Yield (key, item) pairs in insertion order.
from_cif(block)
Populate this collection from a CIF block.
add(item)
Insert or replace a pre-built item into the collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
item
|
object
|
A |
required |
create(**kwargs)
Create a new item with the given attributes and add it.
A default instance of the collection's item type is created,
then each keyword argument is applied via setattr.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**kwargs
|
object
|
Attribute names and values for the new item. |
{}
|
enums
Enumerations for background model types and estimation methods.
Classes:
| Name | Description |
|---|---|
BackgroundTypeEnum |
Supported background model types. |
BackgroundEstimatorMethodEnum |
Supported automatic background-estimation methods. |
BackgroundTypeEnum
Supported background model types.
Methods:
| Name | Description |
|---|---|
default |
Return a default background type. |
description |
Human-friendly description for the enum value. |
default()
classmethod
Return a default background type.
description()
Human-friendly description for the enum value.
BackgroundEstimatorMethodEnum
Supported automatic background-estimation methods.
Methods:
| Name | Description |
|---|---|
default |
Return the default estimation method. |
description |
Human-friendly description for the enum value. |
default()
classmethod
Return the default estimation method.
description()
Human-friendly description for the enum value.
estimate
Automatic background-curve estimation for powder patterns.
Pure, array-in / array-out helpers with no experiment-model state. The
estimator runs in two stages (see the background-auto-estimate ADR):
- Stage 1 builds a peak-insensitive background curve
B(x)over the whole grid using :mod:pybaselines. - Stage 2 thins
B(x)to a sparse set of(x, intensity)anchors with a vertical Ramer-Douglas-Peucker simplification, keeping the endpoints and never placing a non-endpoint anchor on a peak.
All per-dataset parameters (peak width, noise, smoothing penalty) are derived from the data so a bare call needs no tuning. The numeric constants below are first cuts; they are calibrated against the tutorial corpus in Phase 2.
Classes:
| Name | Description |
|---|---|
BackgroundEstimate |
Result of a background-curve estimation. |
Functions:
| Name | Description |
|---|---|
estimate_background_curve |
Estimate background control points from a measured pattern. |
BackgroundEstimate(curve, anchors, method, width, noise, tolerance, backend_params)
dataclass
Result of a background-curve estimation.
Attributes:
| Name | Type | Description |
|---|---|---|
curve |
np.ndarray
|
Dense peak-insensitive background |
anchors |
np.ndarray
|
Thinned control points with shape |
method |
str
|
Resolved Stage-1 method actually run ( |
width |
float
|
Effective peak width |
noise |
float
|
Robust noise estimate |
tolerance |
float
|
Stage-2 RDP tolerance actually used ( |
backend_params |
dict[str, float]
|
Parameters handed to the :mod: |
estimate_background_curve(x, y, *, method='arpls', peaks=None, width=None, smoothness=None, n_points=None)
Estimate background control points from a measured pattern.
Stage 1 builds a peak-insensitive curve B(x) with the resolved
method; Stage 2 thins it to sparse anchors. Every per-dataset
parameter defaults to a data-derived value, so a bare call works.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
x
|
np.ndarray
|
Grid coordinates (e.g. 2theta or time-of-flight), monotonic. |
required |
y
|
np.ndarray
|
Intensities to baseline: the measured pattern (data-only) or the peak-subtracted measured pattern (model-guided). |
required |
method
|
str
|
Resolved Stage-1 routine: |
'arpls'
|
peaks
|
np.ndarray | None
|
Boolean mask aligned with |
None
|
width
|
float | None
|
Peak width in points; derived from |
None
|
smoothness
|
float | None
|
Whittaker penalty override for |
None
|
n_points
|
int | None
|
Maximum number of anchors (endpoints included); uncapped when
|
None
|
Returns:
| Type | Description |
|---|---|
BackgroundEstimate
|
The curve, anchors, and metadata describing the run. |
factory
Background factory — delegates entirely to FactoryBase.
Classes:
| Name | Description |
|---|---|
BackgroundFactory |
Create background collections by tag. |
BackgroundFactory
Create background collections by tag.
Methods:
| Name | Description |
|---|---|
__init_subclass__ |
Give each subclass its own independent registry and rules. |
register |
Class decorator to register a concrete class. |
supported_tags |
Return list of all supported tags. |
default_tag |
Resolve the default tag for a given experimental context. |
create |
Instantiate a registered class by tag. |
create_default_for |
Instantiate the default class for a given context. |
supported_for |
Return classes matching conditions and/or calculator. |
show_supported |
Pretty-print a table of supported types. |
__init_subclass__(**kwargs)
Give each subclass its own independent registry and rules.
register(klass)
classmethod
Class decorator to register a concrete class.
Usage::
@SomeFactory.register class MyClass(SomeBase): type_info = TypeInfo(...)
Returns the class unmodified.
supported_tags()
classmethod
Return list of all supported tags.
default_tag(**conditions)
classmethod
Resolve the default tag for a given experimental context.
Uses largest-subset matching: the rule whose key is the
biggest subset of the given conditions wins. A rule with an
empty key (frozenset()) acts as a universal fallback.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**conditions
|
object
|
Experimental-axis values, e.g.
|
{}
|
Returns:
| Type | Description |
|---|---|
str
|
The resolved default tag string. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If no rule matches the given conditions. |
create(tag, **kwargs)
classmethod
Instantiate a registered class by tag.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag
|
str
|
|
required |
**kwargs
|
object
|
Forwarded to the class constructor. |
{}
|
Returns:
| Type | Description |
|---|---|
object
|
A new instance of the registered class. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If tag is not in the registry. |
create_default_for(**conditions)
classmethod
Instantiate the default class for a given context.
Combines default_tag(**conditions) with create(tag).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**conditions
|
object
|
Experimental-axis values. |
{}
|
Returns:
| Type | Description |
|---|---|
object
|
A new instance of the default class. |
supported_for(*, calculator=None, sample_form=None, scattering_type=None, beam_mode=None, radiation_probe=None)
classmethod
Return classes matching conditions and/or calculator.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
calculator
|
object
|
Optional |
None
|
sample_form
|
object
|
Optional |
None
|
scattering_type
|
object
|
Optional |
None
|
beam_mode
|
object
|
Optional |
None
|
radiation_probe
|
object
|
Optional |
None
|
Returns:
| Type | Description |
|---|---|
list[type]
|
Classes matching the given conditions. |
show_supported(*, calculator=None, sample_form=None, scattering_type=None, beam_mode=None, radiation_probe=None)
classmethod
Pretty-print a table of supported types.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
calculator
|
object
|
Optional |
None
|
sample_form
|
object
|
Optional |
None
|
scattering_type
|
object
|
Optional |
None
|
beam_mode
|
object
|
Optional |
None
|
radiation_probe
|
object
|
Optional |
None
|
line_segment
Line-segment background model.
Interpolate user-specified points to form a background curve.
Classes:
| Name | Description |
|---|---|
LineSegment |
Single background control point for interpolation. |
LineSegmentBackground |
Linear-interpolation background between user-defined points. |
LineSegment()
Single background control point for interpolation.
Methods:
| Name | Description |
|---|---|
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print parameters, other properties, and methods. |
from_cif |
Populate this item from a CIF block. |
Attributes:
| Name | Type | Description |
|---|---|---|
id |
StringDescriptor
|
Identifier for this background line segment. |
position |
NumericDescriptor
|
Position used to create many straight-line segments. |
intensity |
Parameter
|
Intensity used to create many straight-line segments. |
unique_name |
str
|
Fully qualified name: datablock, category, entry. |
parameters |
list
|
All GenericDescriptorBase instances on this item. |
as_cif |
str
|
Return CIF representation of this object. |
id
property
writable
Identifier for this background line segment.
Reading this property returns the underlying
StringDescriptor object. Assigning to it updates the
parameter value.
position
property
writable
Position used to create many straight-line segments.
Reading this property returns the underlying
NumericDescriptor object. Assigning to it updates the
parameter value.
intensity
property
writable
Intensity used to create many straight-line segments.
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
unique_name
property
Fully qualified name: datablock, category, entry.
parameters
property
All GenericDescriptorBase instances on this item.
as_cif
property
Return CIF representation of this object.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print parameters, other properties, and methods.
from_cif(block, idx=0)
Populate this item from a CIF block.
LineSegmentBackground()
Linear-interpolation background between user-defined points.
Methods:
| Name | Description |
|---|---|
auto_estimate |
Detect background control points from the measured pattern. |
show |
Print a table of control points (position, intensity). |
show_supported |
Print supported types and mark the active one. |
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print a summary of public attributes and contained items. |
__getitem__ |
Return an item by name or positional index. |
__setitem__ |
Insert or replace an item under the given identity key. |
__delitem__ |
Delete an item by key or raise |
__contains__ |
Check whether an item with the given key exists. |
__iter__ |
Iterate over items in insertion order. |
__len__ |
Return the number of items in the collection. |
remove |
Remove an item by its key. |
clear |
Remove every item, then mark the parent datablock dirty. |
keys |
Yield keys for all items in insertion order. |
values |
Yield items in insertion order. |
items |
Yield |
from_cif |
Populate this collection from a CIF block. |
add |
Insert or replace a pre-built item into the collection. |
create |
Create a new item with the given attributes and add it. |
Attributes:
| Name | Type | Description |
|---|---|---|
type |
str
|
Active factory tag for this category. |
unique_name |
str | None
|
Return None; collections have no unique name. |
parameters |
list
|
All parameters from all items in this collection. |
as_cif |
str
|
Return CIF representation of this object. |
names |
list[str | None]
|
List of all item keys in the collection. |
scalar_descriptors |
list
|
Collection-level descriptors serialized outside the loop. |
type
property
writable
Active factory tag for this category.
unique_name
property
Return None; collections have no unique name.
parameters
property
All parameters from all items in this collection.
as_cif
property
Return CIF representation of this object.
names
property
List of all item keys in the collection.
scalar_descriptors
property
Collection-level descriptors serialized outside the loop.
auto_estimate(*, method='auto', width=None, smoothness=None, n_points=None, use_model=True)
Detect background control points from the measured pattern.
Builds a peak-insensitive background curve and thins it to a
sparse set of fixed line-segment points, overwriting any
existing ones. Heights come from the de-peaked curve, clipped to
the measured intensities so they never eat into peaks. After at
least one calculation, use_model lets the fitted model place
better points across overlapped regions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
method
|
str
|
Estimation method: |
'auto'
|
width
|
float | None
|
Peak width in points; measured from the data when |
None
|
smoothness
|
float | None
|
Backend smoothing override; derived when |
None
|
n_points
|
int | None
|
Maximum number of points; uncapped when |
None
|
use_model
|
bool
|
When a calculation has run, subtract the fitted peaks before estimating so anchors land in true inter-peak gaps. |
True
|
show()
Print a table of control points (position, intensity).
show_supported()
Print supported types and mark the active one.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print a summary of public attributes and contained items.
__getitem__(key)
Return an item by name or positional index.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key
|
str | int
|
Identity key (str) or zero-based positional index (int). |
required |
Returns:
| Type | Description |
|---|---|
GuardedBase
|
The item matching the given key or index. |
Raises:
| Type | Description |
|---|---|
TypeError
|
If key is neither |
__setitem__(name, item)
Insert or replace an item under the given identity key.
__delitem__(name)
Delete an item by key or raise KeyError if missing.
__contains__(name)
Check whether an item with the given key exists.
__iter__()
Iterate over items in insertion order.
__len__()
Return the number of items in the collection.
remove(name)
Remove an item by its key.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Identity key of the item to remove. |
required |
clear()
Remove every item, then mark the parent datablock dirty.
Layers dirty-marking on :meth:CollectionBase.clear, mirroring
how :meth:add layers it on the base insert.
keys()
Yield keys for all items in insertion order.
values()
Yield items in insertion order.
items()
Yield (key, item) pairs in insertion order.
from_cif(block)
Populate this collection from a CIF block.
add(item)
Insert or replace a pre-built item into the collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
item
|
object
|
A |
required |
create(**kwargs)
Create a new item with the given attributes and add it.
A default instance of the collection's item type is created,
then each keyword argument is applied via setattr.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**kwargs
|
object
|
Attribute names and values for the new item. |
{}
|
calculator
Experiment calculator category exports.
Modules:
| Name | Description |
|---|---|
default |
Experiment calculator category. |
factory |
Factory for experiment calculator categories. |
Classes
Modules
default
Experiment calculator category.
Classes:
| Name | Description |
|---|---|
Calculator |
Calculator selection and access for an experiment. |
Calculator(*, type)
Calculator selection and access for an experiment.
Methods:
| Name | Description |
|---|---|
from_cif |
Populate this calculator category from a CIF block. |
show_supported |
Print supported types and mark the active one. |
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print parameters, other properties, and methods. |
Attributes:
| Name | Type | Description |
|---|---|---|
calculator |
object | None
|
Live calculator backend instance. |
type |
str
|
Active factory tag for this category. |
unique_name |
str
|
Fully qualified name: datablock, category, entry. |
parameters |
list
|
All GenericDescriptorBase instances on this item. |
as_cif |
str
|
Return CIF representation of this object. |
calculator
property
Live calculator backend instance.
type
property
writable
Active factory tag for this category.
unique_name
property
Fully qualified name: datablock, category, entry.
parameters
property
All GenericDescriptorBase instances on this item.
as_cif
property
Return CIF representation of this object.
from_cif(block, idx=0)
Populate this calculator category from a CIF block.
show_supported()
Print supported types and mark the active one.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print parameters, other properties, and methods.
factory
Factory for experiment calculator categories.
Classes:
| Name | Description |
|---|---|
CalculatorCategoryFactory |
Create experiment calculator category instances. |
CalculatorCategoryFactory
Create experiment calculator category instances.
Methods:
| Name | Description |
|---|---|
__init_subclass__ |
Give each subclass its own independent registry and rules. |
register |
Class decorator to register a concrete class. |
supported_tags |
Return list of all supported tags. |
default_tag |
Resolve the default tag for a given experimental context. |
create |
Instantiate a registered class by tag. |
create_default_for |
Instantiate the default class for a given context. |
supported_for |
Return classes matching conditions and/or calculator. |
show_supported |
Pretty-print a table of supported types. |
__init_subclass__(**kwargs)
Give each subclass its own independent registry and rules.
register(klass)
classmethod
Class decorator to register a concrete class.
Usage::
@SomeFactory.register class MyClass(SomeBase): type_info = TypeInfo(...)
Returns the class unmodified.
supported_tags()
classmethod
Return list of all supported tags.
default_tag(**conditions)
classmethod
Resolve the default tag for a given experimental context.
Uses largest-subset matching: the rule whose key is the
biggest subset of the given conditions wins. A rule with an
empty key (frozenset()) acts as a universal fallback.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**conditions
|
object
|
Experimental-axis values, e.g.
|
{}
|
Returns:
| Type | Description |
|---|---|
str
|
The resolved default tag string. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If no rule matches the given conditions. |
create(tag, **kwargs)
classmethod
Instantiate a registered class by tag.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag
|
str
|
|
required |
**kwargs
|
object
|
Forwarded to the class constructor. |
{}
|
Returns:
| Type | Description |
|---|---|
object
|
A new instance of the registered class. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If tag is not in the registry. |
create_default_for(**conditions)
classmethod
Instantiate the default class for a given context.
Combines default_tag(**conditions) with create(tag).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**conditions
|
object
|
Experimental-axis values. |
{}
|
Returns:
| Type | Description |
|---|---|
object
|
A new instance of the default class. |
supported_for(*, calculator=None, sample_form=None, scattering_type=None, beam_mode=None, radiation_probe=None)
classmethod
Return classes matching conditions and/or calculator.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
calculator
|
object
|
Optional |
None
|
sample_form
|
object
|
Optional |
None
|
scattering_type
|
object
|
Optional |
None
|
beam_mode
|
object
|
Optional |
None
|
radiation_probe
|
object
|
Optional |
None
|
Returns:
| Type | Description |
|---|---|
list[type]
|
Classes matching the given conditions. |
show_supported(*, calculator=None, sample_form=None, scattering_type=None, beam_mode=None, radiation_probe=None)
classmethod
Pretty-print a table of supported types.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
calculator
|
object
|
Optional |
None
|
sample_form
|
object
|
Optional |
None
|
scattering_type
|
object
|
Optional |
None
|
beam_mode
|
object
|
Optional |
None
|
radiation_probe
|
object
|
Optional |
None
|
data
Measured pattern data categories for powder experiments.
Modules:
| Name | Description |
|---|---|
bragg_pd |
Measured and calculated powder pattern data categories. |
factory |
Data collection factory — delegates to |
total_pd |
Data categories for total scattering (PDF) experiments. |
Classes
Modules
bragg_pd
Measured and calculated powder pattern data categories.
Classes:
| Name | Description |
|---|---|
PdDataPointBaseMixin |
Single base data point mixin for powder diffraction data. |
PdCwlDataPointMixin |
Mixin for CWL powder diffraction data points. |
PdTofDataPointMixin |
Mixin for powder diffraction data points with time-of-flight. |
PdCwlDataPoint |
Powder diffraction data point for CWL experiments. |
PdTofDataPoint |
Powder diffraction data point for time-of-flight experiments. |
PdDataBase |
Base class for powder diffraction data collections. |
PdCwlData |
Bragg powder CWL data collection. |
PdTofData |
Bragg powder TOF data collection. |
PdDataPointBaseMixin()
Single base data point mixin for powder diffraction data.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
StringDescriptor
|
Identifier for this data point in the dataset. |
d_spacing |
NumericDescriptor
|
d-spacing value corresponding to this data point. |
intensity_meas |
NumericDescriptor
|
Intensity recorded at each measurement point (angle/time). |
intensity_meas_su |
NumericDescriptor
|
Standard uncertainty of the measured intensity at this point. |
intensity_calc |
NumericDescriptor
|
Intensity of a computed diffractogram at this point. |
intensity_bkg |
NumericDescriptor
|
Intensity of a computed background at this point. |
calc_status |
StringDescriptor
|
Status code of the data point in the calculation process. |
id
property
Identifier for this data point in the dataset.
Reading this property returns the underlying
StringDescriptor object.
d_spacing
property
d-spacing value corresponding to this data point.
Reading this property returns the underlying
NumericDescriptor object.
intensity_meas
property
Intensity recorded at each measurement point (angle/time).
Reading this property returns the underlying
NumericDescriptor object.
intensity_meas_su
property
Standard uncertainty of the measured intensity at this point.
Reading this property returns the underlying
NumericDescriptor object.
intensity_calc
property
Intensity of a computed diffractogram at this point.
Reading this property returns the underlying
NumericDescriptor object.
intensity_bkg
property
Intensity of a computed background at this point.
Reading this property returns the underlying
NumericDescriptor object.
calc_status
property
Status code of the data point in the calculation process.
Reading this property returns the underlying
StringDescriptor object.
PdCwlDataPointMixin()
Mixin for CWL powder diffraction data points.
Attributes:
| Name | Type | Description |
|---|---|---|
two_theta |
NumericDescriptor
|
Measured 2θ diffraction angle (deg). |
two_theta
property
Measured 2θ diffraction angle (deg).
Reading this property returns the underlying
NumericDescriptor object.
PdTofDataPointMixin()
Mixin for powder diffraction data points with time-of-flight.
Attributes:
| Name | Type | Description |
|---|---|---|
time_of_flight |
NumericDescriptor
|
Measured time for time-of-flight neutron measurement (μs). |
time_of_flight
property
Measured time for time-of-flight neutron measurement (μs).
Reading this property returns the underlying
NumericDescriptor object.
PdCwlDataPoint()
Powder diffraction data point for CWL experiments.
Methods:
| Name | Description |
|---|---|
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print parameters, other properties, and methods. |
from_cif |
Populate this item from a CIF block. |
Attributes:
| Name | Type | Description |
|---|---|---|
unique_name |
str
|
Fully qualified name: datablock, category, entry. |
parameters |
list
|
All GenericDescriptorBase instances on this item. |
as_cif |
str
|
Return CIF representation of this object. |
two_theta |
NumericDescriptor
|
Measured 2θ diffraction angle (deg). |
id |
StringDescriptor
|
Identifier for this data point in the dataset. |
d_spacing |
NumericDescriptor
|
d-spacing value corresponding to this data point. |
intensity_meas |
NumericDescriptor
|
Intensity recorded at each measurement point (angle/time). |
intensity_meas_su |
NumericDescriptor
|
Standard uncertainty of the measured intensity at this point. |
intensity_calc |
NumericDescriptor
|
Intensity of a computed diffractogram at this point. |
intensity_bkg |
NumericDescriptor
|
Intensity of a computed background at this point. |
calc_status |
StringDescriptor
|
Status code of the data point in the calculation process. |
unique_name
property
Fully qualified name: datablock, category, entry.
parameters
property
All GenericDescriptorBase instances on this item.
as_cif
property
Return CIF representation of this object.
two_theta
property
Measured 2θ diffraction angle (deg).
Reading this property returns the underlying
NumericDescriptor object.
id
property
Identifier for this data point in the dataset.
Reading this property returns the underlying
StringDescriptor object.
d_spacing
property
d-spacing value corresponding to this data point.
Reading this property returns the underlying
NumericDescriptor object.
intensity_meas
property
Intensity recorded at each measurement point (angle/time).
Reading this property returns the underlying
NumericDescriptor object.
intensity_meas_su
property
Standard uncertainty of the measured intensity at this point.
Reading this property returns the underlying
NumericDescriptor object.
intensity_calc
property
Intensity of a computed diffractogram at this point.
Reading this property returns the underlying
NumericDescriptor object.
intensity_bkg
property
Intensity of a computed background at this point.
Reading this property returns the underlying
NumericDescriptor object.
calc_status
property
Status code of the data point in the calculation process.
Reading this property returns the underlying
StringDescriptor object.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print parameters, other properties, and methods.
from_cif(block, idx=0)
Populate this item from a CIF block.
PdTofDataPoint()
Powder diffraction data point for time-of-flight experiments.
Methods:
| Name | Description |
|---|---|
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print parameters, other properties, and methods. |
from_cif |
Populate this item from a CIF block. |
Attributes:
| Name | Type | Description |
|---|---|---|
unique_name |
str
|
Fully qualified name: datablock, category, entry. |
parameters |
list
|
All GenericDescriptorBase instances on this item. |
as_cif |
str
|
Return CIF representation of this object. |
time_of_flight |
NumericDescriptor
|
Measured time for time-of-flight neutron measurement (μs). |
id |
StringDescriptor
|
Identifier for this data point in the dataset. |
d_spacing |
NumericDescriptor
|
d-spacing value corresponding to this data point. |
intensity_meas |
NumericDescriptor
|
Intensity recorded at each measurement point (angle/time). |
intensity_meas_su |
NumericDescriptor
|
Standard uncertainty of the measured intensity at this point. |
intensity_calc |
NumericDescriptor
|
Intensity of a computed diffractogram at this point. |
intensity_bkg |
NumericDescriptor
|
Intensity of a computed background at this point. |
calc_status |
StringDescriptor
|
Status code of the data point in the calculation process. |
unique_name
property
Fully qualified name: datablock, category, entry.
parameters
property
All GenericDescriptorBase instances on this item.
as_cif
property
Return CIF representation of this object.
time_of_flight
property
Measured time for time-of-flight neutron measurement (μs).
Reading this property returns the underlying
NumericDescriptor object.
id
property
Identifier for this data point in the dataset.
Reading this property returns the underlying
StringDescriptor object.
d_spacing
property
d-spacing value corresponding to this data point.
Reading this property returns the underlying
NumericDescriptor object.
intensity_meas
property
Intensity recorded at each measurement point (angle/time).
Reading this property returns the underlying
NumericDescriptor object.
intensity_meas_su
property
Standard uncertainty of the measured intensity at this point.
Reading this property returns the underlying
NumericDescriptor object.
intensity_calc
property
Intensity of a computed diffractogram at this point.
Reading this property returns the underlying
NumericDescriptor object.
intensity_bkg
property
Intensity of a computed background at this point.
Reading this property returns the underlying
NumericDescriptor object.
calc_status
property
Status code of the data point in the calculation process.
Reading this property returns the underlying
StringDescriptor object.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print parameters, other properties, and methods.
from_cif(block, idx=0)
Populate this item from a CIF block.
PdDataBase(item_type)
Base class for powder diffraction data collections.
Methods:
| Name | Description |
|---|---|
fit_data_arrays |
Return arrays needed to draw the fit-data chart. |
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print a summary of public attributes and contained items. |
__getitem__ |
Return an item by name or positional index. |
__setitem__ |
Insert or replace an item under the given identity key. |
__delitem__ |
Delete an item by key or raise |
__contains__ |
Check whether an item with the given key exists. |
__iter__ |
Iterate over items in insertion order. |
__len__ |
Return the number of items in the collection. |
remove |
Remove an item by its key. |
clear |
Remove every item, then mark the parent datablock dirty. |
keys |
Yield keys for all items in insertion order. |
values |
Yield items in insertion order. |
items |
Yield |
from_cif |
Populate this collection from a CIF block. |
add |
Insert or replace a pre-built item into the collection. |
create |
Create a new item with the given attributes and add it. |
Attributes:
| Name | Type | Description |
|---|---|---|
calc_status |
np.ndarray
|
Refinement-status flags for each data point as an array. |
d_spacing |
np.ndarray
|
D-spacing values for active (non-excluded) data points. |
intensity_meas |
np.ndarray
|
Measured intensities for active data points. |
intensity_meas_su |
np.ndarray
|
Standard uncertainties of the measured intensities. |
intensity_calc |
np.ndarray
|
Calculated intensities for active data points. |
intensity_bkg |
np.ndarray
|
Background intensities for active data points. |
unique_name |
str | None
|
Return None; collections have no unique name. |
parameters |
list
|
All parameters from all items in this collection. |
as_cif |
str
|
Return CIF representation of this object. |
names |
list[str | None]
|
List of all item keys in the collection. |
scalar_descriptors |
list
|
Collection-level descriptors serialized outside the loop. |
calc_status
property
Refinement-status flags for each data point as an array.
d_spacing
property
D-spacing values for active (non-excluded) data points.
intensity_meas
property
Measured intensities for active data points.
intensity_meas_su
property
Standard uncertainties of the measured intensities.
Values smaller than 0.0001 are replaced with 1.0 to prevent fitting failures.
intensity_calc
property
Calculated intensities for active data points.
intensity_bkg
property
Background intensities for active data points.
unique_name
property
Return None; collections have no unique name.
parameters
property
All parameters from all items in this collection.
as_cif
property
Return CIF representation of this object.
names
property
List of all item keys in the collection.
scalar_descriptors
property
Collection-level descriptors serialized outside the loop.
fit_data_arrays()
Return arrays needed to draw the fit-data chart.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print a summary of public attributes and contained items.
__getitem__(key)
Return an item by name or positional index.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key
|
str | int
|
Identity key (str) or zero-based positional index (int). |
required |
Returns:
| Type | Description |
|---|---|
GuardedBase
|
The item matching the given key or index. |
Raises:
| Type | Description |
|---|---|
TypeError
|
If key is neither |
__setitem__(name, item)
Insert or replace an item under the given identity key.
__delitem__(name)
Delete an item by key or raise KeyError if missing.
__contains__(name)
Check whether an item with the given key exists.
__iter__()
Iterate over items in insertion order.
__len__()
Return the number of items in the collection.
remove(name)
Remove an item by its key.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Identity key of the item to remove. |
required |
clear()
Remove every item, then mark the parent datablock dirty.
Layers dirty-marking on :meth:CollectionBase.clear, mirroring
how :meth:add layers it on the base insert.
keys()
Yield keys for all items in insertion order.
values()
Yield items in insertion order.
items()
Yield (key, item) pairs in insertion order.
from_cif(block)
Populate this collection from a CIF block.
add(item)
Insert or replace a pre-built item into the collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
item
|
object
|
A |
required |
create(**kwargs)
Create a new item with the given attributes and add it.
A default instance of the collection's item type is created,
then each keyword argument is applied via setattr.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**kwargs
|
object
|
Attribute names and values for the new item. |
{}
|
PdCwlData()
Bragg powder CWL data collection.
Methods:
| Name | Description |
|---|---|
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print a summary of public attributes and contained items. |
__getitem__ |
Return an item by name or positional index. |
__setitem__ |
Insert or replace an item under the given identity key. |
__delitem__ |
Delete an item by key or raise |
__contains__ |
Check whether an item with the given key exists. |
__iter__ |
Iterate over items in insertion order. |
__len__ |
Return the number of items in the collection. |
remove |
Remove an item by its key. |
clear |
Remove every item, then mark the parent datablock dirty. |
keys |
Yield keys for all items in insertion order. |
values |
Yield items in insertion order. |
items |
Yield |
from_cif |
Populate this collection from a CIF block. |
add |
Insert or replace a pre-built item into the collection. |
create |
Create a new item with the given attributes and add it. |
fit_data_arrays |
Return arrays needed to draw the fit-data chart. |
Attributes:
| Name | Type | Description |
|---|---|---|
two_theta |
np.ndarray
|
Get 2θ values for data points included in calculations. |
x_descriptor |
NumericDescriptor
|
Descriptor that owns the 2θ x-axis metadata. |
x |
np.ndarray
|
Alias for two_theta. |
unfiltered_x |
np.ndarray
|
Get the 2θ values for all data points in this collection. |
unique_name |
str | None
|
Return None; collections have no unique name. |
parameters |
list
|
All parameters from all items in this collection. |
as_cif |
str
|
Return CIF representation of this object. |
names |
list[str | None]
|
List of all item keys in the collection. |
scalar_descriptors |
list
|
Collection-level descriptors serialized outside the loop. |
calc_status |
np.ndarray
|
Refinement-status flags for each data point as an array. |
d_spacing |
np.ndarray
|
D-spacing values for active (non-excluded) data points. |
intensity_meas |
np.ndarray
|
Measured intensities for active data points. |
intensity_meas_su |
np.ndarray
|
Standard uncertainties of the measured intensities. |
intensity_calc |
np.ndarray
|
Calculated intensities for active data points. |
intensity_bkg |
np.ndarray
|
Background intensities for active data points. |
two_theta
property
Get 2θ values for data points included in calculations.
x_descriptor
property
Descriptor that owns the 2θ x-axis metadata.
x
property
Alias for two_theta.
unfiltered_x
property
Get the 2θ values for all data points in this collection.
unique_name
property
Return None; collections have no unique name.
parameters
property
All parameters from all items in this collection.
as_cif
property
Return CIF representation of this object.
names
property
List of all item keys in the collection.
scalar_descriptors
property
Collection-level descriptors serialized outside the loop.
calc_status
property
Refinement-status flags for each data point as an array.
d_spacing
property
D-spacing values for active (non-excluded) data points.
intensity_meas
property
Measured intensities for active data points.
intensity_meas_su
property
Standard uncertainties of the measured intensities.
Values smaller than 0.0001 are replaced with 1.0 to prevent fitting failures.
intensity_calc
property
Calculated intensities for active data points.
intensity_bkg
property
Background intensities for active data points.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print a summary of public attributes and contained items.
__getitem__(key)
Return an item by name or positional index.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key
|
str | int
|
Identity key (str) or zero-based positional index (int). |
required |
Returns:
| Type | Description |
|---|---|
GuardedBase
|
The item matching the given key or index. |
Raises:
| Type | Description |
|---|---|
TypeError
|
If key is neither |
__setitem__(name, item)
Insert or replace an item under the given identity key.
__delitem__(name)
Delete an item by key or raise KeyError if missing.
__contains__(name)
Check whether an item with the given key exists.
__iter__()
Iterate over items in insertion order.
__len__()
Return the number of items in the collection.
remove(name)
Remove an item by its key.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Identity key of the item to remove. |
required |
clear()
Remove every item, then mark the parent datablock dirty.
Layers dirty-marking on :meth:CollectionBase.clear, mirroring
how :meth:add layers it on the base insert.
keys()
Yield keys for all items in insertion order.
values()
Yield items in insertion order.
items()
Yield (key, item) pairs in insertion order.
from_cif(block)
Populate this collection from a CIF block.
add(item)
Insert or replace a pre-built item into the collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
item
|
object
|
A |
required |
create(**kwargs)
Create a new item with the given attributes and add it.
A default instance of the collection's item type is created,
then each keyword argument is applied via setattr.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**kwargs
|
object
|
Attribute names and values for the new item. |
{}
|
fit_data_arrays()
Return arrays needed to draw the fit-data chart.
PdTofData()
Bragg powder TOF data collection.
Methods:
| Name | Description |
|---|---|
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print a summary of public attributes and contained items. |
__getitem__ |
Return an item by name or positional index. |
__setitem__ |
Insert or replace an item under the given identity key. |
__delitem__ |
Delete an item by key or raise |
__contains__ |
Check whether an item with the given key exists. |
__iter__ |
Iterate over items in insertion order. |
__len__ |
Return the number of items in the collection. |
remove |
Remove an item by its key. |
clear |
Remove every item, then mark the parent datablock dirty. |
keys |
Yield keys for all items in insertion order. |
values |
Yield items in insertion order. |
items |
Yield |
from_cif |
Populate this collection from a CIF block. |
add |
Insert or replace a pre-built item into the collection. |
create |
Create a new item with the given attributes and add it. |
fit_data_arrays |
Return arrays needed to draw the fit-data chart. |
Attributes:
| Name | Type | Description |
|---|---|---|
time_of_flight |
np.ndarray
|
Get TOF values for data points included in calculations. |
x_descriptor |
NumericDescriptor
|
Descriptor that owns the TOF x-axis metadata. |
x |
np.ndarray
|
Alias for time_of_flight. |
unfiltered_x |
np.ndarray
|
Get the TOF values for all data points in this collection. |
unique_name |
str | None
|
Return None; collections have no unique name. |
parameters |
list
|
All parameters from all items in this collection. |
as_cif |
str
|
Return CIF representation of this object. |
names |
list[str | None]
|
List of all item keys in the collection. |
scalar_descriptors |
list
|
Collection-level descriptors serialized outside the loop. |
calc_status |
np.ndarray
|
Refinement-status flags for each data point as an array. |
d_spacing |
np.ndarray
|
D-spacing values for active (non-excluded) data points. |
intensity_meas |
np.ndarray
|
Measured intensities for active data points. |
intensity_meas_su |
np.ndarray
|
Standard uncertainties of the measured intensities. |
intensity_calc |
np.ndarray
|
Calculated intensities for active data points. |
intensity_bkg |
np.ndarray
|
Background intensities for active data points. |
time_of_flight
property
Get TOF values for data points included in calculations.
x_descriptor
property
Descriptor that owns the TOF x-axis metadata.
x
property
Alias for time_of_flight.
unfiltered_x
property
Get the TOF values for all data points in this collection.
unique_name
property
Return None; collections have no unique name.
parameters
property
All parameters from all items in this collection.
as_cif
property
Return CIF representation of this object.
names
property
List of all item keys in the collection.
scalar_descriptors
property
Collection-level descriptors serialized outside the loop.
calc_status
property
Refinement-status flags for each data point as an array.
d_spacing
property
D-spacing values for active (non-excluded) data points.
intensity_meas
property
Measured intensities for active data points.
intensity_meas_su
property
Standard uncertainties of the measured intensities.
Values smaller than 0.0001 are replaced with 1.0 to prevent fitting failures.
intensity_calc
property
Calculated intensities for active data points.
intensity_bkg
property
Background intensities for active data points.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print a summary of public attributes and contained items.
__getitem__(key)
Return an item by name or positional index.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key
|
str | int
|
Identity key (str) or zero-based positional index (int). |
required |
Returns:
| Type | Description |
|---|---|
GuardedBase
|
The item matching the given key or index. |
Raises:
| Type | Description |
|---|---|
TypeError
|
If key is neither |
__setitem__(name, item)
Insert or replace an item under the given identity key.
__delitem__(name)
Delete an item by key or raise KeyError if missing.
__contains__(name)
Check whether an item with the given key exists.
__iter__()
Iterate over items in insertion order.
__len__()
Return the number of items in the collection.
remove(name)
Remove an item by its key.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Identity key of the item to remove. |
required |
clear()
Remove every item, then mark the parent datablock dirty.
Layers dirty-marking on :meth:CollectionBase.clear, mirroring
how :meth:add layers it on the base insert.
keys()
Yield keys for all items in insertion order.
values()
Yield items in insertion order.
items()
Yield (key, item) pairs in insertion order.
from_cif(block)
Populate this collection from a CIF block.
add(item)
Insert or replace a pre-built item into the collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
item
|
object
|
A |
required |
create(**kwargs)
Create a new item with the given attributes and add it.
A default instance of the collection's item type is created,
then each keyword argument is applied via setattr.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**kwargs
|
object
|
Attribute names and values for the new item. |
{}
|
fit_data_arrays()
Return arrays needed to draw the fit-data chart.
factory
Data collection factory — delegates to FactoryBase.
Classes:
| Name | Description |
|---|---|
DataFactory |
Factory for creating diffraction data collections. |
DataFactory
Factory for creating diffraction data collections.
Methods:
| Name | Description |
|---|---|
__init_subclass__ |
Give each subclass its own independent registry and rules. |
register |
Class decorator to register a concrete class. |
supported_tags |
Return list of all supported tags. |
default_tag |
Resolve the default tag for a given experimental context. |
create |
Instantiate a registered class by tag. |
create_default_for |
Instantiate the default class for a given context. |
supported_for |
Return classes matching conditions and/or calculator. |
show_supported |
Pretty-print a table of supported types. |
__init_subclass__(**kwargs)
Give each subclass its own independent registry and rules.
register(klass)
classmethod
Class decorator to register a concrete class.
Usage::
@SomeFactory.register class MyClass(SomeBase): type_info = TypeInfo(...)
Returns the class unmodified.
supported_tags()
classmethod
Return list of all supported tags.
default_tag(**conditions)
classmethod
Resolve the default tag for a given experimental context.
Uses largest-subset matching: the rule whose key is the
biggest subset of the given conditions wins. A rule with an
empty key (frozenset()) acts as a universal fallback.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**conditions
|
object
|
Experimental-axis values, e.g.
|
{}
|
Returns:
| Type | Description |
|---|---|
str
|
The resolved default tag string. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If no rule matches the given conditions. |
create(tag, **kwargs)
classmethod
Instantiate a registered class by tag.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag
|
str
|
|
required |
**kwargs
|
object
|
Forwarded to the class constructor. |
{}
|
Returns:
| Type | Description |
|---|---|
object
|
A new instance of the registered class. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If tag is not in the registry. |
create_default_for(**conditions)
classmethod
Instantiate the default class for a given context.
Combines default_tag(**conditions) with create(tag).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**conditions
|
object
|
Experimental-axis values. |
{}
|
Returns:
| Type | Description |
|---|---|
object
|
A new instance of the default class. |
supported_for(*, calculator=None, sample_form=None, scattering_type=None, beam_mode=None, radiation_probe=None)
classmethod
Return classes matching conditions and/or calculator.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
calculator
|
object
|
Optional |
None
|
sample_form
|
object
|
Optional |
None
|
scattering_type
|
object
|
Optional |
None
|
beam_mode
|
object
|
Optional |
None
|
radiation_probe
|
object
|
Optional |
None
|
Returns:
| Type | Description |
|---|---|
list[type]
|
Classes matching the given conditions. |
show_supported(*, calculator=None, sample_form=None, scattering_type=None, beam_mode=None, radiation_probe=None)
classmethod
Pretty-print a table of supported types.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
calculator
|
object
|
Optional |
None
|
sample_form
|
object
|
Optional |
None
|
scattering_type
|
object
|
Optional |
None
|
beam_mode
|
object
|
Optional |
None
|
radiation_probe
|
object
|
Optional |
None
|
total_pd
Data categories for total scattering (PDF) experiments.
Classes:
| Name | Description |
|---|---|
TotalDataPoint |
Total scattering (PDF) data point in r-space (real space). |
TotalDataBase |
Base class for total scattering data collections. |
TotalData |
Total scattering (PDF) data collection in r-space. |
TotalDataPoint()
Total scattering (PDF) data point in r-space (real space).
Note: PDF data is always in r-space regardless of whether the original measurement was CWL or TOF.
Methods:
| Name | Description |
|---|---|
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print parameters, other properties, and methods. |
from_cif |
Populate this item from a CIF block. |
Attributes:
| Name | Type | Description |
|---|---|---|
id |
StringDescriptor
|
Identifier for this data point in the dataset. |
r |
NumericDescriptor
|
Interatomic distance in real space (Å). |
g_r_meas |
NumericDescriptor
|
Measured pair distribution function G(r). |
g_r_meas_su |
NumericDescriptor
|
Standard uncertainty of measured G(r). |
g_r_calc |
NumericDescriptor
|
Calculated pair distribution function G(r). |
calc_status |
StringDescriptor
|
Status code of the data point in calculation. |
unique_name |
str
|
Fully qualified name: datablock, category, entry. |
parameters |
list
|
All GenericDescriptorBase instances on this item. |
as_cif |
str
|
Return CIF representation of this object. |
id
property
Identifier for this data point in the dataset.
Reading this property returns the underlying
StringDescriptor object.
r
property
Interatomic distance in real space (Å).
Reading this property returns the underlying
NumericDescriptor object.
g_r_meas
property
Measured pair distribution function G(r).
Reading this property returns the underlying
NumericDescriptor object.
g_r_meas_su
property
Standard uncertainty of measured G(r).
Reading this property returns the underlying
NumericDescriptor object.
g_r_calc
property
Calculated pair distribution function G(r).
Reading this property returns the underlying
NumericDescriptor object.
calc_status
property
Status code of the data point in calculation.
Reading this property returns the underlying
StringDescriptor object.
unique_name
property
Fully qualified name: datablock, category, entry.
parameters
property
All GenericDescriptorBase instances on this item.
as_cif
property
Return CIF representation of this object.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print parameters, other properties, and methods.
from_cif(block, idx=0)
Populate this item from a CIF block.
TotalDataBase(item_type)
Base class for total scattering data collections.
Methods:
| Name | Description |
|---|---|
fit_data_arrays |
Return arrays needed to draw the fit-data chart. |
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print a summary of public attributes and contained items. |
__getitem__ |
Return an item by name or positional index. |
__setitem__ |
Insert or replace an item under the given identity key. |
__delitem__ |
Delete an item by key or raise |
__contains__ |
Check whether an item with the given key exists. |
__iter__ |
Iterate over items in insertion order. |
__len__ |
Return the number of items in the collection. |
remove |
Remove an item by its key. |
clear |
Remove every item, then mark the parent datablock dirty. |
keys |
Yield keys for all items in insertion order. |
values |
Yield items in insertion order. |
items |
Yield |
from_cif |
Populate this collection from a CIF block. |
add |
Insert or replace a pre-built item into the collection. |
create |
Create a new item with the given attributes and add it. |
Attributes:
| Name | Type | Description |
|---|---|---|
calc_status |
np.ndarray
|
Refinement-status flags for each data point as an array. |
intensity_meas |
np.ndarray
|
Measured G(r) values for active data points. |
intensity_meas_su |
np.ndarray
|
Standard uncertainties of the measured G(r) values. |
intensity_calc |
np.ndarray
|
Calculated G(r) values for active data points. |
intensity_bkg |
np.ndarray
|
Background is always zero for PDF data. |
unique_name |
str | None
|
Return None; collections have no unique name. |
parameters |
list
|
All parameters from all items in this collection. |
as_cif |
str
|
Return CIF representation of this object. |
names |
list[str | None]
|
List of all item keys in the collection. |
scalar_descriptors |
list
|
Collection-level descriptors serialized outside the loop. |
calc_status
property
Refinement-status flags for each data point as an array.
intensity_meas
property
Measured G(r) values for active data points.
intensity_meas_su
property
Standard uncertainties of the measured G(r) values.
intensity_calc
property
Calculated G(r) values for active data points.
intensity_bkg
property
Background is always zero for PDF data.
unique_name
property
Return None; collections have no unique name.
parameters
property
All parameters from all items in this collection.
as_cif
property
Return CIF representation of this object.
names
property
List of all item keys in the collection.
scalar_descriptors
property
Collection-level descriptors serialized outside the loop.
fit_data_arrays()
Return arrays needed to draw the fit-data chart.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print a summary of public attributes and contained items.
__getitem__(key)
Return an item by name or positional index.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key
|
str | int
|
Identity key (str) or zero-based positional index (int). |
required |
Returns:
| Type | Description |
|---|---|
GuardedBase
|
The item matching the given key or index. |
Raises:
| Type | Description |
|---|---|
TypeError
|
If key is neither |
__setitem__(name, item)
Insert or replace an item under the given identity key.
__delitem__(name)
Delete an item by key or raise KeyError if missing.
__contains__(name)
Check whether an item with the given key exists.
__iter__()
Iterate over items in insertion order.
__len__()
Return the number of items in the collection.
remove(name)
Remove an item by its key.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Identity key of the item to remove. |
required |
clear()
Remove every item, then mark the parent datablock dirty.
Layers dirty-marking on :meth:CollectionBase.clear, mirroring
how :meth:add layers it on the base insert.
keys()
Yield keys for all items in insertion order.
values()
Yield items in insertion order.
items()
Yield (key, item) pairs in insertion order.
from_cif(block)
Populate this collection from a CIF block.
add(item)
Insert or replace a pre-built item into the collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
item
|
object
|
A |
required |
create(**kwargs)
Create a new item with the given attributes and add it.
A default instance of the collection's item type is created,
then each keyword argument is applied via setattr.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**kwargs
|
object
|
Attribute names and values for the new item. |
{}
|
TotalData()
Total scattering (PDF) data collection in r-space.
Note: Works for both CWL and TOF measurements as PDF data is always transformed to r-space.
Methods:
| Name | Description |
|---|---|
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print a summary of public attributes and contained items. |
__getitem__ |
Return an item by name or positional index. |
__setitem__ |
Insert or replace an item under the given identity key. |
__delitem__ |
Delete an item by key or raise |
__contains__ |
Check whether an item with the given key exists. |
__iter__ |
Iterate over items in insertion order. |
__len__ |
Return the number of items in the collection. |
remove |
Remove an item by its key. |
clear |
Remove every item, then mark the parent datablock dirty. |
keys |
Yield keys for all items in insertion order. |
values |
Yield items in insertion order. |
items |
Yield |
from_cif |
Populate this collection from a CIF block. |
add |
Insert or replace a pre-built item into the collection. |
create |
Create a new item with the given attributes and add it. |
fit_data_arrays |
Return arrays needed to draw the fit-data chart. |
Attributes:
| Name | Type | Description |
|---|---|---|
x_descriptor |
NumericDescriptor
|
Descriptor that owns the r-space x-axis metadata. |
x |
np.ndarray
|
Get the r values for data points included in calculations. |
unfiltered_x |
np.ndarray
|
Get the r values for all data points. |
unique_name |
str | None
|
Return None; collections have no unique name. |
parameters |
list
|
All parameters from all items in this collection. |
as_cif |
str
|
Return CIF representation of this object. |
names |
list[str | None]
|
List of all item keys in the collection. |
scalar_descriptors |
list
|
Collection-level descriptors serialized outside the loop. |
calc_status |
np.ndarray
|
Refinement-status flags for each data point as an array. |
intensity_meas |
np.ndarray
|
Measured G(r) values for active data points. |
intensity_meas_su |
np.ndarray
|
Standard uncertainties of the measured G(r) values. |
intensity_calc |
np.ndarray
|
Calculated G(r) values for active data points. |
intensity_bkg |
np.ndarray
|
Background is always zero for PDF data. |
x_descriptor
property
Descriptor that owns the r-space x-axis metadata.
x
property
Get the r values for data points included in calculations.
unfiltered_x
property
Get the r values for all data points.
unique_name
property
Return None; collections have no unique name.
parameters
property
All parameters from all items in this collection.
as_cif
property
Return CIF representation of this object.
names
property
List of all item keys in the collection.
scalar_descriptors
property
Collection-level descriptors serialized outside the loop.
calc_status
property
Refinement-status flags for each data point as an array.
intensity_meas
property
Measured G(r) values for active data points.
intensity_meas_su
property
Standard uncertainties of the measured G(r) values.
intensity_calc
property
Calculated G(r) values for active data points.
intensity_bkg
property
Background is always zero for PDF data.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print a summary of public attributes and contained items.
__getitem__(key)
Return an item by name or positional index.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key
|
str | int
|
Identity key (str) or zero-based positional index (int). |
required |
Returns:
| Type | Description |
|---|---|
GuardedBase
|
The item matching the given key or index. |
Raises:
| Type | Description |
|---|---|
TypeError
|
If key is neither |
__setitem__(name, item)
Insert or replace an item under the given identity key.
__delitem__(name)
Delete an item by key or raise KeyError if missing.
__contains__(name)
Check whether an item with the given key exists.
__iter__()
Iterate over items in insertion order.
__len__()
Return the number of items in the collection.
remove(name)
Remove an item by its key.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Identity key of the item to remove. |
required |
clear()
Remove every item, then mark the parent datablock dirty.
Layers dirty-marking on :meth:CollectionBase.clear, mirroring
how :meth:add layers it on the base insert.
keys()
Yield keys for all items in insertion order.
values()
Yield items in insertion order.
items()
Yield (key, item) pairs in insertion order.
from_cif(block)
Populate this collection from a CIF block.
add(item)
Insert or replace a pre-built item into the collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
item
|
object
|
A |
required |
create(**kwargs)
Create a new item with the given attributes and add it.
A default instance of the collection's item type is created,
then each keyword argument is applied via setattr.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**kwargs
|
object
|
Attribute names and values for the new item. |
{}
|
fit_data_arrays()
Return arrays needed to draw the fit-data chart.
data_range
Data-range categories for CWL/TOF powder and single crystal.
Modules:
| Name | Description |
|---|---|
base |
Data-range category base definition. |
cwl |
Constant-wavelength powder data range (2θ bounds and step). |
factory |
Data-range factory — delegates to |
sc |
Single-crystal data range (sinθ/λ bounds, no profile step). |
tof |
Time-of-flight powder data range (time-of-flight bounds and step). |
Classes
Modules
base
Data-range category base definition.
The data range defines the reciprocal-space region (and, for powder, the profile step) used to build the calculation grid when no measured scan exists. Concrete per-type classes live alongside this module.
Defaults are authored in d-spacing (a fixed, instrument-independent
window) and projected onto each stored axis through the instrument, so a
from_scratch experiment is calculable with no manual setup and the
time-of-flight default — meaningless in absolute microseconds without a
calibration — stays well defined. The shared reciprocal currency is
sinθ/λ = 1/(2·d).
Classes:
| Name | Description |
|---|---|
DataRangeBase |
Base class for data-range category items. |
DataRangeBase()
Base class for data-range category items.
Sets the common category_code shared by the concrete CWL, TOF,
and single-crystal data-range definitions, and projects the default
d-spacing window onto the stored axis whenever a bound is still
unset.
Methods:
| Name | Description |
|---|---|
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print parameters, other properties, and methods. |
from_cif |
Populate this item from a CIF block. |
Attributes:
| Name | Type | Description |
|---|---|---|
unique_name |
str
|
Fully qualified name: datablock, category, entry. |
parameters |
list
|
All GenericDescriptorBase instances on this item. |
as_cif |
str
|
Return CIF representation of this object. |
unique_name
property
Fully qualified name: datablock, category, entry.
parameters
property
All GenericDescriptorBase instances on this item.
as_cif
property
Return CIF representation of this object.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print parameters, other properties, and methods.
from_cif(block, idx=0)
Populate this item from a CIF block.
cwl
Constant-wavelength powder data range (2θ bounds and step).
Classes:
| Name | Description |
|---|---|
CwlPdDataRange |
Constant-wavelength powder calculation range. |
CwlPdDataRange()
Constant-wavelength powder calculation range.
Stores the 2θ window (two_theta_min/two_theta_max) and the
profile step (two_theta_inc). Unset bounds default to NaN
and are filled by projecting the default d-spacing window through
the instrument wavelength.
Methods:
| Name | Description |
|---|---|
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print parameters, other properties, and methods. |
from_cif |
Populate this item from a CIF block. |
Attributes:
| Name | Type | Description |
|---|---|---|
two_theta_min |
NumericDescriptor
|
Lower 2θ bound of the calculation range (deg). |
two_theta_max |
NumericDescriptor
|
Upper 2θ bound of the calculation range (deg). |
two_theta_inc |
NumericDescriptor
|
2θ step between calculation points (deg). |
x_min |
float
|
Lower bound on the active (2θ) axis (deg). |
x_max |
float
|
Upper bound on the active (2θ) axis (deg). |
x_step |
float | None
|
Step on the active (2θ) axis (deg), or None if non-uniform. |
sin_theta_over_lambda_min |
float
|
Lower sinθ/λ bound derived from 2θ_min (Å⁻¹). |
sin_theta_over_lambda_max |
float
|
Upper sinθ/λ bound derived from 2θ_max (Å⁻¹). |
d_spacing_min |
float
|
Smallest d-spacing in the range (at 2θ_max) (Å). |
d_spacing_max |
float
|
Largest d-spacing in the range (at 2θ_min) (Å). |
unique_name |
str
|
Fully qualified name: datablock, category, entry. |
parameters |
list
|
All GenericDescriptorBase instances on this item. |
as_cif |
str
|
Return CIF representation of this object. |
two_theta_min
property
writable
Lower 2θ bound of the calculation range (deg).
Reading this property returns the underlying
NumericDescriptor object, synced to the effective
(measured-derived or stored/default) value. Assigning a number
updates it; assignment is rejected while a measured scan exists.
two_theta_max
property
writable
Upper 2θ bound of the calculation range (deg).
Reading this property returns the underlying
NumericDescriptor object, synced to the effective value.
two_theta_inc
property
writable
2θ step between calculation points (deg).
Reading this property returns the underlying
NumericDescriptor object. Its value is NaN when a
measured but non-uniform scan is present (no representative
step).
x_min
property
Lower bound on the active (2θ) axis (deg).
x_max
property
Upper bound on the active (2θ) axis (deg).
x_step
property
Step on the active (2θ) axis (deg), or None if non-uniform.
sin_theta_over_lambda_min
property
Lower sinθ/λ bound derived from 2θ_min (Å⁻¹).
sin_theta_over_lambda_max
property
Upper sinθ/λ bound derived from 2θ_max (Å⁻¹).
d_spacing_min
property
Smallest d-spacing in the range (at 2θ_max) (Å).
d_spacing_max
property
Largest d-spacing in the range (at 2θ_min) (Å).
unique_name
property
Fully qualified name: datablock, category, entry.
parameters
property
All GenericDescriptorBase instances on this item.
as_cif
property
Return CIF representation of this object.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print parameters, other properties, and methods.
from_cif(block, idx=0)
Populate this item from a CIF block.
factory
Data-range factory — delegates to FactoryBase.
Classes:
| Name | Description |
|---|---|
DataRangeFactory |
Create data-range instances for supported experiment types. |
DataRangeFactory
Create data-range instances for supported experiment types.
Methods:
| Name | Description |
|---|---|
__init_subclass__ |
Give each subclass its own independent registry and rules. |
register |
Class decorator to register a concrete class. |
supported_tags |
Return list of all supported tags. |
default_tag |
Resolve the default tag for a given experimental context. |
create |
Instantiate a registered class by tag. |
create_default_for |
Instantiate the default class for a given context. |
supported_for |
Return classes matching conditions and/or calculator. |
show_supported |
Pretty-print a table of supported types. |
__init_subclass__(**kwargs)
Give each subclass its own independent registry and rules.
register(klass)
classmethod
Class decorator to register a concrete class.
Usage::
@SomeFactory.register class MyClass(SomeBase): type_info = TypeInfo(...)
Returns the class unmodified.
supported_tags()
classmethod
Return list of all supported tags.
default_tag(**conditions)
classmethod
Resolve the default tag for a given experimental context.
Uses largest-subset matching: the rule whose key is the
biggest subset of the given conditions wins. A rule with an
empty key (frozenset()) acts as a universal fallback.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**conditions
|
object
|
Experimental-axis values, e.g.
|
{}
|
Returns:
| Type | Description |
|---|---|
str
|
The resolved default tag string. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If no rule matches the given conditions. |
create(tag, **kwargs)
classmethod
Instantiate a registered class by tag.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag
|
str
|
|
required |
**kwargs
|
object
|
Forwarded to the class constructor. |
{}
|
Returns:
| Type | Description |
|---|---|
object
|
A new instance of the registered class. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If tag is not in the registry. |
create_default_for(**conditions)
classmethod
Instantiate the default class for a given context.
Combines default_tag(**conditions) with create(tag).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**conditions
|
object
|
Experimental-axis values. |
{}
|
Returns:
| Type | Description |
|---|---|
object
|
A new instance of the default class. |
supported_for(*, calculator=None, sample_form=None, scattering_type=None, beam_mode=None, radiation_probe=None)
classmethod
Return classes matching conditions and/or calculator.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
calculator
|
object
|
Optional |
None
|
sample_form
|
object
|
Optional |
None
|
scattering_type
|
object
|
Optional |
None
|
beam_mode
|
object
|
Optional |
None
|
radiation_probe
|
object
|
Optional |
None
|
Returns:
| Type | Description |
|---|---|
list[type]
|
Classes matching the given conditions. |
show_supported(*, calculator=None, sample_form=None, scattering_type=None, beam_mode=None, radiation_probe=None)
classmethod
Pretty-print a table of supported types.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
calculator
|
object
|
Optional |
None
|
sample_form
|
object
|
Optional |
None
|
scattering_type
|
object
|
Optional |
None
|
beam_mode
|
object
|
Optional |
None
|
radiation_probe
|
object
|
Optional |
None
|
sc
Single-crystal data range (sinθ/λ bounds, no profile step).
Classes:
| Name | Description |
|---|---|
ScDataRange |
Single-crystal calculation range in reciprocal coordinates. |
ScDataRange()
Single-crystal calculation range in reciprocal coordinates.
Single-crystal data has no measurement axis, so sinθ/λ is the stored
truth. Bounds (sin_theta_over_lambda_min/_max) limit
reflection generation; there is no profile step. Unset bounds
default to NaN and are filled from the default d-spacing window
(sinθ/λ = 1/(2·d), instrument-independent).
Methods:
| Name | Description |
|---|---|
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print parameters, other properties, and methods. |
from_cif |
Populate this item from a CIF block. |
Attributes:
| Name | Type | Description |
|---|---|---|
sin_theta_over_lambda_min |
NumericDescriptor
|
Lower sinθ/λ bound of the calculation range (Å⁻¹). |
sin_theta_over_lambda_max |
NumericDescriptor
|
Upper sinθ/λ bound of the calculation range (Å⁻¹). |
x_min |
float
|
Lower bound on the active (sinθ/λ) axis (Å⁻¹). |
x_max |
float
|
Upper bound on the active (sinθ/λ) axis (Å⁻¹). |
x_step |
None
|
Single-crystal data has no profile step. |
d_spacing_min |
float
|
Smallest d-spacing in the range (at sinθ/λ_max) (Å). |
d_spacing_max |
float
|
Largest d-spacing in the range (at sinθ/λ_min) (Å). |
unique_name |
str
|
Fully qualified name: datablock, category, entry. |
parameters |
list
|
All GenericDescriptorBase instances on this item. |
as_cif |
str
|
Return CIF representation of this object. |
sin_theta_over_lambda_min
property
writable
Lower sinθ/λ bound of the calculation range (Å⁻¹).
Reading this property returns the underlying
NumericDescriptor object, synced to the effective
(measured-derived or stored/default) value.
sin_theta_over_lambda_max
property
writable
Upper sinθ/λ bound of the calculation range (Å⁻¹).
Reading this property returns the underlying
NumericDescriptor object, synced to the effective value.
x_min
property
Lower bound on the active (sinθ/λ) axis (Å⁻¹).
x_max
property
Upper bound on the active (sinθ/λ) axis (Å⁻¹).
x_step
property
Single-crystal data has no profile step.
d_spacing_min
property
Smallest d-spacing in the range (at sinθ/λ_max) (Å).
d_spacing_max
property
Largest d-spacing in the range (at sinθ/λ_min) (Å).
unique_name
property
Fully qualified name: datablock, category, entry.
parameters
property
All GenericDescriptorBase instances on this item.
as_cif
property
Return CIF representation of this object.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print parameters, other properties, and methods.
from_cif(block, idx=0)
Populate this item from a CIF block.
tof
Time-of-flight powder data range (time-of-flight bounds and step).
Classes:
| Name | Description |
|---|---|
TofPdDataRange |
Time-of-flight powder calculation range. |
TofPdDataRange()
Time-of-flight powder calculation range.
Stores the time-of-flight window
(time_of_flight_min/time_of_flight_max) and the profile step
(time_of_flight_inc). Unset bounds default to NaN and are
filled by projecting the default d-spacing window through the
instrument TOF calibration.
Methods:
| Name | Description |
|---|---|
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print parameters, other properties, and methods. |
from_cif |
Populate this item from a CIF block. |
Attributes:
| Name | Type | Description |
|---|---|---|
time_of_flight_min |
NumericDescriptor
|
Lower time-of-flight bound of the calculation range (μs). |
time_of_flight_max |
NumericDescriptor
|
Upper time-of-flight bound of the calculation range (μs). |
time_of_flight_inc |
NumericDescriptor
|
Time-of-flight step between calculation points (μs). |
x_min |
float
|
Lower bound on the active (time-of-flight) axis (μs). |
x_max |
float
|
Upper bound on the active (time-of-flight) axis (μs). |
x_step |
float | None
|
Step on the active (TOF) axis (μs), or None if non-uniform. |
d_spacing_min |
float
|
Smallest d-spacing in the range (at TOF_min) (Å). |
d_spacing_max |
float
|
Largest d-spacing in the range (at TOF_max) (Å). |
sin_theta_over_lambda_min |
float
|
Lower sinθ/λ bound derived from the largest d-spacing (Å⁻¹). |
sin_theta_over_lambda_max |
float
|
Upper sinθ/λ bound derived from the smallest d-spacing (Å⁻¹). |
unique_name |
str
|
Fully qualified name: datablock, category, entry. |
parameters |
list
|
All GenericDescriptorBase instances on this item. |
as_cif |
str
|
Return CIF representation of this object. |
time_of_flight_min
property
writable
Lower time-of-flight bound of the calculation range (μs).
Reading this property returns the underlying
NumericDescriptor object, synced to the effective
(measured-derived or stored/default) value.
time_of_flight_max
property
writable
Upper time-of-flight bound of the calculation range (μs).
Reading this property returns the underlying
NumericDescriptor object, synced to the effective value.
time_of_flight_inc
property
writable
Time-of-flight step between calculation points (μs).
Reading this property returns the underlying
NumericDescriptor object. Its value is NaN when a
measured but non-uniform scan is present.
x_min
property
Lower bound on the active (time-of-flight) axis (μs).
x_max
property
Upper bound on the active (time-of-flight) axis (μs).
x_step
property
Step on the active (TOF) axis (μs), or None if non-uniform.
d_spacing_min
property
Smallest d-spacing in the range (at TOF_min) (Å).
d_spacing_max
property
Largest d-spacing in the range (at TOF_max) (Å).
sin_theta_over_lambda_min
property
Lower sinθ/λ bound derived from the largest d-spacing (Å⁻¹).
sin_theta_over_lambda_max
property
Upper sinθ/λ bound derived from the smallest d-spacing (Å⁻¹).
unique_name
property
Fully qualified name: datablock, category, entry.
parameters
property
All GenericDescriptorBase instances on this item.
as_cif
property
Return CIF representation of this object.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print parameters, other properties, and methods.
from_cif(block, idx=0)
Populate this item from a CIF block.
diffrn
Ambient diffraction conditions category for experiments.
Modules:
| Name | Description |
|---|---|
default |
Default diffraction ambient-conditions category. |
factory |
Factory for diffraction ambient-conditions categories. |
Classes
Modules
default
Default diffraction ambient-conditions category.
Classes:
| Name | Description |
|---|---|
DefaultDiffrn |
Ambient conditions recorded during diffraction measurement. |
DefaultDiffrn()
Ambient conditions recorded during diffraction measurement.
Methods:
| Name | Description |
|---|---|
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print parameters, other properties, and methods. |
from_cif |
Populate this item from a CIF block. |
Attributes:
| Name | Type | Description |
|---|---|---|
ambient_temperature |
NumericDescriptor
|
Mean temperature during measurement (K). |
ambient_pressure |
NumericDescriptor
|
Mean hydrostatic pressure during measurement (kPa). |
ambient_magnetic_field |
NumericDescriptor
|
Mean magnetic field during measurement (T). |
ambient_electric_field |
NumericDescriptor
|
Mean electric field during measurement (V/m). |
unique_name |
str
|
Fully qualified name: datablock, category, entry. |
parameters |
list
|
All GenericDescriptorBase instances on this item. |
as_cif |
str
|
Return CIF representation of this object. |
ambient_temperature
property
writable
Mean temperature during measurement (K).
Reading this property returns the underlying
NumericDescriptor object. Assigning to it updates the value.
ambient_pressure
property
writable
Mean hydrostatic pressure during measurement (kPa).
Reading this property returns the underlying
NumericDescriptor object. Assigning to it updates the value.
ambient_magnetic_field
property
writable
Mean magnetic field during measurement (T).
Reading this property returns the underlying
NumericDescriptor object. Assigning to it updates the value.
ambient_electric_field
property
writable
Mean electric field during measurement (V/m).
Reading this property returns the underlying
NumericDescriptor object. Assigning to it updates the value.
unique_name
property
Fully qualified name: datablock, category, entry.
parameters
property
All GenericDescriptorBase instances on this item.
as_cif
property
Return CIF representation of this object.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print parameters, other properties, and methods.
from_cif(block, idx=0)
Populate this item from a CIF block.
factory
Factory for diffraction ambient-conditions categories.
Classes:
| Name | Description |
|---|---|
DiffrnFactory |
Create diffraction ambient-conditions category instances. |
DiffrnFactory
Create diffraction ambient-conditions category instances.
Methods:
| Name | Description |
|---|---|
__init_subclass__ |
Give each subclass its own independent registry and rules. |
register |
Class decorator to register a concrete class. |
supported_tags |
Return list of all supported tags. |
default_tag |
Resolve the default tag for a given experimental context. |
create |
Instantiate a registered class by tag. |
create_default_for |
Instantiate the default class for a given context. |
supported_for |
Return classes matching conditions and/or calculator. |
show_supported |
Pretty-print a table of supported types. |
__init_subclass__(**kwargs)
Give each subclass its own independent registry and rules.
register(klass)
classmethod
Class decorator to register a concrete class.
Usage::
@SomeFactory.register class MyClass(SomeBase): type_info = TypeInfo(...)
Returns the class unmodified.
supported_tags()
classmethod
Return list of all supported tags.
default_tag(**conditions)
classmethod
Resolve the default tag for a given experimental context.
Uses largest-subset matching: the rule whose key is the
biggest subset of the given conditions wins. A rule with an
empty key (frozenset()) acts as a universal fallback.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**conditions
|
object
|
Experimental-axis values, e.g.
|
{}
|
Returns:
| Type | Description |
|---|---|
str
|
The resolved default tag string. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If no rule matches the given conditions. |
create(tag, **kwargs)
classmethod
Instantiate a registered class by tag.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag
|
str
|
|
required |
**kwargs
|
object
|
Forwarded to the class constructor. |
{}
|
Returns:
| Type | Description |
|---|---|
object
|
A new instance of the registered class. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If tag is not in the registry. |
create_default_for(**conditions)
classmethod
Instantiate the default class for a given context.
Combines default_tag(**conditions) with create(tag).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**conditions
|
object
|
Experimental-axis values. |
{}
|
Returns:
| Type | Description |
|---|---|
object
|
A new instance of the default class. |
supported_for(*, calculator=None, sample_form=None, scattering_type=None, beam_mode=None, radiation_probe=None)
classmethod
Return classes matching conditions and/or calculator.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
calculator
|
object
|
Optional |
None
|
sample_form
|
object
|
Optional |
None
|
scattering_type
|
object
|
Optional |
None
|
beam_mode
|
object
|
Optional |
None
|
radiation_probe
|
object
|
Optional |
None
|
Returns:
| Type | Description |
|---|---|
list[type]
|
Classes matching the given conditions. |
show_supported(*, calculator=None, sample_form=None, scattering_type=None, beam_mode=None, radiation_probe=None)
classmethod
Pretty-print a table of supported types.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
calculator
|
object
|
Optional |
None
|
sample_form
|
object
|
Optional |
None
|
scattering_type
|
object
|
Optional |
None
|
beam_mode
|
object
|
Optional |
None
|
radiation_probe
|
object
|
Optional |
None
|
excluded_regions
Excluded data regions to omit from pattern fitting.
Modules:
| Name | Description |
|---|---|
default |
Exclude ranges of x from fitting/plotting (masked regions). |
factory |
Excluded-regions factory — delegates entirely to |
Classes
Modules
default
Exclude ranges of x from fitting/plotting (masked regions).
Classes:
| Name | Description |
|---|---|
ExcludedRegion |
Closed interval [start, end] to be excluded. |
ExcludedRegions |
Collection of ExcludedRegion instances. |
ExcludedRegion()
Closed interval [start, end] to be excluded.
Methods:
| Name | Description |
|---|---|
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print parameters, other properties, and methods. |
from_cif |
Populate this item from a CIF block. |
Attributes:
| Name | Type | Description |
|---|---|---|
id |
StringDescriptor
|
Identifier for this excluded region. |
start |
NumericDescriptor
|
Start of the excluded region. |
end |
NumericDescriptor
|
End of the excluded region. |
unique_name |
str
|
Fully qualified name: datablock, category, entry. |
parameters |
list
|
All GenericDescriptorBase instances on this item. |
as_cif |
str
|
Return CIF representation of this object. |
id
property
writable
Identifier for this excluded region.
Reading this property returns the underlying
StringDescriptor object. Assigning to it updates the
parameter value.
start
property
writable
Start of the excluded region.
Reading this property returns the underlying
NumericDescriptor object. Assigning to it updates the
parameter value.
end
property
writable
End of the excluded region.
Reading this property returns the underlying
NumericDescriptor object. Assigning to it updates the
parameter value.
unique_name
property
Fully qualified name: datablock, category, entry.
parameters
property
All GenericDescriptorBase instances on this item.
as_cif
property
Return CIF representation of this object.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print parameters, other properties, and methods.
from_cif(block, idx=0)
Populate this item from a CIF block.
ExcludedRegions()
Collection of ExcludedRegion instances.
Excluded regions define closed intervals [start, end] on the x-axis that are to be excluded from calculations and, as a result, from fitting and plotting.
Methods:
| Name | Description |
|---|---|
show |
Print a table of excluded [start, end] intervals. |
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print a summary of public attributes and contained items. |
__getitem__ |
Return an item by name or positional index. |
__setitem__ |
Insert or replace an item under the given identity key. |
__delitem__ |
Delete an item by key or raise |
__contains__ |
Check whether an item with the given key exists. |
__iter__ |
Iterate over items in insertion order. |
__len__ |
Return the number of items in the collection. |
remove |
Remove an item by its key. |
clear |
Remove every item, then mark the parent datablock dirty. |
keys |
Yield keys for all items in insertion order. |
values |
Yield items in insertion order. |
items |
Yield |
from_cif |
Populate this collection from a CIF block. |
add |
Insert or replace a pre-built item into the collection. |
create |
Create a new item with the given attributes and add it. |
Attributes:
| Name | Type | Description |
|---|---|---|
unique_name |
str | None
|
Return None; collections have no unique name. |
parameters |
list
|
All parameters from all items in this collection. |
as_cif |
str
|
Return CIF representation of this object. |
names |
list[str | None]
|
List of all item keys in the collection. |
scalar_descriptors |
list
|
Collection-level descriptors serialized outside the loop. |
unique_name
property
Return None; collections have no unique name.
parameters
property
All parameters from all items in this collection.
as_cif
property
Return CIF representation of this object.
names
property
List of all item keys in the collection.
scalar_descriptors
property
Collection-level descriptors serialized outside the loop.
show()
Print a table of excluded [start, end] intervals.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print a summary of public attributes and contained items.
__getitem__(key)
Return an item by name or positional index.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key
|
str | int
|
Identity key (str) or zero-based positional index (int). |
required |
Returns:
| Type | Description |
|---|---|
GuardedBase
|
The item matching the given key or index. |
Raises:
| Type | Description |
|---|---|
TypeError
|
If key is neither |
__setitem__(name, item)
Insert or replace an item under the given identity key.
__delitem__(name)
Delete an item by key or raise KeyError if missing.
__contains__(name)
Check whether an item with the given key exists.
__iter__()
Iterate over items in insertion order.
__len__()
Return the number of items in the collection.
remove(name)
Remove an item by its key.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Identity key of the item to remove. |
required |
clear()
Remove every item, then mark the parent datablock dirty.
Layers dirty-marking on :meth:CollectionBase.clear, mirroring
how :meth:add layers it on the base insert.
keys()
Yield keys for all items in insertion order.
values()
Yield items in insertion order.
items()
Yield (key, item) pairs in insertion order.
from_cif(block)
Populate this collection from a CIF block.
add(item)
Insert or replace a pre-built item into the collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
item
|
object
|
A |
required |
create(**kwargs)
Create a new item with the given attributes and add it.
A default instance of the collection's item type is created,
then each keyword argument is applied via setattr.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**kwargs
|
object
|
Attribute names and values for the new item. |
{}
|
factory
Excluded-regions factory — delegates entirely to FactoryBase.
Classes:
| Name | Description |
|---|---|
ExcludedRegionsFactory |
Create excluded-regions collections by tag. |
ExcludedRegionsFactory
Create excluded-regions collections by tag.
Methods:
| Name | Description |
|---|---|
__init_subclass__ |
Give each subclass its own independent registry and rules. |
register |
Class decorator to register a concrete class. |
supported_tags |
Return list of all supported tags. |
default_tag |
Resolve the default tag for a given experimental context. |
create |
Instantiate a registered class by tag. |
create_default_for |
Instantiate the default class for a given context. |
supported_for |
Return classes matching conditions and/or calculator. |
show_supported |
Pretty-print a table of supported types. |
__init_subclass__(**kwargs)
Give each subclass its own independent registry and rules.
register(klass)
classmethod
Class decorator to register a concrete class.
Usage::
@SomeFactory.register class MyClass(SomeBase): type_info = TypeInfo(...)
Returns the class unmodified.
supported_tags()
classmethod
Return list of all supported tags.
default_tag(**conditions)
classmethod
Resolve the default tag for a given experimental context.
Uses largest-subset matching: the rule whose key is the
biggest subset of the given conditions wins. A rule with an
empty key (frozenset()) acts as a universal fallback.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**conditions
|
object
|
Experimental-axis values, e.g.
|
{}
|
Returns:
| Type | Description |
|---|---|
str
|
The resolved default tag string. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If no rule matches the given conditions. |
create(tag, **kwargs)
classmethod
Instantiate a registered class by tag.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag
|
str
|
|
required |
**kwargs
|
object
|
Forwarded to the class constructor. |
{}
|
Returns:
| Type | Description |
|---|---|
object
|
A new instance of the registered class. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If tag is not in the registry. |
create_default_for(**conditions)
classmethod
Instantiate the default class for a given context.
Combines default_tag(**conditions) with create(tag).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**conditions
|
object
|
Experimental-axis values. |
{}
|
Returns:
| Type | Description |
|---|---|
object
|
A new instance of the default class. |
supported_for(*, calculator=None, sample_form=None, scattering_type=None, beam_mode=None, radiation_probe=None)
classmethod
Return classes matching conditions and/or calculator.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
calculator
|
object
|
Optional |
None
|
sample_form
|
object
|
Optional |
None
|
scattering_type
|
object
|
Optional |
None
|
beam_mode
|
object
|
Optional |
None
|
radiation_probe
|
object
|
Optional |
None
|
Returns:
| Type | Description |
|---|---|
list[type]
|
Classes matching the given conditions. |
show_supported(*, calculator=None, sample_form=None, scattering_type=None, beam_mode=None, radiation_probe=None)
classmethod
Pretty-print a table of supported types.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
calculator
|
object
|
Optional |
None
|
sample_form
|
object
|
Optional |
None
|
scattering_type
|
object
|
Optional |
None
|
beam_mode
|
object
|
Optional |
None
|
radiation_probe
|
object
|
Optional |
None
|
experiment_type
Experiment type category defining the diffraction axes.
Modules:
| Name | Description |
|---|---|
default |
Experiment type descriptor (form, beam, probe, scattering). |
factory |
Experiment-type factory — delegates entirely to |
Classes
Modules
default
Experiment type descriptor (form, beam, probe, scattering).
This lightweight container stores the categorical attributes defining an
experiment configuration and handles CIF serialization via TagSpec.
Classes:
| Name | Description |
|---|---|
ExperimentType |
Container of attributes defining the experiment type. |
ExperimentType()
Container of attributes defining the experiment type.
Methods:
| Name | Description |
|---|---|
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print parameters, other properties, and methods. |
from_cif |
Populate this item from a CIF block. |
Attributes:
| Name | Type | Description |
|---|---|---|
sample_form |
EnumDescriptor
|
Powder diffraction or single crystal diffraction. |
beam_mode |
EnumDescriptor
|
Constant wavelength (CW) or time-of-flight (TOF) measurement. |
radiation_probe |
EnumDescriptor
|
Neutron or X-ray diffraction measurement. |
scattering_type |
EnumDescriptor
|
Conventional Bragg diffraction or total scattering (PDF). |
unique_name |
str
|
Fully qualified name: datablock, category, entry. |
parameters |
list
|
All GenericDescriptorBase instances on this item. |
as_cif |
str
|
Return CIF representation of this object. |
sample_form
property
Powder diffraction or single crystal diffraction.
Reading this property returns the underlying EnumDescriptor
object.
beam_mode
property
Constant wavelength (CW) or time-of-flight (TOF) measurement.
Reading this property returns the underlying EnumDescriptor
object.
radiation_probe
property
Neutron or X-ray diffraction measurement.
Reading this property returns the underlying EnumDescriptor
object.
scattering_type
property
Conventional Bragg diffraction or total scattering (PDF).
Reading this property returns the underlying EnumDescriptor
object.
unique_name
property
Fully qualified name: datablock, category, entry.
parameters
property
All GenericDescriptorBase instances on this item.
as_cif
property
Return CIF representation of this object.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print parameters, other properties, and methods.
from_cif(block, idx=0)
Populate this item from a CIF block.
factory
Experiment-type factory — delegates entirely to FactoryBase.
Classes:
| Name | Description |
|---|---|
ExperimentTypeFactory |
Create experiment-type descriptors by tag. |
ExperimentTypeFactory
Create experiment-type descriptors by tag.
Methods:
| Name | Description |
|---|---|
__init_subclass__ |
Give each subclass its own independent registry and rules. |
register |
Class decorator to register a concrete class. |
supported_tags |
Return list of all supported tags. |
default_tag |
Resolve the default tag for a given experimental context. |
create |
Instantiate a registered class by tag. |
create_default_for |
Instantiate the default class for a given context. |
supported_for |
Return classes matching conditions and/or calculator. |
show_supported |
Pretty-print a table of supported types. |
__init_subclass__(**kwargs)
Give each subclass its own independent registry and rules.
register(klass)
classmethod
Class decorator to register a concrete class.
Usage::
@SomeFactory.register class MyClass(SomeBase): type_info = TypeInfo(...)
Returns the class unmodified.
supported_tags()
classmethod
Return list of all supported tags.
default_tag(**conditions)
classmethod
Resolve the default tag for a given experimental context.
Uses largest-subset matching: the rule whose key is the
biggest subset of the given conditions wins. A rule with an
empty key (frozenset()) acts as a universal fallback.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**conditions
|
object
|
Experimental-axis values, e.g.
|
{}
|
Returns:
| Type | Description |
|---|---|
str
|
The resolved default tag string. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If no rule matches the given conditions. |
create(tag, **kwargs)
classmethod
Instantiate a registered class by tag.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag
|
str
|
|
required |
**kwargs
|
object
|
Forwarded to the class constructor. |
{}
|
Returns:
| Type | Description |
|---|---|
object
|
A new instance of the registered class. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If tag is not in the registry. |
create_default_for(**conditions)
classmethod
Instantiate the default class for a given context.
Combines default_tag(**conditions) with create(tag).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**conditions
|
object
|
Experimental-axis values. |
{}
|
Returns:
| Type | Description |
|---|---|
object
|
A new instance of the default class. |
supported_for(*, calculator=None, sample_form=None, scattering_type=None, beam_mode=None, radiation_probe=None)
classmethod
Return classes matching conditions and/or calculator.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
calculator
|
object
|
Optional |
None
|
sample_form
|
object
|
Optional |
None
|
scattering_type
|
object
|
Optional |
None
|
beam_mode
|
object
|
Optional |
None
|
radiation_probe
|
object
|
Optional |
None
|
Returns:
| Type | Description |
|---|---|
list[type]
|
Classes matching the given conditions. |
show_supported(*, calculator=None, sample_form=None, scattering_type=None, beam_mode=None, radiation_probe=None)
classmethod
Pretty-print a table of supported types.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
calculator
|
object
|
Optional |
None
|
sample_form
|
object
|
Optional |
None
|
scattering_type
|
object
|
Optional |
None
|
beam_mode
|
object
|
Optional |
None
|
radiation_probe
|
object
|
Optional |
None
|
extinction
Becker-Coppens extinction correction category.
Modules:
| Name | Description |
|---|---|
base |
Base class for extinction correction categories. |
becker_coppens |
Becker-Coppens isotropic extinction correction for single crystals. |
factory |
Extinction factory — delegates entirely to |
Classes
Modules
base
Base class for extinction correction categories.
Classes:
| Name | Description |
|---|---|
ExtinctionBase |
Base class for extinction correction categories. |
ExtinctionBase()
Base class for extinction correction categories.
Methods:
| Name | Description |
|---|---|
show_supported |
Print supported types and mark the active one. |
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print parameters, other properties, and methods. |
from_cif |
Populate this item from a CIF block. |
Attributes:
| Name | Type | Description |
|---|---|---|
type |
str
|
Active factory tag for this category. |
unique_name |
str
|
Fully qualified name: datablock, category, entry. |
parameters |
list
|
All GenericDescriptorBase instances on this item. |
as_cif |
str
|
Return CIF representation of this object. |
type
property
writable
Active factory tag for this category.
unique_name
property
Fully qualified name: datablock, category, entry.
parameters
property
All GenericDescriptorBase instances on this item.
as_cif
property
Return CIF representation of this object.
show_supported()
Print supported types and mark the active one.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print parameters, other properties, and methods.
from_cif(block, idx=0)
Populate this item from a CIF block.
becker_coppens
Becker-Coppens isotropic extinction correction for single crystals.
Classes:
| Name | Description |
|---|---|
BeckerCoppensExtinction |
Becker-Coppens spherical extinction correction for single crystals. |
BeckerCoppensExtinction()
Becker-Coppens spherical extinction correction for single crystals.
Combines primary and secondary extinction into a single correction
factor y = y_p * y_s, following the Becker-Coppens formalism.
The mosaicity distribution for the secondary extinction can be
either Gaussian ('gauss') or Lorentzian ('lorentz').
Parameters are the crystal radius (in μm) and the mosaicity
(in arc-minutes, as expected by CrysPy).
Methods:
| Name | Description |
|---|---|
show_supported |
Print supported types and mark the active one. |
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print parameters, other properties, and methods. |
from_cif |
Populate this item from a CIF block. |
Attributes:
| Name | Type | Description |
|---|---|---|
model |
EnumDescriptor
|
Mosaicity distribution model ( |
mosaicity |
Parameter
|
Mosaicity of the crystal (arcmin). |
radius |
Parameter
|
Mean radius of the crystal (μm). |
type |
str
|
Active factory tag for this category. |
unique_name |
str
|
Fully qualified name: datablock, category, entry. |
parameters |
list
|
All GenericDescriptorBase instances on this item. |
as_cif |
str
|
Return CIF representation of this object. |
model
property
writable
Mosaicity distribution model ('gauss' or 'lorentz').
Reading this property returns the underlying EnumDescriptor
object. Assigning to it updates the descriptor value.
mosaicity
property
writable
Mosaicity of the crystal (arcmin).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
radius
property
writable
Mean radius of the crystal (μm).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
type
property
writable
Active factory tag for this category.
unique_name
property
Fully qualified name: datablock, category, entry.
parameters
property
All GenericDescriptorBase instances on this item.
as_cif
property
Return CIF representation of this object.
show_supported()
Print supported types and mark the active one.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print parameters, other properties, and methods.
from_cif(block, idx=0)
Populate this item from a CIF block.
factory
Extinction factory — delegates entirely to FactoryBase.
Classes:
| Name | Description |
|---|---|
ExtinctionFactory |
Create extinction correction models by tag. |
ExtinctionFactory
Create extinction correction models by tag.
Methods:
| Name | Description |
|---|---|
__init_subclass__ |
Give each subclass its own independent registry and rules. |
register |
Class decorator to register a concrete class. |
supported_tags |
Return list of all supported tags. |
default_tag |
Resolve the default tag for a given experimental context. |
create |
Instantiate a registered class by tag. |
create_default_for |
Instantiate the default class for a given context. |
supported_for |
Return classes matching conditions and/or calculator. |
show_supported |
Pretty-print a table of supported types. |
__init_subclass__(**kwargs)
Give each subclass its own independent registry and rules.
register(klass)
classmethod
Class decorator to register a concrete class.
Usage::
@SomeFactory.register class MyClass(SomeBase): type_info = TypeInfo(...)
Returns the class unmodified.
supported_tags()
classmethod
Return list of all supported tags.
default_tag(**conditions)
classmethod
Resolve the default tag for a given experimental context.
Uses largest-subset matching: the rule whose key is the
biggest subset of the given conditions wins. A rule with an
empty key (frozenset()) acts as a universal fallback.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**conditions
|
object
|
Experimental-axis values, e.g.
|
{}
|
Returns:
| Type | Description |
|---|---|
str
|
The resolved default tag string. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If no rule matches the given conditions. |
create(tag, **kwargs)
classmethod
Instantiate a registered class by tag.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag
|
str
|
|
required |
**kwargs
|
object
|
Forwarded to the class constructor. |
{}
|
Returns:
| Type | Description |
|---|---|
object
|
A new instance of the registered class. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If tag is not in the registry. |
create_default_for(**conditions)
classmethod
Instantiate the default class for a given context.
Combines default_tag(**conditions) with create(tag).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**conditions
|
object
|
Experimental-axis values. |
{}
|
Returns:
| Type | Description |
|---|---|
object
|
A new instance of the default class. |
supported_for(*, calculator=None, sample_form=None, scattering_type=None, beam_mode=None, radiation_probe=None)
classmethod
Return classes matching conditions and/or calculator.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
calculator
|
object
|
Optional |
None
|
sample_form
|
object
|
Optional |
None
|
scattering_type
|
object
|
Optional |
None
|
beam_mode
|
object
|
Optional |
None
|
radiation_probe
|
object
|
Optional |
None
|
Returns:
| Type | Description |
|---|---|
list[type]
|
Classes matching the given conditions. |
show_supported(*, calculator=None, sample_form=None, scattering_type=None, beam_mode=None, radiation_probe=None)
classmethod
Pretty-print a table of supported types.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
calculator
|
object
|
Optional |
None
|
sample_form
|
object
|
Optional |
None
|
scattering_type
|
object
|
Optional |
None
|
beam_mode
|
object
|
Optional |
None
|
radiation_probe
|
object
|
Optional |
None
|
instrument
Instrument categories for CWL and TOF powder and single crystal.
Modules:
| Name | Description |
|---|---|
base |
Instrument category base definitions for CWL/TOF instruments. |
cwl |
Constant-wavelength powder and single-crystal instruments. |
factory |
Instrument factory — delegates to |
tof |
Time-of-flight powder and single-crystal instruments. |
Classes
Modules
base
Instrument category base definitions for CWL/TOF instruments.
This module provides the shared parent used by concrete instrument implementations under the instrument category.
Classes:
| Name | Description |
|---|---|
InstrumentBase |
Base class for instrument category items. |
InstrumentBase()
Base class for instrument category items.
This class sets the common category_code and is used as a base
for concrete CWL/TOF instrument definitions.
Methods:
| Name | Description |
|---|---|
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print parameters, other properties, and methods. |
from_cif |
Populate this item from a CIF block. |
Attributes:
| Name | Type | Description |
|---|---|---|
unique_name |
str
|
Fully qualified name: datablock, category, entry. |
parameters |
list
|
All GenericDescriptorBase instances on this item. |
as_cif |
str
|
Return CIF representation of this object. |
unique_name
property
Fully qualified name: datablock, category, entry.
parameters
property
All GenericDescriptorBase instances on this item.
as_cif
property
Return CIF representation of this object.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print parameters, other properties, and methods.
from_cif(block, idx=0)
Populate this item from a CIF block.
cwl
Constant-wavelength powder and single-crystal instruments.
Classes:
| Name | Description |
|---|---|
CwlInstrumentBase |
Base class for constant-wavelength instruments. |
CwlScInstrument |
CW single-crystal diffractometer. |
CwlPdInstrumentBase |
Base class for CW powder diffractometers. |
CwlPdNeutronInstrument |
CW neutron powder diffractometer. |
CwlPdXrayInstrument |
CW X-ray powder diffractometer. |
CwlInstrumentBase()
Base class for constant-wavelength instruments.
Methods:
| Name | Description |
|---|---|
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print parameters, other properties, and methods. |
from_cif |
Populate this item from a CIF block. |
Attributes:
| Name | Type | Description |
|---|---|---|
setup_wavelength |
Parameter
|
Incident neutron or X-ray wavelength (Å). |
setup_wavelength_2 |
NumericDescriptor
|
Second incident wavelength λ₂ (Å), e.g. the X-ray K-alpha2 line. |
setup_wavelength_2_to_1_ratio |
NumericDescriptor
|
Relative intensity of wavelength_2 to wavelength (I₂/I₁). |
unique_name |
str
|
Fully qualified name: datablock, category, entry. |
parameters |
list
|
All GenericDescriptorBase instances on this item. |
as_cif |
str
|
Return CIF representation of this object. |
setup_wavelength
property
writable
Incident neutron or X-ray wavelength (Å).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
setup_wavelength_2
property
writable
Second incident wavelength λ₂ (Å), e.g. the X-ray K-alpha2 line.
Reading returns the underlying NumericDescriptor; assigning
a number updates its value. Default 0.0 means no second
component (monochromatic). Non-refinable; CrysFML consumes it
when setup_wavelength_2_to_1_ratio is positive.
setup_wavelength_2_to_1_ratio
property
writable
Relative intensity of wavelength_2 to wavelength (I₂/I₁).
The _2_to_1_ ordering names the direction: numerator is the
second component, denominator the first. Range [0, 1];
default 0.0 disables the second component. Non-refinable;
CrysFML consumes it together with setup_wavelength_2.
unique_name
property
Fully qualified name: datablock, category, entry.
parameters
property
All GenericDescriptorBase instances on this item.
as_cif
property
Return CIF representation of this object.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print parameters, other properties, and methods.
from_cif(block, idx=0)
Populate this item from a CIF block.
CwlScInstrument()
CW single-crystal diffractometer.
Methods:
| Name | Description |
|---|---|
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print parameters, other properties, and methods. |
from_cif |
Populate this item from a CIF block. |
Attributes:
| Name | Type | Description |
|---|---|---|
unique_name |
str
|
Fully qualified name: datablock, category, entry. |
parameters |
list
|
All GenericDescriptorBase instances on this item. |
as_cif |
str
|
Return CIF representation of this object. |
setup_wavelength |
Parameter
|
Incident neutron or X-ray wavelength (Å). |
setup_wavelength_2 |
NumericDescriptor
|
Second incident wavelength λ₂ (Å), e.g. the X-ray K-alpha2 line. |
setup_wavelength_2_to_1_ratio |
NumericDescriptor
|
Relative intensity of wavelength_2 to wavelength (I₂/I₁). |
unique_name
property
Fully qualified name: datablock, category, entry.
parameters
property
All GenericDescriptorBase instances on this item.
as_cif
property
Return CIF representation of this object.
setup_wavelength
property
writable
Incident neutron or X-ray wavelength (Å).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
setup_wavelength_2
property
writable
Second incident wavelength λ₂ (Å), e.g. the X-ray K-alpha2 line.
Reading returns the underlying NumericDescriptor; assigning
a number updates its value. Default 0.0 means no second
component (monochromatic). Non-refinable; CrysFML consumes it
when setup_wavelength_2_to_1_ratio is positive.
setup_wavelength_2_to_1_ratio
property
writable
Relative intensity of wavelength_2 to wavelength (I₂/I₁).
The _2_to_1_ ordering names the direction: numerator is the
second component, denominator the first. Range [0, 1];
default 0.0 disables the second component. Non-refinable;
CrysFML consumes it together with setup_wavelength_2.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print parameters, other properties, and methods.
from_cif(block, idx=0)
Populate this item from a CIF block.
CwlPdInstrumentBase()
Base class for CW powder diffractometers.
Methods:
| Name | Description |
|---|---|
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print parameters, other properties, and methods. |
from_cif |
Populate this item from a CIF block. |
Attributes:
| Name | Type | Description |
|---|---|---|
calib_twotheta_offset |
Parameter
|
Instrument misalignment offset (deg). |
calib_sample_displacement |
Parameter
|
Specimen-displacement peak-position correction (deg). |
calib_sample_transparency |
Parameter
|
Sample-transparency peak-position correction (deg). |
unique_name |
str
|
Fully qualified name: datablock, category, entry. |
parameters |
list
|
All GenericDescriptorBase instances on this item. |
as_cif |
str
|
Return CIF representation of this object. |
setup_wavelength |
Parameter
|
Incident neutron or X-ray wavelength (Å). |
setup_wavelength_2 |
NumericDescriptor
|
Second incident wavelength λ₂ (Å), e.g. the X-ray K-alpha2 line. |
setup_wavelength_2_to_1_ratio |
NumericDescriptor
|
Relative intensity of wavelength_2 to wavelength (I₂/I₁). |
calib_twotheta_offset
property
writable
Instrument misalignment offset (deg).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
calib_sample_displacement
property
writable
Specimen-displacement peak-position correction (deg).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
calib_sample_transparency
property
writable
Sample-transparency peak-position correction (deg).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
unique_name
property
Fully qualified name: datablock, category, entry.
parameters
property
All GenericDescriptorBase instances on this item.
as_cif
property
Return CIF representation of this object.
setup_wavelength
property
writable
Incident neutron or X-ray wavelength (Å).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
setup_wavelength_2
property
writable
Second incident wavelength λ₂ (Å), e.g. the X-ray K-alpha2 line.
Reading returns the underlying NumericDescriptor; assigning
a number updates its value. Default 0.0 means no second
component (monochromatic). Non-refinable; CrysFML consumes it
when setup_wavelength_2_to_1_ratio is positive.
setup_wavelength_2_to_1_ratio
property
writable
Relative intensity of wavelength_2 to wavelength (I₂/I₁).
The _2_to_1_ ordering names the direction: numerator is the
second component, denominator the first. Range [0, 1];
default 0.0 disables the second component. Non-refinable;
CrysFML consumes it together with setup_wavelength_2.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print parameters, other properties, and methods.
from_cif(block, idx=0)
Populate this item from a CIF block.
CwlPdNeutronInstrument()
CW neutron powder diffractometer.
Methods:
| Name | Description |
|---|---|
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print parameters, other properties, and methods. |
from_cif |
Populate this item from a CIF block. |
Attributes:
| Name | Type | Description |
|---|---|---|
unique_name |
str
|
Fully qualified name: datablock, category, entry. |
parameters |
list
|
All GenericDescriptorBase instances on this item. |
as_cif |
str
|
Return CIF representation of this object. |
setup_wavelength |
Parameter
|
Incident neutron or X-ray wavelength (Å). |
setup_wavelength_2 |
NumericDescriptor
|
Second incident wavelength λ₂ (Å), e.g. the X-ray K-alpha2 line. |
setup_wavelength_2_to_1_ratio |
NumericDescriptor
|
Relative intensity of wavelength_2 to wavelength (I₂/I₁). |
calib_twotheta_offset |
Parameter
|
Instrument misalignment offset (deg). |
calib_sample_displacement |
Parameter
|
Specimen-displacement peak-position correction (deg). |
calib_sample_transparency |
Parameter
|
Sample-transparency peak-position correction (deg). |
unique_name
property
Fully qualified name: datablock, category, entry.
parameters
property
All GenericDescriptorBase instances on this item.
as_cif
property
Return CIF representation of this object.
setup_wavelength
property
writable
Incident neutron or X-ray wavelength (Å).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
setup_wavelength_2
property
writable
Second incident wavelength λ₂ (Å), e.g. the X-ray K-alpha2 line.
Reading returns the underlying NumericDescriptor; assigning
a number updates its value. Default 0.0 means no second
component (monochromatic). Non-refinable; CrysFML consumes it
when setup_wavelength_2_to_1_ratio is positive.
setup_wavelength_2_to_1_ratio
property
writable
Relative intensity of wavelength_2 to wavelength (I₂/I₁).
The _2_to_1_ ordering names the direction: numerator is the
second component, denominator the first. Range [0, 1];
default 0.0 disables the second component. Non-refinable;
CrysFML consumes it together with setup_wavelength_2.
calib_twotheta_offset
property
writable
Instrument misalignment offset (deg).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
calib_sample_displacement
property
writable
Specimen-displacement peak-position correction (deg).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
calib_sample_transparency
property
writable
Sample-transparency peak-position correction (deg).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print parameters, other properties, and methods.
from_cif(block, idx=0)
Populate this item from a CIF block.
CwlPdXrayInstrument()
CW X-ray powder diffractometer.
Methods:
| Name | Description |
|---|---|
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print parameters, other properties, and methods. |
from_cif |
Populate this item from a CIF block. |
Attributes:
| Name | Type | Description |
|---|---|---|
setup_polarization_coefficient |
NumericDescriptor
|
CW Lorentz-polarization coefficient. |
setup_monochromator_twotheta |
NumericDescriptor
|
Pre-specimen monochromator 2theta angle (deg). |
unique_name |
str
|
Fully qualified name: datablock, category, entry. |
parameters |
list
|
All GenericDescriptorBase instances on this item. |
as_cif |
str
|
Return CIF representation of this object. |
setup_wavelength |
Parameter
|
Incident neutron or X-ray wavelength (Å). |
setup_wavelength_2 |
NumericDescriptor
|
Second incident wavelength λ₂ (Å), e.g. the X-ray K-alpha2 line. |
setup_wavelength_2_to_1_ratio |
NumericDescriptor
|
Relative intensity of wavelength_2 to wavelength (I₂/I₁). |
calib_twotheta_offset |
Parameter
|
Instrument misalignment offset (deg). |
calib_sample_displacement |
Parameter
|
Specimen-displacement peak-position correction (deg). |
calib_sample_transparency |
Parameter
|
Sample-transparency peak-position correction (deg). |
setup_polarization_coefficient
property
writable
CW Lorentz-polarization coefficient.
Reading returns the underlying NumericDescriptor; assigning
a number updates its value. Default 0.0 disables the
polarization correction.
setup_monochromator_twotheta
property
writable
Pre-specimen monochromator 2theta angle (deg).
Reading returns the underlying NumericDescriptor; assigning
a number updates its value. Default 0.0 means no
monochromator.
unique_name
property
Fully qualified name: datablock, category, entry.
parameters
property
All GenericDescriptorBase instances on this item.
as_cif
property
Return CIF representation of this object.
setup_wavelength
property
writable
Incident neutron or X-ray wavelength (Å).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
setup_wavelength_2
property
writable
Second incident wavelength λ₂ (Å), e.g. the X-ray K-alpha2 line.
Reading returns the underlying NumericDescriptor; assigning
a number updates its value. Default 0.0 means no second
component (monochromatic). Non-refinable; CrysFML consumes it
when setup_wavelength_2_to_1_ratio is positive.
setup_wavelength_2_to_1_ratio
property
writable
Relative intensity of wavelength_2 to wavelength (I₂/I₁).
The _2_to_1_ ordering names the direction: numerator is the
second component, denominator the first. Range [0, 1];
default 0.0 disables the second component. Non-refinable;
CrysFML consumes it together with setup_wavelength_2.
calib_twotheta_offset
property
writable
Instrument misalignment offset (deg).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
calib_sample_displacement
property
writable
Specimen-displacement peak-position correction (deg).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
calib_sample_transparency
property
writable
Sample-transparency peak-position correction (deg).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print parameters, other properties, and methods.
from_cif(block, idx=0)
Populate this item from a CIF block.
factory
Instrument factory — delegates to FactoryBase.
Classes:
| Name | Description |
|---|---|
InstrumentFactory |
Create instrument instances for supported modes. |
InstrumentFactory
Create instrument instances for supported modes.
Methods:
| Name | Description |
|---|---|
__init_subclass__ |
Give each subclass its own independent registry and rules. |
register |
Class decorator to register a concrete class. |
supported_tags |
Return list of all supported tags. |
default_tag |
Resolve the default tag for a given experimental context. |
create |
Instantiate a registered class by tag. |
create_default_for |
Instantiate the default class for a given context. |
supported_for |
Return classes matching conditions and/or calculator. |
show_supported |
Pretty-print a table of supported types. |
__init_subclass__(**kwargs)
Give each subclass its own independent registry and rules.
register(klass)
classmethod
Class decorator to register a concrete class.
Usage::
@SomeFactory.register class MyClass(SomeBase): type_info = TypeInfo(...)
Returns the class unmodified.
supported_tags()
classmethod
Return list of all supported tags.
default_tag(**conditions)
classmethod
Resolve the default tag for a given experimental context.
Uses largest-subset matching: the rule whose key is the
biggest subset of the given conditions wins. A rule with an
empty key (frozenset()) acts as a universal fallback.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**conditions
|
object
|
Experimental-axis values, e.g.
|
{}
|
Returns:
| Type | Description |
|---|---|
str
|
The resolved default tag string. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If no rule matches the given conditions. |
create(tag, **kwargs)
classmethod
Instantiate a registered class by tag.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag
|
str
|
|
required |
**kwargs
|
object
|
Forwarded to the class constructor. |
{}
|
Returns:
| Type | Description |
|---|---|
object
|
A new instance of the registered class. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If tag is not in the registry. |
create_default_for(**conditions)
classmethod
Instantiate the default class for a given context.
Combines default_tag(**conditions) with create(tag).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**conditions
|
object
|
Experimental-axis values. |
{}
|
Returns:
| Type | Description |
|---|---|
object
|
A new instance of the default class. |
supported_for(*, calculator=None, sample_form=None, scattering_type=None, beam_mode=None, radiation_probe=None)
classmethod
Return classes matching conditions and/or calculator.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
calculator
|
object
|
Optional |
None
|
sample_form
|
object
|
Optional |
None
|
scattering_type
|
object
|
Optional |
None
|
beam_mode
|
object
|
Optional |
None
|
radiation_probe
|
object
|
Optional |
None
|
Returns:
| Type | Description |
|---|---|
list[type]
|
Classes matching the given conditions. |
show_supported(*, calculator=None, sample_form=None, scattering_type=None, beam_mode=None, radiation_probe=None)
classmethod
Pretty-print a table of supported types.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
calculator
|
object
|
Optional |
None
|
sample_form
|
object
|
Optional |
None
|
scattering_type
|
object
|
Optional |
None
|
beam_mode
|
object
|
Optional |
None
|
radiation_probe
|
object
|
Optional |
None
|
tof
Time-of-flight powder and single-crystal instruments.
Classes:
| Name | Description |
|---|---|
TofScInstrument |
TOF single-crystal diffractometer. |
TofPdInstrument |
TOF powder diffractometer. |
TofScInstrument()
TOF single-crystal diffractometer.
Methods:
| Name | Description |
|---|---|
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print parameters, other properties, and methods. |
from_cif |
Populate this item from a CIF block. |
Attributes:
| Name | Type | Description |
|---|---|---|
unique_name |
str
|
Fully qualified name: datablock, category, entry. |
parameters |
list
|
All GenericDescriptorBase instances on this item. |
as_cif |
str
|
Return CIF representation of this object. |
unique_name
property
Fully qualified name: datablock, category, entry.
parameters
property
All GenericDescriptorBase instances on this item.
as_cif
property
Return CIF representation of this object.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print parameters, other properties, and methods.
from_cif(block, idx=0)
Populate this item from a CIF block.
TofPdInstrument()
TOF powder diffractometer.
Methods:
| Name | Description |
|---|---|
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print parameters, other properties, and methods. |
from_cif |
Populate this item from a CIF block. |
Attributes:
| Name | Type | Description |
|---|---|---|
setup_twotheta_bank |
Parameter
|
Detector bank position (deg). |
calib_d_to_tof_offset |
Parameter
|
TOF offset (μs). |
calib_d_to_tof_linear |
Parameter
|
TOF linear conversion (μs/Å). |
calib_d_to_tof_quadratic |
Parameter
|
TOF quadratic correction (μs/Ų). |
calib_d_to_tof_reciprocal |
Parameter
|
TOF reciprocal velocity correction (μs·Å). |
unique_name |
str
|
Fully qualified name: datablock, category, entry. |
parameters |
list
|
All GenericDescriptorBase instances on this item. |
as_cif |
str
|
Return CIF representation of this object. |
setup_twotheta_bank
property
writable
Detector bank position (deg).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
calib_d_to_tof_offset
property
writable
TOF offset (μs).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
calib_d_to_tof_linear
property
writable
TOF linear conversion (μs/Å).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
calib_d_to_tof_quadratic
property
writable
TOF quadratic correction (μs/Ų).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
calib_d_to_tof_reciprocal
property
writable
TOF reciprocal velocity correction (μs·Å).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
unique_name
property
Fully qualified name: datablock, category, entry.
parameters
property
All GenericDescriptorBase instances on this item.
as_cif
property
Return CIF representation of this object.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print parameters, other properties, and methods.
from_cif(block, idx=0)
Populate this item from a CIF block.
linked_structure
Linked structure category referencing a sample model by ID.
Modules:
| Name | Description |
|---|---|
default |
Default linked-structure reference for single-crystal experiments. |
factory |
Linked-structure factory delegates to |
Classes
Modules
default
Default linked-structure reference for single-crystal experiments.
Classes:
| Name | Description |
|---|---|
LinkedStructure |
Linked structure reference for single-crystal diffraction. |
LinkedStructure()
Linked structure reference for single-crystal diffraction.
Methods:
| Name | Description |
|---|---|
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print parameters, other properties, and methods. |
from_cif |
Populate this item from a CIF block. |
Attributes:
| Name | Type | Description |
|---|---|---|
structure_id |
StringDescriptor
|
Identifier of the linked structure. |
scale |
Parameter
|
Scale factor of the linked structure. |
unique_name |
str
|
Fully qualified name: datablock, category, entry. |
parameters |
list
|
All GenericDescriptorBase instances on this item. |
as_cif |
str
|
Return CIF representation of this object. |
structure_id
property
writable
Identifier of the linked structure.
Reading this property returns the underlying
StringDescriptor object. Assigning to it updates the
parameter value.
scale
property
writable
Scale factor of the linked structure.
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
unique_name
property
Fully qualified name: datablock, category, entry.
parameters
property
All GenericDescriptorBase instances on this item.
as_cif
property
Return CIF representation of this object.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print parameters, other properties, and methods.
from_cif(block, idx=0)
Populate this item from a CIF block.
factory
Linked-structure factory delegates to FactoryBase.
Classes:
| Name | Description |
|---|---|
LinkedStructureFactory |
Create linked-structure references by tag. |
LinkedStructureFactory
Create linked-structure references by tag.
Methods:
| Name | Description |
|---|---|
__init_subclass__ |
Give each subclass its own independent registry and rules. |
register |
Class decorator to register a concrete class. |
supported_tags |
Return list of all supported tags. |
default_tag |
Resolve the default tag for a given experimental context. |
create |
Instantiate a registered class by tag. |
create_default_for |
Instantiate the default class for a given context. |
supported_for |
Return classes matching conditions and/or calculator. |
show_supported |
Pretty-print a table of supported types. |
__init_subclass__(**kwargs)
Give each subclass its own independent registry and rules.
register(klass)
classmethod
Class decorator to register a concrete class.
Usage::
@SomeFactory.register class MyClass(SomeBase): type_info = TypeInfo(...)
Returns the class unmodified.
supported_tags()
classmethod
Return list of all supported tags.
default_tag(**conditions)
classmethod
Resolve the default tag for a given experimental context.
Uses largest-subset matching: the rule whose key is the
biggest subset of the given conditions wins. A rule with an
empty key (frozenset()) acts as a universal fallback.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**conditions
|
object
|
Experimental-axis values, e.g.
|
{}
|
Returns:
| Type | Description |
|---|---|
str
|
The resolved default tag string. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If no rule matches the given conditions. |
create(tag, **kwargs)
classmethod
Instantiate a registered class by tag.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag
|
str
|
|
required |
**kwargs
|
object
|
Forwarded to the class constructor. |
{}
|
Returns:
| Type | Description |
|---|---|
object
|
A new instance of the registered class. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If tag is not in the registry. |
create_default_for(**conditions)
classmethod
Instantiate the default class for a given context.
Combines default_tag(**conditions) with create(tag).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**conditions
|
object
|
Experimental-axis values. |
{}
|
Returns:
| Type | Description |
|---|---|
object
|
A new instance of the default class. |
supported_for(*, calculator=None, sample_form=None, scattering_type=None, beam_mode=None, radiation_probe=None)
classmethod
Return classes matching conditions and/or calculator.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
calculator
|
object
|
Optional |
None
|
sample_form
|
object
|
Optional |
None
|
scattering_type
|
object
|
Optional |
None
|
beam_mode
|
object
|
Optional |
None
|
radiation_probe
|
object
|
Optional |
None
|
Returns:
| Type | Description |
|---|---|
list[type]
|
Classes matching the given conditions. |
show_supported(*, calculator=None, sample_form=None, scattering_type=None, beam_mode=None, radiation_probe=None)
classmethod
Pretty-print a table of supported types.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
calculator
|
object
|
Optional |
None
|
sample_form
|
object
|
Optional |
None
|
scattering_type
|
object
|
Optional |
None
|
beam_mode
|
object
|
Optional |
None
|
radiation_probe
|
object
|
Optional |
None
|
linked_structures
Linked structures category weighting sample models in a pattern.
Modules:
| Name | Description |
|---|---|
default |
Linked structures allow combining models with scale factors. |
factory |
Linked-structures factory delegates to |
Classes
Modules
default
Linked structures allow combining models with scale factors.
Classes:
| Name | Description |
|---|---|
LinkedStructure |
Link to a structure by id with a scale factor. |
LinkedStructures |
Collection of LinkedStructure instances. |
LinkedStructure()
Link to a structure by id with a scale factor.
Methods:
| Name | Description |
|---|---|
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print parameters, other properties, and methods. |
from_cif |
Populate this item from a CIF block. |
Attributes:
| Name | Type | Description |
|---|---|---|
structure_id |
StringDescriptor
|
Identifier of the linked structure. |
scale |
Parameter
|
Scale factor of the linked structure. |
unique_name |
str
|
Fully qualified name: datablock, category, entry. |
parameters |
list
|
All GenericDescriptorBase instances on this item. |
as_cif |
str
|
Return CIF representation of this object. |
structure_id
property
writable
Identifier of the linked structure.
Reading this property returns the underlying
StringDescriptor object. Assigning to it updates the
parameter value.
scale
property
writable
Scale factor of the linked structure.
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
unique_name
property
Fully qualified name: datablock, category, entry.
parameters
property
All GenericDescriptorBase instances on this item.
as_cif
property
Return CIF representation of this object.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print parameters, other properties, and methods.
from_cif(block, idx=0)
Populate this item from a CIF block.
LinkedStructures()
Collection of LinkedStructure instances.
Methods:
| Name | Description |
|---|---|
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print a summary of public attributes and contained items. |
__getitem__ |
Return an item by name or positional index. |
__setitem__ |
Insert or replace an item under the given identity key. |
__delitem__ |
Delete an item by key or raise |
__contains__ |
Check whether an item with the given key exists. |
__iter__ |
Iterate over items in insertion order. |
__len__ |
Return the number of items in the collection. |
remove |
Remove an item by its key. |
clear |
Remove every item, then mark the parent datablock dirty. |
keys |
Yield keys for all items in insertion order. |
values |
Yield items in insertion order. |
items |
Yield |
from_cif |
Populate this collection from a CIF block. |
add |
Insert or replace a pre-built item into the collection. |
create |
Create a new item with the given attributes and add it. |
Attributes:
| Name | Type | Description |
|---|---|---|
unique_name |
str | None
|
Return None; collections have no unique name. |
parameters |
list
|
All parameters from all items in this collection. |
as_cif |
str
|
Return CIF representation of this object. |
names |
list[str | None]
|
List of all item keys in the collection. |
scalar_descriptors |
list
|
Collection-level descriptors serialized outside the loop. |
unique_name
property
Return None; collections have no unique name.
parameters
property
All parameters from all items in this collection.
as_cif
property
Return CIF representation of this object.
names
property
List of all item keys in the collection.
scalar_descriptors
property
Collection-level descriptors serialized outside the loop.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print a summary of public attributes and contained items.
__getitem__(key)
Return an item by name or positional index.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key
|
str | int
|
Identity key (str) or zero-based positional index (int). |
required |
Returns:
| Type | Description |
|---|---|
GuardedBase
|
The item matching the given key or index. |
Raises:
| Type | Description |
|---|---|
TypeError
|
If key is neither |
__setitem__(name, item)
Insert or replace an item under the given identity key.
__delitem__(name)
Delete an item by key or raise KeyError if missing.
__contains__(name)
Check whether an item with the given key exists.
__iter__()
Iterate over items in insertion order.
__len__()
Return the number of items in the collection.
remove(name)
Remove an item by its key.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Identity key of the item to remove. |
required |
clear()
Remove every item, then mark the parent datablock dirty.
Layers dirty-marking on :meth:CollectionBase.clear, mirroring
how :meth:add layers it on the base insert.
keys()
Yield keys for all items in insertion order.
values()
Yield items in insertion order.
items()
Yield (key, item) pairs in insertion order.
from_cif(block)
Populate this collection from a CIF block.
add(item)
Insert or replace a pre-built item into the collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
item
|
object
|
A |
required |
create(**kwargs)
Create a new item with the given attributes and add it.
A default instance of the collection's item type is created,
then each keyword argument is applied via setattr.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**kwargs
|
object
|
Attribute names and values for the new item. |
{}
|
factory
Linked-structures factory delegates to FactoryBase.
Classes:
| Name | Description |
|---|---|
LinkedStructuresFactory |
Create linked-structures collections by tag. |
LinkedStructuresFactory
Create linked-structures collections by tag.
Methods:
| Name | Description |
|---|---|
__init_subclass__ |
Give each subclass its own independent registry and rules. |
register |
Class decorator to register a concrete class. |
supported_tags |
Return list of all supported tags. |
default_tag |
Resolve the default tag for a given experimental context. |
create |
Instantiate a registered class by tag. |
create_default_for |
Instantiate the default class for a given context. |
supported_for |
Return classes matching conditions and/or calculator. |
show_supported |
Pretty-print a table of supported types. |
__init_subclass__(**kwargs)
Give each subclass its own independent registry and rules.
register(klass)
classmethod
Class decorator to register a concrete class.
Usage::
@SomeFactory.register class MyClass(SomeBase): type_info = TypeInfo(...)
Returns the class unmodified.
supported_tags()
classmethod
Return list of all supported tags.
default_tag(**conditions)
classmethod
Resolve the default tag for a given experimental context.
Uses largest-subset matching: the rule whose key is the
biggest subset of the given conditions wins. A rule with an
empty key (frozenset()) acts as a universal fallback.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**conditions
|
object
|
Experimental-axis values, e.g.
|
{}
|
Returns:
| Type | Description |
|---|---|
str
|
The resolved default tag string. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If no rule matches the given conditions. |
create(tag, **kwargs)
classmethod
Instantiate a registered class by tag.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag
|
str
|
|
required |
**kwargs
|
object
|
Forwarded to the class constructor. |
{}
|
Returns:
| Type | Description |
|---|---|
object
|
A new instance of the registered class. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If tag is not in the registry. |
create_default_for(**conditions)
classmethod
Instantiate the default class for a given context.
Combines default_tag(**conditions) with create(tag).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**conditions
|
object
|
Experimental-axis values. |
{}
|
Returns:
| Type | Description |
|---|---|
object
|
A new instance of the default class. |
supported_for(*, calculator=None, sample_form=None, scattering_type=None, beam_mode=None, radiation_probe=None)
classmethod
Return classes matching conditions and/or calculator.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
calculator
|
object
|
Optional |
None
|
sample_form
|
object
|
Optional |
None
|
scattering_type
|
object
|
Optional |
None
|
beam_mode
|
object
|
Optional |
None
|
radiation_probe
|
object
|
Optional |
None
|
Returns:
| Type | Description |
|---|---|
list[type]
|
Classes matching the given conditions. |
show_supported(*, calculator=None, sample_form=None, scattering_type=None, beam_mode=None, radiation_probe=None)
classmethod
Pretty-print a table of supported types.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
calculator
|
object
|
Optional |
None
|
sample_form
|
object
|
Optional |
None
|
scattering_type
|
object
|
Optional |
None
|
beam_mode
|
object
|
Optional |
None
|
radiation_probe
|
object
|
Optional |
None
|
peak
Peak profile categories for CWL, TOF, and total scattering.
Modules:
| Name | Description |
|---|---|
base |
Base class for peak profile categories. |
cwl |
Constant-wavelength peak profile classes. |
cwl_mixins |
Constant-wavelength (CWL) peak-profile component classes. |
factory |
Peak profile factory — delegates to |
tof |
Time-of-flight peak profile classes. |
tof_mixins |
Time-of-flight (TOF) peak-profile mixin classes. |
total |
Total-scattering (PDF) peak profile classes. |
total_mixins |
Total scattering / PDF peak-profile component classes. |
Classes
Modules
base
Base class for peak profile categories.
Classes:
| Name | Description |
|---|---|
PeakBase |
Base class for peak profile categories. |
PeakBase()
Base class for peak profile categories.
Methods:
| Name | Description |
|---|---|
show_supported |
Print supported peak profiles with context-local aliases. |
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print parameters, other properties, and methods. |
from_cif |
Populate this item from a CIF block. |
Attributes:
| Name | Type | Description |
|---|---|---|
type |
str
|
Active factory tag for this category. |
unique_name |
str
|
Fully qualified name: datablock, category, entry. |
parameters |
list
|
All GenericDescriptorBase instances on this item. |
as_cif |
str
|
Return CIF representation of this object. |
type
property
writable
Active factory tag for this category.
unique_name
property
Fully qualified name: datablock, category, entry.
parameters
property
All GenericDescriptorBase instances on this item.
as_cif
property
Return CIF representation of this object.
show_supported()
Print supported peak profiles with context-local aliases.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print parameters, other properties, and methods.
from_cif(block, idx=0)
Populate this item from a CIF block.
cwl
Constant-wavelength peak profile classes.
Classes:
| Name | Description |
|---|---|
CwlPseudoVoigt |
Constant-wavelength pseudo-Voigt peak shape. |
CwlPseudoVoigtBerarBaldinozziAsymmetry |
Pseudo-Voigt with Berar-Baldinozzi asymmetry for CWL mode. |
CwlThompsonCoxHastings |
Thompson-Cox-Hastings with FCJ asymmetry for CWL mode. |
CwlPseudoVoigt()
Constant-wavelength pseudo-Voigt peak shape.
Methods:
| Name | Description |
|---|---|
show_supported |
Print supported peak profiles with context-local aliases. |
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print parameters, other properties, and methods. |
from_cif |
Populate this item from a CIF block. |
Attributes:
| Name | Type | Description |
|---|---|---|
cutoff_fwhm |
NumericDescriptor
|
Peak-range cutoff in FWHMs (speed vs accuracy). |
broad_gauss_u |
Parameter
|
Gaussian broadening from sample size and resolution (deg²). |
broad_gauss_v |
Parameter
|
Gaussian broadening instrumental contribution (deg²). |
broad_gauss_w |
Parameter
|
Gaussian broadening instrumental contribution (deg²). |
broad_lorentz_x |
Parameter
|
Lorentzian broadening (sample strain effects) (deg). |
broad_lorentz_y |
Parameter
|
Lorentzian broadening from microstructural defects (deg). |
type |
str
|
Active factory tag for this category. |
unique_name |
str
|
Fully qualified name: datablock, category, entry. |
parameters |
list
|
All GenericDescriptorBase instances on this item. |
as_cif |
str
|
Return CIF representation of this object. |
cutoff_fwhm
property
writable
Peak-range cutoff in FWHMs (speed vs accuracy).
The profile is evaluated only within this many FWHMs of each
peak. 0 (default) means no cutoff (the full range is
computed); a positive value is a literal cutoff in FWHMs that
mirrors FullProf's WDT (faster, truncates the peak tails).
Reading returns the underlying descriptor; assigning updates its
value.
broad_gauss_u
property
writable
Gaussian broadening from sample size and resolution (deg²).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_gauss_v
property
writable
Gaussian broadening instrumental contribution (deg²).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_gauss_w
property
writable
Gaussian broadening instrumental contribution (deg²).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_lorentz_x
property
writable
Lorentzian broadening (sample strain effects) (deg).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_lorentz_y
property
writable
Lorentzian broadening from microstructural defects (deg).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
type
property
writable
Active factory tag for this category.
unique_name
property
Fully qualified name: datablock, category, entry.
parameters
property
All GenericDescriptorBase instances on this item.
as_cif
property
Return CIF representation of this object.
show_supported()
Print supported peak profiles with context-local aliases.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print parameters, other properties, and methods.
from_cif(block, idx=0)
Populate this item from a CIF block.
CwlPseudoVoigtBerarBaldinozziAsymmetry()
Pseudo-Voigt with Berar-Baldinozzi asymmetry for CWL mode.
Methods:
| Name | Description |
|---|---|
show_supported |
Print supported peak profiles with context-local aliases. |
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print parameters, other properties, and methods. |
from_cif |
Populate this item from a CIF block. |
Attributes:
| Name | Type | Description |
|---|---|---|
asym_beba_a0 |
Parameter
|
Berar-Baldinozzi asymmetry coefficient A0 (Fa/tan theta). |
asym_beba_b0 |
Parameter
|
Berar-Baldinozzi asymmetry coefficient B0 (Fb/tan theta). |
asym_beba_a1 |
Parameter
|
Berar-Baldinozzi asymmetry coefficient A1 (Fa/tan 2theta). |
asym_beba_b1 |
Parameter
|
Berar-Baldinozzi asymmetry coefficient B1 (Fb/tan 2theta). |
cutoff_fwhm |
NumericDescriptor
|
Peak-range cutoff in FWHMs (speed vs accuracy). |
broad_gauss_u |
Parameter
|
Gaussian broadening from sample size and resolution (deg²). |
broad_gauss_v |
Parameter
|
Gaussian broadening instrumental contribution (deg²). |
broad_gauss_w |
Parameter
|
Gaussian broadening instrumental contribution (deg²). |
broad_lorentz_x |
Parameter
|
Lorentzian broadening (sample strain effects) (deg). |
broad_lorentz_y |
Parameter
|
Lorentzian broadening from microstructural defects (deg). |
type |
str
|
Active factory tag for this category. |
unique_name |
str
|
Fully qualified name: datablock, category, entry. |
parameters |
list
|
All GenericDescriptorBase instances on this item. |
as_cif |
str
|
Return CIF representation of this object. |
asym_beba_a0
property
writable
Berar-Baldinozzi asymmetry coefficient A0 (Fa/tan theta).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
asym_beba_b0
property
writable
Berar-Baldinozzi asymmetry coefficient B0 (Fb/tan theta).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
asym_beba_a1
property
writable
Berar-Baldinozzi asymmetry coefficient A1 (Fa/tan 2theta).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
asym_beba_b1
property
writable
Berar-Baldinozzi asymmetry coefficient B1 (Fb/tan 2theta).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
cutoff_fwhm
property
writable
Peak-range cutoff in FWHMs (speed vs accuracy).
The profile is evaluated only within this many FWHMs of each
peak. 0 (default) means no cutoff (the full range is
computed); a positive value is a literal cutoff in FWHMs that
mirrors FullProf's WDT (faster, truncates the peak tails).
Reading returns the underlying descriptor; assigning updates its
value.
broad_gauss_u
property
writable
Gaussian broadening from sample size and resolution (deg²).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_gauss_v
property
writable
Gaussian broadening instrumental contribution (deg²).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_gauss_w
property
writable
Gaussian broadening instrumental contribution (deg²).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_lorentz_x
property
writable
Lorentzian broadening (sample strain effects) (deg).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_lorentz_y
property
writable
Lorentzian broadening from microstructural defects (deg).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
type
property
writable
Active factory tag for this category.
unique_name
property
Fully qualified name: datablock, category, entry.
parameters
property
All GenericDescriptorBase instances on this item.
as_cif
property
Return CIF representation of this object.
show_supported()
Print supported peak profiles with context-local aliases.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print parameters, other properties, and methods.
from_cif(block, idx=0)
Populate this item from a CIF block.
CwlThompsonCoxHastings()
Thompson-Cox-Hastings with FCJ asymmetry for CWL mode.
Methods:
| Name | Description |
|---|---|
show_supported |
Print supported peak profiles with context-local aliases. |
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print parameters, other properties, and methods. |
from_cif |
Populate this item from a CIF block. |
Attributes:
| Name | Type | Description |
|---|---|---|
asym_fcj_1 |
Parameter
|
Finger-Cox-Jephcoat asymmetry parameter 1. |
asym_fcj_2 |
Parameter
|
Finger-Cox-Jephcoat asymmetry parameter 2. |
cutoff_fwhm |
NumericDescriptor
|
Peak-range cutoff in FWHMs (speed vs accuracy). |
broad_gauss_u |
Parameter
|
Gaussian broadening from sample size and resolution (deg²). |
broad_gauss_v |
Parameter
|
Gaussian broadening instrumental contribution (deg²). |
broad_gauss_w |
Parameter
|
Gaussian broadening instrumental contribution (deg²). |
broad_lorentz_x |
Parameter
|
Lorentzian broadening (sample strain effects) (deg). |
broad_lorentz_y |
Parameter
|
Lorentzian broadening from microstructural defects (deg). |
type |
str
|
Active factory tag for this category. |
unique_name |
str
|
Fully qualified name: datablock, category, entry. |
parameters |
list
|
All GenericDescriptorBase instances on this item. |
as_cif |
str
|
Return CIF representation of this object. |
asym_fcj_1
property
writable
Finger-Cox-Jephcoat asymmetry parameter 1.
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
asym_fcj_2
property
writable
Finger-Cox-Jephcoat asymmetry parameter 2.
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
cutoff_fwhm
property
writable
Peak-range cutoff in FWHMs (speed vs accuracy).
The profile is evaluated only within this many FWHMs of each
peak. 0 (default) means no cutoff (the full range is
computed); a positive value is a literal cutoff in FWHMs that
mirrors FullProf's WDT (faster, truncates the peak tails).
Reading returns the underlying descriptor; assigning updates its
value.
broad_gauss_u
property
writable
Gaussian broadening from sample size and resolution (deg²).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_gauss_v
property
writable
Gaussian broadening instrumental contribution (deg²).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_gauss_w
property
writable
Gaussian broadening instrumental contribution (deg²).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_lorentz_x
property
writable
Lorentzian broadening (sample strain effects) (deg).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_lorentz_y
property
writable
Lorentzian broadening from microstructural defects (deg).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
type
property
writable
Active factory tag for this category.
unique_name
property
Fully qualified name: datablock, category, entry.
parameters
property
All GenericDescriptorBase instances on this item.
as_cif
property
Return CIF representation of this object.
show_supported()
Print supported peak profiles with context-local aliases.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print parameters, other properties, and methods.
from_cif(block, idx=0)
Populate this item from a CIF block.
cwl_mixins
Constant-wavelength (CWL) peak-profile component classes.
This module provides classes that add broadening and asymmetry parameters. They are composed into concrete peak classes elsewhere via multiple inheritance.
Classes:
| Name | Description |
|---|---|
CwlBroadeningMixin |
CWL Gaussian and Lorentz broadening parameters. |
BerarBaldinozziAsymmetryMixin |
Berar-Baldinozzi empirical CWL peak asymmetry parameters. |
FcjAsymmetryMixin |
Finger-Cox-Jephcoat (FCJ) asymmetry parameters. |
CwlBroadeningMixin()
CWL Gaussian and Lorentz broadening parameters.
Attributes:
| Name | Type | Description |
|---|---|---|
cutoff_fwhm |
NumericDescriptor
|
Peak-range cutoff in FWHMs (speed vs accuracy). |
broad_gauss_u |
Parameter
|
Gaussian broadening from sample size and resolution (deg²). |
broad_gauss_v |
Parameter
|
Gaussian broadening instrumental contribution (deg²). |
broad_gauss_w |
Parameter
|
Gaussian broadening instrumental contribution (deg²). |
broad_lorentz_x |
Parameter
|
Lorentzian broadening (sample strain effects) (deg). |
broad_lorentz_y |
Parameter
|
Lorentzian broadening from microstructural defects (deg). |
cutoff_fwhm
property
writable
Peak-range cutoff in FWHMs (speed vs accuracy).
The profile is evaluated only within this many FWHMs of each
peak. 0 (default) means no cutoff (the full range is
computed); a positive value is a literal cutoff in FWHMs that
mirrors FullProf's WDT (faster, truncates the peak tails).
Reading returns the underlying descriptor; assigning updates its
value.
broad_gauss_u
property
writable
Gaussian broadening from sample size and resolution (deg²).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_gauss_v
property
writable
Gaussian broadening instrumental contribution (deg²).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_gauss_w
property
writable
Gaussian broadening instrumental contribution (deg²).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_lorentz_x
property
writable
Lorentzian broadening (sample strain effects) (deg).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_lorentz_y
property
writable
Lorentzian broadening from microstructural defects (deg).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
BerarBaldinozziAsymmetryMixin()
Berar-Baldinozzi empirical CWL peak asymmetry parameters.
Attributes:
| Name | Type | Description |
|---|---|---|
asym_beba_a0 |
Parameter
|
Berar-Baldinozzi asymmetry coefficient A0 (Fa/tan theta). |
asym_beba_b0 |
Parameter
|
Berar-Baldinozzi asymmetry coefficient B0 (Fb/tan theta). |
asym_beba_a1 |
Parameter
|
Berar-Baldinozzi asymmetry coefficient A1 (Fa/tan 2theta). |
asym_beba_b1 |
Parameter
|
Berar-Baldinozzi asymmetry coefficient B1 (Fb/tan 2theta). |
asym_beba_a0
property
writable
Berar-Baldinozzi asymmetry coefficient A0 (Fa/tan theta).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
asym_beba_b0
property
writable
Berar-Baldinozzi asymmetry coefficient B0 (Fb/tan theta).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
asym_beba_a1
property
writable
Berar-Baldinozzi asymmetry coefficient A1 (Fa/tan 2theta).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
asym_beba_b1
property
writable
Berar-Baldinozzi asymmetry coefficient B1 (Fb/tan 2theta).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
FcjAsymmetryMixin()
Finger-Cox-Jephcoat (FCJ) asymmetry parameters.
Attributes:
| Name | Type | Description |
|---|---|---|
asym_fcj_1 |
Parameter
|
Finger-Cox-Jephcoat asymmetry parameter 1. |
asym_fcj_2 |
Parameter
|
Finger-Cox-Jephcoat asymmetry parameter 2. |
asym_fcj_1
property
writable
Finger-Cox-Jephcoat asymmetry parameter 1.
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
asym_fcj_2
property
writable
Finger-Cox-Jephcoat asymmetry parameter 2.
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
factory
Peak profile factory — delegates to FactoryBase.
Classes:
| Name | Description |
|---|---|
PeakFactory |
Factory for creating peak profile objects. |
PeakFactory
Factory for creating peak profile objects.
Methods:
| Name | Description |
|---|---|
show_supported |
Pretty-print supported peak profiles with context-local aliases. |
__init_subclass__ |
Give each subclass its own independent registry and rules. |
register |
Class decorator to register a concrete class. |
supported_tags |
Return list of all supported tags. |
default_tag |
Resolve the default tag for a given experimental context. |
create |
Instantiate a registered class by tag. |
create_default_for |
Instantiate the default class for a given context. |
supported_for |
Return classes matching conditions and/or calculator. |
show_supported(*, calculator=None, sample_form=None, scattering_type=None, beam_mode=None, radiation_probe=None)
classmethod
Pretty-print supported peak profiles with context-local aliases.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
calculator
|
object
|
Optional |
None
|
sample_form
|
object
|
Optional |
None
|
scattering_type
|
object
|
Optional |
None
|
beam_mode
|
object
|
Optional |
None
|
radiation_probe
|
object
|
Optional |
None
|
__init_subclass__(**kwargs)
Give each subclass its own independent registry and rules.
register(klass)
classmethod
Class decorator to register a concrete class.
Usage::
@SomeFactory.register class MyClass(SomeBase): type_info = TypeInfo(...)
Returns the class unmodified.
supported_tags()
classmethod
Return list of all supported tags.
default_tag(**conditions)
classmethod
Resolve the default tag for a given experimental context.
Uses largest-subset matching: the rule whose key is the
biggest subset of the given conditions wins. A rule with an
empty key (frozenset()) acts as a universal fallback.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**conditions
|
object
|
Experimental-axis values, e.g.
|
{}
|
Returns:
| Type | Description |
|---|---|
str
|
The resolved default tag string. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If no rule matches the given conditions. |
create(tag, **kwargs)
classmethod
Instantiate a registered class by tag.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag
|
str
|
|
required |
**kwargs
|
object
|
Forwarded to the class constructor. |
{}
|
Returns:
| Type | Description |
|---|---|
object
|
A new instance of the registered class. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If tag is not in the registry. |
create_default_for(**conditions)
classmethod
Instantiate the default class for a given context.
Combines default_tag(**conditions) with create(tag).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**conditions
|
object
|
Experimental-axis values. |
{}
|
Returns:
| Type | Description |
|---|---|
object
|
A new instance of the default class. |
supported_for(*, calculator=None, sample_form=None, scattering_type=None, beam_mode=None, radiation_probe=None)
classmethod
Return classes matching conditions and/or calculator.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
calculator
|
object
|
Optional |
None
|
sample_form
|
object
|
Optional |
None
|
scattering_type
|
object
|
Optional |
None
|
beam_mode
|
object
|
Optional |
None
|
radiation_probe
|
object
|
Optional |
None
|
Returns:
| Type | Description |
|---|---|
list[type]
|
Classes matching the given conditions. |
tof
Time-of-flight peak profile classes.
Jorgensen: back-to-back exponentials ⊗ Gaussian (CrysPy
peak_shape="Gauss"). Jorgensen-Von Dreele: back-to-back exponentials
⊗ pseudo-Voigt (CrysPy peak_shape="pseudo-Voigt").
Double-Jorgensen-Von Dreele: double back-to-back exponentials ⊗
pseudo-Voigt (CrysPy peak_shape="type0m", Z-Rietveld).
Classes:
| Name | Description |
|---|---|
TofPseudoVoigt |
Simple non-convoluted pseudo-Voigt TOF profile. |
TofJorgensen |
Jorgensen TOF profile: back-to-back exponentials ⊗ Gaussian. |
TofJorgensenVonDreele |
Back-to-back exponentials ⊗ pseudo-Voigt TOF profile. |
TofDoubleJorgensenVonDreele |
Double back-to-back exponentials ⊗ pseudo-Voigt TOF profile. |
TofPseudoVoigt()
Simple non-convoluted pseudo-Voigt TOF profile.
Methods:
| Name | Description |
|---|---|
show_supported |
Print supported peak profiles with context-local aliases. |
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print parameters, other properties, and methods. |
from_cif |
Populate this item from a CIF block. |
Attributes:
| Name | Type | Description |
|---|---|---|
broad_lorentz_gamma_0 |
Parameter
|
Lorentzian broadening (microstrain effects) (μs). |
broad_lorentz_gamma_1 |
Parameter
|
Lorentzian broadening (dependent on d-spacing) (μs/Å). |
broad_lorentz_gamma_2 |
Parameter
|
Lorentzian broadening (instrument-dependent term) (μs²/Ų). |
broad_lorentz_size_l |
Parameter
|
Lorentzian isotropic size broadening, additive to γ₂ (μs²/Ų). |
broad_lorentz_strain_l |
Parameter
|
Lorentzian isotropic strain broadening, additive to γ₁ (μs/Å). |
cutoff_fwhm |
NumericDescriptor
|
Peak-range cutoff in FWHMs (speed vs accuracy). |
broad_gauss_sigma_0 |
Parameter
|
Gaussian broadening (instrumental resolution) (μs²). |
broad_gauss_sigma_1 |
Parameter
|
Gaussian broadening (dependent on d-spacing) (μs/Å). |
broad_gauss_sigma_2 |
Parameter
|
Gaussian broadening (instrument-dependent term) (μs²/Ų). |
broad_gauss_size_g |
Parameter
|
Gaussian isotropic size broadening, additive to σ₂ (μs²/Ų). |
broad_gauss_strain_g |
Parameter
|
Gaussian isotropic strain broadening, additive to σ₁ (μs/Å). |
type |
str
|
Active factory tag for this category. |
unique_name |
str
|
Fully qualified name: datablock, category, entry. |
parameters |
list
|
All GenericDescriptorBase instances on this item. |
as_cif |
str
|
Return CIF representation of this object. |
broad_lorentz_gamma_0
property
writable
Lorentzian broadening (microstrain effects) (μs).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_lorentz_gamma_1
property
writable
Lorentzian broadening (dependent on d-spacing) (μs/Å).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_lorentz_gamma_2
property
writable
Lorentzian broadening (instrument-dependent term) (μs²/Ų).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_lorentz_size_l
property
writable
Lorentzian isotropic size broadening, additive to γ₂ (μs²/Ų).
broad_lorentz_strain_l
property
writable
Lorentzian isotropic strain broadening, additive to γ₁ (μs/Å).
cutoff_fwhm
property
writable
Peak-range cutoff in FWHMs (speed vs accuracy).
The profile is evaluated only within this many FWHMs of each
peak. 0 (default) means no cutoff (the full range is
computed); a positive value is a literal cutoff in FWHMs that
mirrors FullProf's WDT (faster, truncates the peak tails).
Reading returns the underlying descriptor; assigning updates its
value.
broad_gauss_sigma_0
property
writable
Gaussian broadening (instrumental resolution) (μs²).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_gauss_sigma_1
property
writable
Gaussian broadening (dependent on d-spacing) (μs/Å).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_gauss_sigma_2
property
writable
Gaussian broadening (instrument-dependent term) (μs²/Ų).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_gauss_size_g
property
writable
Gaussian isotropic size broadening, additive to σ₂ (μs²/Ų).
broad_gauss_strain_g
property
writable
Gaussian isotropic strain broadening, additive to σ₁ (μs/Å).
type
property
writable
Active factory tag for this category.
unique_name
property
Fully qualified name: datablock, category, entry.
parameters
property
All GenericDescriptorBase instances on this item.
as_cif
property
Return CIF representation of this object.
show_supported()
Print supported peak profiles with context-local aliases.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print parameters, other properties, and methods.
from_cif(block, idx=0)
Populate this item from a CIF block.
TofJorgensen()
Jorgensen TOF profile: back-to-back exponentials ⊗ Gaussian.
Methods:
| Name | Description |
|---|---|
show_supported |
Print supported peak profiles with context-local aliases. |
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print parameters, other properties, and methods. |
from_cif |
Populate this item from a CIF block. |
Attributes:
| Name | Type | Description |
|---|---|---|
rise_alpha_0 |
Parameter
|
Back-to-back exponential rise α₀ (μs). |
rise_alpha_1 |
Parameter
|
Back-to-back exponential rise α₁ (μs/Å). |
decay_beta_0 |
Parameter
|
Back-to-back exponential decay β₀ (μs). |
decay_beta_1 |
Parameter
|
Back-to-back exponential decay β₁ (μs/Å). |
cutoff_fwhm |
NumericDescriptor
|
Peak-range cutoff in FWHMs (speed vs accuracy). |
broad_gauss_sigma_0 |
Parameter
|
Gaussian broadening (instrumental resolution) (μs²). |
broad_gauss_sigma_1 |
Parameter
|
Gaussian broadening (dependent on d-spacing) (μs/Å). |
broad_gauss_sigma_2 |
Parameter
|
Gaussian broadening (instrument-dependent term) (μs²/Ų). |
broad_gauss_size_g |
Parameter
|
Gaussian isotropic size broadening, additive to σ₂ (μs²/Ų). |
broad_gauss_strain_g |
Parameter
|
Gaussian isotropic strain broadening, additive to σ₁ (μs/Å). |
type |
str
|
Active factory tag for this category. |
unique_name |
str
|
Fully qualified name: datablock, category, entry. |
parameters |
list
|
All GenericDescriptorBase instances on this item. |
as_cif |
str
|
Return CIF representation of this object. |
rise_alpha_0
property
writable
Back-to-back exponential rise α₀ (μs).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
rise_alpha_1
property
writable
Back-to-back exponential rise α₁ (μs/Å).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
decay_beta_0
property
writable
Back-to-back exponential decay β₀ (μs).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
decay_beta_1
property
writable
Back-to-back exponential decay β₁ (μs/Å).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
cutoff_fwhm
property
writable
Peak-range cutoff in FWHMs (speed vs accuracy).
The profile is evaluated only within this many FWHMs of each
peak. 0 (default) means no cutoff (the full range is
computed); a positive value is a literal cutoff in FWHMs that
mirrors FullProf's WDT (faster, truncates the peak tails).
Reading returns the underlying descriptor; assigning updates its
value.
broad_gauss_sigma_0
property
writable
Gaussian broadening (instrumental resolution) (μs²).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_gauss_sigma_1
property
writable
Gaussian broadening (dependent on d-spacing) (μs/Å).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_gauss_sigma_2
property
writable
Gaussian broadening (instrument-dependent term) (μs²/Ų).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_gauss_size_g
property
writable
Gaussian isotropic size broadening, additive to σ₂ (μs²/Ų).
broad_gauss_strain_g
property
writable
Gaussian isotropic strain broadening, additive to σ₁ (μs/Å).
type
property
writable
Active factory tag for this category.
unique_name
property
Fully qualified name: datablock, category, entry.
parameters
property
All GenericDescriptorBase instances on this item.
as_cif
property
Return CIF representation of this object.
show_supported()
Print supported peak profiles with context-local aliases.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print parameters, other properties, and methods.
from_cif(block, idx=0)
Populate this item from a CIF block.
TofJorgensenVonDreele()
Back-to-back exponentials ⊗ pseudo-Voigt TOF profile.
Methods:
| Name | Description |
|---|---|
show_supported |
Print supported peak profiles with context-local aliases. |
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print parameters, other properties, and methods. |
from_cif |
Populate this item from a CIF block. |
Attributes:
| Name | Type | Description |
|---|---|---|
rise_alpha_0 |
Parameter
|
Back-to-back exponential rise α₀ (μs). |
rise_alpha_1 |
Parameter
|
Back-to-back exponential rise α₁ (μs/Å). |
decay_beta_0 |
Parameter
|
Back-to-back exponential decay β₀ (μs). |
decay_beta_1 |
Parameter
|
Back-to-back exponential decay β₁ (μs/Å). |
broad_lorentz_gamma_0 |
Parameter
|
Lorentzian broadening (microstrain effects) (μs). |
broad_lorentz_gamma_1 |
Parameter
|
Lorentzian broadening (dependent on d-spacing) (μs/Å). |
broad_lorentz_gamma_2 |
Parameter
|
Lorentzian broadening (instrument-dependent term) (μs²/Ų). |
broad_lorentz_size_l |
Parameter
|
Lorentzian isotropic size broadening, additive to γ₂ (μs²/Ų). |
broad_lorentz_strain_l |
Parameter
|
Lorentzian isotropic strain broadening, additive to γ₁ (μs/Å). |
cutoff_fwhm |
NumericDescriptor
|
Peak-range cutoff in FWHMs (speed vs accuracy). |
broad_gauss_sigma_0 |
Parameter
|
Gaussian broadening (instrumental resolution) (μs²). |
broad_gauss_sigma_1 |
Parameter
|
Gaussian broadening (dependent on d-spacing) (μs/Å). |
broad_gauss_sigma_2 |
Parameter
|
Gaussian broadening (instrument-dependent term) (μs²/Ų). |
broad_gauss_size_g |
Parameter
|
Gaussian isotropic size broadening, additive to σ₂ (μs²/Ų). |
broad_gauss_strain_g |
Parameter
|
Gaussian isotropic strain broadening, additive to σ₁ (μs/Å). |
type |
str
|
Active factory tag for this category. |
unique_name |
str
|
Fully qualified name: datablock, category, entry. |
parameters |
list
|
All GenericDescriptorBase instances on this item. |
as_cif |
str
|
Return CIF representation of this object. |
rise_alpha_0
property
writable
Back-to-back exponential rise α₀ (μs).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
rise_alpha_1
property
writable
Back-to-back exponential rise α₁ (μs/Å).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
decay_beta_0
property
writable
Back-to-back exponential decay β₀ (μs).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
decay_beta_1
property
writable
Back-to-back exponential decay β₁ (μs/Å).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_lorentz_gamma_0
property
writable
Lorentzian broadening (microstrain effects) (μs).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_lorentz_gamma_1
property
writable
Lorentzian broadening (dependent on d-spacing) (μs/Å).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_lorentz_gamma_2
property
writable
Lorentzian broadening (instrument-dependent term) (μs²/Ų).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_lorentz_size_l
property
writable
Lorentzian isotropic size broadening, additive to γ₂ (μs²/Ų).
broad_lorentz_strain_l
property
writable
Lorentzian isotropic strain broadening, additive to γ₁ (μs/Å).
cutoff_fwhm
property
writable
Peak-range cutoff in FWHMs (speed vs accuracy).
The profile is evaluated only within this many FWHMs of each
peak. 0 (default) means no cutoff (the full range is
computed); a positive value is a literal cutoff in FWHMs that
mirrors FullProf's WDT (faster, truncates the peak tails).
Reading returns the underlying descriptor; assigning updates its
value.
broad_gauss_sigma_0
property
writable
Gaussian broadening (instrumental resolution) (μs²).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_gauss_sigma_1
property
writable
Gaussian broadening (dependent on d-spacing) (μs/Å).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_gauss_sigma_2
property
writable
Gaussian broadening (instrument-dependent term) (μs²/Ų).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_gauss_size_g
property
writable
Gaussian isotropic size broadening, additive to σ₂ (μs²/Ų).
broad_gauss_strain_g
property
writable
Gaussian isotropic strain broadening, additive to σ₁ (μs/Å).
type
property
writable
Active factory tag for this category.
unique_name
property
Fully qualified name: datablock, category, entry.
parameters
property
All GenericDescriptorBase instances on this item.
as_cif
property
Return CIF representation of this object.
show_supported()
Print supported peak profiles with context-local aliases.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print parameters, other properties, and methods.
from_cif(block, idx=0)
Populate this item from a CIF block.
TofDoubleJorgensenVonDreele()
Double back-to-back exponentials ⊗ pseudo-Voigt TOF profile.
Methods:
| Name | Description |
|---|---|
show_supported |
Print supported peak profiles with context-local aliases. |
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print parameters, other properties, and methods. |
from_cif |
Populate this item from a CIF block. |
Attributes:
| Name | Type | Description |
|---|---|---|
dexp_rise_alpha_1 |
Parameter
|
Double-exp rise parameter α₁ (μs). |
dexp_rise_alpha_2 |
Parameter
|
Double-exp rise parameter α₂ (μs/Å). |
dexp_decay_beta_00 |
Parameter
|
Double-exp first-regime decay β₀₀ (μs). |
dexp_decay_beta_01 |
Parameter
|
Double-exp first-regime decay β₀₁ (μs/Å). |
dexp_decay_beta_10 |
Parameter
|
Double-exp second-regime decay β₁₀ (μs). |
dexp_switch_r_01 |
Parameter
|
Double-exp switching function r₀₁. |
dexp_switch_r_02 |
Parameter
|
Double-exp switching function r₀₂. |
dexp_switch_r_03 |
Parameter
|
Double-exp switching function r₀₃. |
broad_lorentz_gamma_0 |
Parameter
|
Lorentzian broadening (microstrain effects) (μs). |
broad_lorentz_gamma_1 |
Parameter
|
Lorentzian broadening (dependent on d-spacing) (μs/Å). |
broad_lorentz_gamma_2 |
Parameter
|
Lorentzian broadening (instrument-dependent term) (μs²/Ų). |
broad_lorentz_size_l |
Parameter
|
Lorentzian isotropic size broadening, additive to γ₂ (μs²/Ų). |
broad_lorentz_strain_l |
Parameter
|
Lorentzian isotropic strain broadening, additive to γ₁ (μs/Å). |
cutoff_fwhm |
NumericDescriptor
|
Peak-range cutoff in FWHMs (speed vs accuracy). |
broad_gauss_sigma_0 |
Parameter
|
Gaussian broadening (instrumental resolution) (μs²). |
broad_gauss_sigma_1 |
Parameter
|
Gaussian broadening (dependent on d-spacing) (μs/Å). |
broad_gauss_sigma_2 |
Parameter
|
Gaussian broadening (instrument-dependent term) (μs²/Ų). |
broad_gauss_size_g |
Parameter
|
Gaussian isotropic size broadening, additive to σ₂ (μs²/Ų). |
broad_gauss_strain_g |
Parameter
|
Gaussian isotropic strain broadening, additive to σ₁ (μs/Å). |
type |
str
|
Active factory tag for this category. |
unique_name |
str
|
Fully qualified name: datablock, category, entry. |
parameters |
list
|
All GenericDescriptorBase instances on this item. |
as_cif |
str
|
Return CIF representation of this object. |
dexp_rise_alpha_1
property
writable
Double-exp rise parameter α₁ (μs).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
dexp_rise_alpha_2
property
writable
Double-exp rise parameter α₂ (μs/Å).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
dexp_decay_beta_00
property
writable
Double-exp first-regime decay β₀₀ (μs).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
dexp_decay_beta_01
property
writable
Double-exp first-regime decay β₀₁ (μs/Å).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
dexp_decay_beta_10
property
writable
Double-exp second-regime decay β₁₀ (μs).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
dexp_switch_r_01
property
writable
Double-exp switching function r₀₁.
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
dexp_switch_r_02
property
writable
Double-exp switching function r₀₂.
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
dexp_switch_r_03
property
writable
Double-exp switching function r₀₃.
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_lorentz_gamma_0
property
writable
Lorentzian broadening (microstrain effects) (μs).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_lorentz_gamma_1
property
writable
Lorentzian broadening (dependent on d-spacing) (μs/Å).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_lorentz_gamma_2
property
writable
Lorentzian broadening (instrument-dependent term) (μs²/Ų).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_lorentz_size_l
property
writable
Lorentzian isotropic size broadening, additive to γ₂ (μs²/Ų).
broad_lorentz_strain_l
property
writable
Lorentzian isotropic strain broadening, additive to γ₁ (μs/Å).
cutoff_fwhm
property
writable
Peak-range cutoff in FWHMs (speed vs accuracy).
The profile is evaluated only within this many FWHMs of each
peak. 0 (default) means no cutoff (the full range is
computed); a positive value is a literal cutoff in FWHMs that
mirrors FullProf's WDT (faster, truncates the peak tails).
Reading returns the underlying descriptor; assigning updates its
value.
broad_gauss_sigma_0
property
writable
Gaussian broadening (instrumental resolution) (μs²).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_gauss_sigma_1
property
writable
Gaussian broadening (dependent on d-spacing) (μs/Å).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_gauss_sigma_2
property
writable
Gaussian broadening (instrument-dependent term) (μs²/Ų).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_gauss_size_g
property
writable
Gaussian isotropic size broadening, additive to σ₂ (μs²/Ų).
broad_gauss_strain_g
property
writable
Gaussian isotropic strain broadening, additive to σ₁ (μs/Å).
type
property
writable
Active factory tag for this category.
unique_name
property
Fully qualified name: datablock, category, entry.
parameters
property
All GenericDescriptorBase instances on this item.
as_cif
property
Return CIF representation of this object.
show_supported()
Print supported peak profiles with context-local aliases.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print parameters, other properties, and methods.
from_cif(block, idx=0)
Populate this item from a CIF block.
tof_mixins
Time-of-flight (TOF) peak-profile mixin classes.
Defines parameter mixins for TOF peak shapes based on the Jorgensen back-to-back exponential (BBE) formalism:
TofGaussianBroadeningMixin— σ₀, σ₁, σ₂TofLorentzianBroadeningMixin— γ₀, γ₁, γ₂TofBackToBackExponentialMixin— α₀, α₁ (rise), β₀, β₁ (decay)TofDoubleExponentialMixin— α₁, α₂ (rise), β₀₀, β₀₁, β₁₀ (decay), r₀₁, r₀₂, r₀₃ (switching function) for double-BBE (Z-Rietveld type0m)
These are composed into concrete peak classes in tof.py.
Classes:
| Name | Description |
|---|---|
TofGaussianBroadeningMixin |
TOF Gaussian broadening parameters σ₀, σ₁, σ₂. |
TofLorentzianBroadeningMixin |
TOF Lorentzian broadening parameters γ₀, γ₁, γ₂. |
TofBackToBackExponentialMixin |
Back-to-back exponential (BBE) rise and decay parameters. |
TofDoubleExponentialMixin |
Double back-to-back exponential parameters for Z-Rietveld type0m. |
TofGaussianBroadeningMixin()
TOF Gaussian broadening parameters σ₀, σ₁, σ₂.
The constant term σ₀ defaults nonzero so every TOF profile has a finite peak width out of the box; σ₁ and σ₂ default to 0.
Attributes:
| Name | Type | Description |
|---|---|---|
cutoff_fwhm |
NumericDescriptor
|
Peak-range cutoff in FWHMs (speed vs accuracy). |
broad_gauss_sigma_0 |
Parameter
|
Gaussian broadening (instrumental resolution) (μs²). |
broad_gauss_sigma_1 |
Parameter
|
Gaussian broadening (dependent on d-spacing) (μs/Å). |
broad_gauss_sigma_2 |
Parameter
|
Gaussian broadening (instrument-dependent term) (μs²/Ų). |
broad_gauss_size_g |
Parameter
|
Gaussian isotropic size broadening, additive to σ₂ (μs²/Ų). |
broad_gauss_strain_g |
Parameter
|
Gaussian isotropic strain broadening, additive to σ₁ (μs/Å). |
cutoff_fwhm
property
writable
Peak-range cutoff in FWHMs (speed vs accuracy).
The profile is evaluated only within this many FWHMs of each
peak. 0 (default) means no cutoff (the full range is
computed); a positive value is a literal cutoff in FWHMs that
mirrors FullProf's WDT (faster, truncates the peak tails).
Reading returns the underlying descriptor; assigning updates its
value.
broad_gauss_sigma_0
property
writable
Gaussian broadening (instrumental resolution) (μs²).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_gauss_sigma_1
property
writable
Gaussian broadening (dependent on d-spacing) (μs/Å).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_gauss_sigma_2
property
writable
Gaussian broadening (instrument-dependent term) (μs²/Ų).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_gauss_size_g
property
writable
Gaussian isotropic size broadening, additive to σ₂ (μs²/Ų).
broad_gauss_strain_g
property
writable
Gaussian isotropic strain broadening, additive to σ₁ (μs/Å).
TofLorentzianBroadeningMixin()
TOF Lorentzian broadening parameters γ₀, γ₁, γ₂.
Attributes:
| Name | Type | Description |
|---|---|---|
broad_lorentz_gamma_0 |
Parameter
|
Lorentzian broadening (microstrain effects) (μs). |
broad_lorentz_gamma_1 |
Parameter
|
Lorentzian broadening (dependent on d-spacing) (μs/Å). |
broad_lorentz_gamma_2 |
Parameter
|
Lorentzian broadening (instrument-dependent term) (μs²/Ų). |
broad_lorentz_size_l |
Parameter
|
Lorentzian isotropic size broadening, additive to γ₂ (μs²/Ų). |
broad_lorentz_strain_l |
Parameter
|
Lorentzian isotropic strain broadening, additive to γ₁ (μs/Å). |
broad_lorentz_gamma_0
property
writable
Lorentzian broadening (microstrain effects) (μs).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_lorentz_gamma_1
property
writable
Lorentzian broadening (dependent on d-spacing) (μs/Å).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_lorentz_gamma_2
property
writable
Lorentzian broadening (instrument-dependent term) (μs²/Ų).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_lorentz_size_l
property
writable
Lorentzian isotropic size broadening, additive to γ₂ (μs²/Ų).
broad_lorentz_strain_l
property
writable
Lorentzian isotropic strain broadening, additive to γ₁ (μs/Å).
TofBackToBackExponentialMixin()
Back-to-back exponential (BBE) rise and decay parameters.
Rise parameters α₀, α₁ and decay parameters β₀, β₁ follow Von Dreele, Jorgensen & Windsor, J. Appl. Cryst. 15, 581 (1982).
The rise α₁ and decay β₀ default nonzero so the profile is normalisable and the peak is visible; refine per instrument.
Attributes:
| Name | Type | Description |
|---|---|---|
rise_alpha_0 |
Parameter
|
Back-to-back exponential rise α₀ (μs). |
rise_alpha_1 |
Parameter
|
Back-to-back exponential rise α₁ (μs/Å). |
decay_beta_0 |
Parameter
|
Back-to-back exponential decay β₀ (μs). |
decay_beta_1 |
Parameter
|
Back-to-back exponential decay β₁ (μs/Å). |
rise_alpha_0
property
writable
Back-to-back exponential rise α₀ (μs).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
rise_alpha_1
property
writable
Back-to-back exponential rise α₁ (μs/Å).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
decay_beta_0
property
writable
Back-to-back exponential decay β₀ (μs).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
decay_beta_1
property
writable
Back-to-back exponential decay β₁ (μs/Å).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
TofDoubleExponentialMixin()
Double back-to-back exponential parameters for Z-Rietveld type0m.
Rise parameters α₁, α₂, decay parameters β₀₀, β₀₁, β₁₀ for two exponential regimes, and switching-function parameters r₀₁, r₀₂, r₀₃.
α₁, β₀₀, β₁₀ and r₀₁ default nonzero so both regimes stay finite and blended; an all-zero set produces NaN. Refine per instrument.
Attributes:
| Name | Type | Description |
|---|---|---|
dexp_rise_alpha_1 |
Parameter
|
Double-exp rise parameter α₁ (μs). |
dexp_rise_alpha_2 |
Parameter
|
Double-exp rise parameter α₂ (μs/Å). |
dexp_decay_beta_00 |
Parameter
|
Double-exp first-regime decay β₀₀ (μs). |
dexp_decay_beta_01 |
Parameter
|
Double-exp first-regime decay β₀₁ (μs/Å). |
dexp_decay_beta_10 |
Parameter
|
Double-exp second-regime decay β₁₀ (μs). |
dexp_switch_r_01 |
Parameter
|
Double-exp switching function r₀₁. |
dexp_switch_r_02 |
Parameter
|
Double-exp switching function r₀₂. |
dexp_switch_r_03 |
Parameter
|
Double-exp switching function r₀₃. |
dexp_rise_alpha_1
property
writable
Double-exp rise parameter α₁ (μs).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
dexp_rise_alpha_2
property
writable
Double-exp rise parameter α₂ (μs/Å).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
dexp_decay_beta_00
property
writable
Double-exp first-regime decay β₀₀ (μs).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
dexp_decay_beta_01
property
writable
Double-exp first-regime decay β₀₁ (μs/Å).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
dexp_decay_beta_10
property
writable
Double-exp second-regime decay β₁₀ (μs).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
dexp_switch_r_01
property
writable
Double-exp switching function r₀₁.
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
dexp_switch_r_02
property
writable
Double-exp switching function r₀₂.
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
dexp_switch_r_03
property
writable
Double-exp switching function r₀₃.
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
total
Total-scattering (PDF) peak profile classes.
Classes:
| Name | Description |
|---|---|
TotalGaussianDampedSinc |
Gaussian-damped sinc peak for total scattering (PDF). |
TotalGaussianDampedSinc()
Gaussian-damped sinc peak for total scattering (PDF).
Methods:
| Name | Description |
|---|---|
show_supported |
Print supported peak profiles with context-local aliases. |
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print parameters, other properties, and methods. |
from_cif |
Populate this item from a CIF block. |
Attributes:
| Name | Type | Description |
|---|---|---|
damp_q |
Parameter
|
Q-resolution damping for high-r PDF peak amplitude (Å⁻¹). |
broad_q |
Parameter
|
Quadratic peak broadening from thermal uncertainty (Å⁻²). |
cutoff_q |
Parameter
|
Q-value cutoff for Fourier transform (Å⁻¹). |
sharp_delta_1 |
Parameter
|
PDF peak sharpening coefficient (1/r dependence) (Å). |
sharp_delta_2 |
Parameter
|
PDF peak sharpening coefficient (1/r² dependence) (Ų). |
damp_particle_diameter |
Parameter
|
Particle diameter for spherical envelope damping correction (Å). |
type |
str
|
Active factory tag for this category. |
unique_name |
str
|
Fully qualified name: datablock, category, entry. |
parameters |
list
|
All GenericDescriptorBase instances on this item. |
as_cif |
str
|
Return CIF representation of this object. |
damp_q
property
writable
Q-resolution damping for high-r PDF peak amplitude (Å⁻¹).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_q
property
writable
Quadratic peak broadening from thermal uncertainty (Å⁻²).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
cutoff_q
property
writable
Q-value cutoff for Fourier transform (Å⁻¹).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
sharp_delta_1
property
writable
PDF peak sharpening coefficient (1/r dependence) (Å).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
sharp_delta_2
property
writable
PDF peak sharpening coefficient (1/r² dependence) (Ų).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
damp_particle_diameter
property
writable
Particle diameter for spherical envelope damping correction (Å).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
type
property
writable
Active factory tag for this category.
unique_name
property
Fully qualified name: datablock, category, entry.
parameters
property
All GenericDescriptorBase instances on this item.
as_cif
property
Return CIF representation of this object.
show_supported()
Print supported peak profiles with context-local aliases.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print parameters, other properties, and methods.
from_cif(block, idx=0)
Populate this item from a CIF block.
total_mixins
Total scattering / PDF peak-profile component classes.
This module provides classes that add broadening and asymmetry parameters. They are composed into concrete peak classes elsewhere via multiple inheritance.
Classes:
| Name | Description |
|---|---|
TotalBroadeningMixin |
PDF broadening/damping/sharpening parameters. |
TotalBroadeningMixin()
PDF broadening/damping/sharpening parameters.
Attributes:
| Name | Type | Description |
|---|---|---|
damp_q |
Parameter
|
Q-resolution damping for high-r PDF peak amplitude (Å⁻¹). |
broad_q |
Parameter
|
Quadratic peak broadening from thermal uncertainty (Å⁻²). |
cutoff_q |
Parameter
|
Q-value cutoff for Fourier transform (Å⁻¹). |
sharp_delta_1 |
Parameter
|
PDF peak sharpening coefficient (1/r dependence) (Å). |
sharp_delta_2 |
Parameter
|
PDF peak sharpening coefficient (1/r² dependence) (Ų). |
damp_particle_diameter |
Parameter
|
Particle diameter for spherical envelope damping correction (Å). |
damp_q
property
writable
Q-resolution damping for high-r PDF peak amplitude (Å⁻¹).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
broad_q
property
writable
Quadratic peak broadening from thermal uncertainty (Å⁻²).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
cutoff_q
property
writable
Q-value cutoff for Fourier transform (Å⁻¹).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
sharp_delta_1
property
writable
PDF peak sharpening coefficient (1/r dependence) (Å).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
sharp_delta_2
property
writable
PDF peak sharpening coefficient (1/r² dependence) (Ų).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
damp_particle_diameter
property
writable
Particle diameter for spherical envelope damping correction (Å).
Reading this property returns the underlying Parameter
object. Assigning to it updates the parameter value.
pref_orient
Preferred-orientation category (March-Dollase) for textured powders.
Modules:
| Name | Description |
|---|---|
default |
Per-structure March-Dollase preferred-orientation corrections. |
factory |
Preferred-orientation factory — delegates entirely to |
Classes
Modules
default
Per-structure March-Dollase preferred-orientation corrections.
Classes:
| Name | Description |
|---|---|
PrefOrient |
March-Dollase preferred-orientation correction for one structure. |
PrefOrients |
Collection of per-structure preferred-orientation corrections. |
PrefOrient()
March-Dollase preferred-orientation correction for one structure.
Methods:
| Name | Description |
|---|---|
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print parameters, other properties, and methods. |
from_cif |
Populate this item from a CIF block. |
Attributes:
| Name | Type | Description |
|---|---|---|
structure_id |
StringDescriptor
|
Identifier of the corrected structure. |
march_r |
Parameter
|
March coefficient (1 = no preferred orientation). |
index_h |
IntegerDescriptor
|
Texture-axis Miller index h. |
index_k |
IntegerDescriptor
|
Texture-axis Miller index k. |
index_l |
IntegerDescriptor
|
Texture-axis Miller index l. |
march_random_fract |
Parameter
|
Random (untextured) fraction; 0 = pure March-Dollase. |
unique_name |
str
|
Fully qualified name: datablock, category, entry. |
parameters |
list
|
All GenericDescriptorBase instances on this item. |
as_cif |
str
|
Return CIF representation of this object. |
structure_id
property
writable
Identifier of the corrected structure.
march_r
property
writable
March coefficient (1 = no preferred orientation).
index_h
property
writable
Texture-axis Miller index h.
index_k
property
writable
Texture-axis Miller index k.
index_l
property
writable
Texture-axis Miller index l.
march_random_fract
property
writable
Random (untextured) fraction; 0 = pure March-Dollase.
unique_name
property
Fully qualified name: datablock, category, entry.
parameters
property
All GenericDescriptorBase instances on this item.
as_cif
property
Return CIF representation of this object.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print parameters, other properties, and methods.
from_cif(block, idx=0)
Populate this item from a CIF block.
PrefOrients()
Collection of per-structure preferred-orientation corrections.
Methods:
| Name | Description |
|---|---|
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print a summary of public attributes and contained items. |
__getitem__ |
Return an item by name or positional index. |
__setitem__ |
Insert or replace an item under the given identity key. |
__delitem__ |
Delete an item by key or raise |
__contains__ |
Check whether an item with the given key exists. |
__iter__ |
Iterate over items in insertion order. |
__len__ |
Return the number of items in the collection. |
remove |
Remove an item by its key. |
clear |
Remove every item, then mark the parent datablock dirty. |
keys |
Yield keys for all items in insertion order. |
values |
Yield items in insertion order. |
items |
Yield |
from_cif |
Populate this collection from a CIF block. |
add |
Insert or replace a pre-built item into the collection. |
create |
Create a new item with the given attributes and add it. |
Attributes:
| Name | Type | Description |
|---|---|---|
unique_name |
str | None
|
Return None; collections have no unique name. |
parameters |
list
|
All parameters from all items in this collection. |
as_cif |
str
|
Return CIF representation of this object. |
names |
list[str | None]
|
List of all item keys in the collection. |
scalar_descriptors |
list
|
Collection-level descriptors serialized outside the loop. |
unique_name
property
Return None; collections have no unique name.
parameters
property
All parameters from all items in this collection.
as_cif
property
Return CIF representation of this object.
names
property
List of all item keys in the collection.
scalar_descriptors
property
Collection-level descriptors serialized outside the loop.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print a summary of public attributes and contained items.
__getitem__(key)
Return an item by name or positional index.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key
|
str | int
|
Identity key (str) or zero-based positional index (int). |
required |
Returns:
| Type | Description |
|---|---|
GuardedBase
|
The item matching the given key or index. |
Raises:
| Type | Description |
|---|---|
TypeError
|
If key is neither |
__setitem__(name, item)
Insert or replace an item under the given identity key.
__delitem__(name)
Delete an item by key or raise KeyError if missing.
__contains__(name)
Check whether an item with the given key exists.
__iter__()
Iterate over items in insertion order.
__len__()
Return the number of items in the collection.
remove(name)
Remove an item by its key.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Identity key of the item to remove. |
required |
clear()
Remove every item, then mark the parent datablock dirty.
Layers dirty-marking on :meth:CollectionBase.clear, mirroring
how :meth:add layers it on the base insert.
keys()
Yield keys for all items in insertion order.
values()
Yield items in insertion order.
items()
Yield (key, item) pairs in insertion order.
from_cif(block)
Populate this collection from a CIF block.
add(item)
Insert or replace a pre-built item into the collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
item
|
object
|
A |
required |
create(**kwargs)
Create a new item with the given attributes and add it.
A default instance of the collection's item type is created,
then each keyword argument is applied via setattr.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**kwargs
|
object
|
Attribute names and values for the new item. |
{}
|
factory
Preferred-orientation factory — delegates entirely to FactoryBase.
Classes:
| Name | Description |
|---|---|
PrefOrientFactory |
Create preferred-orientation collections by tag. |
PrefOrientFactory
Create preferred-orientation collections by tag.
Methods:
| Name | Description |
|---|---|
__init_subclass__ |
Give each subclass its own independent registry and rules. |
register |
Class decorator to register a concrete class. |
supported_tags |
Return list of all supported tags. |
default_tag |
Resolve the default tag for a given experimental context. |
create |
Instantiate a registered class by tag. |
create_default_for |
Instantiate the default class for a given context. |
supported_for |
Return classes matching conditions and/or calculator. |
show_supported |
Pretty-print a table of supported types. |
__init_subclass__(**kwargs)
Give each subclass its own independent registry and rules.
register(klass)
classmethod
Class decorator to register a concrete class.
Usage::
@SomeFactory.register class MyClass(SomeBase): type_info = TypeInfo(...)
Returns the class unmodified.
supported_tags()
classmethod
Return list of all supported tags.
default_tag(**conditions)
classmethod
Resolve the default tag for a given experimental context.
Uses largest-subset matching: the rule whose key is the
biggest subset of the given conditions wins. A rule with an
empty key (frozenset()) acts as a universal fallback.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**conditions
|
object
|
Experimental-axis values, e.g.
|
{}
|
Returns:
| Type | Description |
|---|---|
str
|
The resolved default tag string. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If no rule matches the given conditions. |
create(tag, **kwargs)
classmethod
Instantiate a registered class by tag.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag
|
str
|
|
required |
**kwargs
|
object
|
Forwarded to the class constructor. |
{}
|
Returns:
| Type | Description |
|---|---|
object
|
A new instance of the registered class. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If tag is not in the registry. |
create_default_for(**conditions)
classmethod
Instantiate the default class for a given context.
Combines default_tag(**conditions) with create(tag).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**conditions
|
object
|
Experimental-axis values. |
{}
|
Returns:
| Type | Description |
|---|---|
object
|
A new instance of the default class. |
supported_for(*, calculator=None, sample_form=None, scattering_type=None, beam_mode=None, radiation_probe=None)
classmethod
Return classes matching conditions and/or calculator.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
calculator
|
object
|
Optional |
None
|
sample_form
|
object
|
Optional |
None
|
scattering_type
|
object
|
Optional |
None
|
beam_mode
|
object
|
Optional |
None
|
radiation_probe
|
object
|
Optional |
None
|
Returns:
| Type | Description |
|---|---|
list[type]
|
Classes matching the given conditions. |
show_supported(*, calculator=None, sample_form=None, scattering_type=None, beam_mode=None, radiation_probe=None)
classmethod
Pretty-print a table of supported types.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
calculator
|
object
|
Optional |
None
|
sample_form
|
object
|
Optional |
None
|
scattering_type
|
object
|
Optional |
None
|
beam_mode
|
object
|
Optional |
None
|
radiation_probe
|
object
|
Optional |
None
|
refln
Reflection categories for powder and single-crystal experiments.
Modules:
| Name | Description |
|---|---|
bragg_pd |
Calculated powder reflection categories for CWL and TOF. |
bragg_sc |
Single-crystal reflection categories for CWL and TOF. |
factory |
Reflection collection factory — delegates to |
Classes
Modules
bragg_pd
Calculated powder reflection categories for CWL and TOF.
Classes:
| Name | Description |
|---|---|
PowderReflnBase |
Single calculated powder reflection row. |
PowderCwlRefln |
Single calculated powder reflection row for CWL experiments. |
PowderTofRefln |
Single calculated powder reflection row for TOF experiments. |
PowderReflnDataBase |
Base collection for calculated powder reflection rows. |
PowderCwlReflnData |
Calculated powder reflection collection for CWL experiments. |
PowderTofReflnData |
Calculated powder reflection collection for TOF experiments. |
PowderReflnBase()
Single calculated powder reflection row.
Methods:
| Name | Description |
|---|---|
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print parameters, other properties, and methods. |
from_cif |
Populate this item from a CIF block. |
Attributes:
| Name | Type | Description |
|---|---|---|
structure_id |
StringDescriptor
|
Linked-structure identifier for this reflection. |
f_calc |
NumericDescriptor
|
Calculated structure-factor amplitude for this reflection. |
f_squared_calc |
NumericDescriptor
|
Calculated structure-factor amplitude squared. |
parameters |
list
|
Powder reflection descriptors serialized in CIF loops. |
unique_name |
str
|
Fully qualified name: datablock, category, entry. |
as_cif |
str
|
Return CIF representation of this object. |
id |
StringDescriptor
|
Identifier of the reflection. |
d_spacing |
NumericDescriptor
|
Distance between lattice planes for this reflection (Å). |
sin_theta_over_lambda |
NumericDescriptor
|
The sin(θ)/λ value for this reflection (Å⁻¹). |
index_h |
NumericDescriptor
|
Miller index h of a measured reflection. |
index_k |
NumericDescriptor
|
Miller index k of a measured reflection. |
index_l |
NumericDescriptor
|
Miller index l of a measured reflection. |
intensity_meas |
NumericDescriptor
|
The intensity of the reflection derived from the measurements. |
intensity_meas_su |
NumericDescriptor
|
Standard uncertainty of the measured intensity. |
intensity_calc |
NumericDescriptor
|
Intensity of the reflection calculated from atom site data. |
structure_id
property
Linked-structure identifier for this reflection.
f_calc
property
Calculated structure-factor amplitude for this reflection.
f_squared_calc
property
Calculated structure-factor amplitude squared.
parameters
property
Powder reflection descriptors serialized in CIF loops.
unique_name
property
Fully qualified name: datablock, category, entry.
as_cif
property
Return CIF representation of this object.
id
property
Identifier of the reflection.
Reading this property returns the underlying
StringDescriptor object.
d_spacing
property
Distance between lattice planes for this reflection (Å).
Reading this property returns the underlying
NumericDescriptor object.
sin_theta_over_lambda
property
The sin(θ)/λ value for this reflection (Å⁻¹).
Reading this property returns the underlying
NumericDescriptor object.
index_h
property
Miller index h of a measured reflection.
Reading this property returns the underlying
NumericDescriptor object.
index_k
property
Miller index k of a measured reflection.
Reading this property returns the underlying
NumericDescriptor object.
index_l
property
Miller index l of a measured reflection.
Reading this property returns the underlying
NumericDescriptor object.
intensity_meas
property
The intensity of the reflection derived from the measurements.
Reading this property returns the underlying
NumericDescriptor object.
intensity_meas_su
property
Standard uncertainty of the measured intensity.
Reading this property returns the underlying
NumericDescriptor object.
intensity_calc
property
Intensity of the reflection calculated from atom site data.
Reading this property returns the underlying
NumericDescriptor object.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print parameters, other properties, and methods.
from_cif(block, idx=0)
Populate this item from a CIF block.
PowderCwlRefln()
Single calculated powder reflection row for CWL experiments.
Methods:
| Name | Description |
|---|---|
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print parameters, other properties, and methods. |
from_cif |
Populate this item from a CIF block. |
Attributes:
| Name | Type | Description |
|---|---|---|
two_theta |
NumericDescriptor
|
Calculated 2theta position for this reflection. |
parameters |
list
|
Powder CWL reflection descriptors serialized in CIF loops. |
unique_name |
str
|
Fully qualified name: datablock, category, entry. |
as_cif |
str
|
Return CIF representation of this object. |
id |
StringDescriptor
|
Identifier of the reflection. |
d_spacing |
NumericDescriptor
|
Distance between lattice planes for this reflection (Å). |
sin_theta_over_lambda |
NumericDescriptor
|
The sin(θ)/λ value for this reflection (Å⁻¹). |
index_h |
NumericDescriptor
|
Miller index h of a measured reflection. |
index_k |
NumericDescriptor
|
Miller index k of a measured reflection. |
index_l |
NumericDescriptor
|
Miller index l of a measured reflection. |
intensity_meas |
NumericDescriptor
|
The intensity of the reflection derived from the measurements. |
intensity_meas_su |
NumericDescriptor
|
Standard uncertainty of the measured intensity. |
intensity_calc |
NumericDescriptor
|
Intensity of the reflection calculated from atom site data. |
structure_id |
StringDescriptor
|
Linked-structure identifier for this reflection. |
f_calc |
NumericDescriptor
|
Calculated structure-factor amplitude for this reflection. |
f_squared_calc |
NumericDescriptor
|
Calculated structure-factor amplitude squared. |
two_theta
property
Calculated 2theta position for this reflection.
parameters
property
Powder CWL reflection descriptors serialized in CIF loops.
unique_name
property
Fully qualified name: datablock, category, entry.
as_cif
property
Return CIF representation of this object.
id
property
Identifier of the reflection.
Reading this property returns the underlying
StringDescriptor object.
d_spacing
property
Distance between lattice planes for this reflection (Å).
Reading this property returns the underlying
NumericDescriptor object.
sin_theta_over_lambda
property
The sin(θ)/λ value for this reflection (Å⁻¹).
Reading this property returns the underlying
NumericDescriptor object.
index_h
property
Miller index h of a measured reflection.
Reading this property returns the underlying
NumericDescriptor object.
index_k
property
Miller index k of a measured reflection.
Reading this property returns the underlying
NumericDescriptor object.
index_l
property
Miller index l of a measured reflection.
Reading this property returns the underlying
NumericDescriptor object.
intensity_meas
property
The intensity of the reflection derived from the measurements.
Reading this property returns the underlying
NumericDescriptor object.
intensity_meas_su
property
Standard uncertainty of the measured intensity.
Reading this property returns the underlying
NumericDescriptor object.
intensity_calc
property
Intensity of the reflection calculated from atom site data.
Reading this property returns the underlying
NumericDescriptor object.
structure_id
property
Linked-structure identifier for this reflection.
f_calc
property
Calculated structure-factor amplitude for this reflection.
f_squared_calc
property
Calculated structure-factor amplitude squared.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print parameters, other properties, and methods.
from_cif(block, idx=0)
Populate this item from a CIF block.
PowderTofRefln()
Single calculated powder reflection row for TOF experiments.
Methods:
| Name | Description |
|---|---|
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print parameters, other properties, and methods. |
from_cif |
Populate this item from a CIF block. |
Attributes:
| Name | Type | Description |
|---|---|---|
time_of_flight |
NumericDescriptor
|
Calculated time-of-flight position for this reflection. |
parameters |
list
|
Powder TOF reflection descriptors serialized in CIF loops. |
unique_name |
str
|
Fully qualified name: datablock, category, entry. |
as_cif |
str
|
Return CIF representation of this object. |
id |
StringDescriptor
|
Identifier of the reflection. |
d_spacing |
NumericDescriptor
|
Distance between lattice planes for this reflection (Å). |
sin_theta_over_lambda |
NumericDescriptor
|
The sin(θ)/λ value for this reflection (Å⁻¹). |
index_h |
NumericDescriptor
|
Miller index h of a measured reflection. |
index_k |
NumericDescriptor
|
Miller index k of a measured reflection. |
index_l |
NumericDescriptor
|
Miller index l of a measured reflection. |
intensity_meas |
NumericDescriptor
|
The intensity of the reflection derived from the measurements. |
intensity_meas_su |
NumericDescriptor
|
Standard uncertainty of the measured intensity. |
intensity_calc |
NumericDescriptor
|
Intensity of the reflection calculated from atom site data. |
structure_id |
StringDescriptor
|
Linked-structure identifier for this reflection. |
f_calc |
NumericDescriptor
|
Calculated structure-factor amplitude for this reflection. |
f_squared_calc |
NumericDescriptor
|
Calculated structure-factor amplitude squared. |
time_of_flight
property
Calculated time-of-flight position for this reflection.
parameters
property
Powder TOF reflection descriptors serialized in CIF loops.
unique_name
property
Fully qualified name: datablock, category, entry.
as_cif
property
Return CIF representation of this object.
id
property
Identifier of the reflection.
Reading this property returns the underlying
StringDescriptor object.
d_spacing
property
Distance between lattice planes for this reflection (Å).
Reading this property returns the underlying
NumericDescriptor object.
sin_theta_over_lambda
property
The sin(θ)/λ value for this reflection (Å⁻¹).
Reading this property returns the underlying
NumericDescriptor object.
index_h
property
Miller index h of a measured reflection.
Reading this property returns the underlying
NumericDescriptor object.
index_k
property
Miller index k of a measured reflection.
Reading this property returns the underlying
NumericDescriptor object.
index_l
property
Miller index l of a measured reflection.
Reading this property returns the underlying
NumericDescriptor object.
intensity_meas
property
The intensity of the reflection derived from the measurements.
Reading this property returns the underlying
NumericDescriptor object.
intensity_meas_su
property
Standard uncertainty of the measured intensity.
Reading this property returns the underlying
NumericDescriptor object.
intensity_calc
property
Intensity of the reflection calculated from atom site data.
Reading this property returns the underlying
NumericDescriptor object.
structure_id
property
Linked-structure identifier for this reflection.
f_calc
property
Calculated structure-factor amplitude for this reflection.
f_squared_calc
property
Calculated structure-factor amplitude squared.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print parameters, other properties, and methods.
from_cif(block, idx=0)
Populate this item from a CIF block.
PowderReflnDataBase(item_type)
Base collection for calculated powder reflection rows.
Methods:
| Name | Description |
|---|---|
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print a summary of public attributes and contained items. |
__getitem__ |
Return an item by name or positional index. |
__setitem__ |
Insert or replace an item under the given identity key. |
__delitem__ |
Delete an item by key or raise |
__contains__ |
Check whether an item with the given key exists. |
__iter__ |
Iterate over items in insertion order. |
__len__ |
Return the number of items in the collection. |
remove |
Remove an item by its key. |
clear |
Remove every item, then mark the parent datablock dirty. |
keys |
Yield keys for all items in insertion order. |
values |
Yield items in insertion order. |
items |
Yield |
from_cif |
Populate this collection from a CIF block. |
add |
Insert or replace a pre-built item into the collection. |
create |
Create a new item with the given attributes and add it. |
Attributes:
| Name | Type | Description |
|---|---|---|
id |
np.ndarray
|
Reflection identifiers for all rows. |
structure_id |
np.ndarray
|
Linked-structure identifiers for all rows. |
d_spacing |
np.ndarray
|
D-spacing values for all rows. |
sin_theta_over_lambda |
np.ndarray
|
sin(theta)/lambda values for all rows. |
index_h |
np.ndarray
|
Miller h indices for all rows. |
index_k |
np.ndarray
|
Miller k indices for all rows. |
index_l |
np.ndarray
|
Miller l indices for all rows. |
f_calc |
np.ndarray
|
Calculated structure-factor amplitudes for all rows. |
f_squared_calc |
np.ndarray
|
Calculated structure-factor amplitudes squared for all rows. |
unique_name |
str | None
|
Return None; collections have no unique name. |
parameters |
list
|
All parameters from all items in this collection. |
as_cif |
str
|
Return CIF representation of this object. |
names |
list[str | None]
|
List of all item keys in the collection. |
scalar_descriptors |
list
|
Collection-level descriptors serialized outside the loop. |
id
property
Reflection identifiers for all rows.
structure_id
property
Linked-structure identifiers for all rows.
d_spacing
property
D-spacing values for all rows.
sin_theta_over_lambda
property
sin(theta)/lambda values for all rows.
index_h
property
Miller h indices for all rows.
index_k
property
Miller k indices for all rows.
index_l
property
Miller l indices for all rows.
f_calc
property
Calculated structure-factor amplitudes for all rows.
f_squared_calc
property
Calculated structure-factor amplitudes squared for all rows.
unique_name
property
Return None; collections have no unique name.
parameters
property
All parameters from all items in this collection.
as_cif
property
Return CIF representation of this object.
names
property
List of all item keys in the collection.
scalar_descriptors
property
Collection-level descriptors serialized outside the loop.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print a summary of public attributes and contained items.
__getitem__(key)
Return an item by name or positional index.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key
|
str | int
|
Identity key (str) or zero-based positional index (int). |
required |
Returns:
| Type | Description |
|---|---|
GuardedBase
|
The item matching the given key or index. |
Raises:
| Type | Description |
|---|---|
TypeError
|
If key is neither |
__setitem__(name, item)
Insert or replace an item under the given identity key.
__delitem__(name)
Delete an item by key or raise KeyError if missing.
__contains__(name)
Check whether an item with the given key exists.
__iter__()
Iterate over items in insertion order.
__len__()
Return the number of items in the collection.
remove(name)
Remove an item by its key.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Identity key of the item to remove. |
required |
clear()
Remove every item, then mark the parent datablock dirty.
Layers dirty-marking on :meth:CollectionBase.clear, mirroring
how :meth:add layers it on the base insert.
keys()
Yield keys for all items in insertion order.
values()
Yield items in insertion order.
items()
Yield (key, item) pairs in insertion order.
from_cif(block)
Populate this collection from a CIF block.
add(item)
Insert or replace a pre-built item into the collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
item
|
object
|
A |
required |
create(**kwargs)
Create a new item with the given attributes and add it.
A default instance of the collection's item type is created,
then each keyword argument is applied via setattr.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**kwargs
|
object
|
Attribute names and values for the new item. |
{}
|
PowderCwlReflnData()
Calculated powder reflection collection for CWL experiments.
Methods:
| Name | Description |
|---|---|
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print a summary of public attributes and contained items. |
__getitem__ |
Return an item by name or positional index. |
__setitem__ |
Insert or replace an item under the given identity key. |
__delitem__ |
Delete an item by key or raise |
__contains__ |
Check whether an item with the given key exists. |
__iter__ |
Iterate over items in insertion order. |
__len__ |
Return the number of items in the collection. |
remove |
Remove an item by its key. |
clear |
Remove every item, then mark the parent datablock dirty. |
keys |
Yield keys for all items in insertion order. |
values |
Yield items in insertion order. |
items |
Yield |
from_cif |
Populate this collection from a CIF block. |
add |
Insert or replace a pre-built item into the collection. |
create |
Create a new item with the given attributes and add it. |
Attributes:
| Name | Type | Description |
|---|---|---|
two_theta |
np.ndarray
|
Calculated 2theta positions for all rows. |
unique_name |
str | None
|
Return None; collections have no unique name. |
parameters |
list
|
All parameters from all items in this collection. |
as_cif |
str
|
Return CIF representation of this object. |
names |
list[str | None]
|
List of all item keys in the collection. |
scalar_descriptors |
list
|
Collection-level descriptors serialized outside the loop. |
id |
np.ndarray
|
Reflection identifiers for all rows. |
structure_id |
np.ndarray
|
Linked-structure identifiers for all rows. |
d_spacing |
np.ndarray
|
D-spacing values for all rows. |
sin_theta_over_lambda |
np.ndarray
|
sin(theta)/lambda values for all rows. |
index_h |
np.ndarray
|
Miller h indices for all rows. |
index_k |
np.ndarray
|
Miller k indices for all rows. |
index_l |
np.ndarray
|
Miller l indices for all rows. |
f_calc |
np.ndarray
|
Calculated structure-factor amplitudes for all rows. |
f_squared_calc |
np.ndarray
|
Calculated structure-factor amplitudes squared for all rows. |
two_theta
property
Calculated 2theta positions for all rows.
unique_name
property
Return None; collections have no unique name.
parameters
property
All parameters from all items in this collection.
as_cif
property
Return CIF representation of this object.
names
property
List of all item keys in the collection.
scalar_descriptors
property
Collection-level descriptors serialized outside the loop.
id
property
Reflection identifiers for all rows.
structure_id
property
Linked-structure identifiers for all rows.
d_spacing
property
D-spacing values for all rows.
sin_theta_over_lambda
property
sin(theta)/lambda values for all rows.
index_h
property
Miller h indices for all rows.
index_k
property
Miller k indices for all rows.
index_l
property
Miller l indices for all rows.
f_calc
property
Calculated structure-factor amplitudes for all rows.
f_squared_calc
property
Calculated structure-factor amplitudes squared for all rows.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print a summary of public attributes and contained items.
__getitem__(key)
Return an item by name or positional index.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key
|
str | int
|
Identity key (str) or zero-based positional index (int). |
required |
Returns:
| Type | Description |
|---|---|
GuardedBase
|
The item matching the given key or index. |
Raises:
| Type | Description |
|---|---|
TypeError
|
If key is neither |
__setitem__(name, item)
Insert or replace an item under the given identity key.
__delitem__(name)
Delete an item by key or raise KeyError if missing.
__contains__(name)
Check whether an item with the given key exists.
__iter__()
Iterate over items in insertion order.
__len__()
Return the number of items in the collection.
remove(name)
Remove an item by its key.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Identity key of the item to remove. |
required |
clear()
Remove every item, then mark the parent datablock dirty.
Layers dirty-marking on :meth:CollectionBase.clear, mirroring
how :meth:add layers it on the base insert.
keys()
Yield keys for all items in insertion order.
values()
Yield items in insertion order.
items()
Yield (key, item) pairs in insertion order.
from_cif(block)
Populate this collection from a CIF block.
add(item)
Insert or replace a pre-built item into the collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
item
|
object
|
A |
required |
create(**kwargs)
Create a new item with the given attributes and add it.
A default instance of the collection's item type is created,
then each keyword argument is applied via setattr.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**kwargs
|
object
|
Attribute names and values for the new item. |
{}
|
PowderTofReflnData()
Calculated powder reflection collection for TOF experiments.
Methods:
| Name | Description |
|---|---|
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print a summary of public attributes and contained items. |
__getitem__ |
Return an item by name or positional index. |
__setitem__ |
Insert or replace an item under the given identity key. |
__delitem__ |
Delete an item by key or raise |
__contains__ |
Check whether an item with the given key exists. |
__iter__ |
Iterate over items in insertion order. |
__len__ |
Return the number of items in the collection. |
remove |
Remove an item by its key. |
clear |
Remove every item, then mark the parent datablock dirty. |
keys |
Yield keys for all items in insertion order. |
values |
Yield items in insertion order. |
items |
Yield |
from_cif |
Populate this collection from a CIF block. |
add |
Insert or replace a pre-built item into the collection. |
create |
Create a new item with the given attributes and add it. |
Attributes:
| Name | Type | Description |
|---|---|---|
time_of_flight |
np.ndarray
|
Calculated time-of-flight positions for all rows. |
unique_name |
str | None
|
Return None; collections have no unique name. |
parameters |
list
|
All parameters from all items in this collection. |
as_cif |
str
|
Return CIF representation of this object. |
names |
list[str | None]
|
List of all item keys in the collection. |
scalar_descriptors |
list
|
Collection-level descriptors serialized outside the loop. |
id |
np.ndarray
|
Reflection identifiers for all rows. |
structure_id |
np.ndarray
|
Linked-structure identifiers for all rows. |
d_spacing |
np.ndarray
|
D-spacing values for all rows. |
sin_theta_over_lambda |
np.ndarray
|
sin(theta)/lambda values for all rows. |
index_h |
np.ndarray
|
Miller h indices for all rows. |
index_k |
np.ndarray
|
Miller k indices for all rows. |
index_l |
np.ndarray
|
Miller l indices for all rows. |
f_calc |
np.ndarray
|
Calculated structure-factor amplitudes for all rows. |
f_squared_calc |
np.ndarray
|
Calculated structure-factor amplitudes squared for all rows. |
time_of_flight
property
Calculated time-of-flight positions for all rows.
unique_name
property
Return None; collections have no unique name.
parameters
property
All parameters from all items in this collection.
as_cif
property
Return CIF representation of this object.
names
property
List of all item keys in the collection.
scalar_descriptors
property
Collection-level descriptors serialized outside the loop.
id
property
Reflection identifiers for all rows.
structure_id
property
Linked-structure identifiers for all rows.
d_spacing
property
D-spacing values for all rows.
sin_theta_over_lambda
property
sin(theta)/lambda values for all rows.
index_h
property
Miller h indices for all rows.
index_k
property
Miller k indices for all rows.
index_l
property
Miller l indices for all rows.
f_calc
property
Calculated structure-factor amplitudes for all rows.
f_squared_calc
property
Calculated structure-factor amplitudes squared for all rows.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print a summary of public attributes and contained items.
__getitem__(key)
Return an item by name or positional index.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key
|
str | int
|
Identity key (str) or zero-based positional index (int). |
required |
Returns:
| Type | Description |
|---|---|
GuardedBase
|
The item matching the given key or index. |
Raises:
| Type | Description |
|---|---|
TypeError
|
If key is neither |
__setitem__(name, item)
Insert or replace an item under the given identity key.
__delitem__(name)
Delete an item by key or raise KeyError if missing.
__contains__(name)
Check whether an item with the given key exists.
__iter__()
Iterate over items in insertion order.
__len__()
Return the number of items in the collection.
remove(name)
Remove an item by its key.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Identity key of the item to remove. |
required |
clear()
Remove every item, then mark the parent datablock dirty.
Layers dirty-marking on :meth:CollectionBase.clear, mirroring
how :meth:add layers it on the base insert.
keys()
Yield keys for all items in insertion order.
values()
Yield items in insertion order.
items()
Yield (key, item) pairs in insertion order.
from_cif(block)
Populate this collection from a CIF block.
add(item)
Insert or replace a pre-built item into the collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
item
|
object
|
A |
required |
create(**kwargs)
Create a new item with the given attributes and add it.
A default instance of the collection's item type is created,
then each keyword argument is applied via setattr.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**kwargs
|
object
|
Attribute names and values for the new item. |
{}
|
bragg_sc
Single-crystal reflection categories for CWL and TOF.
Classes:
| Name | Description |
|---|---|
Refln |
Single reflection for single-crystal diffraction data. |
TofRefln |
TOF single-crystal reflection with a per-reflection wavelength. |
ReflnDataBase |
Base collection of reflections for single-crystal diffraction data. |
CwlReflnData |
Collection of reflections for CWL single-crystal diffraction data. |
TofReflnData |
Collection of reflections for TOF single-crystal diffraction data. |
Refln()
Single reflection for single-crystal diffraction data.
Methods:
| Name | Description |
|---|---|
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print parameters, other properties, and methods. |
from_cif |
Populate this item from a CIF block. |
Attributes:
| Name | Type | Description |
|---|---|---|
id |
StringDescriptor
|
Identifier of the reflection. |
d_spacing |
NumericDescriptor
|
Distance between lattice planes for this reflection (Å). |
sin_theta_over_lambda |
NumericDescriptor
|
The sin(θ)/λ value for this reflection (Å⁻¹). |
index_h |
NumericDescriptor
|
Miller index h of a measured reflection. |
index_k |
NumericDescriptor
|
Miller index k of a measured reflection. |
index_l |
NumericDescriptor
|
Miller index l of a measured reflection. |
intensity_meas |
NumericDescriptor
|
The intensity of the reflection derived from the measurements. |
intensity_meas_su |
NumericDescriptor
|
Standard uncertainty of the measured intensity. |
intensity_calc |
NumericDescriptor
|
Intensity of the reflection calculated from atom site data. |
unique_name |
str
|
Fully qualified name: datablock, category, entry. |
parameters |
list
|
All GenericDescriptorBase instances on this item. |
as_cif |
str
|
Return CIF representation of this object. |
id
property
Identifier of the reflection.
Reading this property returns the underlying
StringDescriptor object.
d_spacing
property
Distance between lattice planes for this reflection (Å).
Reading this property returns the underlying
NumericDescriptor object.
sin_theta_over_lambda
property
The sin(θ)/λ value for this reflection (Å⁻¹).
Reading this property returns the underlying
NumericDescriptor object.
index_h
property
Miller index h of a measured reflection.
Reading this property returns the underlying
NumericDescriptor object.
index_k
property
Miller index k of a measured reflection.
Reading this property returns the underlying
NumericDescriptor object.
index_l
property
Miller index l of a measured reflection.
Reading this property returns the underlying
NumericDescriptor object.
intensity_meas
property
The intensity of the reflection derived from the measurements.
Reading this property returns the underlying
NumericDescriptor object.
intensity_meas_su
property
Standard uncertainty of the measured intensity.
Reading this property returns the underlying
NumericDescriptor object.
intensity_calc
property
Intensity of the reflection calculated from atom site data.
Reading this property returns the underlying
NumericDescriptor object.
unique_name
property
Fully qualified name: datablock, category, entry.
parameters
property
All GenericDescriptorBase instances on this item.
as_cif
property
Return CIF representation of this object.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print parameters, other properties, and methods.
from_cif(block, idx=0)
Populate this item from a CIF block.
TofRefln()
TOF single-crystal reflection with a per-reflection wavelength.
Methods:
| Name | Description |
|---|---|
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print parameters, other properties, and methods. |
from_cif |
Populate this item from a CIF block. |
Attributes:
| Name | Type | Description |
|---|---|---|
wavelength |
NumericDescriptor
|
Mean wavelength of radiation for this reflection (Å). |
unique_name |
str
|
Fully qualified name: datablock, category, entry. |
parameters |
list
|
All GenericDescriptorBase instances on this item. |
as_cif |
str
|
Return CIF representation of this object. |
id |
StringDescriptor
|
Identifier of the reflection. |
d_spacing |
NumericDescriptor
|
Distance between lattice planes for this reflection (Å). |
sin_theta_over_lambda |
NumericDescriptor
|
The sin(θ)/λ value for this reflection (Å⁻¹). |
index_h |
NumericDescriptor
|
Miller index h of a measured reflection. |
index_k |
NumericDescriptor
|
Miller index k of a measured reflection. |
index_l |
NumericDescriptor
|
Miller index l of a measured reflection. |
intensity_meas |
NumericDescriptor
|
The intensity of the reflection derived from the measurements. |
intensity_meas_su |
NumericDescriptor
|
Standard uncertainty of the measured intensity. |
intensity_calc |
NumericDescriptor
|
Intensity of the reflection calculated from atom site data. |
wavelength
property
Mean wavelength of radiation for this reflection (Å).
Reading this property returns the underlying
NumericDescriptor object.
unique_name
property
Fully qualified name: datablock, category, entry.
parameters
property
All GenericDescriptorBase instances on this item.
as_cif
property
Return CIF representation of this object.
id
property
Identifier of the reflection.
Reading this property returns the underlying
StringDescriptor object.
d_spacing
property
Distance between lattice planes for this reflection (Å).
Reading this property returns the underlying
NumericDescriptor object.
sin_theta_over_lambda
property
The sin(θ)/λ value for this reflection (Å⁻¹).
Reading this property returns the underlying
NumericDescriptor object.
index_h
property
Miller index h of a measured reflection.
Reading this property returns the underlying
NumericDescriptor object.
index_k
property
Miller index k of a measured reflection.
Reading this property returns the underlying
NumericDescriptor object.
index_l
property
Miller index l of a measured reflection.
Reading this property returns the underlying
NumericDescriptor object.
intensity_meas
property
The intensity of the reflection derived from the measurements.
Reading this property returns the underlying
NumericDescriptor object.
intensity_meas_su
property
Standard uncertainty of the measured intensity.
Reading this property returns the underlying
NumericDescriptor object.
intensity_calc
property
Intensity of the reflection calculated from atom site data.
Reading this property returns the underlying
NumericDescriptor object.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print parameters, other properties, and methods.
from_cif(block, idx=0)
Populate this item from a CIF block.
ReflnDataBase(item_type)
Base collection of reflections for single-crystal diffraction data.
Methods:
| Name | Description |
|---|---|
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print a summary of public attributes and contained items. |
__getitem__ |
Return an item by name or positional index. |
__setitem__ |
Insert or replace an item under the given identity key. |
__delitem__ |
Delete an item by key or raise |
__contains__ |
Check whether an item with the given key exists. |
__iter__ |
Iterate over items in insertion order. |
__len__ |
Return the number of items in the collection. |
remove |
Remove an item by its key. |
clear |
Remove every item, then mark the parent datablock dirty. |
keys |
Yield keys for all items in insertion order. |
values |
Yield items in insertion order. |
items |
Yield |
from_cif |
Populate this collection from a CIF block. |
add |
Insert or replace a pre-built item into the collection. |
create |
Create a new item with the given attributes and add it. |
Attributes:
| Name | Type | Description |
|---|---|---|
d_spacing |
np.ndarray
|
D-spacing values for all reflection data points. |
sin_theta_over_lambda |
np.ndarray
|
sinθ/λ values for all reflection data points. |
index_h |
np.ndarray
|
Miller h indices for all reflection data points. |
index_k |
np.ndarray
|
Miller k indices for all reflection data points. |
index_l |
np.ndarray
|
Miller l indices for all reflection data points. |
intensity_meas |
np.ndarray
|
Measured structure-factor intensities for all reflections. |
intensity_meas_su |
np.ndarray
|
Standard uncertainties of the measured intensities. |
intensity_calc |
np.ndarray
|
Calculated intensities for all reflections. |
unique_name |
str | None
|
Return None; collections have no unique name. |
parameters |
list
|
All parameters from all items in this collection. |
as_cif |
str
|
Return CIF representation of this object. |
names |
list[str | None]
|
List of all item keys in the collection. |
scalar_descriptors |
list
|
Collection-level descriptors serialized outside the loop. |
d_spacing
property
D-spacing values for all reflection data points.
sin_theta_over_lambda
property
sinθ/λ values for all reflection data points.
index_h
property
Miller h indices for all reflection data points.
index_k
property
Miller k indices for all reflection data points.
index_l
property
Miller l indices for all reflection data points.
intensity_meas
property
Measured structure-factor intensities for all reflections.
intensity_meas_su
property
Standard uncertainties of the measured intensities.
intensity_calc
property
Calculated intensities for all reflections.
unique_name
property
Return None; collections have no unique name.
parameters
property
All parameters from all items in this collection.
as_cif
property
Return CIF representation of this object.
names
property
List of all item keys in the collection.
scalar_descriptors
property
Collection-level descriptors serialized outside the loop.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print a summary of public attributes and contained items.
__getitem__(key)
Return an item by name or positional index.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key
|
str | int
|
Identity key (str) or zero-based positional index (int). |
required |
Returns:
| Type | Description |
|---|---|
GuardedBase
|
The item matching the given key or index. |
Raises:
| Type | Description |
|---|---|
TypeError
|
If key is neither |
__setitem__(name, item)
Insert or replace an item under the given identity key.
__delitem__(name)
Delete an item by key or raise KeyError if missing.
__contains__(name)
Check whether an item with the given key exists.
__iter__()
Iterate over items in insertion order.
__len__()
Return the number of items in the collection.
remove(name)
Remove an item by its key.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Identity key of the item to remove. |
required |
clear()
Remove every item, then mark the parent datablock dirty.
Layers dirty-marking on :meth:CollectionBase.clear, mirroring
how :meth:add layers it on the base insert.
keys()
Yield keys for all items in insertion order.
values()
Yield items in insertion order.
items()
Yield (key, item) pairs in insertion order.
from_cif(block)
Populate this collection from a CIF block.
add(item)
Insert or replace a pre-built item into the collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
item
|
object
|
A |
required |
create(**kwargs)
Create a new item with the given attributes and add it.
A default instance of the collection's item type is created,
then each keyword argument is applied via setattr.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**kwargs
|
object
|
Attribute names and values for the new item. |
{}
|
CwlReflnData()
Collection of reflections for CWL single-crystal diffraction data.
Methods:
| Name | Description |
|---|---|
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print a summary of public attributes and contained items. |
__getitem__ |
Return an item by name or positional index. |
__setitem__ |
Insert or replace an item under the given identity key. |
__delitem__ |
Delete an item by key or raise |
__contains__ |
Check whether an item with the given key exists. |
__iter__ |
Iterate over items in insertion order. |
__len__ |
Return the number of items in the collection. |
remove |
Remove an item by its key. |
clear |
Remove every item, then mark the parent datablock dirty. |
keys |
Yield keys for all items in insertion order. |
values |
Yield items in insertion order. |
items |
Yield |
from_cif |
Populate this collection from a CIF block. |
add |
Insert or replace a pre-built item into the collection. |
create |
Create a new item with the given attributes and add it. |
Attributes:
| Name | Type | Description |
|---|---|---|
unique_name |
str | None
|
Return None; collections have no unique name. |
parameters |
list
|
All parameters from all items in this collection. |
as_cif |
str
|
Return CIF representation of this object. |
names |
list[str | None]
|
List of all item keys in the collection. |
scalar_descriptors |
list
|
Collection-level descriptors serialized outside the loop. |
d_spacing |
np.ndarray
|
D-spacing values for all reflection data points. |
sin_theta_over_lambda |
np.ndarray
|
sinθ/λ values for all reflection data points. |
index_h |
np.ndarray
|
Miller h indices for all reflection data points. |
index_k |
np.ndarray
|
Miller k indices for all reflection data points. |
index_l |
np.ndarray
|
Miller l indices for all reflection data points. |
intensity_meas |
np.ndarray
|
Measured structure-factor intensities for all reflections. |
intensity_meas_su |
np.ndarray
|
Standard uncertainties of the measured intensities. |
intensity_calc |
np.ndarray
|
Calculated intensities for all reflections. |
unique_name
property
Return None; collections have no unique name.
parameters
property
All parameters from all items in this collection.
as_cif
property
Return CIF representation of this object.
names
property
List of all item keys in the collection.
scalar_descriptors
property
Collection-level descriptors serialized outside the loop.
d_spacing
property
D-spacing values for all reflection data points.
sin_theta_over_lambda
property
sinθ/λ values for all reflection data points.
index_h
property
Miller h indices for all reflection data points.
index_k
property
Miller k indices for all reflection data points.
index_l
property
Miller l indices for all reflection data points.
intensity_meas
property
Measured structure-factor intensities for all reflections.
intensity_meas_su
property
Standard uncertainties of the measured intensities.
intensity_calc
property
Calculated intensities for all reflections.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print a summary of public attributes and contained items.
__getitem__(key)
Return an item by name or positional index.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key
|
str | int
|
Identity key (str) or zero-based positional index (int). |
required |
Returns:
| Type | Description |
|---|---|
GuardedBase
|
The item matching the given key or index. |
Raises:
| Type | Description |
|---|---|
TypeError
|
If key is neither |
__setitem__(name, item)
Insert or replace an item under the given identity key.
__delitem__(name)
Delete an item by key or raise KeyError if missing.
__contains__(name)
Check whether an item with the given key exists.
__iter__()
Iterate over items in insertion order.
__len__()
Return the number of items in the collection.
remove(name)
Remove an item by its key.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Identity key of the item to remove. |
required |
clear()
Remove every item, then mark the parent datablock dirty.
Layers dirty-marking on :meth:CollectionBase.clear, mirroring
how :meth:add layers it on the base insert.
keys()
Yield keys for all items in insertion order.
values()
Yield items in insertion order.
items()
Yield (key, item) pairs in insertion order.
from_cif(block)
Populate this collection from a CIF block.
add(item)
Insert or replace a pre-built item into the collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
item
|
object
|
A |
required |
create(**kwargs)
Create a new item with the given attributes and add it.
A default instance of the collection's item type is created,
then each keyword argument is applied via setattr.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**kwargs
|
object
|
Attribute names and values for the new item. |
{}
|
TofReflnData()
Collection of reflections for TOF single-crystal diffraction data.
Methods:
| Name | Description |
|---|---|
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print a summary of public attributes and contained items. |
__getitem__ |
Return an item by name or positional index. |
__setitem__ |
Insert or replace an item under the given identity key. |
__delitem__ |
Delete an item by key or raise |
__contains__ |
Check whether an item with the given key exists. |
__iter__ |
Iterate over items in insertion order. |
__len__ |
Return the number of items in the collection. |
remove |
Remove an item by its key. |
clear |
Remove every item, then mark the parent datablock dirty. |
keys |
Yield keys for all items in insertion order. |
values |
Yield items in insertion order. |
items |
Yield |
from_cif |
Populate this collection from a CIF block. |
add |
Insert or replace a pre-built item into the collection. |
create |
Create a new item with the given attributes and add it. |
Attributes:
| Name | Type | Description |
|---|---|---|
wavelength |
np.ndarray
|
Wavelengths associated with each reflection. |
unique_name |
str | None
|
Return None; collections have no unique name. |
parameters |
list
|
All parameters from all items in this collection. |
as_cif |
str
|
Return CIF representation of this object. |
names |
list[str | None]
|
List of all item keys in the collection. |
scalar_descriptors |
list
|
Collection-level descriptors serialized outside the loop. |
d_spacing |
np.ndarray
|
D-spacing values for all reflection data points. |
sin_theta_over_lambda |
np.ndarray
|
sinθ/λ values for all reflection data points. |
index_h |
np.ndarray
|
Miller h indices for all reflection data points. |
index_k |
np.ndarray
|
Miller k indices for all reflection data points. |
index_l |
np.ndarray
|
Miller l indices for all reflection data points. |
intensity_meas |
np.ndarray
|
Measured structure-factor intensities for all reflections. |
intensity_meas_su |
np.ndarray
|
Standard uncertainties of the measured intensities. |
intensity_calc |
np.ndarray
|
Calculated intensities for all reflections. |
wavelength
property
Wavelengths associated with each reflection.
unique_name
property
Return None; collections have no unique name.
parameters
property
All parameters from all items in this collection.
as_cif
property
Return CIF representation of this object.
names
property
List of all item keys in the collection.
scalar_descriptors
property
Collection-level descriptors serialized outside the loop.
d_spacing
property
D-spacing values for all reflection data points.
sin_theta_over_lambda
property
sinθ/λ values for all reflection data points.
index_h
property
Miller h indices for all reflection data points.
index_k
property
Miller k indices for all reflection data points.
index_l
property
Miller l indices for all reflection data points.
intensity_meas
property
Measured structure-factor intensities for all reflections.
intensity_meas_su
property
Standard uncertainties of the measured intensities.
intensity_calc
property
Calculated intensities for all reflections.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print a summary of public attributes and contained items.
__getitem__(key)
Return an item by name or positional index.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key
|
str | int
|
Identity key (str) or zero-based positional index (int). |
required |
Returns:
| Type | Description |
|---|---|
GuardedBase
|
The item matching the given key or index. |
Raises:
| Type | Description |
|---|---|
TypeError
|
If key is neither |
__setitem__(name, item)
Insert or replace an item under the given identity key.
__delitem__(name)
Delete an item by key or raise KeyError if missing.
__contains__(name)
Check whether an item with the given key exists.
__iter__()
Iterate over items in insertion order.
__len__()
Return the number of items in the collection.
remove(name)
Remove an item by its key.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Identity key of the item to remove. |
required |
clear()
Remove every item, then mark the parent datablock dirty.
Layers dirty-marking on :meth:CollectionBase.clear, mirroring
how :meth:add layers it on the base insert.
keys()
Yield keys for all items in insertion order.
values()
Yield items in insertion order.
items()
Yield (key, item) pairs in insertion order.
from_cif(block)
Populate this collection from a CIF block.
add(item)
Insert or replace a pre-built item into the collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
item
|
object
|
A |
required |
create(**kwargs)
Create a new item with the given attributes and add it.
A default instance of the collection's item type is created,
then each keyword argument is applied via setattr.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**kwargs
|
object
|
Attribute names and values for the new item. |
{}
|
factory
Reflection collection factory — delegates to FactoryBase.
Classes:
| Name | Description |
|---|---|
ReflnFactory |
Factory for creating reflection collections. |
ReflnFactory
Factory for creating reflection collections.
Methods:
| Name | Description |
|---|---|
__init_subclass__ |
Give each subclass its own independent registry and rules. |
register |
Class decorator to register a concrete class. |
supported_tags |
Return list of all supported tags. |
default_tag |
Resolve the default tag for a given experimental context. |
create |
Instantiate a registered class by tag. |
create_default_for |
Instantiate the default class for a given context. |
supported_for |
Return classes matching conditions and/or calculator. |
show_supported |
Pretty-print a table of supported types. |
__init_subclass__(**kwargs)
Give each subclass its own independent registry and rules.
register(klass)
classmethod
Class decorator to register a concrete class.
Usage::
@SomeFactory.register class MyClass(SomeBase): type_info = TypeInfo(...)
Returns the class unmodified.
supported_tags()
classmethod
Return list of all supported tags.
default_tag(**conditions)
classmethod
Resolve the default tag for a given experimental context.
Uses largest-subset matching: the rule whose key is the
biggest subset of the given conditions wins. A rule with an
empty key (frozenset()) acts as a universal fallback.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**conditions
|
object
|
Experimental-axis values, e.g.
|
{}
|
Returns:
| Type | Description |
|---|---|
str
|
The resolved default tag string. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If no rule matches the given conditions. |
create(tag, **kwargs)
classmethod
Instantiate a registered class by tag.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag
|
str
|
|
required |
**kwargs
|
object
|
Forwarded to the class constructor. |
{}
|
Returns:
| Type | Description |
|---|---|
object
|
A new instance of the registered class. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If tag is not in the registry. |
create_default_for(**conditions)
classmethod
Instantiate the default class for a given context.
Combines default_tag(**conditions) with create(tag).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**conditions
|
object
|
Experimental-axis values. |
{}
|
Returns:
| Type | Description |
|---|---|
object
|
A new instance of the default class. |
supported_for(*, calculator=None, sample_form=None, scattering_type=None, beam_mode=None, radiation_probe=None)
classmethod
Return classes matching conditions and/or calculator.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
calculator
|
object
|
Optional |
None
|
sample_form
|
object
|
Optional |
None
|
scattering_type
|
object
|
Optional |
None
|
beam_mode
|
object
|
Optional |
None
|
radiation_probe
|
object
|
Optional |
None
|
Returns:
| Type | Description |
|---|---|
list[type]
|
Classes matching the given conditions. |
show_supported(*, calculator=None, sample_form=None, scattering_type=None, beam_mode=None, radiation_probe=None)
classmethod
Pretty-print a table of supported types.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
calculator
|
object
|
Optional |
None
|
sample_form
|
object
|
Optional |
None
|
scattering_type
|
object
|
Optional |
None
|
beam_mode
|
object
|
Optional |
None
|
radiation_probe
|
object
|
Optional |
None
|
collection
Collection of experiment data blocks.
Classes:
| Name | Description |
|---|---|
Experiments |
Collection of Experiment data blocks. |
Classes
Experiments()
Collection of Experiment data blocks.
Provides convenience constructors for common creation patterns and helper methods for simple presentation of collection contents.
Methods:
| Name | Description |
|---|---|
create |
Add an experiment without associating a data file. |
add_from_cif_str |
Add an experiment from a CIF string. |
add_from_cif_path |
Add an experiment from a CIF file path. |
add_from_edi_path |
Add an experiment from an Edi file. |
add_from_data_path |
Add an experiment from a data file path. |
show_names |
List all experiment names in the collection. |
show_params |
Show parameters of all experiments in the collection. |
__str__ |
Human-readable representation of this component. |
__repr__ |
Return the developer representation of this object. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print a summary of public attributes and contained items. |
__getitem__ |
Return an item by name or positional index. |
__setitem__ |
Insert or replace an item under the given identity key. |
__delitem__ |
Delete an item by key or raise |
__contains__ |
Check whether an item with the given key exists. |
__iter__ |
Iterate over items in insertion order. |
__len__ |
Return the number of items in the collection. |
remove |
Remove an item by its key. |
clear |
Remove every item, unlinking each from this collection. |
keys |
Yield keys for all items in insertion order. |
values |
Yield items in insertion order. |
items |
Yield |
add |
Add a pre-built item to the collection. |
Attributes:
| Name | Type | Description |
|---|---|---|
unique_name |
str | None
|
Return None; collections have no unique name. |
parameters |
list
|
All parameters from all datablocks in this collection. |
as_cif |
str
|
Return CIF representation of this object. |
names |
list[str | None]
|
List of all item keys in the collection. |
fittable_parameters |
list
|
All Parameters not blocked by constraints or symmetry. |
free_parameters |
list
|
All fittable parameters that are currently marked as free. |
Attributes
unique_name
property
Return None; collections have no unique name.
parameters
property
All parameters from all datablocks in this collection.
as_cif
property
Return CIF representation of this object.
names
property
List of all item keys in the collection.
fittable_parameters
property
All Parameters not blocked by constraints or symmetry.
free_parameters
property
All fittable parameters that are currently marked as free.
Methods:
create(*, name, sample_form=None, beam_mode=None, radiation_probe=None, scattering_type=None)
Add an experiment without associating a data file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Experiment identifier. |
required |
sample_form
|
str | None
|
Sample form (e.g. |
None
|
beam_mode
|
str | None
|
Beam mode (e.g. |
None
|
radiation_probe
|
str | None
|
Radiation probe (e.g. |
None
|
scattering_type
|
str | None
|
Scattering type (e.g. |
None
|
add_from_cif_str(cif_str)
Add an experiment from a CIF string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cif_str
|
str
|
Full CIF document as a string. |
required |
add_from_cif_path(cif_path)
Add an experiment from a CIF file path.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cif_path
|
str
|
Path to a CIF document. |
required |
add_from_edi_path(edi_path)
Add an experiment from an Edi file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
edi_path
|
str
|
Path to an Edi experiment file. |
required |
add_from_data_path(*, name, data_path, sample_form=None, beam_mode=None, radiation_probe=None, scattering_type=None)
Add an experiment from a data file path.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Experiment identifier. |
required |
data_path
|
str
|
Path to the measured data file. |
required |
sample_form
|
str | None
|
Sample form (e.g. |
None
|
beam_mode
|
str | None
|
Beam mode (e.g. |
None
|
radiation_probe
|
str | None
|
Radiation probe (e.g. |
None
|
scattering_type
|
str | None
|
Scattering type (e.g. |
None
|
show_names()
List all experiment names in the collection.
show_params()
Show parameters of all experiments in the collection.
__str__()
Human-readable representation of this component.
__repr__()
Return the developer representation of this object.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print a summary of public attributes and contained items.
__getitem__(key)
Return an item by name or positional index.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key
|
str | int
|
Identity key (str) or zero-based positional index (int). |
required |
Returns:
| Type | Description |
|---|---|
GuardedBase
|
The item matching the given key or index. |
Raises:
| Type | Description |
|---|---|
TypeError
|
If key is neither |
__setitem__(name, item)
Insert or replace an item under the given identity key.
__delitem__(name)
Delete an item by key or raise KeyError if missing.
__contains__(name)
Check whether an item with the given key exists.
__iter__()
Iterate over items in insertion order.
__len__()
Return the number of items in the collection.
remove(name)
Remove an item by its key.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Identity key of the item to remove. |
required |
clear()
Remove every item, unlinking each from this collection.
Delegates to :meth:_adopt_items with an empty list: every
child has _parent cleared, _items is emptied, and the
index is rebuilt, matching the invariants __delitem__ keeps.
keys()
Yield keys for all items in insertion order.
values()
Yield items in insertion order.
items()
Yield (key, item) pairs in insertion order.
add(item)
Add a pre-built item to the collection.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
item
|
object
|
A |
required |
Functions:
item
Experiment datablock items for Bragg and total scattering.
Modules:
| Name | Description |
|---|---|
base |
Base classes for experiment datablock items. |
bragg_pd |
Bragg powder diffraction experiment datablock. |
bragg_sc |
Bragg single-crystal CWL and TOF experiment datablocks. |
enums |
Enumerations for experiment configuration (forms, modes, types). |
factory |
Factory for creating experiment instances from various inputs. |
total_pd |
Total scattering (PDF) powder experiment datablock item. |
Classes
Modules
base
Base classes for experiment datablock items.
Classes:
| Name | Description |
|---|---|
ExperimentBase |
Base class for all experiment datablock items. |
ScExperimentBase |
Base class for all single crystal experiments. |
PdExperimentBase |
Base class for all powder experiments. |
Functions:
| Name | Description |
|---|---|
intensity_category_for |
Return the category exposing measured and calculated values. |
Classes
ExperimentBase(*, name, experiment_type)
Base class for all experiment datablock items.
Methods:
| Name | Description |
|---|---|
show_as_text |
Pretty-print the experiment as text. |
__str__ |
Human-readable representation of this component. |
__repr__ |
Developer-oriented representation of this component. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print a summary of public attributes and categories. |
Attributes:
| Name | Type | Description |
|---|---|---|
name |
str
|
Human-readable name of the experiment. |
experiment_type |
object
|
Experiment type: sample form, probe, beam mode. |
measured_range |
MeasuredRange | None
|
Active-axis range as |
diffrn |
object
|
Ambient conditions recorded during measurement. |
data_range |
object
|
Reciprocal-space range used to calculate without measured data. |
as_cif |
str
|
Serialize this experiment to a CIF fragment. |
calculator |
object
|
The active calculator category for this experiment. |
unique_name |
str | None
|
Unique name of this datablock item (from identity). |
parameters |
list
|
All parameters from all owned categories. |
categories |
list
|
All category objects owned by this object, sorted by priority. |
name
property
writable
Human-readable name of the experiment.
experiment_type
property
Experiment type: sample form, probe, beam mode.
measured_range
property
Active-axis range as (min, max, inc).
Backed by data_range: the measured range when a measured
scan is present, and the stored or default calculation range
otherwise. This subsumes the former measured-only behaviour.
diffrn
property
Ambient conditions recorded during measurement.
data_range
property
Reciprocal-space range used to calculate without measured data.
as_cif
property
Serialize this experiment to a CIF fragment.
calculator
property
The active calculator category for this experiment.
Holds the selected calculator type and provides access to the live calculator backend instance.
unique_name
property
Unique name of this datablock item (from identity).
parameters
property
All parameters from all owned categories.
categories
property
All category objects owned by this object, sorted by priority.
show_as_text()
Pretty-print the experiment as text.
__str__()
Human-readable representation of this component.
__repr__()
Developer-oriented representation of this component.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print a summary of public attributes and categories.
ScExperimentBase(*, name, experiment_type)
Base class for all single crystal experiments.
Methods:
| Name | Description |
|---|---|
fit_data_arrays |
Return no 1-D fit arrays for single-crystal experiments. |
__str__ |
Human-readable representation of this component. |
__repr__ |
Developer-oriented representation of this component. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print a summary of public attributes and categories. |
show_as_text |
Pretty-print the experiment as text. |
Attributes:
| Name | Type | Description |
|---|---|---|
extinction |
object
|
Active extinction correction model. |
linked_structure |
object
|
Linked structure model for this experiment. |
instrument |
object
|
Active instrument model for this experiment. |
refln |
object
|
Reflection collection for this experiment. |
x_descriptor |
NumericDescriptor | None
|
Return None because single-crystal data has no 1-D x axis. |
unique_name |
str | None
|
Unique name of this datablock item (from identity). |
parameters |
list
|
All parameters from all owned categories. |
as_cif |
str
|
Serialize this experiment to a CIF fragment. |
categories |
list
|
All category objects owned by this object, sorted by priority. |
name |
str
|
Human-readable name of the experiment. |
experiment_type |
object
|
Experiment type: sample form, probe, beam mode. |
measured_range |
MeasuredRange | None
|
Active-axis range as |
diffrn |
object
|
Ambient conditions recorded during measurement. |
data_range |
object
|
Reciprocal-space range used to calculate without measured data. |
calculator |
object
|
The active calculator category for this experiment. |
extinction
property
Active extinction correction model.
linked_structure
property
Linked structure model for this experiment.
instrument
property
Active instrument model for this experiment.
refln
property
Reflection collection for this experiment.
x_descriptor
property
Return None because single-crystal data has no 1-D x axis.
unique_name
property
Unique name of this datablock item (from identity).
parameters
property
All parameters from all owned categories.
as_cif
property
Serialize this experiment to a CIF fragment.
categories
property
All category objects owned by this object, sorted by priority.
name
property
writable
Human-readable name of the experiment.
experiment_type
property
Experiment type: sample form, probe, beam mode.
measured_range
property
Active-axis range as (min, max, inc).
Backed by data_range: the measured range when a measured
scan is present, and the stored or default calculation range
otherwise. This subsumes the former measured-only behaviour.
diffrn
property
Ambient conditions recorded during measurement.
data_range
property
Reciprocal-space range used to calculate without measured data.
calculator
property
The active calculator category for this experiment.
Holds the selected calculator type and provides access to the live calculator backend instance.
fit_data_arrays()
staticmethod
Return no 1-D fit arrays for single-crystal experiments.
__str__()
Human-readable representation of this component.
__repr__()
Developer-oriented representation of this component.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print a summary of public attributes and categories.
show_as_text()
Pretty-print the experiment as text.
PdExperimentBase(*, name, experiment_type)
Base class for all powder experiments.
Methods:
| Name | Description |
|---|---|
fit_data_arrays |
Return arrays needed to draw the powder fit-data chart. |
__str__ |
Human-readable representation of this component. |
__repr__ |
Developer-oriented representation of this component. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print a summary of public attributes and categories. |
show_as_text |
Pretty-print the experiment as text. |
Attributes:
| Name | Type | Description |
|---|---|---|
linked_structures |
object
|
Collection of structures linked to this experiment. |
excluded_regions |
object
|
Collection of excluded regions for the x-grid. |
data |
object
|
Data collection for this experiment. |
x_descriptor |
NumericDescriptor
|
Descriptor that owns the powder experiment's x-axis metadata. |
peak |
object
|
Peak category object with profile parameters and mixins. |
unique_name |
str | None
|
Unique name of this datablock item (from identity). |
parameters |
list
|
All parameters from all owned categories. |
as_cif |
str
|
Serialize this experiment to a CIF fragment. |
categories |
list
|
All category objects owned by this object, sorted by priority. |
name |
str
|
Human-readable name of the experiment. |
experiment_type |
object
|
Experiment type: sample form, probe, beam mode. |
measured_range |
MeasuredRange | None
|
Active-axis range as |
diffrn |
object
|
Ambient conditions recorded during measurement. |
data_range |
object
|
Reciprocal-space range used to calculate without measured data. |
calculator |
object
|
The active calculator category for this experiment. |
linked_structures
property
Collection of structures linked to this experiment.
excluded_regions
property
Collection of excluded regions for the x-grid.
data
property
Data collection for this experiment.
x_descriptor
property
Descriptor that owns the powder experiment's x-axis metadata.
peak
property
Peak category object with profile parameters and mixins.
unique_name
property
Unique name of this datablock item (from identity).
parameters
property
All parameters from all owned categories.
as_cif
property
Serialize this experiment to a CIF fragment.
categories
property
All category objects owned by this object, sorted by priority.
name
property
writable
Human-readable name of the experiment.
experiment_type
property
Experiment type: sample form, probe, beam mode.
measured_range
property
Active-axis range as (min, max, inc).
Backed by data_range: the measured range when a measured
scan is present, and the stored or default calculation range
otherwise. This subsumes the former measured-only behaviour.
diffrn
property
Ambient conditions recorded during measurement.
data_range
property
Reciprocal-space range used to calculate without measured data.
calculator
property
The active calculator category for this experiment.
Holds the selected calculator type and provides access to the live calculator backend instance.
fit_data_arrays()
Return arrays needed to draw the powder fit-data chart.
__str__()
Human-readable representation of this component.
__repr__()
Developer-oriented representation of this component.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print a summary of public attributes and categories.
show_as_text()
Pretty-print the experiment as text.
Functions:
intensity_category_for(experiment)
Return the category exposing measured and calculated values.
bragg_pd
Bragg powder diffraction experiment datablock.
Classes:
| Name | Description |
|---|---|
BraggPdExperiment |
Standard Bragg powder diffraction experiment. |
Classes
BraggPdExperiment(*, name, experiment_type)
Standard Bragg powder diffraction experiment.
Methods:
| Name | Description |
|---|---|
__str__ |
Human-readable representation of this component. |
__repr__ |
Developer-oriented representation of this component. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print a summary of public attributes and categories. |
show_as_text |
Pretty-print the experiment as text. |
fit_data_arrays |
Return arrays needed to draw the powder fit-data chart. |
Attributes:
| Name | Type | Description |
|---|---|---|
instrument |
object
|
Active instrument model for this experiment. |
refln |
object | None
|
Calculated reflection metadata when supported. |
background |
object
|
Active background model for this experiment. |
preferred_orientation |
object
|
Per-phase March-Dollase preferred-orientation corrections. |
absorption |
object
|
Active sample-absorption correction for this experiment. |
unique_name |
str | None
|
Unique name of this datablock item (from identity). |
parameters |
list
|
All parameters from all owned categories. |
as_cif |
str
|
Serialize this experiment to a CIF fragment. |
categories |
list
|
All category objects owned by this object, sorted by priority. |
name |
str
|
Human-readable name of the experiment. |
experiment_type |
object
|
Experiment type: sample form, probe, beam mode. |
measured_range |
MeasuredRange | None
|
Active-axis range as |
diffrn |
object
|
Ambient conditions recorded during measurement. |
data_range |
object
|
Reciprocal-space range used to calculate without measured data. |
calculator |
object
|
The active calculator category for this experiment. |
linked_structures |
object
|
Collection of structures linked to this experiment. |
excluded_regions |
object
|
Collection of excluded regions for the x-grid. |
data |
object
|
Data collection for this experiment. |
x_descriptor |
NumericDescriptor
|
Descriptor that owns the powder experiment's x-axis metadata. |
peak |
object
|
Peak category object with profile parameters and mixins. |
instrument
property
Active instrument model for this experiment.
refln
property
Calculated reflection metadata when supported.
background
property
Active background model for this experiment.
preferred_orientation
property
Per-phase March-Dollase preferred-orientation corrections.
absorption
property
Active sample-absorption correction for this experiment.
unique_name
property
Unique name of this datablock item (from identity).
parameters
property
All parameters from all owned categories.
as_cif
property
Serialize this experiment to a CIF fragment.
categories
property
All category objects owned by this object, sorted by priority.
name
property
writable
Human-readable name of the experiment.
experiment_type
property
Experiment type: sample form, probe, beam mode.
measured_range
property
Active-axis range as (min, max, inc).
Backed by data_range: the measured range when a measured
scan is present, and the stored or default calculation range
otherwise. This subsumes the former measured-only behaviour.
diffrn
property
Ambient conditions recorded during measurement.
data_range
property
Reciprocal-space range used to calculate without measured data.
calculator
property
The active calculator category for this experiment.
Holds the selected calculator type and provides access to the live calculator backend instance.
linked_structures
property
Collection of structures linked to this experiment.
excluded_regions
property
Collection of excluded regions for the x-grid.
data
property
Data collection for this experiment.
x_descriptor
property
Descriptor that owns the powder experiment's x-axis metadata.
peak
property
Peak category object with profile parameters and mixins.
__str__()
Human-readable representation of this component.
__repr__()
Developer-oriented representation of this component.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print a summary of public attributes and categories.
show_as_text()
Pretty-print the experiment as text.
fit_data_arrays()
Return arrays needed to draw the powder fit-data chart.
Functions:
bragg_sc
Bragg single-crystal CWL and TOF experiment datablocks.
Classes:
| Name | Description |
|---|---|
CwlScExperiment |
Bragg constant-wavelength single-crystal experiment. |
TofScExperiment |
Bragg time-of-flight single-crystal experiment. |
Classes
CwlScExperiment(*, name, experiment_type)
Bragg constant-wavelength single-crystal experiment.
Methods:
| Name | Description |
|---|---|
__str__ |
Human-readable representation of this component. |
__repr__ |
Developer-oriented representation of this component. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print a summary of public attributes and categories. |
show_as_text |
Pretty-print the experiment as text. |
fit_data_arrays |
Return no 1-D fit arrays for single-crystal experiments. |
Attributes:
| Name | Type | Description |
|---|---|---|
unique_name |
str | None
|
Unique name of this datablock item (from identity). |
parameters |
list
|
All parameters from all owned categories. |
as_cif |
str
|
Serialize this experiment to a CIF fragment. |
categories |
list
|
All category objects owned by this object, sorted by priority. |
name |
str
|
Human-readable name of the experiment. |
experiment_type |
object
|
Experiment type: sample form, probe, beam mode. |
measured_range |
MeasuredRange | None
|
Active-axis range as |
diffrn |
object
|
Ambient conditions recorded during measurement. |
data_range |
object
|
Reciprocal-space range used to calculate without measured data. |
calculator |
object
|
The active calculator category for this experiment. |
extinction |
object
|
Active extinction correction model. |
linked_structure |
object
|
Linked structure model for this experiment. |
instrument |
object
|
Active instrument model for this experiment. |
refln |
object
|
Reflection collection for this experiment. |
x_descriptor |
NumericDescriptor | None
|
Return None because single-crystal data has no 1-D x axis. |
unique_name
property
Unique name of this datablock item (from identity).
parameters
property
All parameters from all owned categories.
as_cif
property
Serialize this experiment to a CIF fragment.
categories
property
All category objects owned by this object, sorted by priority.
name
property
writable
Human-readable name of the experiment.
experiment_type
property
Experiment type: sample form, probe, beam mode.
measured_range
property
Active-axis range as (min, max, inc).
Backed by data_range: the measured range when a measured
scan is present, and the stored or default calculation range
otherwise. This subsumes the former measured-only behaviour.
diffrn
property
Ambient conditions recorded during measurement.
data_range
property
Reciprocal-space range used to calculate without measured data.
calculator
property
The active calculator category for this experiment.
Holds the selected calculator type and provides access to the live calculator backend instance.
extinction
property
Active extinction correction model.
linked_structure
property
Linked structure model for this experiment.
instrument
property
Active instrument model for this experiment.
refln
property
Reflection collection for this experiment.
x_descriptor
property
Return None because single-crystal data has no 1-D x axis.
__str__()
Human-readable representation of this component.
__repr__()
Developer-oriented representation of this component.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print a summary of public attributes and categories.
show_as_text()
Pretty-print the experiment as text.
fit_data_arrays()
staticmethod
Return no 1-D fit arrays for single-crystal experiments.
TofScExperiment(*, name, experiment_type)
Bragg time-of-flight single-crystal experiment.
Methods:
| Name | Description |
|---|---|
__str__ |
Human-readable representation of this component. |
__repr__ |
Developer-oriented representation of this component. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print a summary of public attributes and categories. |
show_as_text |
Pretty-print the experiment as text. |
fit_data_arrays |
Return no 1-D fit arrays for single-crystal experiments. |
Attributes:
| Name | Type | Description |
|---|---|---|
unique_name |
str | None
|
Unique name of this datablock item (from identity). |
parameters |
list
|
All parameters from all owned categories. |
as_cif |
str
|
Serialize this experiment to a CIF fragment. |
categories |
list
|
All category objects owned by this object, sorted by priority. |
name |
str
|
Human-readable name of the experiment. |
experiment_type |
object
|
Experiment type: sample form, probe, beam mode. |
measured_range |
MeasuredRange | None
|
Active-axis range as |
diffrn |
object
|
Ambient conditions recorded during measurement. |
data_range |
object
|
Reciprocal-space range used to calculate without measured data. |
calculator |
object
|
The active calculator category for this experiment. |
extinction |
object
|
Active extinction correction model. |
linked_structure |
object
|
Linked structure model for this experiment. |
instrument |
object
|
Active instrument model for this experiment. |
refln |
object
|
Reflection collection for this experiment. |
x_descriptor |
NumericDescriptor | None
|
Return None because single-crystal data has no 1-D x axis. |
unique_name
property
Unique name of this datablock item (from identity).
parameters
property
All parameters from all owned categories.
as_cif
property
Serialize this experiment to a CIF fragment.
categories
property
All category objects owned by this object, sorted by priority.
name
property
writable
Human-readable name of the experiment.
experiment_type
property
Experiment type: sample form, probe, beam mode.
measured_range
property
Active-axis range as (min, max, inc).
Backed by data_range: the measured range when a measured
scan is present, and the stored or default calculation range
otherwise. This subsumes the former measured-only behaviour.
diffrn
property
Ambient conditions recorded during measurement.
data_range
property
Reciprocal-space range used to calculate without measured data.
calculator
property
The active calculator category for this experiment.
Holds the selected calculator type and provides access to the live calculator backend instance.
extinction
property
Active extinction correction model.
linked_structure
property
Linked structure model for this experiment.
instrument
property
Active instrument model for this experiment.
refln
property
Reflection collection for this experiment.
x_descriptor
property
Return None because single-crystal data has no 1-D x axis.
__str__()
Human-readable representation of this component.
__repr__()
Developer-oriented representation of this component.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print a summary of public attributes and categories.
show_as_text()
Pretty-print the experiment as text.
fit_data_arrays()
staticmethod
Return no 1-D fit arrays for single-crystal experiments.
Functions:
enums
Enumerations for experiment configuration (forms, modes, types).
Classes:
| Name | Description |
|---|---|
SampleFormEnum |
Physical sample form supported by experiments. |
ScatteringTypeEnum |
Type of scattering modeled in an experiment. |
RadiationProbeEnum |
Incident radiation probe used in the experiment. |
BeamModeEnum |
Beam delivery mode for the instrument. |
CalculatorEnum |
Known calculation engine identifiers. |
PeakProfileTypeEnum |
Available peak profile types per scattering and beam mode. |
ExtinctionModelEnum |
Mosaicity distribution model for Becker-Coppens extinction. |
AbsorptionTypeEnum |
Sample-absorption correction types for powder experiments. |
Classes
SampleFormEnum
Physical sample form supported by experiments.
Methods:
| Name | Description |
|---|---|
default |
Return the default sample form (POWDER). |
description |
Return a human-readable description of this sample form. |
default()
classmethod
Return the default sample form (POWDER).
Returns:
| Type | Description |
|---|---|
SampleFormEnum
|
The default enum member. |
description()
Return a human-readable description of this sample form.
Returns:
| Type | Description |
|---|---|
str
|
Description string for the current enum member. |
ScatteringTypeEnum
Type of scattering modeled in an experiment.
Methods:
| Name | Description |
|---|---|
default |
Return the default scattering type (BRAGG). |
description |
Return a human-readable description of this scattering type. |
default()
classmethod
Return the default scattering type (BRAGG).
Returns:
| Type | Description |
|---|---|
ScatteringTypeEnum
|
The default enum member. |
description()
Return a human-readable description of this scattering type.
Returns:
| Type | Description |
|---|---|
str
|
Description string for the current enum member. |
RadiationProbeEnum
Incident radiation probe used in the experiment.
Methods:
| Name | Description |
|---|---|
default |
Return the default radiation probe (NEUTRON). |
description |
Return a human-readable description of this radiation probe. |
default()
classmethod
Return the default radiation probe (NEUTRON).
Returns:
| Type | Description |
|---|---|
RadiationProbeEnum
|
The default enum member. |
description()
Return a human-readable description of this radiation probe.
Returns:
| Type | Description |
|---|---|
str
|
Description string for the current enum member. |
BeamModeEnum
Beam delivery mode for the instrument.
Methods:
| Name | Description |
|---|---|
default |
Return the default beam mode (CONSTANT_WAVELENGTH). |
description |
Return a human-readable description of this beam mode. |
default()
classmethod
Return the default beam mode (CONSTANT_WAVELENGTH).
Returns:
| Type | Description |
|---|---|
BeamModeEnum
|
The default enum member. |
description()
Return a human-readable description of this beam mode.
Returns:
| Type | Description |
|---|---|
str
|
Description string for the current enum member. |
CalculatorEnum
Known calculation engine identifiers.
PeakProfileTypeEnum
Available peak profile types per scattering and beam mode.
Methods:
| Name | Description |
|---|---|
default |
Return the default peak profile type for a given mode. |
description |
Return a human-readable description of this peak profile type. |
default(scattering_type=None, beam_mode=None)
classmethod
Return the default peak profile type for a given mode.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
scattering_type
|
ScatteringTypeEnum | None
|
Scattering type; defaults to
|
None
|
beam_mode
|
BeamModeEnum | None
|
Beam mode; defaults to |
None
|
Returns:
| Type | Description |
|---|---|
PeakProfileTypeEnum
|
The default profile type for the given combination. |
description()
Return a human-readable description of this peak profile type.
Returns:
| Type | Description |
|---|---|
str
|
Description string for the current enum member. |
ExtinctionModelEnum
Mosaicity distribution model for Becker-Coppens extinction.
Methods:
| Name | Description |
|---|---|
default |
Return the default extinction model (GAUSS). |
description |
Return a human-readable description of this extinction model. |
default()
classmethod
Return the default extinction model (GAUSS).
Returns:
| Type | Description |
|---|---|
ExtinctionModelEnum
|
The default enum member. |
description()
Return a human-readable description of this extinction model.
Returns:
| Type | Description |
|---|---|
str
|
Description string for the current enum member. |
AbsorptionTypeEnum
Sample-absorption correction types for powder experiments.
Methods:
| Name | Description |
|---|---|
default |
Return the default absorption type (NONE). |
description |
Return a human-readable description of this absorption type. |
default()
classmethod
Return the default absorption type (NONE).
Returns:
| Type | Description |
|---|---|
AbsorptionTypeEnum
|
The default enum member. |
description()
Return a human-readable description of this absorption type.
Returns:
| Type | Description |
|---|---|
str
|
Description string for the current enum member. |
factory
Factory for creating experiment instances from various inputs.
Provides individual class methods for each creation pathway:
from_cif_path, from_cif_str, from_data_path, and
from_scratch.
Classes:
| Name | Description |
|---|---|
ExperimentFactory |
Creates Experiment instances with only relevant attributes. |
Classes
ExperimentFactory()
Creates Experiment instances with only relevant attributes.
Methods:
| Name | Description |
|---|---|
from_scratch |
Create an experiment without measured data. |
from_cif_str |
Create an experiment from a CIF string. |
from_cif_path |
Create an experiment from a CIF file path. |
from_data_path |
Create an experiment from a raw data ASCII file. |
__init_subclass__ |
Give each subclass its own independent registry and rules. |
register |
Class decorator to register a concrete class. |
supported_tags |
Return list of all supported tags. |
default_tag |
Resolve the default tag for a given experimental context. |
create |
Instantiate a registered class by tag. |
create_default_for |
Instantiate the default class for a given context. |
supported_for |
Return classes matching conditions and/or calculator. |
show_supported |
Pretty-print a table of supported types. |
from_scratch(*, name, sample_form=None, beam_mode=None, radiation_probe=None, scattering_type=None)
classmethod
Create an experiment without measured data.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Experiment identifier. |
required |
sample_form
|
str | None
|
Sample form (e.g. |
None
|
beam_mode
|
str | None
|
Beam mode (e.g. |
None
|
radiation_probe
|
str | None
|
Radiation probe (e.g. |
None
|
scattering_type
|
str | None
|
Scattering type (e.g. |
None
|
Returns:
| Type | Description |
|---|---|
ExperimentBase
|
An experiment instance with only metadata. |
from_cif_str(cif_str)
classmethod
Create an experiment from a CIF string.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cif_str
|
str
|
Full CIF document as a string. |
required |
Returns:
| Type | Description |
|---|---|
ExperimentBase
|
A populated experiment instance. |
from_cif_path(cif_path)
classmethod
Create an experiment from a CIF file path.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
cif_path
|
str
|
Path to a CIF file. |
required |
Returns:
| Type | Description |
|---|---|
ExperimentBase
|
A populated experiment instance. |
from_data_path(*, name, data_path, sample_form=None, beam_mode=None, radiation_probe=None, scattering_type=None)
classmethod
Create an experiment from a raw data ASCII file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Experiment identifier. |
required |
data_path
|
str
|
Path to the measured data file. |
required |
sample_form
|
str | None
|
Sample form (e.g. |
None
|
beam_mode
|
str | None
|
Beam mode (e.g. |
None
|
radiation_probe
|
str | None
|
Radiation probe (e.g. |
None
|
scattering_type
|
str | None
|
Scattering type (e.g. |
None
|
Returns:
| Type | Description |
|---|---|
ExperimentBase
|
An experiment instance with measured data attached. |
__init_subclass__(**kwargs)
Give each subclass its own independent registry and rules.
register(klass)
classmethod
Class decorator to register a concrete class.
Usage::
@SomeFactory.register class MyClass(SomeBase): type_info = TypeInfo(...)
Returns the class unmodified.
supported_tags()
classmethod
Return list of all supported tags.
default_tag(**conditions)
classmethod
Resolve the default tag for a given experimental context.
Uses largest-subset matching: the rule whose key is the
biggest subset of the given conditions wins. A rule with an
empty key (frozenset()) acts as a universal fallback.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**conditions
|
object
|
Experimental-axis values, e.g.
|
{}
|
Returns:
| Type | Description |
|---|---|
str
|
The resolved default tag string. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If no rule matches the given conditions. |
create(tag, **kwargs)
classmethod
Instantiate a registered class by tag.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tag
|
str
|
|
required |
**kwargs
|
object
|
Forwarded to the class constructor. |
{}
|
Returns:
| Type | Description |
|---|---|
object
|
A new instance of the registered class. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If tag is not in the registry. |
create_default_for(**conditions)
classmethod
Instantiate the default class for a given context.
Combines default_tag(**conditions) with create(tag).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**conditions
|
object
|
Experimental-axis values. |
{}
|
Returns:
| Type | Description |
|---|---|
object
|
A new instance of the default class. |
supported_for(*, calculator=None, sample_form=None, scattering_type=None, beam_mode=None, radiation_probe=None)
classmethod
Return classes matching conditions and/or calculator.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
calculator
|
object
|
Optional |
None
|
sample_form
|
object
|
Optional |
None
|
scattering_type
|
object
|
Optional |
None
|
beam_mode
|
object
|
Optional |
None
|
radiation_probe
|
object
|
Optional |
None
|
Returns:
| Type | Description |
|---|---|
list[type]
|
Classes matching the given conditions. |
show_supported(*, calculator=None, sample_form=None, scattering_type=None, beam_mode=None, radiation_probe=None)
classmethod
Pretty-print a table of supported types.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
calculator
|
object
|
Optional |
None
|
sample_form
|
object
|
Optional |
None
|
scattering_type
|
object
|
Optional |
None
|
beam_mode
|
object
|
Optional |
None
|
radiation_probe
|
object
|
Optional |
None
|
Functions:
total_pd
Total scattering (PDF) powder experiment datablock item.
Classes:
| Name | Description |
|---|---|
TotalPdExperiment |
PDF experiment class with specific attributes. |
Classes
TotalPdExperiment(name, experiment_type)
PDF experiment class with specific attributes.
Methods:
| Name | Description |
|---|---|
__str__ |
Human-readable representation of this component. |
__repr__ |
Developer-oriented representation of this component. |
__getattr__ |
Raise a descriptive error for unknown attribute access. |
__setattr__ |
Set an attribute with access-control diagnostics. |
help |
Print a summary of public attributes and categories. |
show_as_text |
Pretty-print the experiment as text. |
fit_data_arrays |
Return arrays needed to draw the powder fit-data chart. |
Attributes:
| Name | Type | Description |
|---|---|---|
unique_name |
str | None
|
Unique name of this datablock item (from identity). |
parameters |
list
|
All parameters from all owned categories. |
as_cif |
str
|
Serialize this experiment to a CIF fragment. |
categories |
list
|
All category objects owned by this object, sorted by priority. |
name |
str
|
Human-readable name of the experiment. |
experiment_type |
object
|
Experiment type: sample form, probe, beam mode. |
measured_range |
MeasuredRange | None
|
Active-axis range as |
diffrn |
object
|
Ambient conditions recorded during measurement. |
data_range |
object
|
Reciprocal-space range used to calculate without measured data. |
calculator |
object
|
The active calculator category for this experiment. |
linked_structures |
object
|
Collection of structures linked to this experiment. |
excluded_regions |
object
|
Collection of excluded regions for the x-grid. |
data |
object
|
Data collection for this experiment. |
x_descriptor |
NumericDescriptor
|
Descriptor that owns the powder experiment's x-axis metadata. |
peak |
object
|
Peak category object with profile parameters and mixins. |
unique_name
property
Unique name of this datablock item (from identity).
parameters
property
All parameters from all owned categories.
as_cif
property
Serialize this experiment to a CIF fragment.
categories
property
All category objects owned by this object, sorted by priority.
name
property
writable
Human-readable name of the experiment.
experiment_type
property
Experiment type: sample form, probe, beam mode.
measured_range
property
Active-axis range as (min, max, inc).
Backed by data_range: the measured range when a measured
scan is present, and the stored or default calculation range
otherwise. This subsumes the former measured-only behaviour.
diffrn
property
Ambient conditions recorded during measurement.
data_range
property
Reciprocal-space range used to calculate without measured data.
calculator
property
The active calculator category for this experiment.
Holds the selected calculator type and provides access to the live calculator backend instance.
linked_structures
property
Collection of structures linked to this experiment.
excluded_regions
property
Collection of excluded regions for the x-grid.
data
property
Data collection for this experiment.
x_descriptor
property
Descriptor that owns the powder experiment's x-axis metadata.
peak
property
Peak category object with profile parameters and mixins.
__str__()
Human-readable representation of this component.
__repr__()
Developer-oriented representation of this component.
__getattr__(key)
Raise a descriptive error for unknown attribute access.
__setattr__(key, value)
Set an attribute with access-control diagnostics.
help()
Print a summary of public attributes and categories.
show_as_text()
Pretty-print the experiment as text.
fit_data_arrays()
Return arrays needed to draw the powder fit-data chart.