NeXus classes#
Overview#
NeXus provides a substantial number of base class definitions. At this point ScippNexus supports only a very limited number of these. Furthermore, not all features of each class definition are implemented. The class of a group is read from the group’s 'NX_class'
attribute.
The following table gives an overview of the most important supported classes. There are roughly two categories of classes, those that contain data and can be read as a scipp.DataArray
(for example NXdata), and those that mostly serve as groups for nested classes (for example NXentry containing NXdata):
NeXus class |
read as |
comment |
NeXus specification |
---|---|---|---|
scipp.DataArray |
|||
scipp.DataGroup wrapping scipp.DataArray |
|||
scipp.DataGroup |
|||
scipp.DataGroup |
|||
scipp.DataArray |
|||
scipp.DataGroup |
|||
scipp.DataArray |
|||
scipp.DataGroup wrapping scipp.DataArray |
|||
scipp.DataGroup |
|||
scipp.DataGroup |
|||
scipp.DataGroup |
|||
scipp.DataGroup |
Any class that is not explicitly supported will be loaded as a scipp.DataGroup
as well.
For the examples below we use a file from the ScippNexus sample data:
[1]:
from scippnexus import data
import scippnexus as snx
filename = data.get_path('PG3_4844_event.nxs')
f = snx.File(filename)
Base class: NXobject#
Base of all other NeXus classes. Provides a generic group-like interface. That is, this is equivalent to a dictionary of fields and/or other groups.
NeXus classes that group other information but cannot be read as a data array provide this interface. Such groups will be loaded as scipp.DataGroup
when loaded:
[2]:
tree = f['entry/instrument'][()]
tree
/home/runner/work/scippnexus/scippnexus/.tox/docs/lib/python3.10/site-packages/scippnexus/base.py:375: UserWarning: Failed to load /entry/instrument/bank184 as NXevent_data: Invalid index in NXevent_data at /entry/instrument/bank184/event_index:
Bin indices out of range Falling back to loading HDF5 group children as scipp.DataGroup.
self._warn_fallback(e)
/home/runner/work/scippnexus/scippnexus/.tox/docs/lib/python3.10/site-packages/scippnexus/base.py:375: UserWarning: Failed to load /entry/instrument/bank82 as NXevent_data: Invalid index in NXevent_data at /entry/instrument/bank82/event_index:
Bin begin index must be less or equal to its end index. Falling back to loading HDF5 group children as scipp.DataGroup.
self._warn_fallback(e)
/home/runner/work/scippnexus/scippnexus/.tox/docs/lib/python3.10/site-packages/scippnexus/base.py:375: UserWarning: Failed to load /entry/instrument/bank84 as NXevent_data: Invalid index in NXevent_data at /entry/instrument/bank84/event_index:
Bin begin index must be less or equal to its end index. Falling back to loading HDF5 group children as scipp.DataGroup.
self._warn_fallback(e)
[2]:
- scippDataGroup(dim_0: None)
- azimuthal_anglescippVariable()float32rad0.0
- bend_angle_xscippVariable()stringdeg0
- bend_angle_yscippVariable()stringdeg0
- coating_materialstr()Ni/Ti
- distancescippVariable()float32m-54.5
- external_materialstr()stainless steel
- scippDataGroup()
- average_valuescippVariable()float32mm-55.463
- durationscippVariable()float32s0.0
- effective_valuescippVariable()float32mm-55.463
- maximum_valuescippVariable()float32mm-55.463
- minimum_valuescippVariable()float32mm-55.463
- requested_valuescippVariable()float32mm-55.463
- timescippVariable()datetime64ns2011-08-12T15:50:16.784000000
- valuescippVariable()float32mm-55.463
- interior_atmospherestr()vacuum
- m_valuestr()2.0
- scippDataGroup(dim_0: None)
- scippDataGroup(dim_0: 6)
- valuescippVariable(dim_0: 6)float321.0, 0.0, ..., 1.0, 0.0
- scippDataGroup(dim_0: 3)
- descriptionstr()x,y,z
- shapestr()nxbox
- sizescippVariable(dim_0: 3)float32m0.014, 0.0515, nan
- scippDataGroup(dim_0: 3)
- distancescippVariable(dim_0: 3)float32m0.0, 0.0, -54.5
- polar_anglescippVariable()float32rad3.1415927
- substrate_materialstr()borofloat glass
- substrate_thickness_maxscippVariable()stringmm11
- substrate_thickness_minscippVariable()stringmm9
- scippDataGroup()
- average_valuefloat32()2.0
- durationscippVariable()float32s0.0
- effective_valuefloat32()2.0
- maximum_valuefloat32()2.0
- minimum_valuefloat32()2.0
- requested_valuescippVariable()float32N2.0
- timescippVariable()datetime64ns2011-08-12T15:50:16.800000000
- valuefloat32()2.0
- x_pixel_offsetscippVariable()float32m0.0
- y_pixel_offsetscippVariable()float32m0.0
- scippDataGroup(dim_0: None)
- azimuthal_anglescippVariable()float32rad0.0
- bend_angle_xscippVariable()stringdeg0
- bend_angle_yscippVariable()stringdeg0
- coating_materialstr()Ni/Ti
- distancescippVariable()float32m-54.5
- external_materialstr()stainless steel
- scippDataGroup()
- average_valuescippVariable()float32mm-55.463
- durationscippVariable()float32s0.0
- effective_valuescippVariable()float32mm-55.463
- maximum_valuescippVariable()float32mm-55.463
- minimum_valuescippVariable()float32mm-55.463
- requested_valuescippVariable()float32mm-55.463
- timescippVariable()datetime64ns2011-08-12T15:50:16.784000000
- valuescippVariable()float32mm-55.463
- interior_atmospherestr()vacuum
- m_valuestr()0.0
- scippDataGroup(dim_0: None)
- scippDataGroup(dim_0: 6)
- valuescippVariable(dim_0: 6)float321.0, 0.0, ..., 1.0, 0.0
- scippDataGroup(dim_0: 3)
- descriptionstr()x,y,z
- shapestr()nxbox
- sizescippVariable(dim_0: 3)float32m0.014, 0.0515, nan
- scippDataGroup(dim_0: 3)
- distancescippVariable(dim_0: 3)float32m0.0, 0.0, -54.5
- polar_anglescippVariable()float32rad3.1415927
- substrate_materialstr()borofloat glass
- substrate_thickness_maxscippVariable()stringmm11
- substrate_thickness_minscippVariable()stringmm9
- scippDataGroup()
- average_valuefloat32()2.0
- durationscippVariable()float32s0.0
- effective_valuefloat32()2.0
- maximum_valuefloat32()2.0
- minimum_valuefloat32()2.0
- requested_valuescippVariable()float32N2.0
- timescippVariable()datetime64ns2011-08-12T15:50:16.800000000
- valuefloat32()2.0
- x_pixel_offsetscippVariable()float32m0.0
- y_pixel_offsetscippVariable()float32m0.0
- scippDataGroup()
- frequencyscippVariable()float32Hz60.0
- namestr()Spallation Neutron Source
- probestr()neutron
- typestr()Spallation Neutron Source
- SNSdetector_calibration_idstr()139
- SNSgeometry_file_namestr()PG3_geom_2011_02_25.xml
- SNSnxtranslatestr()0.3.0
- SNStranslation_servicestr()3.2.3
- scippDataGroup(dim_0: None)
- scippDataGroup()
- average_valuescippVariable()float32mm0.0
- durationscippVariable()float32s0.0
- effective_valuescippVariable()float32mm0.0
- maximum_valuescippVariable()float32mm0.0
- minimum_valuescippVariable()float32mm0.0
- requested_valuescippVariable()float32mm0.0
- timescippVariable()datetime64ns2011-08-12T15:50:16.800000000
- valuescippVariable()float32mm0.0
- scippDataGroup()
- average_valuefloat32()0.0
- durationscippVariable()float32s0.0
- effective_valuefloat32()0.0
- maximum_valuefloat32()0.0
- minimum_valuefloat32()0.0
- requested_valuescippVariable()float32N0.0
- timescippVariable()datetime64ns2011-08-12T15:50:16.800000000
- valuefloat32()0.0
- scippDataGroup()
- average_valuescippVariable()float32mm10.0
- durationscippVariable()float32s0.0
- effective_valuescippVariable()float32mm10.0
- maximum_valuescippVariable()float32mm10.0
- minimum_valuescippVariable()float32mm10.0
- requested_valuescippVariable()float32mm10.0
- timescippVariable()datetime64ns2011-08-12T15:50:16.800000000
- valuescippVariable()float32mm10.0
- scippDataGroup()
- average_valuescippVariable()float32mm5.0
- durationscippVariable()float32s0.0
- effective_valuescippVariable()float32mm5.0
- maximum_valuescippVariable()float32mm5.0
- minimum_valuescippVariable()float32mm5.0
- requested_valuescippVariable()float32mm5.0
- timescippVariable()datetime64ns2011-08-12T15:50:16.800000000
- valuescippVariable()float32mm5.0
- scippDataGroup()
- average_valuefloat32()0.0
- durationscippVariable()float32s0.0
- effective_valuefloat32()0.0
- maximum_valuefloat32()0.0
- minimum_valuefloat32()0.0
- requested_valuescippVariable()float32N0.0
- timescippVariable()datetime64ns2011-08-12T15:50:16.800000000
- valuefloat32()0.0
- scippDataGroup()
- average_valuescippVariable()float32mm30.0
- durationscippVariable()float32s0.0
- effective_valuescippVariable()float32mm30.0
- maximum_valuescippVariable()float32mm30.0
- minimum_valuescippVariable()float32mm30.0
- requested_valuescippVariable()float32mm30.0
- timescippVariable()datetime64ns2011-08-12T15:50:16.816000000
- valuescippVariable()float32mm30.0
- azimuthal_anglescippVariable()float32rad0.0
- distancescippVariable()float32m-1.0
- scippDataGroup(dim_0: None)
- scippDataGroup(dim_0: 6)
- valuescippVariable(dim_0: 6)float321.0, 0.0, ..., 1.0, 0.0
- scippDataGroup(dim_0: 3)
- descriptionstr()x,y,z
- shapestr()nxbox
- sizescippVariable(dim_0: 3)float32m0.01, 0.03, nan
- scippDataGroup(dim_0: 3)
- distancescippVariable(dim_0: 3)float32m0.0, 0.0, -1.0
- polar_anglescippVariable()float32rad3.1415927
- scippDataGroup()
- average_valuescippVariable()float32mm20.0
- durationscippVariable()float32s0.0
- effective_valuescippVariable()float32mm20.0
- maximum_valuescippVariable()float32mm20.0
- minimum_valuescippVariable()float32mm20.0
- requested_valuescippVariable()float32mm20.0
- timescippVariable()datetime64ns2011-08-12T15:50:16.784000000
- valuescippVariable()float32mm20.0
- scippDataGroup()
- average_valuescippVariable()float32mm5.0
- durationscippVariable()float32s0.0
- effective_valuescippVariable()float32mm5.0
- maximum_valuescippVariable()float32mm5.0
- minimum_valuescippVariable()float32mm5.0
- requested_valuescippVariable()float32mm5.0
- timescippVariable()datetime64ns2011-08-12T15:50:16.800000000
- valuescippVariable()float32mm5.0
- scippDataGroup()
- average_valuescippVariable()float32mm-5.0
- durationscippVariable()float32s0.0
- effective_valuescippVariable()float32mm-5.0
- maximum_valuescippVariable()float32mm-5.0
- minimum_valuescippVariable()float32mm-5.0
- requested_valuescippVariable()float32mm-5.0
- timescippVariable()datetime64ns2011-08-12T15:50:16.784000000
- valuescippVariable()float32mm-5.0
- scippDataGroup()
- average_valuescippVariable()float32mm-10.0
- durationscippVariable()float32s0.0
- effective_valuescippVariable()float32mm-10.0
- maximum_valuescippVariable()float32mm-10.0
- minimum_valuescippVariable()float32mm-10.0
- requested_valuescippVariable()float32mm-10.0
- timescippVariable()datetime64ns2011-08-12T15:50:16.784000000
- valuescippVariable()float32mm-10.0
- x_pixel_offsetscippVariable()float32m0.0
- y_pixel_offsetscippVariable()float32m0.0
- scippDataGroup(dim_0: None,
 x_pixel_offset: 154,
 y_pixel_offset: 7)- local_namestr()F2
