project
Modules:
| Name | Description |
|---|---|
categories |
|
display |
Project display facade grouping charts and reports. |
project |
Project facade to orchestrate models, experiments, and analysis. |
project_config |
Project configuration owner for singleton project categories. |
project_info |
Project metadata category export. |
Modules
categories
Modules:
| Name | Description |
|---|---|
info |
Project info category exports. |
rendering_plot |
Project rendering_plot category exports. |
rendering_structure |
Project rendering_structure category exports. |
rendering_table |
Project rendering_table category exports. |
report |
Project report category exports. |
structure_style |
Project structure_style category exports. |
structure_view |
Project structure_view category exports. |
verbosity |
Project verbosity category exports. |
Modules
info
Project info category exports.
Modules:
| Name | Description |
|---|---|
default |
Project info category. |
factory |
Factory for project info categories. |
Classes
Modules
default
Project info category.
Classes:
| Name | Description |
|---|---|
ProjectInfo |
Project metadata category. |
ProjectInfo(name='untitled_project', title='Untitled Project', description='')
Project metadata category.
Methods:
| Name | Description |
|---|---|
update_last_modified |
Update the last modified timestamp. |
show_as_cif |
Pretty-print CIF via shared utilities. |
__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
|
Unique name for GuardedBase diagnostics. |
name |
str
|
Return the project name. |
title |
str
|
Return the project title. |
description |
str
|
Return sanitized description with single spaces. |
path |
pathlib.Path | None
|
Return the project path as a Path object. |
created |
datetime.datetime
|
Return the creation timestamp. |
last_modified |
datetime.datetime
|
Return the last modified timestamp. |
as_cif |
str
|
Export project metadata to CIF. |
parameters |
list
|
All GenericDescriptorBase instances on this item. |
unique_name
property
Unique name for GuardedBase diagnostics.
name
property
writable
Return the project name.
title
property
writable
Return the project title.
description
property
writable
Return sanitized description with single spaces.
path
property
writable
Return the project path as a Path object.
created
property
Return the creation timestamp.
last_modified
property
Return the last modified timestamp.
as_cif
property
Export project metadata to CIF.
parameters
property
All GenericDescriptorBase instances on this item.
update_last_modified()
Update the last modified timestamp.
show_as_cif()
Pretty-print CIF via shared utilities.
__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 project info categories.
Classes:
| Name | Description |
|---|---|
ProjectInfoFactory |
Create project info category instances. |
ProjectInfoFactory
Create project info 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
|
rendering_plot
Project rendering_plot category exports.
Modules:
| Name | Description |
|---|---|
default |
Project rendering_plot category. |
factory |
Factory for project rendering_plot categories. |
Classes
Modules
default
Project rendering_plot category.
Classes:
| Name | Description |
|---|---|
RenderingPlot |
RenderingPlot engine selection for a project. |
RenderingPlot()
RenderingPlot engine selection for a project.
Methods:
| Name | Description |
|---|---|
from_cif |
Populate this rendering_plot 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 |
|---|---|---|
plotter |
Plotter
|
Live plotting facade bound to the owning project. |
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. |
plotter
property
Live plotting facade bound to the owning project.
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 rendering_plot 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 project rendering_plot categories.
Classes:
| Name | Description |
|---|---|
RenderingPlotFactory |
Create project rendering_plot category instances. |
RenderingPlotFactory
Create project rendering_plot 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
|
rendering_structure
Project rendering_structure category exports.
Modules:
| Name | Description |
|---|---|
default |
Project rendering_structure category (switchable renderer engine). |
factory |
Factory for project view categories. |
Classes
Modules
default
Project rendering_structure category (switchable renderer engine).
Classes:
| Name | Description |
|---|---|
RenderingStructure |
Renderer engine selection for the project structure view. |
RenderingStructure()
Renderer engine selection for the project structure view.
Methods:
| Name | Description |
|---|---|
from_cif |
Populate this category from a CIF block, rebinding engine. |
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 |
|---|---|---|
viewer |
Viewer
|
Live structure-view facade bound to the active engine. |
as_cif |
str
|
Return the CIF text for this rendering_structure category. |
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. |
viewer
property
Live structure-view facade bound to the active engine.
as_cif
property
Return the CIF text for this rendering_structure category.
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.
from_cif(block, idx=0)
Populate this category from a CIF block, rebinding engine.
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 project view categories.
Classes:
| Name | Description |
|---|---|
RenderingStructureFactory |
Create project rendering_structure category instances. |
RenderingStructureFactory
Create project rendering_structure 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
|
rendering_table
Project rendering_table category exports.
Modules:
| Name | Description |
|---|---|
default |
Project rendering_table category. |
factory |
Factory for project table categories. |
Classes
Modules
default
Project rendering_table category.
Classes:
| Name | Description |
|---|---|
RenderingTable |
Table engine selection for a project. |
RenderingTable()
Table engine selection for a project.
Methods:
| Name | Description |
|---|---|
from_cif |
Populate this rendering_table 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 |
|---|---|---|
tabler |
TableRenderer
|
Live table-rendering facade. |
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. |
tabler
property
Live table-rendering facade.
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 rendering_table 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 project table categories.
Classes:
| Name | Description |
|---|---|
RenderingTableFactory |
Create project rendering_table category instances. |
RenderingTableFactory
Create project rendering_table 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
|
report
Project report category exports.
Modules:
| Name | Description |
|---|---|
default |
Project report output configuration and file export. |
factory |
Factory for project report categories. |
Classes
Modules
default
Project report output configuration and file export.
Classes:
| Name | Description |
|---|---|
Report |
Generates reports and exports results from the project. |
Report()
Generates reports and exports results from the project.
This class collects and presents all relevant information about the fitted model, experiments, and analysis results.
Methods:
| Name | Description |
|---|---|
data_context |
Return shared report-rendering data. |
help |
Print available report methods. |
save_cif |
Write the IUCr submission report. |
save_html |
Write the HTML report. |
as_html |
Render the HTML report. |
save_tex |
Write the TeX report. |
as_tex |
Render the TeX report. |
save_pdf |
Write the PDF report. |
save |
Write all configured report formats. |
__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. |
from_cif |
Populate this item from a CIF block. |
Attributes:
| Name | Type | Description |
|---|---|---|
cif |
BoolDescriptor
|
Whether to write CIF reports when saving. |
html |
BoolDescriptor
|
Whether to write HTML reports when saving. |
tex |
BoolDescriptor
|
Whether to write TeX reports when saving. |
pdf |
BoolDescriptor
|
Whether to write PDF reports when saving. |
html_offline |
BoolDescriptor
|
Whether HTML reports should embed assets. |
project |
object
|
Project owning this report 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. |
cif
property
writable
Whether to write CIF reports when saving.
html
property
writable
Whether to write HTML reports when saving.
tex
property
writable
Whether to write TeX reports when saving.
pdf
property
writable
Whether to write PDF reports when saving.
html_offline
property
writable
Whether HTML reports should embed assets.
project
property
Project owning this report 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.
data_context()
Return shared report-rendering data.
help()
Print available report methods.
save_cif()
Write the IUCr submission report.
Returns:
| Type | Description |
|---|---|
pathlib.Path
|
Path of the written report CIF. |
save_html(*, offline=False)
Write the HTML report.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
offline
|
bool
|
Whether to embed assets in the HTML report. |
False
|
Returns:
| Type | Description |
|---|---|
pathlib.Path
|
Path of the written HTML report. |
as_html(*, offline=False)
Render the HTML report.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
offline
|
bool
|
Whether to embed HTML JavaScript assets. |
False
|
Returns:
| Type | Description |
|---|---|
str
|
Complete HTML report document. |
save_tex()
Write the TeX report.
Returns:
| Type | Description |
|---|---|
pathlib.Path
|
Path of the written TeX report. |
as_tex()
Render the TeX report.
Returns:
| Type | Description |
|---|---|
str
|
Complete TeX report document. |
save_pdf()
Write the PDF report.
Returns:
| Type | Description |
|---|---|
pathlib.Path
|
Path of the PDF report, or the intended PDF path when no TeX engine is available. |
save()
Write all configured report formats.
Returns:
| Type | Description |
|---|---|
list[pathlib.Path]
|
Paths of written report files. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If no report formats are configured. |
__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.
from_cif(block, idx=0)
Populate this item from a CIF block.
factory
Factory for project report categories.
Classes:
| Name | Description |
|---|---|
ReportFactory |
Create project report category instances. |
ReportFactory
Create project report 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
|
structure_style
Project structure_style category exports.
Modules:
| Name | Description |
|---|---|
default |
Project structure_style category (durable structure-view appearance). |
factory |
Factory for project structure_style categories. |
Classes
Modules
default
Project structure_style category (durable structure-view appearance).
Classes:
| Name | Description |
|---|---|
StructureStyle |
How the structure view looks (appearance, not per-element). |
StructureStyle()
How the structure view looks (appearance, not per-element).
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 |
|---|---|---|
atom_view |
EnumDescriptor
|
How atoms are sized/shaped (vdw/covalent/ionic/adp). |
color_scheme |
EnumDescriptor
|
Standard element colour scheme. |
adp_probability |
NumericDescriptor
|
ORTEP probability level (fraction in interval (0, 1)). |
atom_scale |
NumericDescriptor
|
Overall ball-atom size factor in (0, 1] (sqrt compressed). |
as_cif |
str
|
Return CIF text for this structure_style category. |
unique_name |
str
|
Fully qualified name: datablock, category, entry. |
parameters |
list
|
All GenericDescriptorBase instances on this item. |
atom_view
property
writable
How atoms are sized/shaped (vdw/covalent/ionic/adp).
color_scheme
property
writable
Standard element colour scheme.
adp_probability
property
writable
ORTEP probability level (fraction in interval (0, 1)).
atom_scale
property
writable
Overall ball-atom size factor in (0, 1] (sqrt compressed).
as_cif
property
Return CIF text for this structure_style category.
unique_name
property
Fully qualified name: datablock, category, entry.
parameters
property
All GenericDescriptorBase instances on this item.
__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 project structure_style categories.
Classes:
| Name | Description |
|---|---|
StructureStyleFactory |
Create project structure_style category instances. |
StructureStyleFactory
Create project structure_style 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
|
structure_view
Project structure_view category exports.
Modules:
| Name | Description |
|---|---|
default |
Project structure_view category (durable content + region view state). |
factory |
Factory for project structure_view categories. |
Classes
Modules
default
Project structure_view category (durable content + region view state).
Classes:
| Name | Description |
|---|---|
StructureView |
What and where to draw in the structure view (engine-neutral). |
StructureView()
What and where to draw in the structure view (engine-neutral).
Methods:
| Name | Description |
|---|---|
view_range |
Assemble the per-axis |
__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 |
|---|---|---|
show_labels |
BoolDescriptor
|
Whether atom labels are shown when the view opens. |
show_moments |
BoolDescriptor
|
Whether moment arrows are shown where the data exists. |
range_a_min |
NumericDescriptor
|
Lower fractional bound along a. |
range_a_max |
NumericDescriptor
|
Upper fractional bound along a. |
range_b_min |
NumericDescriptor
|
Lower fractional bound along b. |
range_b_max |
NumericDescriptor
|
Upper fractional bound along b. |
range_c_min |
NumericDescriptor
|
Lower fractional bound along c. |
range_c_max |
NumericDescriptor
|
Upper fractional bound along c. |
as_cif |
str
|
Return CIF representation of this structure_view category. |
unique_name |
str
|
Fully qualified name: datablock, category, entry. |
parameters |
list
|
All GenericDescriptorBase instances on this item. |
show_labels
property
writable
Whether atom labels are shown when the view opens.
show_moments
property
writable
Whether moment arrows are shown where the data exists.
range_a_min
property
writable
Lower fractional bound along a.
range_a_max
property
writable
Upper fractional bound along a.
range_b_min
property
writable
Lower fractional bound along b.
range_b_max
property
writable
Upper fractional bound along b.
range_c_min
property
writable
Lower fractional bound along c.
range_c_max
property
writable
Upper fractional bound along c.
as_cif
property
Return CIF representation of this structure_view category.
unique_name
property
Fully qualified name: datablock, category, entry.
parameters
property
All GenericDescriptorBase instances on this item.
view_range()
Assemble the per-axis ((min, max), ...) fractional window.
__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 project structure_view categories.
Classes:
| Name | Description |
|---|---|
StructureViewFactory |
Create project structure_view category instances. |
StructureViewFactory
Create project structure_view 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
|
verbosity
Project verbosity category exports.
Modules:
| Name | Description |
|---|---|
default |
Project fit-output verbosity category. |
factory |
Factory for project verbosity categories. |
Classes
Modules
default
Project fit-output verbosity category.
Classes:
| Name | Description |
|---|---|
Verbosity |
Fit-output verbosity selection for a project. |
Verbosity()
Fit-output verbosity selection for a project.
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 |
|---|---|---|
fit |
EnumDescriptor
|
Fitting process output verbosity. |
as_cif |
str
|
Return CIF representation of this verbosity category. |
unique_name |
str
|
Fully qualified name: datablock, category, entry. |
parameters |
list
|
All GenericDescriptorBase instances on this item. |
fit
property
writable
Fitting process output verbosity.
as_cif
property
Return CIF representation of this verbosity category.
unique_name
property
Fully qualified name: datablock, category, entry.
parameters
property
All GenericDescriptorBase instances on this item.
__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 project verbosity categories.
Classes:
| Name | Description |
|---|---|
VerbosityFactory |
Create project verbosity category instances. |
VerbosityFactory
Create project verbosity 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
|
display
Project display facade grouping charts and reports.
Classes:
| Name | Description |
|---|---|
PatternOptionStatus |
Availability metadata for one |
ParameterDisplay |
Parameter-table namespace under |
FitDisplay |
Fit-report namespace under |
PosteriorDisplay |
Posterior-plot namespace under |
ProjectDisplay |
Grouped display facade exposed as |
Classes
PatternOptionStatus(name, description, available, auto_included, reason)
dataclass
Availability metadata for one display.pattern option.
ParameterDisplay(project)
Parameter-table namespace under project.display.
Methods:
| Name | Description |
|---|---|
all |
Show all structure and experiment parameters. |
fittable |
Show all currently fittable parameters. |
free |
Show all currently free parameters. |
access |
Show Python access paths for all parameters. |
cif_uids |
Show CIF unique identifiers for all parameters. |
help |
Print available parameter-display methods. |
Functions
all()
Show all structure and experiment parameters.
fittable()
Show all currently fittable parameters.
free()
Show all currently free parameters.
access()
Show Python access paths for all parameters.
cif_uids()
Show CIF unique identifiers for all parameters.
help()
Print available parameter-display methods.
FitDisplay(project)
Fit-report namespace under project.display.
Methods:
| Name | Description |
|---|---|
results |
Show the latest fit summary and fitted parameter table. |
correlations |
Show parameter correlations from the latest fit. |
series |
Plot fitted parameter(s) across sequential results. |
help |
Print available fit-display methods. |
Functions
results()
Show the latest fit summary and fitted parameter table.
correlations(threshold=None, precision=2, *, max_parameters=6, show_diagonal=True)
Show parameter correlations from the latest fit.
series(param=None, versus=None)
Plot fitted parameter(s) across sequential results.
Use a persisted diffrn path such as
``'diffrn.ambient_temperature'`` for *versus*. When *param*
is provided, plot that single parameter. When *param* is
``None`` (default), plot every fitted parameter, one after
another.
help()
Print available fit-display methods.
PosteriorDisplay(project)
Posterior-plot namespace under project.display.
Methods:
| Name | Description |
|---|---|
pairs |
Plot posterior pair relationships for sampled parameters. |
distribution |
Plot posterior distributions for one or all free parameters. |
predictive |
Plot posterior predictive summaries for one experiment. |
help |
Print available posterior-display methods. |
Functions
pairs(parameters=None, style=PosteriorPairPlotStyleEnum.AUTO, *, threshold=None, max_parameters=6)
Plot posterior pair relationships for sampled parameters.
distribution(param=None)
Plot posterior distributions for one or all free parameters.
predictive(expt_name, style='band', x_min=None, x_max=None, *, show_residual=None, x=None)
Plot posterior predictive summaries for one experiment.
help()
Print available posterior-display methods.
ProjectDisplay(project)
Grouped display facade exposed as project.display.
Methods:
| Name | Description |
|---|---|
help |
Print display namespaces and methods. |
pattern |
Show the experiment's diffraction pattern. |
structure |
Show a 3D structure view for one structure. |
show_structure_options |
Show available |
Attributes:
| Name | Type | Description |
|---|---|---|
parameters |
ParameterDisplay
|
Parameter-table namespace. |
fit |
FitDisplay
|
Fit-report namespace. |
posterior |
PosteriorDisplay
|
Posterior-plot namespace. |
Attributes
parameters
property
Parameter-table namespace.
fit
property
Fit-report namespace.
posterior
property
Posterior-plot namespace.
Functions
help()
Print display namespaces and methods.
pattern(expt_name, x_min=None, x_max=None, *, x=None)
Show the experiment's diffraction pattern.
Renders every kind of data the project state supports for the experiment: measured and calculated intensities, the residual, Bragg ticks, background, excluded regions, and posterior predictive uncertainty bands, each shown when available.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
expt_name
|
str
|
Name of the experiment to plot. |
required |
x_min
|
float | None
|
Lower bound for the x-axis range. |
None
|
x_max
|
float | None
|
Upper bound for the x-axis range. |
None
|
x
|
object | None
|
Optional x-axis variable overriding the experiment default (excluded-region overlays are skipped for a custom axis). |
None
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If no pattern content is available for the experiment. |
structure(struct_name, include='auto', range=None, path=None)
Show a 3D structure view for one structure.
Parallels :meth:pattern: it draws with the active
project.rendering_structure engine and displays directly (no
return value). Feature visibility is resolved per ADR section 8;
the renderer announces and skips any feature it cannot draw.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
struct_name
|
str
|
Name of the structure to draw. |
required |
include
|
str | tuple[str, ...]
|
|
'auto'
|
range
|
StructureViewRange | None
|
Optional per-axis |
None
|
path
|
str | None
|
When given, write the rendered view to this path instead of displaying it (a standalone HTML file for the Three.js engine). |
None
|
show_structure_options(struct_name)
Show available structure(include=...) options.
Functions
project
Project facade to orchestrate models, experiments, and analysis.
Classes:
| Name | Description |
|---|---|
Project |
Central API for managing a diffraction data analysis project. |
Classes
Project(name='untitled_project', title='Untitled Project', description='')
Central API for managing a diffraction data analysis project.
Provides access to structures, experiments, analysis, and reports.
Methods:
| Name | Description |
|---|---|
current_project_path |
Return the saved path of the current project, if any. |
__str__ |
Human-readable representation. |
load |
Load a project from a saved directory. |
save |
Save the project into the existing project directory. |
save_as |
Save the project into a directory. |
apply_params_from_csv |
Load a single CSV row and apply its parameters to the project. |
__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 properties and methods. |
Attributes:
| Name | Type | Description |
|---|---|---|
info |
ProjectInfo
|
Project metadata container. |
name |
str
|
Convenience property for the project name. |
full_name |
str
|
Return the full project name (alias for :attr: |
structures |
Structures
|
Collection of structures in the project. |
experiments |
Experiments
|
Collection of experiments in the project. |
rendering_plot |
RenderingPlot
|
Chart configuration bound to the project. |
rendering_table |
RenderingTable
|
Table configuration bound to the project. |
rendering_structure |
RenderingStructure
|
Structure-view configuration bound to the project. |
structure_view |
StructureView
|
Structure-view content and region bound to the project. |
structure_style |
StructureStyle
|
Structure-view appearance bound to the project. |
display |
ProjectDisplay
|
Current display entry-point bound to the project. |
analysis |
Analysis
|
Analysis entry-point bound to the project. |
report |
Report
|
Submission report builder bound to the project. |
parameters |
list
|
Return parameters from all structures and experiments. |
free_parameters |
list
|
Return free parameters from structures and experiments. |
as_cif |
str
|
Export whole project as CIF text. |
verbosity |
Verbosity
|
Verbosity configuration bound to the project. |
unique_name |
str
|
Fallback unique name: the class name. |
Attributes
info
property
Project metadata container.
name
property
Convenience property for the project name.
full_name
property
Return the full project name (alias for :attr:name).
Returns:
| Type | Description |
|---|---|
str
|
The project name. |
structures
property
writable
Collection of structures in the project.
experiments
property
writable
Collection of experiments in the project.
rendering_plot
property
Chart configuration bound to the project.
rendering_table
property
Table configuration bound to the project.
rendering_structure
property
Structure-view configuration bound to the project.
structure_view
property
Structure-view content and region bound to the project.
structure_style
property
Structure-view appearance bound to the project.
display
property
Current display entry-point bound to the project.
analysis
property
Analysis entry-point bound to the project.
report
property
Submission report builder bound to the project.
parameters
property
Return parameters from all structures and experiments.
free_parameters
property
Return free parameters from structures and experiments.
as_cif
property
Export whole project as CIF text.
verbosity
property
writable
Verbosity configuration bound to the project.
unique_name
property
Fallback unique name: the class name.
Functions
current_project_path()
classmethod
Return the saved path of the current project, if any.
__str__()
Human-readable representation.
load(dir_path)
classmethod
Load a project from a saved directory.
Reads project.cif, structures/*.cif,
experiments/*.cif, and analysis.cif from dir_path and
reconstructs the full project state, including project-level
display configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dir_path
|
str
|
Path to the project directory previously created by
:meth: |
required |
Returns:
| Type | Description |
|---|---|
Project
|
A fully reconstructed project instance. |
Raises:
| Type | Description |
|---|---|
FileNotFoundError
|
If dir_path does not exist. |
save()
Save the project into the existing project directory.
save_as(dir_path, *, temporary=False, overwrite=True)
Save the project into a directory.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dir_path
|
str
|
Destination directory for the saved project. |
required |
temporary
|
bool
|
Whether to save beneath the system temporary directory. |
False
|
overwrite
|
bool
|
Whether to remove an existing target directory before saving. |
True
|
apply_params_from_csv(row_index)
Load a single CSV row and apply its parameters to the project.
Reads the row at row_index from analysis/results.csv,
overrides parameter values in the live project, and (for
sequential-fit results where file_path points to a real
file) reloads the measured data into the template experiment.
After calling this method,
display.plotter.plot_meas_vs_calc() will fit for that
specific dataset.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
row_index
|
int
|
Row index in the CSV file. Supports Python-style negative
indexing (e.g. |
required |
Raises:
| Type | Description |
|---|---|
FileNotFoundError
|
If |
IndexError
|
If row_index is out of range. |
__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 properties and methods.
Functions
project_config
Project configuration owner for singleton project categories.
Classes:
| Name | Description |
|---|---|
ProjectConfig |
Own singleton project configuration categories. |
Classes
ProjectConfig(name='untitled_project', title='Untitled Project', description='')
Own singleton project configuration categories.
Methods:
| Name | Description |
|---|---|
__str__ |
Return the string representation of this object. |
__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 categories. |
Attributes:
| Name | Type | Description |
|---|---|---|
info |
ProjectInfo
|
Project metadata category. |
rendering_plot |
RenderingPlot
|
Chart configuration category. |
report |
Report
|
Report configuration category. |
rendering_table |
RenderingTable
|
Table configuration category. |
verbosity |
Verbosity
|
Verbosity configuration category. |
rendering_structure |
RenderingStructure
|
Structure-view configuration category. |
structure_view |
StructureView
|
Structure-view content and region category. |
structure_style |
StructureStyle
|
Structure-view appearance category. |
as_cif |
str
|
Serialize singleton project categories to CIF. |
unique_name |
str
|
Fallback unique name: the class name. |
parameters |
list
|
All parameters from all owned categories. |
categories |
list
|
All category objects owned by this object, sorted by priority. |
Attributes
info
property
Project metadata category.
rendering_plot
property
Chart configuration category.
report
property
Report configuration category.
rendering_table
property
Table configuration category.
verbosity
property
Verbosity configuration category.
rendering_structure
property
Structure-view configuration category.
structure_view
property
Structure-view content and region category.
structure_style
property
Structure-view appearance category.
as_cif
property
Serialize singleton project categories to CIF.
unique_name
property
Fallback unique name: the class name.
parameters
property
All parameters from all owned categories.
categories
property
All category objects owned by this object, sorted by priority.
Functions
__str__()
Return the string representation of this object.
__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 categories.
project_info
Project metadata category export.