generated.docs.javadoc.org.eclipse.dawnsci.nexus.impl.NXevent_dataImpl.html Maven / Gradle / Ivy
NXevent_dataImpl (h5jan API)
org.eclipse.dawnsci.nexus.impl
Class NXevent_dataImpl
- 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.NXevent_dataImpl
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Iterable<NodeLink>, GroupNode, Node, NXevent_data, NXobject
public class NXevent_dataImpl
extends NXobjectImpl
implements NXevent_data
NXevent_data is a special group for storing data from neutron
detectors in event mode. In this mode, the detector electronics
emits a stream of detectorID, timestamp pairs. With detectorID
describing the detector element in which the neutron was detected
and timestamp the timestamp at which the neutron event was
detected. In NeXus detectorID maps to event_id, event_time_offset
to the timestamp.
As this kind of data is common at pulsed neutron
sources, the timestamp is almost always relative to the start of a
neutron pulse. Thus the pulse timestamp is recorded too together
with an index in the event_id, event_time_offset pair at which data for
that pulse starts. At reactor source the same pulsed data effect
may be achieved through the use of choppers or in stroboscopic
measurement setups.
In order to make random access to timestamped data
faster there is an optional array pair of
cue_timestamp_zero and cue_index. The cue_timestamp_zero will
contain courser timestamps then in the time array, say
every five minutes. The cue_index will then contain the
index into the event_id,event_time_offset pair of arrays for that
courser cue_timestamp_zero.
- 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.NXevent_data
NX_CUE_INDEX, NX_CUE_TIMESTAMP_ZERO, NX_CUE_TIMESTAMP_ZERO_ATTRIBUTE_START, NX_EVENT_ID, NX_EVENT_INDEX, NX_EVENT_TIME_OFFSET, NX_EVENT_TIME_ZERO, NX_EVENT_TIME_ZERO_ATTRIBUTE_OFFSET, NX_PULSE_HEIGHT
-
Constructor Summary
Constructors
Constructor and Description
NXevent_dataImpl()
NXevent_dataImpl(long oid)
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
IDataset
getCue_index()
Index into the event_id, event_time_offset pair matching the corresponding
cue_timestamp.
java.lang.Long
getCue_indexScalar()
Index into the event_id, event_time_offset pair matching the corresponding
cue_timestamp.
IDataset
getCue_timestamp_zero()
Timestamps matching the corresponding cue_index into the
event_id, event_time_offset pair.
java.util.Date
getCue_timestamp_zeroAttributeStart()
java.util.Date
getCue_timestamp_zeroScalar()
Timestamps matching the corresponding cue_index into the
event_id, event_time_offset pair.
IDataset
getEvent_id()
There will be extra information in the NXdetector to convert
event_id to detector_number.
java.lang.Long
getEvent_idScalar()
There will be extra information in the NXdetector to convert
event_id to detector_number.
IDataset
getEvent_index()
The index into the event_time_offset, event_id pair for
the pulse occurring at the matching entry in event_time_zero.
java.lang.Long
getEvent_indexScalar()
The index into the event_time_offset, event_id pair for
the pulse occurring at the matching entry in event_time_zero.
IDataset
getEvent_time_offset()
A list of timestamps for each event as it comes in.
java.lang.Number
getEvent_time_offsetScalar()
A list of timestamps for each event as it comes in.
IDataset
getEvent_time_zero()
The time that each pulse started with respect to the offset
java.util.Date
getEvent_time_zeroAttributeOffset()
ISO8601
java.lang.Number
getEvent_time_zeroScalar()
The time that each pulse started with respect to the offset
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.
java.util.Set<NexusBaseClass>
getPermittedChildGroupClasses()
Returns a set containing the NexusBaseClass
constants for the permitted child group types
of this base class.
IDataset
getPulse_height()
If voltages from the ends of the detector are read out this
is where they go.
java.lang.Double
getPulse_heightScalar()
If voltages from the ends of the detector are read out this
is where they go.
DataNode
setCue_index(IDataset cue_index)
Index into the event_id, event_time_offset pair matching the corresponding
cue_timestamp.
DataNode
setCue_indexScalar(java.lang.Long cue_index)
Index into the event_id, event_time_offset pair matching the corresponding
cue_timestamp.
DataNode
setCue_timestamp_zero(IDataset cue_timestamp_zero)
Timestamps matching the corresponding cue_index into the
event_id, event_time_offset pair.
void
setCue_timestamp_zeroAttributeStart(java.util.Date start)
DataNode
setCue_timestamp_zeroScalar(java.util.Date cue_timestamp_zero)
Timestamps matching the corresponding cue_index into the
event_id, event_time_offset pair.
DataNode
setEvent_id(IDataset event_id)
There will be extra information in the NXdetector to convert
event_id to detector_number.
DataNode
setEvent_idScalar(java.lang.Long event_id)
There will be extra information in the NXdetector to convert
event_id to detector_number.
DataNode
setEvent_index(IDataset event_index)
The index into the event_time_offset, event_id pair for
the pulse occurring at the matching entry in event_time_zero.
DataNode
setEvent_indexScalar(java.lang.Long event_index)
The index into the event_time_offset, event_id pair for
the pulse occurring at the matching entry in event_time_zero.
DataNode
setEvent_time_offset(IDataset event_time_offset)
A list of timestamps for each event as it comes in.
DataNode
setEvent_time_offsetScalar(java.lang.Number event_time_offset)
A list of timestamps for each event as it comes in.
DataNode
setEvent_time_zero(IDataset event_time_zero)
The time that each pulse started with respect to the offset
void
setEvent_time_zeroAttributeOffset(java.util.Date offset)
ISO8601
DataNode
setEvent_time_zeroScalar(java.lang.Number event_time_zero)
The time that each pulse started with respect to the offset
DataNode
setPulse_height(IDataset pulse_height)
If voltages from the ends of the detector are read out this
is where they go.
DataNode
setPulse_heightScalar(java.lang.Double pulse_height)
If voltages from the ends of the detector are read out this
is where they go.
-
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
-
NXevent_dataImpl
public NXevent_dataImpl()
-
NXevent_dataImpl
public NXevent_dataImpl(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
-
getEvent_time_offset
public IDataset getEvent_time_offset()
Description copied from interface: NXevent_data
A list of timestamps for each event as it comes in.
Type: NX_NUMBER
Units: NX_TIME_OF_FLIGHT
Dimensions: 1: i;
- Specified by:
getEvent_time_offset
in interface NXevent_data
- Returns:
- the value.
-
getEvent_time_offsetScalar
public java.lang.Number getEvent_time_offsetScalar()
Description copied from interface: NXevent_data
A list of timestamps for each event as it comes in.
Type: NX_NUMBER
Units: NX_TIME_OF_FLIGHT
Dimensions: 1: i;
- Specified by:
getEvent_time_offsetScalar
in interface NXevent_data
- Returns:
- the value.
-
setEvent_time_offset
public DataNode setEvent_time_offset(IDataset event_time_offset)
Description copied from interface: NXevent_data
A list of timestamps for each event as it comes in.
Type: NX_NUMBER
Units: NX_TIME_OF_FLIGHT
Dimensions: 1: i;
- Specified by:
setEvent_time_offset
in interface NXevent_data
- Parameters:
event_time_offset
- the event_time_offset
-
setEvent_time_offsetScalar
public DataNode setEvent_time_offsetScalar(java.lang.Number event_time_offset)
Description copied from interface: NXevent_data
A list of timestamps for each event as it comes in.
Type: NX_NUMBER
Units: NX_TIME_OF_FLIGHT
Dimensions: 1: i;
- Specified by:
setEvent_time_offsetScalar
in interface NXevent_data
- Parameters:
event_time_offset
- the event_time_offset
-
getEvent_id
public IDataset getEvent_id()
Description copied from interface: NXevent_data
There will be extra information in the NXdetector to convert
event_id to detector_number.
Type: NX_INT
Units: NX_DIMENSIONLESS
Dimensions: 1: i;
- Specified by:
getEvent_id
in interface NXevent_data
- Returns:
- the value.
-
getEvent_idScalar
public java.lang.Long getEvent_idScalar()
Description copied from interface: NXevent_data
There will be extra information in the NXdetector to convert
event_id to detector_number.
Type: NX_INT
Units: NX_DIMENSIONLESS
Dimensions: 1: i;
- Specified by:
getEvent_idScalar
in interface NXevent_data
- Returns:
- the value.
-
setEvent_id
public DataNode setEvent_id(IDataset event_id)
Description copied from interface: NXevent_data
There will be extra information in the NXdetector to convert
event_id to detector_number.
Type: NX_INT
Units: NX_DIMENSIONLESS
Dimensions: 1: i;
- Specified by:
setEvent_id
in interface NXevent_data
- Parameters:
event_id
- the event_id
-
setEvent_idScalar
public DataNode setEvent_idScalar(java.lang.Long event_id)
Description copied from interface: NXevent_data
There will be extra information in the NXdetector to convert
event_id to detector_number.
Type: NX_INT
Units: NX_DIMENSIONLESS
Dimensions: 1: i;
- Specified by:
setEvent_idScalar
in interface NXevent_data
- Parameters:
event_id
- the event_id
-
getEvent_time_zero
public IDataset getEvent_time_zero()
Description copied from interface: NXevent_data
The time that each pulse started with respect to the offset
Type: NX_NUMBER
Units: NX_TIME
Dimensions: 1: j;
- Specified by:
getEvent_time_zero
in interface NXevent_data
- Returns:
- the value.
-
getEvent_time_zeroScalar
public java.lang.Number getEvent_time_zeroScalar()
Description copied from interface: NXevent_data
The time that each pulse started with respect to the offset
Type: NX_NUMBER
Units: NX_TIME
Dimensions: 1: j;
- Specified by:
getEvent_time_zeroScalar
in interface NXevent_data
- Returns:
- the value.
-
setEvent_time_zero
public DataNode setEvent_time_zero(IDataset event_time_zero)
Description copied from interface: NXevent_data
The time that each pulse started with respect to the offset
Type: NX_NUMBER
Units: NX_TIME
Dimensions: 1: j;
- Specified by:
setEvent_time_zero
in interface NXevent_data
- Parameters:
event_time_zero
- the event_time_zero
-
setEvent_time_zeroScalar
public DataNode setEvent_time_zeroScalar(java.lang.Number event_time_zero)
Description copied from interface: NXevent_data
The time that each pulse started with respect to the offset
Type: NX_NUMBER
Units: NX_TIME
Dimensions: 1: j;
- Specified by:
setEvent_time_zeroScalar
in interface NXevent_data
- Parameters:
event_time_zero
- the event_time_zero
-
getEvent_time_zeroAttributeOffset
public java.util.Date getEvent_time_zeroAttributeOffset()
Description copied from interface: NXevent_data
ISO8601
- Specified by:
getEvent_time_zeroAttributeOffset
in interface NXevent_data
- Returns:
- the value.
-
setEvent_time_zeroAttributeOffset
public void setEvent_time_zeroAttributeOffset(java.util.Date offset)
Description copied from interface: NXevent_data
ISO8601
- Specified by:
setEvent_time_zeroAttributeOffset
in interface NXevent_data
- Parameters:
offset
- the offset
-
getEvent_index
public IDataset getEvent_index()
Description copied from interface: NXevent_data
The index into the event_time_offset, event_id pair for
the pulse occurring at the matching entry in event_time_zero.
Type: NX_INT
Units: NX_DIMENSIONLESS
Dimensions: 1: j;
- Specified by:
getEvent_index
in interface NXevent_data
- Returns:
- the value.
-
getEvent_indexScalar
public java.lang.Long getEvent_indexScalar()
Description copied from interface: NXevent_data
The index into the event_time_offset, event_id pair for
the pulse occurring at the matching entry in event_time_zero.
Type: NX_INT
Units: NX_DIMENSIONLESS
Dimensions: 1: j;
- Specified by:
getEvent_indexScalar
in interface NXevent_data
- Returns:
- the value.
-
setEvent_index
public DataNode setEvent_index(IDataset event_index)
Description copied from interface: NXevent_data
The index into the event_time_offset, event_id pair for
the pulse occurring at the matching entry in event_time_zero.
Type: NX_INT
Units: NX_DIMENSIONLESS
Dimensions: 1: j;
- Specified by:
setEvent_index
in interface NXevent_data
- Parameters:
event_index
- the event_index
-
setEvent_indexScalar
public DataNode setEvent_indexScalar(java.lang.Long event_index)
Description copied from interface: NXevent_data
The index into the event_time_offset, event_id pair for
the pulse occurring at the matching entry in event_time_zero.
Type: NX_INT
Units: NX_DIMENSIONLESS
Dimensions: 1: j;
- Specified by:
setEvent_indexScalar
in interface NXevent_data
- Parameters:
event_index
- the event_index
-
getPulse_height
public IDataset getPulse_height()
Description copied from interface: NXevent_data
If voltages from the ends of the detector are read out this
is where they go. This list is for all events with information
to attach to a particular pulse height. The information to
attach to a particular pulse is located in events_per_pulse.
Type: NX_FLOAT
Units: NX_DIMENSIONLESS
Dimensions: 1: i; 2: k;
- Specified by:
getPulse_height
in interface NXevent_data
- Returns:
- the value.
-
getPulse_heightScalar
public java.lang.Double getPulse_heightScalar()
Description copied from interface: NXevent_data
If voltages from the ends of the detector are read out this
is where they go. This list is for all events with information
to attach to a particular pulse height. The information to
attach to a particular pulse is located in events_per_pulse.
Type: NX_FLOAT
Units: NX_DIMENSIONLESS
Dimensions: 1: i; 2: k;
- Specified by:
getPulse_heightScalar
in interface NXevent_data
- Returns:
- the value.
-
setPulse_height
public DataNode setPulse_height(IDataset pulse_height)
Description copied from interface: NXevent_data
If voltages from the ends of the detector are read out this
is where they go. This list is for all events with information
to attach to a particular pulse height. The information to
attach to a particular pulse is located in events_per_pulse.
Type: NX_FLOAT
Units: NX_DIMENSIONLESS
Dimensions: 1: i; 2: k;
- Specified by:
setPulse_height
in interface NXevent_data
- Parameters:
pulse_height
- the pulse_height
-
setPulse_heightScalar
public DataNode setPulse_heightScalar(java.lang.Double pulse_height)
Description copied from interface: NXevent_data
If voltages from the ends of the detector are read out this
is where they go. This list is for all events with information
to attach to a particular pulse height. The information to
attach to a particular pulse is located in events_per_pulse.
Type: NX_FLOAT
Units: NX_DIMENSIONLESS
Dimensions: 1: i; 2: k;
- Specified by:
setPulse_heightScalar
in interface NXevent_data
- Parameters:
pulse_height
- the pulse_height
-
getCue_timestamp_zero
public IDataset getCue_timestamp_zero()
Description copied from interface: NXevent_data
Timestamps matching the corresponding cue_index into the
event_id, event_time_offset pair.
Type: NX_DATE_TIME
Units: NX_TIME
- Specified by:
getCue_timestamp_zero
in interface NXevent_data
- Returns:
- the value.
-
getCue_timestamp_zeroScalar
public java.util.Date getCue_timestamp_zeroScalar()
Description copied from interface: NXevent_data
Timestamps matching the corresponding cue_index into the
event_id, event_time_offset pair.
Type: NX_DATE_TIME
Units: NX_TIME
- Specified by:
getCue_timestamp_zeroScalar
in interface NXevent_data
- Returns:
- the value.
-
setCue_timestamp_zero
public DataNode setCue_timestamp_zero(IDataset cue_timestamp_zero)
Description copied from interface: NXevent_data
Timestamps matching the corresponding cue_index into the
event_id, event_time_offset pair.
Type: NX_DATE_TIME
Units: NX_TIME
- Specified by:
setCue_timestamp_zero
in interface NXevent_data
- Parameters:
cue_timestamp_zero
- the cue_timestamp_zero
-
setCue_timestamp_zeroScalar
public DataNode setCue_timestamp_zeroScalar(java.util.Date cue_timestamp_zero)
Description copied from interface: NXevent_data
Timestamps matching the corresponding cue_index into the
event_id, event_time_offset pair.
Type: NX_DATE_TIME
Units: NX_TIME
- Specified by:
setCue_timestamp_zeroScalar
in interface NXevent_data
- Parameters:
cue_timestamp_zero
- the cue_timestamp_zero
-
getCue_timestamp_zeroAttributeStart
public java.util.Date getCue_timestamp_zeroAttributeStart()
- Specified by:
getCue_timestamp_zeroAttributeStart
in interface NXevent_data
- Returns:
- the value.
-
setCue_timestamp_zeroAttributeStart
public void setCue_timestamp_zeroAttributeStart(java.util.Date start)
- Specified by:
setCue_timestamp_zeroAttributeStart
in interface NXevent_data
- Parameters:
start
- the start
-
getCue_index
public IDataset getCue_index()
Description copied from interface: NXevent_data
Index into the event_id, event_time_offset pair matching the corresponding
cue_timestamp.
Type: NX_INT
- Specified by:
getCue_index
in interface NXevent_data
- Returns:
- the value.
-
getCue_indexScalar
public java.lang.Long getCue_indexScalar()
Description copied from interface: NXevent_data
Index into the event_id, event_time_offset pair matching the corresponding
cue_timestamp.
Type: NX_INT
- Specified by:
getCue_indexScalar
in interface NXevent_data
- Returns:
- the value.
-
setCue_index
public DataNode setCue_index(IDataset cue_index)
Description copied from interface: NXevent_data
Index into the event_id, event_time_offset pair matching the corresponding
cue_timestamp.
Type: NX_INT
- Specified by:
setCue_index
in interface NXevent_data
- Parameters:
cue_index
- the cue_index
-
setCue_indexScalar
public DataNode setCue_indexScalar(java.lang.Long cue_index)
Description copied from interface: NXevent_data
Index into the event_id, event_time_offset pair matching the corresponding
cue_timestamp.
Type: NX_INT
- Specified by:
setCue_indexScalar
in interface NXevent_data
- Parameters:
cue_index
- the cue_index