- scippDataGroup(dim_0: None)
- scippDataGroup(dim_0: 6)
- valuescippVariable(dim_0: 6)float320.07520324, 0.0008634576, ..., 0.95087516, -0.024099652
- scippDataGroup(dim_0: 3)
- descriptionstr()x,y,z
- shapestr()nxbox
- sizescippVariable(dim_0: 3)float32m0.77, 0.3801, nan
- scippDataGroup(dim_0: 3)
- distancescippVariable(dim_0: 3)float32m3.2050142, -0.8542655, 0.67503774
- total_countsint32()456601
- data_x_yscippDataArray(x_pixel_offset: 154,
 y_pixel_offset: 7)int320, 0, ..., 0, 0 - eventsscippDataArray(x_pixel_offset: 154,
 y_pixel_offset: 7)DataArrayViewbinned data [len=0, len=0, ..., len=0, len=0]
- scippDataGroup(dim_0: None,
 x_pixel_offset: 154,
 y_pixel_offset: 7)- local_namestr()F3
- scippDataGroup(dim_0: None)
- scippDataGroup(dim_0: 6)
- valuescippVariable(dim_0: 6)float320.07206946, 0.0019221402, ..., 0.9885856, -0.012752413
- scippDataGroup(dim_0: 3)
- descriptionstr()x,y,z
- shapestr()nxbox
- sizescippVariable(dim_0: 3)float32m0.77, 0.3801, nan
- scippDataGroup(dim_0: 3)
- distancescippVariable(dim_0: 3)float32m3.3054664, -0.42925474, 0.66754323
- total_countsint32()484446
- data_x_yscippDataArray(x_pixel_offset: 154,
 y_pixel_offset: 7)int320, 0, ..., 0, 0 - eventsscippDataArray(x_pixel_offset: 154,
 y_pixel_offset: 7)DataArrayViewbinned data [len=0, len=0, ..., len=0, len=0]
- scippDataGroup(dim_0: None,
 x_pixel_offset: 154,
 y_pixel_offset: 7)- local_namestr()F4
- scippDataGroup(dim_0: None)
- scippDataGroup(dim_0: 6)
- valuescippVariable(dim_0: 6)float320.07762421, 0.0025745311, ..., 0.9999957, -0.0026736327
- scippDataGroup(dim_0: 3)
- descriptionstr()x,y,z
- shapestr()nxbox
- sizescippVariable(dim_0: 3)float32m0.77, 0.3801, nan
- scippDataGroup(dim_0: 3)
- distancescippVariable(dim_0: 3)float32m3.3375163, 0.007599, 0.6648235
- total_countsint32()465038
- data_x_yscippDataArray(x_pixel_offset: 154,
 y_pixel_offset: 7)int320, 0, ..., 0, 0 - eventsscippDataArray(x_pixel_offset: 154,
 y_pixel_offset: 7)DataArrayViewbinned data [len=0, len=0, ..., len=0, len=0]
