Skip to content

Commit

Permalink
Merge pull request #1411 from FAIRmat-NFDI/fairmat-2024-nxdetector
Browse files Browse the repository at this point in the history
Fairmat 2024: additional fields in NXdetector
  • Loading branch information
lukaspie authored Oct 22, 2024
2 parents a12a91b + 96493f8 commit fa09ecd
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 3 deletions.
10 changes: 7 additions & 3 deletions base_classes/NXdetector.nxdl.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
<symbol name="nP"><doc>number of scan points (only present in scanning measurements)</doc></symbol>
<symbol name="i"><doc>number of detector pixels in the first (slowest) direction</doc></symbol>
<symbol name="j"><doc>number of detector pixels in the second (faster) direction</doc></symbol>
<symbol name="k"><doc>number of detector pixels in the third (if necessary, fastest) direction</doc></symbol>
<symbol name="tof"><doc>number of bins in the time-of-flight histogram</doc></symbol>
</symbols>

Expand Down Expand Up @@ -460,9 +461,10 @@
<field name="efficiency" type="NX_FLOAT" units="NX_DIMENSIONLESS">
<doc>efficiency of the detector</doc>

<dimensions rank="2">
<dimensions rank="3">
<dim index="1" value="i" />
<dim index="2" value="j" />
<dim index="3" value="k" />
</dimensions>
</field>

Expand All @@ -480,10 +482,10 @@
In this use case, the efficiency and wavelength arrays must
have the same dimensionality.
</doc>

<dimensions rank="2">
<dimensions rank="3">
<dim index="1" value="i" />
<dim index="2" value="j" />
<dim index="3" value="k" />
</dimensions>
</field>
</group>
Expand Down Expand Up @@ -612,6 +614,7 @@
<item value="event"/>
<item value="histogrammed"/>
<item value="decimated"/>
<item value="pulse counting"/>
</enumeration>
</field>
<field name="angular_calibration_applied" type="NX_BOOLEAN" >
Expand Down Expand Up @@ -930,6 +933,7 @@
</doc>
</group>
</choice>
<group type="NXfabrication"/>
<attribute name="default">
<doc>
.. index:: plotting
Expand Down
60 changes: 60 additions & 0 deletions base_classes/NXelectron_detector.nxdl.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="nxdlformat.xsl" ?>
<!--
# NeXus - Neutron and X-ray Common Data Format
#
# Copyright (C) 2008-2024 NeXus International Advisory Committee (NIAC)
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 3 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# For further information, see http://www.nexusformat.org
-->
<definition category="base" extends="NXdetector" name="NXelectron_detector"
type="group"
xsi:schemaLocation="http://definition.nexusformat.org/nxdl/3.1 ../nxdl.xsd"
xmlns="http://definition.nexusformat.org/nxdl/3.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:ns="http://definition.nexusformat.org/nxdl/@NXDL_RELEASE@"
>
<doc>
A subclass of NXdetector for detectors that detect electrons.
</doc>
<field name="amplifier_type" type="NX_CHAR">
<doc>
Type of electron amplifier, MCP, channeltron, etc.
</doc>
</field>
<field name="detector_type" type="NX_CHAR">
<doc>
Description of the electron detector type, DLD, Phosphor+CCD, CMOS.
</doc>
</field>
<field name="detector_voltage" type="NX_FLOAT" units="NX_VOLTAGE">
<doc>
Voltage applied to the electron detector.
</doc>
</field>
<field name="amplifier_voltage" type="NX_FLOAT" units="NX_VOLTAGE">
<doc>
Voltage applied to the amplifier.
</doc>
</field>
<field name="amplifier_bias" type="NX_FLOAT" units="NX_VOLTAGE">
<doc>
The low voltage of the amplifier might not be the ground.
</doc>
</field>
</definition>

0 comments on commit fa09ecd

Please sign in to comment.