Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fairmat 2024: several new base classes in NXsample and NXsample_component #1413

Open
wants to merge 31 commits into
base: main
Choose a base branch
from

Conversation

lukaspie
Copy link
Contributor

@lukaspie lukaspie commented Sep 23, 2024

This PR is aimed at a more detailed description of the components of a sample. It introduces the following new base classes:
NXsample_component_set, NXsubstance, NXunit_cell, NXsingle_crystal, NXrotation_set

  • NXsample_component_set: this is meant as a wrapper that takes in all the sub sample components (i.e. instances of NXsample_component) and their relationships (mass fractions, volume fractions, etc.)
  • NXsubstance: this is meant to describe a chemical substance. Examples can be single chemical elements, chemical compunds, or alloys (e.g. CuO, C,). It is envisioned that if such a substance is crystalline, it could have an instance of
  • NXunit_cell: Description of a unit cell, i.e., the crystal structure of a single thermodynamic phase. This was can be used within NXsample_(component) and/or in
  • NXsingle_crystal: this is for describing a single crystalline material/phase within another material. It makes use of the new base_class NXrotation_set, which provides a rigorous way of describing rotations, orientations, and disorientations.

Eventually, it is envisioned that each sample can contain one or more instances NXsample_component_set, each of which has one or more instances of NXsample_component. This component is either not mixed (and thus can contain an instance of NXsubstance) or it by itself contains one or more instances NXsample_component_set with multiple instances of NXsample_component. The image provides a useful visualization of this nesting.

image

One thing to consider here is the naming of the base classes: NXsample_component_set and NXrotation_set are probably not the best idea as _set is a reserved suffix and will now also be formally added to NXobject, see #1507.

In addition to the description of the sample component hierarchy, this PR also brings in NXhistory and NXactivity, which are used to describe the history of physical activities that have happened on the sample (preparation, calcination, in situ treatment, ...). It is the same concept as described in #1419, but it is now added to NXsample as well.

@lukaspie lukaspie marked this pull request as draft September 23, 2024 15:59
@lukaspie lukaspie force-pushed the fairmat-2024-nxsample branch from 07d88ba to da28e00 Compare September 23, 2024 17:02
@lukaspie lukaspie changed the title Fairmat 2024: introduce several new base classes to be used in NXsample and NXsample_component Fairmat 2024: several new base classes in NXsample and NXsample_component Sep 24, 2024
@lukaspie lukaspie force-pushed the fairmat-2024-nxsample branch from e123e88 to cdb9b96 Compare September 24, 2024 07:04
@lukaspie lukaspie marked this pull request as ready for review September 24, 2024 07:11
This was referenced Sep 29, 2024
This was linked to issues Sep 29, 2024
# For further information, see http://www.nexusformat.org
-->
<definition xmlns="http://definition.nexusformat.org/nxdl/3.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" category="base" type="group" name="NXsubstance" extends="NXobject" xsi:schemaLocation="http://definition.nexusformat.org/nxdl/3.1 ../nxdl.xsd">
<doc>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can now also inherit IDENTIFIER

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will be implemented when #1486 has been discussed

@lukaspie
Copy link
Contributor Author

lukaspie commented Oct 7, 2024

Dev notes to keep track:

ToDo:

@lukaspie lukaspie mentioned this pull request Oct 8, 2024
@lukaspie lukaspie force-pushed the fairmat-2024-nxsample branch from 699d63c to e635f8e Compare October 16, 2024 09:31
lukaspie and others added 13 commits October 16, 2024 11:31
NXsample can now hold several base classes that split the sample description into
1) description of its components down to the chemical substance level -> NXsample_component, NXsample_component_set, NXsubstance, NXsample_surface_dopant as an example for an NXsubstance
2) any physical process that was performed prior/during the experiment -> NXphysical_process, NXsample_synthesis_step, ... -> can also be stored in NXsample_history
3) a description of the sample history -> NXsample_history, made up of one or more NXphysical_process instances
4) sample environment -> for now still allowed as NXenvironment in NXsample, but should eventually be on the level of the application definitions