- scippDataGroup(dim_0: None,
 x_pixel_offset: 154,
 y_pixel_offset: 7)- local_namestr()F5
- scippDataGroup(dim_0: None)
- scippDataGroup(dim_0: 6)
- valuescippVariable(dim_0: 6)float320.074737966, 0.0007595541, ..., 0.9876911, 0.010942041
- scippDataGroup(dim_0: 3)
- descriptionstr()x,y,z
- shapestr()nxbox
- sizescippVariable(dim_0: 3)float32m0.77, 0.3801, nan
- scippDataGroup(dim_0: 3)
- distancescippVariable(dim_0: 3)float32m3.3034072, 0.44297725, 0.6675825
- total_countsint32()597687
- data_x_yscippDataArray(x_pixel_offset: 154,
 y_pixel_offset: 7)int320, 0, ..., 0, 0 - eventsscippDataArray(x_pixel_offset: 154,
 y_pixel_offset: 7)DataArrayViewbinned data [len=0, len=0, ..., len=0, len=0]
- scippDataGroup(dim_0: None,
 x_pixel_offset: 154,
 y_pixel_offset: 7)- local_namestr()F6
- scippDataGroup(dim_0: None)
- scippDataGroup(dim_0: 6)
- valuescippVariable(dim_0: 6)float320.07553149, -0.0007277964, ..., 0.95065147, 0.02412432
- scippDataGroup(dim_0: 3)
- descriptionstr()x,y,z
- shapestr()nxbox
- sizescippVariable(dim_0: 3)float32m0.77, 0.3801, nan
- scippDataGroup(dim_0: 3)
- distancescippVariable(dim_0: 3)float32m3.2015195, 0.86776173, 0.67536724
- total_countsint32()619400
- data_x_yscippDataArray(x_pixel_offset: 154,
 y_pixel_offset: 7)int320, 0, ..., 0, 0 - eventsscippDataArray(x_pixel_offset: 154,
 y_pixel_offset: 7)DataArrayViewbinned data [len=0, len=0, ..., len=0, len=0]
- scippDataGroup(dim_0: None,
 x_pixel_offset: 154,
 y_pixel_offset: 7)- local_namestr()G3
- scippDataGroup(dim_0: None)
- scippDataGroup(dim_0: 6)
- valuescippVariable(dim_0: 6)float32-0.12487066, -0.005911149, ..., 0.9997881, 0.008326013
- scippDataGroup(dim_0: 3)
- descriptionstr()x,y,z
- shapestr()nxbox
- sizescippVariable(dim_0: 3)float32m0.77, 0.3801, nan
- scippDataGroup(dim_0: 3)
- distancescippVariable(dim_0: 3)float32m3.1319537, -0.41684926, 1.4719385
- total_countsint32()835910
- data_x_yscippDataArray(x_pixel_offset: 154,
 y_pixel_offset: 7)int320, 0, ..., 0, 0 - eventsscippDataArray(x_pixel_offset: 154,
 y_pixel_offset: 7)DataArrayViewbinned data [len=0, len=0, ..., len=0, len=0]
- scippDataGroup(dim_0: None,
 x_pixel_offset: 154,
 y_pixel_offset: 7)- local_namestr()G4
- scippDataGroup(dim_0: None)
- scippDataGroup(dim_0: 6)
- valuescippVariable(dim_0: 6)float32-0.11986005, -0.005193665, ..., 0.99983066, 0.0030392138
- scippDataGroup(dim_0: 3)
- descriptionstr()x,y,z
- shapestr()nxbox
- sizescippVariable(dim_0: 3)float32m0.77, 0.3801, nan
- scippDataGroup(dim_0: 3)
- distancescippVariable(dim_0: 3)float32m3.1185687, -0.0002555, 1.470097
- total_countsint32()719846
- data_x_yscippDataArray(x_pixel_offset: 154,
 y_pixel_offset: 7)int320, 0, ..., 0, 0 - eventsscippDataArray(x_pixel_offset: 154,
 y_pixel_offset: 7)DataArrayViewbinned data [len=0, len=0, ..., len=0, len=0]
- scippDataGroup(dim_0: None,
 x_pixel_offset: 154,
 y_pixel_offset: 7)- local_namestr()H3
- scippDataGroup(dim_0: None)
- scippDataGroup(dim_0: 6)
- valuescippVariable(dim_0: 6)float32-0.34058982, -0.007132651, ..., 0.99986297, 0.0016174228
- scippDataGroup(dim_0: 3)
- descriptionstr()x,y,z
- shapestr()nxbox
- sizescippVariable(dim_0: 3)float32m0.77, 0.3801, nan
- scippDataGroup(dim_0: 3)
- distancescippVariable(dim_0: 3)float32m2.9351792, -0.41630125, 2.2435923
- total_countsint32()605641
- data_x_yscippDataArray(x_pixel_offset: 154,
 y_pixel_offset: 7)int320, 0, ..., 0, 0 - eventsscippDataArray(x_pixel_offset: 154,
 y_pixel_offset: 7)DataArrayViewbinned data [len=0, len=0, ..., len=0, len=0]
- scippDataGroup(dim_0: None,
 x_pixel_offset: 154,
 y_pixel_offset: 7)- local_namestr()H4
- scippDataGroup(dim_0: None)
- scippDataGroup(dim_0: 6)
- valuescippVariable(dim_0: 6)float32-0.3371856, -0.005633195, ..., 0.9998946, 0.0007914557
- scippDataGroup(dim_0: 3)
- descriptionstr()x,y,z
- shapestr()nxbox
- sizescippVariable(dim_0: 3)float32m0.77, 0.3801, nan
- scippDataGroup(dim_0: 3)
- distancescippVariable(dim_0: 3)float32m2.9297032, -0.00782325, 2.243953
- total_countsint32()719502
- data_x_yscippDataArray(x_pixel_offset: 154,
 y_pixel_offset: 7)int320, 0, ..., 0, 0 - eventsscippDataArray(x_pixel_offset: 154,
 y_pixel_offset: 7)DataArrayViewbinned data [len=0, len=0, ..., len=0, len=0]
- scippDataGroup(dim_0: None,
 x_pixel_offset: 154,
 y_pixel_offset: 7)- local_namestr()I4
- scippDataGroup(dim_0: None)
- scippDataGroup(dim_0: 6)
- valuescippVariable(dim_0: 6)float32-0.52433485, -0.0075674476, ..., 0.9999132, 0.0120967375
- scippDataGroup(dim_0: 3)
- descriptionstr()x,y,z
- shapestr()nxbox
- sizescippVariable(dim_0: 3)float32m0.77, 0.3801, nan
- scippDataGroup(dim_0: 3)
- distancescippVariable(dim_0: 3)float32m2.5749183, -0.0123765, 2.939976
- total_countsint32()619712
- data_x_yscippDataArray(x_pixel_offset: 154,
 y_pixel_offset: 7)int320, 0, ..., 0, 0 - eventsscippDataArray(x_pixel_offset: 154,
 y_pixel_offset: 7)DataArrayViewbinned data [len=0, len=0, ..., len=0, len=0]
- scippDataGroup(dim_0: None,
 x_pixel_offset: 154,
 y_pixel_offset: 7,
 event_time_zero: 330473,
 event: 513380)- local_namestr()J4
- scippDataGroup(dim_0: None)
- scippDataGroup(dim_0: 6)
- valuescippVariable(dim_0: 6)float32-0.68827075, 0.0023438812, ..., 0.99987054, -0.012655793
- scippDataGroup(dim_0: 3)
- descriptionstr()x,y,z
- shapestr()nxbox
- sizescippVariable(dim_0: 3)float32m0.77, 0.3801, nan
- scippDataGroup(dim_0: 3)
- distancescippVariable(dim_0: 3)float32m2.078632, -0.0137955, 3.5672722
- total_countsint32()513380
- data_x_yscippDataArray(x_pixel_offset: 154,
 y_pixel_offset: 7)int320, 0, ..., 0, 0 - scippDataGroup(event_time_zero: 330473,
 event: 513380)- event_indexscippVariable(event_time_zero: 330473)int640, 0, ..., 9223372036854775807, 9223372036854775807
