generated.docs.javadoc.org.eclipse.dawnsci.nexus.impl.NXcontainerImpl.html Maven / Gradle / Ivy
NXcontainerImpl (h5jan API)
org.eclipse.dawnsci.nexus.impl
Class NXcontainerImpl
- java.lang.Object
-
- org.eclipse.dawnsci.analysis.tree.impl.NodeImpl
-
- org.eclipse.dawnsci.analysis.tree.impl.GroupNodeImpl
-
- org.eclipse.dawnsci.nexus.impl.NXobjectImpl
-
- org.eclipse.dawnsci.nexus.impl.NXcontainerImpl
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Iterable<NodeLink>, GroupNode, Node, NXcontainer, NXobject
public class NXcontainerImpl
extends NXobjectImpl
implements NXcontainer
State of a container holding the sample under investigation.
A container is any object in the beam path which absorbs the beam and
whose contribution to the overall attenuation/scattering needs to be
determined to process the experimental data. Examples of containers
include glass capillary tubes, vanadium cans, windows in furnaces or
diamonds in a Diamond Anvil Cell. The following figures show a complex
example of a container:
.. figure:: container/ComplexExampleContainer.png
A hypothetical capillary furnace. The beam passes from left to right
(blue dashes), passing through window 1, then window 2, before
passing through the downstream wall of the capillary. It is then
scattered by the sample with scattered beams passing through the
upstream wall of the capillary, then windows 4 and 5. As part of the
corrections for a PDF experiment it is necessary to subtract the PDF
of the empty container (i.e. each of the windows and the capillary).
To calculate the PDF of the empty container it is necessary to have
the measured scattering data and to know the nature (e.g. density,
elemental composition, etc.) of the portion of the container which
the beam passed through.
.. figure:: container/ComplexContainerBeampath.png
A complete description of the shapes of the container elements with
their orientation relative to the beam and also information on
whether they are upstream or downstream of the sample is also
therefore important. For example, although the windows 2 and 4 have
the same shape, the path taken through them by the beam is very
different and this needs to be modelled. Furthermore, it is not
inconceivable that windows might move during an experiment and thus
the changes to the beampath would need to be accounted for.
This class encodes the position of the container with respect to the
sample and allows the calculation of the beampath through the container.
It also includes sufficient data to model beam absorption of the
container and a link to a dataset containing a measurement of the
container with nothing inside, to allow data corrections (at a specific
beam energy/measurement time) to be made.
- See Also:
- Serialized Form
-
-
Field Summary
Fields
Modifier and Type
Field and Description
static java.util.Set<NexusBaseClass>
PERMITTED_CHILD_GROUP_CLASSES
-
Fields inherited from class org.eclipse.dawnsci.nexus.impl.NXobjectImpl
NX_CLASS
-
Fields inherited from class org.eclipse.dawnsci.analysis.tree.impl.NodeImpl
attributes, id, INDENT
-
Fields inherited from interface org.eclipse.dawnsci.nexus.NXcontainer
NX_CHEMICAL_FORMULA, NX_DENSITY, NX_DESCRIPTION, NX_NAME, NX_PACKING_FRACTION, NX_RELATIVE_MOLECULAR_MASS
-
Constructor Summary
Constructors
Constructor and Description
NXcontainerImpl()
NXcontainerImpl(long oid)
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
NXbeam
getBeam()
Details of beam incident on container, including the position
relative to the sample (to determine whether the container is
upstream or downstream of the sample).
IDataset
getChemical_formula()
Chemical composition of the material the container is made from.
java.lang.String
getChemical_formulaScalar()
Chemical composition of the material the container is made from.
IDataset
getDensity()
Density of the material the container is made from.
java.lang.Double
getDensityScalar()
Density of the material the container is made from.
IDataset
getDescription()
Verbose description of container and how it fits into the wider
experimental set up.
java.lang.String
getDescriptionScalar()
Verbose description of container and how it fits into the wider
experimental set up.
IDataset
getName()
Descriptive name of container.
java.lang.String
getNameScalar()
Descriptive name of container.
NexusBaseClass
getNexusBaseClass()
Enum constant from NexusBaseClass
for this base class, e.g.
java.lang.Class<? extends NXobject>
getNXclass()
Java Class
object of the interface for this base class, e.g.
NXtransformations
getOrientation()
The angle the container makes to the beam and how it may change
during the experiment.In combination with shape this should allow
the beampath through the container to be modelled to allow the
adsorption of the container to be calculated.
IDataset
getPacking_fraction()
Fraction of the volume of the container occupied by the material
forming the container.
java.lang.Double
getPacking_fractionScalar()
Fraction of the volume of the container occupied by the material
forming the container.
java.util.Set<NexusBaseClass>
getPermittedChildGroupClasses()
Returns a set containing the NexusBaseClass
constants for the permitted child group types
of this base class.
IDataset
getRelative_molecular_mass()
Relative molecular mass of container.
java.lang.Double
getRelative_molecular_massScalar()
Relative molecular mass of container.
NXshape
getShape()
Shape of the container.
void
setBeam(NXbeam beam)
Details of beam incident on container, including the position
relative to the sample (to determine whether the container is
upstream or downstream of the sample).
DataNode
setChemical_formula(IDataset chemical_formula)
Chemical composition of the material the container is made from.
DataNode
setChemical_formulaScalar(java.lang.String chemical_formula)
Chemical composition of the material the container is made from.
DataNode
setDensity(IDataset density)
Density of the material the container is made from.
DataNode
setDensityScalar(java.lang.Double density)
Density of the material the container is made from.
DataNode
setDescription(IDataset description)
Verbose description of container and how it fits into the wider
experimental set up.
DataNode
setDescriptionScalar(java.lang.String description)
Verbose description of container and how it fits into the wider
experimental set up.
DataNode
setName(IDataset name)
Descriptive name of container.
DataNode
setNameScalar(java.lang.String name)
Descriptive name of container.
void
setOrientation(NXtransformations orientation)
The angle the container makes to the beam and how it may change
during the experiment.In combination with shape this should allow
the beampath through the container to be modelled to allow the
adsorption of the container to be calculated.
DataNode
setPacking_fraction(IDataset packing_fraction)
Fraction of the volume of the container occupied by the material
forming the container.
DataNode
setPacking_fractionScalar(java.lang.Double packing_fraction)
Fraction of the volume of the container occupied by the material
forming the container.
DataNode
setRelative_molecular_mass(IDataset relative_molecular_mass)
Relative molecular mass of container.
DataNode
setRelative_molecular_massScalar(java.lang.Double relative_molecular_mass)
Relative molecular mass of container.
void
setShape(NXshape shape)
Shape of the container.
-
Methods inherited from class org.eclipse.dawnsci.nexus.impl.NXobjectImpl
addExternalLink, appendNodeString, canAddChild, createDataNode, getAllDatasets, getAttr, getAttrBoolean, getAttrDate, getAttrDouble, getAttrLong, getAttrNumber, getAttrString, getBoolean, getChild, getChildren, getChildren, getDataset, getDate, getDouble, getLazyWritableDataset, getLong, getNumber, getString, initializeFixedSizeLazyDataset, initializeLazyDataset, initializeLazyDataset, putChild, setAttribute, setChildren, setDataset, setDate, setField, setString
-
Methods inherited from class org.eclipse.dawnsci.analysis.tree.impl.GroupNodeImpl
addDataNode, addGroupNode, addNode, addNodeLink, addSymbolicNode, containsDataNode, containsGroupNode, containsNode, containsSymbolicNode, createNodeLink, findLinkedNodeName, findNodeLink, getDataNode, getDataNodeMap, getDataNodes, getDatasets, getGlobalPool, getGroupNode, getGroupNodeMap, getGroupNodes, getNames, getNode, getNodeLink, getNodeNameIterator, getNumberOfDataNodes, getNumberOfGroupNodes, getNumberOfNodelinks, getSymbolicNode, isGroupNode, isPopulated, iterator, removeDataNode, removeDataNode, removeGroupNode, removeGroupNode, removeSymbolicNode, removeSymbolicNode, setGlobalPool, toString
-
Methods inherited from class org.eclipse.dawnsci.analysis.tree.impl.NodeImpl
addAttribute, containsAttribute, getAttribute, getAttributeIterator, getAttributeNameIterator, getID, getNumberOfAttributes, isDataNode, isSymbolicNode
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.dawnsci.nexus.NXobject
addExternalLink, canAddChild, createDataNode, getAllDatasets, getAttr, getAttrBoolean, getAttrDate, getAttrDouble, getAttrLong, getAttrNumber, getAttrString, getBoolean, getChild, getChildren, getChildren, getDataset, getDate, getDouble, getLazyWritableDataset, getLong, getNumber, getString, initializeFixedSizeLazyDataset, initializeLazyDataset, initializeLazyDataset, putChild, setAttribute, setChildren, setDataset, setField
-
Methods inherited from interface org.eclipse.dawnsci.analysis.api.tree.GroupNode
addDataNode, addGroupNode, addNode, addNodeLink, addSymbolicNode, containsDataNode, containsGroupNode, containsNode, containsSymbolicNode, findLinkedNodeName, findNodeLink, getDataNode, getDataNodeMap, getDataNodes, getDatasets, getGlobalPool, getGroupNode, getGroupNodeMap, getGroupNodes, getNames, getNode, getNodeLink, getNodeNameIterator, getNumberOfDataNodes, getNumberOfGroupNodes, getNumberOfNodelinks, getSymbolicNode, isPopulated, iterator, removeDataNode, removeDataNode, removeGroupNode, removeGroupNode, removeSymbolicNode, removeSymbolicNode, setGlobalPool
-
Methods inherited from interface org.eclipse.dawnsci.analysis.api.tree.Node
addAttribute, containsAttribute, getAttribute, getAttributeIterator, getAttributeNameIterator, getID, getNumberOfAttributes, isDataNode, isGroupNode, isSymbolicNode
-
-
Field Detail
-
PERMITTED_CHILD_GROUP_CLASSES
public static final java.util.Set<NexusBaseClass> PERMITTED_CHILD_GROUP_CLASSES
-
Constructor Detail
-
NXcontainerImpl
public NXcontainerImpl()
-
NXcontainerImpl
public NXcontainerImpl(long oid)
-
Method Detail
-
getNXclass
public java.lang.Class<? extends NXobject> getNXclass()
Description copied from interface: NXobject
Java Class
object of the interface for this base class, e.g. NXsample
.class.
- Specified by:
getNXclass
in interface NXobject
- Returns:
- name of Nexus class
-
getNexusBaseClass
public NexusBaseClass getNexusBaseClass()
Description copied from interface: NXobject
Enum constant from NexusBaseClass
for this base class, e.g. NexusBaseClass.NX_SAMPLE
.
- Specified by:
getNexusBaseClass
in interface NXobject
- Returns:
NexusBaseClass
enum constant for this class
-
getPermittedChildGroupClasses
public java.util.Set<NexusBaseClass> getPermittedChildGroupClasses()
Description copied from interface: NXobject
Returns a set containing the NexusBaseClass
constants for the permitted child group types
of this base class.
- Specified by:
getPermittedChildGroupClasses
in interface NXobject
- Returns:
NexusBaseClass
constants for permitted child groups
-
getName
public IDataset getName()
Description copied from interface: NXcontainer
Descriptive name of container.
- Specified by:
getName
in interface NXcontainer
- Returns:
- the value.
-
getNameScalar
public java.lang.String getNameScalar()
Description copied from interface: NXcontainer
Descriptive name of container.
- Specified by:
getNameScalar
in interface NXcontainer
- Returns:
- the value.
-
setName
public DataNode setName(IDataset name)
Description copied from interface: NXcontainer
Descriptive name of container.
- Specified by:
setName
in interface NXcontainer
- Parameters:
name
- the name
-
setNameScalar
public DataNode setNameScalar(java.lang.String name)
Description copied from interface: NXcontainer
Descriptive name of container.
- Specified by:
setNameScalar
in interface NXcontainer
- Parameters:
name
- the name
-
getDescription
public IDataset getDescription()
Description copied from interface: NXcontainer
Verbose description of container and how it fits into the wider
experimental set up.
- Specified by:
getDescription
in interface NXcontainer
- Returns:
- the value.
-
getDescriptionScalar
public java.lang.String getDescriptionScalar()
Description copied from interface: NXcontainer
Verbose description of container and how it fits into the wider
experimental set up.
- Specified by:
getDescriptionScalar
in interface NXcontainer
- Returns:
- the value.
-
setDescription
public DataNode setDescription(IDataset description)
Description copied from interface: NXcontainer
Verbose description of container and how it fits into the wider
experimental set up.
- Specified by:
setDescription
in interface NXcontainer
- Parameters:
description
- the description
-
setDescriptionScalar
public DataNode setDescriptionScalar(java.lang.String description)
Description copied from interface: NXcontainer
Verbose description of container and how it fits into the wider
experimental set up.
- Specified by:
setDescriptionScalar
in interface NXcontainer
- Parameters:
description
- the description
-
getChemical_formula
public IDataset getChemical_formula()
Description copied from interface: NXcontainer
Chemical composition of the material the container is made from.
Specified using CIF conventions. Abbreviated version of CIF
standard:
* Only recognized element symbols may be used.
* Each element symbol is followed by a 'count' number. A count of
'1' may be omitted.
* A space or parenthesis must separate each cluster of (element
symbol + count).
* Where a group of elements is enclosed in parentheses, the
multiplier for the group must follow the closing parentheses.
That is, all element and group multipliers are assumed to be
printed as subscripted numbers.
* Unless the elements are ordered in a manner that corresponds to
their chemical structure, the order of the elements within any
group or moiety depends on whether or not carbon is present.
* If carbon is present, the order should be:
- C, then H, then the other elements in alphabetical order of
their symbol.
- If carbon is not present, the elements are listed purely in
alphabetic order of their symbol.
* This is the *Hill* system used by Chemical Abstracts.
- Specified by:
getChemical_formula
in interface NXcontainer
- Returns:
- the value.
-
getChemical_formulaScalar
public java.lang.String getChemical_formulaScalar()
Description copied from interface: NXcontainer
Chemical composition of the material the container is made from.
Specified using CIF conventions. Abbreviated version of CIF
standard:
* Only recognized element symbols may be used.
* Each element symbol is followed by a 'count' number. A count of
'1' may be omitted.
* A space or parenthesis must separate each cluster of (element
symbol + count).
* Where a group of elements is enclosed in parentheses, the
multiplier for the group must follow the closing parentheses.
That is, all element and group multipliers are assumed to be
printed as subscripted numbers.
* Unless the elements are ordered in a manner that corresponds to
their chemical structure, the order of the elements within any
group or moiety depends on whether or not carbon is present.
* If carbon is present, the order should be:
- C, then H, then the other elements in alphabetical order of
their symbol.
- If carbon is not present, the elements are listed purely in
alphabetic order of their symbol.
* This is the *Hill* system used by Chemical Abstracts.
- Specified by:
getChemical_formulaScalar
in interface NXcontainer
- Returns:
- the value.
-
setChemical_formula
public DataNode setChemical_formula(IDataset chemical_formula)
Description copied from interface: NXcontainer
Chemical composition of the material the container is made from.
Specified using CIF conventions. Abbreviated version of CIF
standard:
* Only recognized element symbols may be used.
* Each element symbol is followed by a 'count' number. A count of
'1' may be omitted.
* A space or parenthesis must separate each cluster of (element
symbol + count).
* Where a group of elements is enclosed in parentheses, the
multiplier for the group must follow the closing parentheses.
That is, all element and group multipliers are assumed to be
printed as subscripted numbers.
* Unless the elements are ordered in a manner that corresponds to
their chemical structure, the order of the elements within any
group or moiety depends on whether or not carbon is present.
* If carbon is present, the order should be:
- C, then H, then the other elements in alphabetical order of
their symbol.
- If carbon is not present, the elements are listed purely in
alphabetic order of their symbol.
* This is the *Hill* system used by Chemical Abstracts.
- Specified by:
setChemical_formula
in interface NXcontainer
- Parameters:
chemical_formula
- the chemical_formula
-
setChemical_formulaScalar
public DataNode setChemical_formulaScalar(java.lang.String chemical_formula)
Description copied from interface: NXcontainer
Chemical composition of the material the container is made from.
Specified using CIF conventions. Abbreviated version of CIF
standard:
* Only recognized element symbols may be used.
* Each element symbol is followed by a 'count' number. A count of
'1' may be omitted.
* A space or parenthesis must separate each cluster of (element
symbol + count).
* Where a group of elements is enclosed in parentheses, the
multiplier for the group must follow the closing parentheses.
That is, all element and group multipliers are assumed to be
printed as subscripted numbers.
* Unless the elements are ordered in a manner that corresponds to
their chemical structure, the order of the elements within any
group or moiety depends on whether or not carbon is present.
* If carbon is present, the order should be:
- C, then H, then the other elements in alphabetical order of
their symbol.
- If carbon is not present, the elements are listed purely in
alphabetic order of their symbol.
* This is the *Hill* system used by Chemical Abstracts.
- Specified by:
setChemical_formulaScalar
in interface NXcontainer
- Parameters:
chemical_formula
- the chemical_formula
-
getDensity
public IDataset getDensity()
Description copied from interface: NXcontainer
Density of the material the container is made from.
Type: NX_FLOAT
Units: NX_MASS_DENSITY
Dimensions: 1: n_comp;
- Specified by:
getDensity
in interface NXcontainer
- Returns:
- the value.
-
getDensityScalar
public java.lang.Double getDensityScalar()
Description copied from interface: NXcontainer
Density of the material the container is made from.
Type: NX_FLOAT
Units: NX_MASS_DENSITY
Dimensions: 1: n_comp;
- Specified by:
getDensityScalar
in interface NXcontainer
- Returns:
- the value.
-
setDensity
public DataNode setDensity(IDataset density)
Description copied from interface: NXcontainer
Density of the material the container is made from.
Type: NX_FLOAT
Units: NX_MASS_DENSITY
Dimensions: 1: n_comp;
- Specified by:
setDensity
in interface NXcontainer
- Parameters:
density
- the density
-
setDensityScalar
public DataNode setDensityScalar(java.lang.Double density)
Description copied from interface: NXcontainer
Density of the material the container is made from.
Type: NX_FLOAT
Units: NX_MASS_DENSITY
Dimensions: 1: n_comp;
- Specified by:
setDensityScalar
in interface NXcontainer
- Parameters:
density
- the density
-
getPacking_fraction
public IDataset getPacking_fraction()
Description copied from interface: NXcontainer
Fraction of the volume of the container occupied by the material
forming the container.
Type: NX_FLOAT
Units: NX_UNITLESS
Dimensions: 1: n_comp;
- Specified by:
getPacking_fraction
in interface NXcontainer
- Returns:
- the value.
-
getPacking_fractionScalar
public java.lang.Double getPacking_fractionScalar()
Description copied from interface: NXcontainer
Fraction of the volume of the container occupied by the material
forming the container.
Type: NX_FLOAT
Units: NX_UNITLESS
Dimensions: 1: n_comp;
- Specified by:
getPacking_fractionScalar
in interface NXcontainer
- Returns:
- the value.
-
setPacking_fraction
public DataNode setPacking_fraction(IDataset packing_fraction)
Description copied from interface: NXcontainer
Fraction of the volume of the container occupied by the material
forming the container.
Type: NX_FLOAT
Units: NX_UNITLESS
Dimensions: 1: n_comp;
- Specified by:
setPacking_fraction
in interface NXcontainer
- Parameters:
packing_fraction
- the packing_fraction
-
setPacking_fractionScalar
public DataNode setPacking_fractionScalar(java.lang.Double packing_fraction)
Description copied from interface: NXcontainer
Fraction of the volume of the container occupied by the material
forming the container.
Type: NX_FLOAT
Units: NX_UNITLESS
Dimensions: 1: n_comp;
- Specified by:
setPacking_fractionScalar
in interface NXcontainer
- Parameters:
packing_fraction
- the packing_fraction
-
getRelative_molecular_mass
public IDataset getRelative_molecular_mass()
Description copied from interface: NXcontainer
Relative molecular mass of container.
Type: NX_FLOAT
Units: NX_MASS
Dimensions: 1: n_comp;
- Specified by:
getRelative_molecular_mass
in interface NXcontainer
- Returns:
- the value.
-
getRelative_molecular_massScalar
public java.lang.Double getRelative_molecular_massScalar()
Description copied from interface: NXcontainer
Relative molecular mass of container.
Type: NX_FLOAT
Units: NX_MASS
Dimensions: 1: n_comp;
- Specified by:
getRelative_molecular_massScalar
in interface NXcontainer
- Returns:
- the value.
-
setRelative_molecular_mass
public DataNode setRelative_molecular_mass(IDataset relative_molecular_mass)
Description copied from interface: NXcontainer
Relative molecular mass of container.
Type: NX_FLOAT
Units: NX_MASS
Dimensions: 1: n_comp;
- Specified by:
setRelative_molecular_mass
in interface NXcontainer
- Parameters:
relative_molecular_mass
- the relative_molecular_mass
-
setRelative_molecular_massScalar
public DataNode setRelative_molecular_massScalar(java.lang.Double relative_molecular_mass)
Description copied from interface: NXcontainer
Relative molecular mass of container.
Type: NX_FLOAT
Units: NX_MASS
Dimensions: 1: n_comp;
- Specified by:
setRelative_molecular_massScalar
in interface NXcontainer
- Parameters:
relative_molecular_mass
- the relative_molecular_mass
-
getBeam
public NXbeam getBeam()
Description copied from interface: NXcontainer
Details of beam incident on container, including the position
relative to the sample (to determine whether the container is
upstream or downstream of the sample).
- Specified by:
getBeam
in interface NXcontainer
- Returns:
- the value.
-
setBeam
public void setBeam(NXbeam beam)
Description copied from interface: NXcontainer
Details of beam incident on container, including the position
relative to the sample (to determine whether the container is
upstream or downstream of the sample).
- Specified by:
setBeam
in interface NXcontainer
- Parameters:
beam
- the beam
-
getShape
public NXshape getShape()
Description copied from interface: NXcontainer
Shape of the container. In combination with orientation this
should allow the beampath through the container to be modelled to
allow the adsorption to be calculated.
- Specified by:
getShape
in interface NXcontainer
- Returns:
- the value.
-
setShape
public void setShape(NXshape shape)
Description copied from interface: NXcontainer
Shape of the container. In combination with orientation this
should allow the beampath through the container to be modelled to
allow the adsorption to be calculated.
- Specified by:
setShape
in interface NXcontainer
- Parameters:
shape
- the shape
-
getOrientation
public NXtransformations getOrientation()
Description copied from interface: NXcontainer
The angle the container makes to the beam and how it may change
during the experiment.In combination with shape this should allow
the beampath through the container to be modelled to allow the
adsorption of the container to be calculated.
- Specified by:
getOrientation
in interface NXcontainer
- Returns:
- the value.
-
setOrientation
public void setOrientation(NXtransformations orientation)
Description copied from interface: NXcontainer
The angle the container makes to the beam and how it may change
during the experiment.In combination with shape this should allow
the beampath through the container to be modelled to allow the
adsorption of the container to be calculated.
- Specified by:
setOrientation
in interface NXcontainer
- Parameters:
orientation
- the orientation