# Conflicts:
#	base_classes/NXsample.nxdl.xml
#	base_classes/NXsample_component.nxdl.xml
New(changed base classes:
- NXsample
- NXsample_component
- NXsample_history
- NXactivtiy
- NXphysical_process
- NXsample_synthesis_step

# Conflicts:
#	base_classes/NXsample_component.nxdl.xml
#	base_classes/nyaml/NXsample.yaml
#	base_classes/nyaml/NXsample_component.yaml
#	contributed_definitions/NXsample_history.nxdl.xml
#	contributed_definitions/nyaml/NXphysical_process.yaml
#	contributed_definitions/nyaml/NXsample_history.yaml
- Update some links/terms
- Remove non-supported base class inheritance wrt. NXactivity

# Conflicts:
#	base_classes/nyaml/NXsample.yaml
#	contributed_definitions/NXphysical_process.nxdl.xml
#	contributed_definitions/NXsample_component_set.nxdl.xml
#	contributed_definitions/nyaml/NXphysical_process.yaml
#	contributed_definitions/nyaml/NXsample_component_set.yaml
#	contributed_definitions/nyaml/NXsample_history.yaml
#	contributed_definitions/nyaml/NXsubstance.yaml
There can only ever be one NXsample_component_set in any NXsample or NXsample_component.
There can only ever be one NXsubstance in any NXsample or NXsample_component -> in this case, we are talking about a pure material

# Conflicts:
#	base_classes/NXsample_component.nxdl.xml
#	base_classes/nyaml/NXsample.yaml
#	base_classes/nyaml/NXsample_component.yaml
# Conflicts:
#	base_classes/NXsample_component.nxdl.xml
#	base_classes/nyaml/NXsample.yaml
#	base_classes/nyaml/NXsample_component.yaml
#	contributed_definitions/NXsample_component_set.nxdl.xml
#	contributed_definitions/NXsample_history.nxdl.xml
#	contributed_definitions/NXsample_synthesis_step.nxdl.xml
#	contributed_definitions/NXsubstance.nxdl.xml
#	contributed_definitions/nyaml/NXphysical_process.yaml
#	contributed_definitions/nyaml/NXsample_component_set.yaml
#	contributed_definitions/nyaml/NXsample_history.yaml
#	contributed_definitions/nyaml/NXsubstance.yaml
currently not possible for base_classes

# Conflicts:
#	base_classes/NXsample_component.nxdl.xml
#	base_classes/nyaml/NXsample.yaml
#	base_classes/nyaml/NXsample_component.yaml
# Conflicts:
#	base_classes/NXsample.nxdl.xml
#	contributed_definitions/NXsingle_crystal.nxdl.xml
# Conflicts:
#	base_classes/NXsample_component.nxdl.xml
… version of yaml.

Removing unintensional comments

# Conflicts:
#	base_classes/NXbeam.nxdl.xml
#	base_classes/NXdetector.nxdl.xml
#	base_classes/NXentry.nxdl.xml
#	base_classes/NXinstrument.nxdl.xml
#	base_classes/NXprocess.nxdl.xml
#	base_classes/NXsample.nxdl.xml
#	base_classes/NXsource.nxdl.xml
#	contributed_definitions/NXcollectioncolumn.nxdl.xml
#	contributed_definitions/NXmpes.nxdl.xml
Since we have substantial changes on the NXsample base class now, here we remove any changes to NXsample in this PR.
# Conflicts:
#	contributed_definitions/NXmpes.nxdl.xml
#	contributed_definitions/nyaml/NXmpes.yaml
# Conflicts:
#	base_classes/NXsample_component.nxdl.xml
#	base_classes/nyaml/NXsample.yaml
#	base_classes/nyaml/NXsample_component.yaml
# Conflicts:
#	base_classes/NXsample_component.nxdl.xml
#	base_classes/nyaml/NXsample.yaml
#	base_classes/nyaml/NXsample_component.yaml
# Conflicts:
#	base_classes/nyaml/NXsample.yaml
# Conflicts:
#	base_classes/NXuser.nxdl.xml
#	base_classes/nyaml/NXsample.yaml
#	base_classes/nyaml/NXuser.yaml
#	contributed_definitions/NXapm.nxdl.xml
#	contributed_definitions/NXfabrication.nxdl.xml
#	contributed_definitions/NXidentifier.nxdl.xml
#	contributed_definitions/NXoptical_spectroscopy.nxdl.xml
#	contributed_definitions/nyaml/NXapm.yaml
#	contributed_definitions/nyaml/NXfabrication.yaml
#	contributed_definitions/nyaml/NXidentifier.yaml
#	contributed_definitions/nyaml/NXoptical_spectroscopy.yaml
# Conflicts:
#	base_classes/NXactivity.nxdl.xml
#	contributed_definitions/NXactivity.nxdl.xml
#	contributed_definitions/NXaperture_em.nxdl.xml
#	contributed_definitions/NXchemical_process.nxdl.xml
#	contributed_definitions/NXelectronanalyser.nxdl.xml
#	contributed_definitions/NXrotation_set.nxdl.xml
#	contributed_definitions/NXunit_cell.nxdl.xml
pull in cited base classes

pull in cited base classes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion needed NIAC vote needed PR needs an approving vote from NIAC before merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NXsample NXsample_component
4 participants