- event_time_offsetscippVariable(event: 513380)float32µs5906.3, 6189.3, ..., 10358.8, 11654.9
- event_time_zeroscippVariable(event_time_zero: 330473)datetime64ns2011-08-12T15:50:17.000000000, 2011-08-12T15:50:17.016659999, ..., 2011-08-12T17:22:05.085449218, 2011-08-12T17:22:05.102050781
- event_idscippVariable(event: 513380)int32230254, 231027, ..., 230834, 230571
- scippDataGroup(dim_0: None,
 x_pixel_offset: 154,
 y_pixel_offset: 7)- local_namestr()B2
- scippDataGroup(dim_0: None)
- scippDataGroup(dim_0: 6)
- valuescippVariable(dim_0: 6)float320.91311646, -0.0018039594, ..., 0.9504342, -0.2832085
- scippDataGroup(dim_0: 3)
- descriptionstr()x,y,z
- shapestr()nxbox
- sizescippVariable(dim_0: 3)float32m0.77, 0.3801, nan
- scippDataGroup(dim_0: 3)
- distancescippVariable(dim_0: 3)float32m1.544676, -0.8569665, -1.9281462
- total_countsint32()1383144
- data_x_yscippDataArray(x_pixel_offset: 154,
 y_pixel_offset: 7)int320, 0, ..., 0, 0 - eventsscippDataArray(x_pixel_offset: 154,
 y_pixel_offset: 7)DataArrayViewbinned data [len=0, len=0, ..., len=0, len=0]
- scippDataGroup(dim_0: None,
 x_pixel_offset: 154,
 y_pixel_offset: 7)- local_namestr()B3
- scippDataGroup(dim_0: None)
- scippDataGroup(dim_0: 6)
- valuescippVariable(dim_0: 6)float320.91298234, -0.0015865297, ..., 0.98713416, -0.14533475
- scippDataGroup(dim_0: 3)
- descriptionstr()x,y,z
- shapestr()nxbox
- sizescippVariable(dim_0: 3)float32m0.77, 0.3801, nan
- scippDataGroup(dim_0: 3)
- distancescippVariable(dim_0: 3)float32m1.586625, -0.43086874, -2.0230145
- total_countsint32()1003546
- data_x_yscippDataArray(x_pixel_offset: 154,
 y_pixel_offset: 7)int320, 0, ..., 0, 0 - eventsscippDataArray(x_pixel_offset: 154,
 y_pixel_offset: 7)DataArrayViewbinned data [len=0, len=0, ..., len=0, len=0]
- scippDataGroup(dim_0: None,
 x_pixel_offset: 154,
 y_pixel_offset: 7)- local_namestr()B4
- scippDataGroup(dim_0: None)
- scippDataGroup(dim_0: 6)
- valuescippVariable(dim_0: 6)float320.912612, -4.732385e-05, ..., 0.99999857, 0.0015598646
- scippDataGroup(dim_0: 3)
- descriptionstr()x,y,z
- shapestr()nxbox
- sizescippVariable(dim_0: 3)float32m0.77, 0.3801, nan
- scippDataGroup(dim_0: 3)
- distancescippVariable(dim_0: 3)float32m1.599787, 0.004278, -2.0524123
- total_countsint32()1123324
- data_x_yscippDataArray(x_pixel_offset: 154,
 y_pixel_offset: 7)int320, 0, ..., 0, 0 - eventsscippDataArray(x_pixel_offset: 154,
 y_pixel_offset: 7)DataArrayViewbinned data [len=0, len=0, ..., len=0, len=0]
- scippDataGroup(dim_0: None,
 x_pixel_offset: 154,
 y_pixel_offset: 7)- local_namestr()C2
- scippDataGroup(dim_0: None)
- scippDataGroup(dim_0: 6)
- valuescippVariable(dim_0: 6)float320.7532727, -0.0017466473, ..., 0.94824696, -0.2380973
- scippDataGroup(dim_0: 3)
- descriptionstr()x,y,z
- shapestr()nxbox
- sizescippVariable(dim_0: 3)float32m0.77, 0.3801, nan
- scippDataGroup(dim_0: 3)
- distancescippVariable(dim_0: 3)float32m2.1918738, -0.84933674, -1.435612
- total_countsint32()991345
- data_x_yscippDataArray(x_pixel_offset: 154,
 y_pixel_offset: 7)int320, 0, ..., 0, 0 - eventsscippDataArray(x_pixel_offset: 154,
 y_pixel_offset: 7)DataArrayViewbinned data [len=0, len=0, ..., len=0, len=0]
- scippDataGroup(dim_0: None,
 x_pixel_offset: 154,
 y_pixel_offset: 7)- local_namestr()C3
- scippDataGroup(dim_0: None)
- scippDataGroup(dim_0: 6)
- valuescippVariable(dim_0: 6)float320.7523526, -0.0001120215, ..., 0.9868775, -0.12141007
- scippDataGroup(dim_0: 3)
- descriptionstr()x,y,z
- shapestr()nxbox
- sizescippVariable(dim_0: 3)float32m0.77, 0.3801, nan
- scippDataGroup(dim_0: 3)
- distancescippVariable(dim_0: 3)float32m2.2594852, -0.4253265, -1.5125445
- total_countsint32()1050733
- data_x_yscippDataArray(x_pixel_offset: 154,
 y_pixel_offset: 7)int320, 0, ..., 0, 0 - eventsscippDataArray(x_pixel_offset: 154,
 y_pixel_offset: 7)DataArrayViewbinned data [len=0, len=0, ..., len=0, len=0]
- scippDataGroup(dim_0: None,
 x_pixel_offset: 154,
 y_pixel_offset: 7)- local_namestr()C4
- scippDataGroup(dim_0: None)
- scippDataGroup(dim_0: 6)
- valuescippVariable(dim_0: 6)float320.7523935, -0.0016688275, ..., 0.99998444, -0.0029054708
- scippDataGroup(dim_0: 3)
- descriptionstr()x,y,z
- shapestr()nxbox
- sizescippVariable(dim_0: 3)float32m0.77, 0.3801, nan
- scippDataGroup(dim_0: 3)
- distancescippVariable(dim_0: 3)float32m2.283286, 0.011741, -1.5391445
- total_countsint32()933319
- data_x_yscippDataArray(x_pixel_offset: 154,
 y_pixel_offset: 7)int320, 0, ..., 0, 0 - eventsscippDataArray(x_pixel_offset: 154,
 y_pixel_offset: 7)DataArrayViewbinned data [len=0, len=0, ..., len=0, len=0]
- scippDataGroup(dim_0: None,
 x_pixel_offset: 154,
 y_pixel_offset: 7)- local_namestr()D2
- scippDataGroup(dim_0: None)
- scippDataGroup(dim_0: 6)
- valuescippVariable(dim_0: 6)float320.5424301, 0.0032140214, ..., 0.9512337, -0.16988519
- scippDataGroup(dim_0: 3)
- descriptionstr()x,y,z
- shapestr()nxbox
- sizescippVariable(dim_0: 3)float32m0.77, 0.3801, nan
- scippDataGroup(dim_0: 3)
- distancescippVariable(dim_0: 3)float32m2.712514, -0.8528865, -0.8270292
- total_countsint32()1145925
- data_x_yscippDataArray(x_pixel_offset: 154,
 y_pixel_offset: 7)int320, 0, ..., 0, 0 - eventsscippDataArray(x_pixel_offset: 154,
 y_pixel_offset: 7)DataArrayViewbinned data [len=0, len=0, ..., len=0, len=0]
- scippDataGroup(dim_0: None,
 x_pixel_offset: 154,
 y_pixel_offset: 7)- local_namestr()D3
- scippDataGroup(dim_0: None)
- scippDataGroup(dim_0: 6)
- valuescippVariable(dim_0: 6)float320.54071504, -0.0031628278, ..., 0.9870752, -0.084011525
- scippDataGroup(dim_0: 3)
- descriptionstr()x,y,z
- shapestr()nxbox
- sizescippVariable(dim_0: 3)float32m0.77, 0.3801, nan
- scippDataGroup(dim_0: 3)
- distancescippVariable(dim_0: 3)float32m2.7984772, -0.4272105, -0.8828877
- total_countsint32()602001
- data_x_yscippDataArray(x_pixel_offset: 154,
 y_pixel_offset: 7)int320, 0, ..., 0, 0 - eventsscippDataArray(x_pixel_offset: 154,
 y_pixel_offset: 7)DataArrayViewbinned data [len=0, len=0, ..., len=0, len=0]
- scippDataGroup(dim_0: None,
 x_pixel_offset: 154,
 y_pixel_offset: 7)- local_namestr()D4
- scippDataGroup(dim_0: None)
- scippDataGroup(dim_0: 6)
- valuescippVariable(dim_0: 6)float320.54180133, -0.0009649804, ..., 0.9999995, 0.0009414952
- scippDataGroup(dim_0: 3)
- descriptionstr()x,y,z
- shapestr()nxbox
- sizescippVariable(dim_0: 3)float32m0.77, 0.3801, nan
- scippDataGroup(dim_0: 3)
- distancescippVariable(dim_0: 3)float32m2.828899, 0.00748275, -0.9024227
- total_countsint32()1123669
- data_x_yscippDataArray(x_pixel_offset: 154,
 y_pixel_offset: 7)int320, 0, ..., 0, 0 - eventsscippDataArray(x_pixel_offset: 154,
 y_pixel_offset: 7)DataArrayViewbinned data [len=0, len=0, ..., len=0, len=0]
- scippDataGroup(dim_0: None,
 x_pixel_offset: 154,
 y_pixel_offset: 7,
 event_time_zero: 330473,
 event: 663792)- local_namestr()E2
- scippDataGroup(dim_0: None)
- scippDataGroup(dim_0: 6)
- valuescippVariable(dim_0: 6)float320.30577186, 0.0016155625, ..., 0.9530574, -0.09404948
- scippDataGroup(dim_0: 3)
- descriptionstr()x,y,z
- shapestr()nxbox
- sizescippVariable(dim_0: 3)float32m0.77, 0.3801, nan
- scippDataGroup(dim_0: 3)
- distancescippVariable(dim_0: 3)float32m3.0537205, -0.8558485, -0.10468375
- total_countsint32()663792
- data_x_yscippDataArray(x_pixel_offset: 154,
 y_pixel_offset: 7)int320, 0, ..., 0, 0 - scippDataGroup(event_time_zero: 330473,
 event: 663792)- event_indexscippVariable(event_time_zero: 330473)int640, 0, ..., 663790, 9223372036854775807
- event_time_offsetscippVariable(event: 663792)float32µs8883.5, 9103.0, ..., 7131.6, 7331.1
- event_time_zeroscippVariable(event_time_zero: 330473)datetime64ns2011-08-12T15:50:17.000000000, 2011-08-12T15:50:17.016659999, ..., 2011-08-12T17:22:05.085449218, 2011-08-12T17:22:05.102050781
- event_idscippVariable(event: 663792)int32102537, 102886, ..., 102960, 102948
- scippDataGroup(dim_0: None,
 x_pixel_offset: 154,
 y_pixel_offset: 7)- local_namestr()E3
- scippDataGroup(dim_0: None)
- scippDataGroup(dim_0: 6)
- valuescippVariable(dim_0: 6)float320.30549735, -0.002963881, ..., 0.9888769, -0.04263911
- scippDataGroup(dim_0: 3)
- descriptionstr()x,y,z
- shapestr()nxbox
- sizescippVariable(dim_0: 3)float32m0.77, 0.3801, nan
- scippDataGroup(dim_0: 3)
- distancescippVariable(dim_0: 3)float32m3.1493595, -0.42939225, -0.13501576
- total_countsint32()644580
- data_x_yscippDataArray(x_pixel_offset: 154,
 y_pixel_offset: 7)int320, 0, ..., 0, 0 - eventsscippDataArray(x_pixel_offset: 154,
 y_pixel_offset: 7)DataArrayViewbinned data [len=0, len=0, ..., len=0, len=0]
- scippDataGroup(dim_0: None,
 x_pixel_offset: 154,
 y_pixel_offset: 7,
 event_time_zero: 330473,
 event: 624439)- local_namestr()E4
- scippDataGroup(dim_0: None)
- scippDataGroup(dim_0: 6)
- valuescippVariable(dim_0: 6)float320.30450308, -0.0036800236, ..., 0.99995583, 0.006138266
- scippDataGroup(dim_0: 3)
- descriptionstr()x,y,z
- shapestr()nxbox
- sizescippVariable(dim_0: 3)float32m0.77, 0.3801, nan
- scippDataGroup(dim_0: 3)
- distancescippVariable(dim_0: 3)float32m3.1805677, 0.00451375, -0.146255
- total_countsint32()624439
- data_x_yscippDataArray(x_pixel_offset: 154,
 y_pixel_offset: 7)int320, 0, ..., 0, 0 - scippDataGroup(event_time_zero: 330473,
 event: 624439)- event_indexscippVariable(event_time_zero: 330473)int640, 0, ..., 624438, 9223372036854775807
- event_time_offsetscippVariable(event: 624439)float32µs8164.1, 4931.2, ..., 6524.7, 14206.1
- event_time_zeroscippVariable(event_time_zero: 330473)datetime64ns2011-08-12T15:50:17.000000000, 2011-08-12T15:50:17.016659999, ..., 2011-08-12T17:22:05.085449218, 2011-08-12T17:22:05.102050781
- event_idscippVariable(event: 624439)int32105088, 105821, ..., 105403, 105275
- beamlinestr()11A
- scippDataGroup()
- distancescippVariable()float64m6.647418
- scippDataGroup()
- distancescippVariable()float64m7.899603
- scippDataGroup()
- distancescippVariable()float64m49.975666
- scippDataGroup()
- distancescippVariable()float32m-60.0
- poison_depthscippVariable()float32cm2.5
- poison_materialstr()Gd
- temperaturescippVariable()float32K20.0
- typestr()H2, supercritical
- namestr()POWGEN
- scippDataGroup(dim_0: None)
- azimuthal_anglescippVariable()float32rad0.0
- bend_angle_xscippVariable()stringdeg0
- bend_angle_yscippVariable()stringdeg0
- coating_materialstr()Ni/Ti
- distancescippVariable()float32m-25.5
- external_materialstr()stainless steel
- interior_atmospherestr()vacuum
- m_valuestr()2.0
- scippDataGroup(dim_0: None)
- scippDataGroup(dim_0: 6)
- valuescippVariable(dim_0: 6)float321.0, 0.0, ..., 1.0, 0.0
- scippDataGroup(dim_0: 3)
- descriptionstr()x,y,z
- shapestr()nxbox
- sizescippVariable(dim_0: 3)float32m0.014, 0.086, nan
- scippDataGroup(dim_0: 3)
- distancescippVariable(dim_0: 3)float32m0.0, 0.0, -25.5
- polar_anglescippVariable()float32rad3.1415927
- substrate_materialstr()borofloat glass
- substrate_thickness_maxscippVariable()stringmm11
- substrate_thickness_minscippVariable()stringmm9
- x_pixel_offsetscippVariable()float32m0.0
- y_pixel_offsetscippVariable()float32m0.0
- scippDataGroup(dim_0: None)
- azimuthal_anglescippVariable()float32rad0.0
- bend_angle_xscippVariable()stringdeg0
- bend_angle_yscippVariable()stringdeg0
- coating_materialstr()Ni/Ti
- distancescippVariable()float32m-47.5
- external_materialstr()stainless steel
- interior_atmospherestr()vacuum
- m_valuestr()2.0
- scippDataGroup(dim_0: None)
- scippDataGroup(dim_0: 6)
- valuescippVariable(dim_0: 6)float321.0, 0.0, ..., 1.0, 0.0
- scippDataGroup(dim_0: 3)
- descriptionstr()x,y,z
- shapestr()nxbox
- sizescippVariable(dim_0: 3)float32m0.014, 0.0725, nan
- scippDataGroup(dim_0: 3)
- distancescippVariable(dim_0: 3)float32m0.0, 0.0, -47.5
- polar_anglescippVariable()float32rad3.1415927
- substrate_materialstr()borofloat glass
- substrate_thickness_maxscippVariable()stringmm11
- substrate_thickness_minscippVariable()stringmm9
- x_pixel_offsetscippVariable()float32m0.0
- y_pixel_offsetscippVariable()float32m0.0
NXdata#
Provides multi-dimensional labeled data. See the NeXus format NXdata base class definition for details. Can be read as a data array using positional indexing.
Example:
[3]:
data = f['entry/bank103']
data
[3]:
<scippnexus.base.Group at 0x7eff988d49a0>
[4]:
data['x_pixel_offset', :10]
[4]:
- x_pixel_offset: 10
- y_pixel_offset: 7
- x_pixel_offset(x_pixel_offset)float32m-0.3825, -0.3775, ..., -0.3425, -0.3375
Values:
array([-0.3825, -0.3775, -0.3725, -0.3675, -0.3625, -0.3575, -0.3525, -0.3475, -0.3425, -0.3375], dtype=float32) - y_pixel_offset(y_pixel_offset)float32m-0.1629, -0.1086, ..., 0.1086, 0.1629
Values:
array([-0.1629, -0.1086, -0.0543, 0. , 0.0543, 0.1086, 0.1629], dtype=float32)
- (x_pixel_offset, y_pixel_offset)int320, 0, ..., 0, 0
Values:
array([[0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0]], dtype=int32)
NXdetector#
Provides data for a detector. See the NeXus format NXdetector base class definition for details. NXdetector
contains data and coords similar to NXdata
as well as additional fields that are not readily inserted into a scipp.DataArray
. Therefore, NXdetector
can be read as a scipp.DataGroup
wrapping a scipp.DataArray
using positional indexing. The “signal” field and associated coordinates are combined
into a scipp.DataArray
and the remaining fields are added as fields to the scipp.DataGroup
. In the output, the scipp.DataArray
has the same name as the “signal” dataset in the NeXus file. The underlying data may be dense data or event data.
Example:
[5]:
detector = f['entry/instrument/bank102']
detector
[5]:
<scippnexus.base.Group at 0x7eff988d7ca0>
[6]:
det = detector[...]
det
[6]:
- local_namestr()F2
- scippDataGroup(dim_0: None)
- scippDataGroup(dim_0: 6)
- valuescippVariable(dim_0: 6)float320.07520324, 0.0008634576, ..., 0.95087516, -0.024099652
- scippDataGroup(dim_0: 3)
- descriptionstr()x,y,z
- shapestr()nxbox
- sizescippVariable(dim_0: 3)float32m0.77, 0.3801, nan
- scippDataGroup(dim_0: 3)
- distancescippVariable(dim_0: 3)float32m3.2050142, -0.8542655, 0.67503774
- total_countsint32()456601
- data_x_yscippDataArray(x_pixel_offset: 154,
 y_pixel_offset: 7)int320, 0, ..., 0, 0 - eventsscippDataArray(x_pixel_offset: 154,
 y_pixel_offset: 7)DataArrayViewbinned data [len=0, len=0, ..., len=0, len=0]
In this example both dense data (“data_x”) and event data (“events”) are present:
[7]:
det['data_x_y']
[7]:
- x_pixel_offset: 154
- y_pixel_offset: 7
- azimuthal_angle(x_pixel_offset, y_pixel_offset)float32rad-0.3123652, -0.2958419, ..., -0.22583345, -0.20972791
Values:
array([[-0.3123652 , -0.2958419 , -0.27932844, ..., -0.24636689, -0.22993654, -0.21355148], [-0.3123288 , -0.2958073 , -0.27929565, ..., -0.24633776, -0.22990927, -0.21352607], [-0.31229237, -0.29577267, -0.27926287, ..., -0.24630865, -0.229882 , -0.21350066], ..., [-0.30695337, -0.29069847, -0.2744558 , ..., -0.24204123, -0.2258862 , -0.20977707], [-0.3069181 , -0.29066497, -0.27442405, ..., -0.24201305, -0.22585982, -0.20975249], [-0.3068829 , -0.29063147, -0.27439234, ..., -0.24198489, -0.22583345, -0.20972791]], dtype=float32) - distance(x_pixel_offset, y_pixel_offset)float32m3.2983806, 3.2987897, ..., 3.5141585, 3.518735
Values:
array([[3.2983806, 3.2987897, 3.3000927, ..., 3.305374 , 3.3093479, 3.314207 ], [3.299189 , 3.2995982, 3.3009007, ..., 3.3061805, 3.3101537, 3.3150117], [3.300005 , 3.300414 , 3.301716 , ..., 3.3069947, 3.310967 , 3.3158238], ..., [3.500146 , 3.5005317, 3.5017593, ..., 3.506737 , 3.510483 , 3.5150642], [3.501986 , 3.5023715, 3.5035987, ..., 3.5085735, 3.5123177, 3.5168965], [3.5038323, 3.5042174, 3.505444 , ..., 3.5104163, 3.5141585, 3.518735 ]], dtype=float32) - pixel_id(x_pixel_offset, y_pixel_offset)int32127500, 127501, ..., 128576, 128577
Values:
array([[127500, 127501, 127502, ..., 127504, 127505, 127506], [127507, 127508, 127509, ..., 127511, 127512, 127513], [127514, 127515, 127516, ..., 127518, 127519, 127520], ..., [128557, 128558, 128559, ..., 128561, 128562, 128563], [128564, 128565, 128566, ..., 128568, 128569, 128570], [128571, 128572, 128573, ..., 128575, 128576, 128577]], dtype=int32) - polar_angle(x_pixel_offset, y_pixel_offset)float32rad1.4804635, 1.4808731, ..., 1.266226, 1.2670246
Values:
array([[1.4804635, 1.4808731, 1.4813068, ..., 1.4822451, 1.4827487, 1.4832746], [1.4789683, 1.4793779, 1.4798121, ..., 1.4807527, 1.481258 , 1.4817859], [1.4774736, 1.4778835, 1.4783182, ..., 1.479261 , 1.479768 , 1.480298 ], ..., [1.2659944, 1.266421 , 1.2669227, ..., 1.2681499, 1.2688735, 1.2696692], [1.2646669, 1.2650936, 1.2655957, ..., 1.2668242, 1.267549 , 1.2683462], [1.2633408, 1.2637675, 1.2642701, ..., 1.2655001, 1.266226 , 1.2670246]], dtype=float32) - x_pixel_offset(x_pixel_offset)float32m-0.3825, -0.3775, ..., 0.3775, 0.3825
Values:
array([-0.3825, -0.3775, -0.3725, -0.3675, -0.3625, -0.3575, -0.3525, -0.3475, -0.3425, -0.3375, -0.3325, -0.3275, -0.3225, -0.3175, -0.3125, -0.3075, -0.3025, -0.2975, -0.2925, -0.2875, -0.2825, -0.2775, -0.2725, -0.2675, -0.2625, -0.2575, -0.2525, -0.2475, -0.2425, -0.2375, -0.2325, -0.2275, -0.2225, -0.2175, -0.2125, -0.2075, -0.2025, -0.1975, -0.1925, -0.1875, -0.1825, -0.1775, -0.1725, -0.1675, -0.1625, -0.1575, -0.1525, -0.1475, -0.1425, -0.1375, -0.1325, -0.1275, -0.1225, -0.1175, -0.1125, -0.1075, -0.1025, -0.0975, -0.0925, -0.0875, -0.0825, -0.0775, -0.0725, -0.0675, -0.0625, -0.0575, -0.0525, -0.0475, -0.0425, -0.0375, -0.0325, -0.0275, -0.0225, -0.0175, -0.0125, -0.0075, -0.0025, 0.0025, 0.0075, 0.0125, 0.0175, 0.0225, 0.0275, 0.0325, 0.0375, 0.0425, 0.0475, 0.0525, 0.0575, 0.0625, 0.0675, 0.0725, 0.0775, 0.0825, 0.0875, 0.0925, 0.0975, 0.1025, 0.1075, 0.1125, 0.1175, 0.1225, 0.1275, 0.1325, 0.1375, 0.1425, 0.1475, 0.1525, 0.1575, 0.1625, 0.1675, 0.1725, 0.1775, 0.1825, 0.1875, 0.1925, 0.1975, 0.2025, 0.2075, 0.2125, 0.2175, 0.2225, 0.2275, 0.2325, 0.2375, 0.2425, 0.2475, 0.2525, 0.2575, 0.2625, 0.2675, 0.2725, 0.2775, 0.2825, 0.2875, 0.2925, 0.2975, 0.3025, 0.3075, 0.3125, 0.3175, 0.3225, 0.3275, 0.3325, 0.3375, 0.3425, 0.3475, 0.3525, 0.3575, 0.3625, 0.3675, 0.3725, 0.3775, 0.3825], dtype=float32) - y_pixel_offset(y_pixel_offset)float32m-0.1629, -0.1086, ..., 0.1086, 0.1629
Values:
array([-0.1629, -0.1086, -0.0543, 0. , 0.0543, 0.1086, 0.1629], dtype=float32)
- (x_pixel_offset, y_pixel_offset)int320, 0, ..., 0, 0
Values:
array([[ 0, 0, 0, ..., 0, 0, 0], [340, 259, 191, ..., 118, 110, 94], [464, 527, 401, ..., 193, 160, 151], ..., [ 0, 0, 0, ..., 0, 0, 0], [ 0, 0, 0, ..., 0, 0, 0], [ 0, 0, 0, ..., 0, 0, 0]], dtype=int32)
[8]:
det['events']
[8]:
- x_pixel_offset: 154
- y_pixel_offset: 7
- azimuthal_angle(x_pixel_offset, y_pixel_offset)float32rad-0.3123652, -0.2958419, ..., -0.22583345, -0.20972791
Values:
array([[-0.3123652 , -0.2958419 , -0.27932844, ..., -0.24636689, -0.22993654, -0.21355148], [-0.3123288 , -0.2958073 , -0.27929565, ..., -0.24633776, -0.22990927, -0.21352607], [-0.31229237, -0.29577267, -0.27926287, ..., -0.24630865, -0.229882 , -0.21350066], ..., [-0.30695337, -0.29069847, -0.2744558 , ..., -0.24204123, -0.2258862 , -0.20977707], [-0.3069181 , -0.29066497, -0.27442405, ..., -0.24201305, -0.22585982, -0.20975249], [-0.3068829 , -0.29063147, -0.27439234, ..., -0.24198489, -0.22583345, -0.20972791]], dtype=float32) - distance(x_pixel_offset, y_pixel_offset)float32m3.2983806, 3.2987897, ..., 3.5141585, 3.518735
Values:
array([[3.2983806, 3.2987897, 3.3000927, ..., 3.305374 , 3.3093479, 3.314207 ], [3.299189 , 3.2995982, 3.3009007, ..., 3.3061805, 3.3101537, 3.3150117], [3.300005 , 3.300414 , 3.301716 , ..., 3.3069947, 3.310967 , 3.3158238], ..., [3.500146 , 3.5005317, 3.5017593, ..., 3.506737 , 3.510483 , 3.5150642], [3.501986 , 3.5023715, 3.5035987, ..., 3.5085735, 3.5123177, 3.5168965], [3.5038323, 3.5042174, 3.505444 , ..., 3.5104163, 3.5141585, 3.518735 ]], dtype=float32) - pixel_id(x_pixel_offset, y_pixel_offset)int32127500, 127501, ..., 128576, 128577
Values:
array([[127500, 127501, 127502, ..., 127504, 127505, 127506], [127507, 127508, 127509, ..., 127511, 127512, 127513], [127514, 127515, 127516, ..., 127518, 127519, 127520], ..., [128557, 128558, 128559, ..., 128561, 128562, 128563], [128564, 128565, 128566, ..., 128568, 128569, 128570], [128571, 128572, 128573, ..., 128575, 128576, 128577]], dtype=int32) - polar_angle(x_pixel_offset, y_pixel_offset)float32rad1.4804635, 1.4808731, ..., 1.266226, 1.2670246
Values:
array([[1.4804635, 1.4808731, 1.4813068, ..., 1.4822451, 1.4827487, 1.4832746], [1.4789683, 1.4793779, 1.4798121, ..., 1.4807527, 1.481258 , 1.4817859], [1.4774736, 1.4778835, 1.4783182, ..., 1.479261 , 1.479768 , 1.480298 ], ..., [1.2659944, 1.266421 , 1.2669227, ..., 1.2681499, 1.2688735, 1.2696692], [1.2646669, 1.2650936, 1.2655957, ..., 1.2668242, 1.267549 , 1.2683462], [1.2633408, 1.2637675, 1.2642701, ..., 1.2655001, 1.266226 , 1.2670246]], dtype=float32) - x_pixel_offset(x_pixel_offset)float32m-0.3825, -0.3775, ..., 0.3775, 0.3825
Values:
array([-0.3825, -0.3775, -0.3725, -0.3675, -0.3625, -0.3575, -0.3525, -0.3475, -0.3425, -0.3375, -0.3325, -0.3275, -0.3225, -0.3175, -0.3125, -0.3075, -0.3025, -0.2975, -0.2925, -0.2875, -0.2825, -0.2775, -0.2725, -0.2675, -0.2625, -0.2575, -0.2525, -0.2475, -0.2425, -0.2375, -0.2325, -0.2275, -0.2225, -0.2175, -0.2125, -0.2075, -0.2025, -0.1975, -0.1925, -0.1875, -0.1825, -0.1775, -0.1725, -0.1675, -0.1625, -0.1575, -0.1525, -0.1475, -0.1425, -0.1375, -0.1325, -0.1275, -0.1225, -0.1175, -0.1125, -0.1075, -0.1025, -0.0975, -0.0925, -0.0875, -0.0825, -0.0775, -0.0725, -0.0675, -0.0625, -0.0575, -0.0525, -0.0475, -0.0425, -0.0375, -0.0325, -0.0275, -0.0225, -0.0175, -0.0125, -0.0075, -0.0025, 0.0025, 0.0075, 0.0125, 0.0175, 0.0225, 0.0275, 0.0325, 0.0375, 0.0425, 0.0475, 0.0525, 0.0575, 0.0625, 0.0675, 0.0725, 0.0775, 0.0825, 0.0875, 0.0925, 0.0975, 0.1025, 0.1075, 0.1125, 0.1175, 0.1225, 0.1275, 0.1325, 0.1375, 0.1425, 0.1475, 0.1525, 0.1575, 0.1625, 0.1675, 0.1725, 0.1775, 0.1825, 0.1875, 0.1925, 0.1975, 0.2025, 0.2075, 0.2125, 0.2175, 0.2225, 0.2275, 0.2325, 0.2375, 0.2425, 0.2475, 0.2525, 0.2575, 0.2625, 0.2675, 0.2725, 0.2775, 0.2825, 0.2875, 0.2925, 0.2975, 0.3025, 0.3075, 0.3125, 0.3175, 0.3225, 0.3275, 0.3325, 0.3375, 0.3425, 0.3475, 0.3525, 0.3575, 0.3625, 0.3675, 0.3725, 0.3775, 0.3825], dtype=float32) - y_pixel_offset(y_pixel_offset)float32m-0.1629, -0.1086, ..., 0.1086, 0.1629
Values:
array([-0.1629, -0.1086, -0.0543, 0. , 0.0543, 0.1086, 0.1629], dtype=float32)
- (x_pixel_offset, y_pixel_offset)DataArrayViewbinned data [len=0, len=0, ..., len=0, len=0]
dim='event', content=DataArray( dims=(event: 456601), data=float32[counts], coords={'event_time_offset':float32[µs], 'event_time_zero':datetime64[ns]})
If the underlying data is event data, the underlying event data can be selected using the special event_time_zero
dimension. This dimension is present in the underlying NXevent_data
group, but not preserved after loading and binning by pixels due to the prohibitive size. For example, we can select the first 1000 pulses and load data for all pixels:
[9]:
detector['event_time_zero', :1000]
[9]:
- local_namestr()F2
- scippDataGroup(dim_0: None)
- scippDataGroup(dim_0: 6)
- valuescippVariable(dim_0: 6)float320.07520324, 0.0008634576, ..., 0.95087516, -0.024099652
- scippDataGroup(dim_0: 3)
- descriptionstr()x,y,z
- shapestr()nxbox
- sizescippVariable(dim_0: 3)float32m0.77, 0.3801, nan
- scippDataGroup(dim_0: 3)
- distancescippVariable(dim_0: 3)float32m3.2050142, -0.8542655, 0.67503774
- total_countsint32()456601
- data_x_yscippDataArray(x_pixel_offset: 154,
 y_pixel_offset: 7)int320, 0, ..., 0, 0 - eventsscippDataArray(x_pixel_offset: 154,
 y_pixel_offset: 7)DataArrayViewbinned data [len=0, len=0, ..., len=0, len=0]
Note:
Selecting a range of events allows for loading only a potentially very small section of the underlying event data and can thus be very fast.
In contrast, e.g., selecting a small range of pixels in presence of underlying event data is not fast, since the events for all pixels are stored in the order as they arrive in the acquisition system and the entire NXevent_data group must be loaded.
NXevent_data#
Provides event data in raw format as produced by the acquisition system, i.e., not grouped into detector pixels. See the NeXus format NXevent_data base class definition for details. Can be read as a data array using slicing syntax.
Example:
[10]:
event_data = f['entry/bank102_events']
event_data[...]
[10]:
- event_time_zero: 330473
- event_time_zero(event_time_zero)datetime64ns2011-08-12T15:50:17.000000000, 2011-08-12T15:50:17.016659999, ..., 2011-08-12T17:22:05.085449218, 2011-08-12T17:22:05.102050781
Values:
array(['2011-08-12T15:50:17.000000000', '2011-08-12T15:50:17.016659999', '2011-08-12T15:50:17.033321000', ..., '2011-08-12T17:22:05.068359375', '2011-08-12T17:22:05.085449218', '2011-08-12T17:22:05.102050781'], dtype='datetime64[ns]')
- (event_time_zero)DataArrayViewbinned data [len=0, len=3, ..., len=3, len=2]
dim='event', content=DataArray( dims=(event: 456601), data=float32[counts], coords={'event_time_offset':float32[µs], 'event_id':int32})
In some cases the event data fields may be contained directly within an NXdetector. The event data can also be accessed from there:
[11]:
f['entry/instrument/bank102']['events'][...]
[11]:
- event_time_zero: 330473
- event_time_zero(event_time_zero)datetime64ns2011-08-12T15:50:17.000000000, 2011-08-12T15:50:17.016659999, ..., 2011-08-12T17:22:05.085449218, 2011-08-12T17:22:05.102050781
Values:
array(['2011-08-12T15:50:17.000000000', '2011-08-12T15:50:17.016659999', '2011-08-12T15:50:17.033321000', ..., '2011-08-12T17:22:05.068359375', '2011-08-12T17:22:05.085449218', '2011-08-12T17:22:05.102050781'], dtype='datetime64[ns]')
- (event_time_zero)DataArrayViewbinned data [len=0, len=3, ..., len=3, len=2]
dim='event', content=DataArray( dims=(event: 456601), data=float32[counts], coords={'event_time_offset':float32[µs], 'event_id':int32})
NXlog#
Provides a time-series log. See the NeXus format NXlog base class definition for details. Can be read as a data array using positional indexing.
Example:
[12]:
proton_charge = f['/entry/DASlogs/proton_charge']
proton_charge
[12]:
<scippnexus.base.Group at 0x7eff90e82980>
[13]:
proton_charge[...]
[13]:
- time: 330473
- average_value()float64pC12766652.799260454σ = 5061670.635363746
Values:
array(12766652.79926045)
Variances (σ²):
array(2.56205096e+13) - description()stringdescription
Values:
'description' - duration()float32s5508.0
Values:
array(5508., dtype=float32) - maximum_value()float64pC15146700.0
Values:
array(15146700.) - minimum_value()float64pC0.0
Values:
array(0.) - time(time)datetime64ns2011-08-12T15:50:17.000000000, 2011-08-12T15:50:17.016659999, ..., 2011-08-12T17:22:05.085449218, 2011-08-12T17:22:05.102050781
Values:
array(['2011-08-12T15:50:17.000000000', '2011-08-12T15:50:17.016659999', '2011-08-12T15:50:17.033321000', ..., '2011-08-12T17:22:05.068359375', '2011-08-12T17:22:05.085449218', '2011-08-12T17:22:05.102050781'], dtype='datetime64[ns]')
- (time)float64pC1.484e+07, 1.484e+07, ..., 1.487e+07, 1.484e+07
Values:
array([14843360., 14843360., 14787820., ..., 14809180., 14873260., 14839090.])
NXmonitor#
Provides data for a beam monitor. See the NeXus format NXmonitor base class definition for details. Can be read as a scipp.DataGroup
holding a scipp.DataArray
using positional indexing, similar to NXdetector
.
Example:
[14]:
monitor = f['entry/monitor1']
mon = monitor[...]
mon
[14]:
- modestr()monitor
- datascippDataArray(time_of_flight: 200001)int3225, 10, ..., 0, 0
[15]:
mon['data']
[15]:
- time_of_flight: 200001
- distance()float64m-1.0
Values:
array(-1.) - time_of_flight(time_of_flight [bin-edge])float32µs0.0, 1.0, ..., 200000.0, 200001.0
Values:
array([0.00000e+00, 1.00000e+00, 2.00000e+00, ..., 1.99999e+05, 2.00000e+05, 2.00001e+05], dtype=float32)
- (time_of_flight)int3225, 10, ..., 0, 0
Values:
array([25, 10, 12, ..., 0, 0, 0], dtype=int32)