NeXus and Elec on Mic oscopy
Fede ica Bazzocchi,
Is i u o di Rice ca pe l’Inno azione Tecnologica (RIT) T ies e
Op ical, Elec on, and Scanning P obe Mic oscopy Online Wo kshop
6.11.2024
OUTLINE
❑B ie ecap on FAIR p inciples
❑NeXus ile o ma
❑Nxem
❑Final ema ks
Fo o di B ian Penny da Pixabay
❑B ie ecap on FAIR p inciples
Doo SangyaPundi - Eigen we k, CC BY-SA 4.0,
h ps://commons.wikimedia.o g/w/index.php?cu id=53414062
h ps://doi.o g/10.1038/sda a.2016.18
F
F1: (Me a) da a a e assigned globally unique
and pe sis en iden i ie s
F2: Da a a e desc ibed wi h ich me ada a
F3: Me ada a clea ly and explici ly include
he iden i ie o he da a hey desc ibe
F4: (Me a)da a a e egis e ed o indexed in a
sea chable esou ce
A
A1: (Me a)da a a e e ie able by hei
iden i ie using a s anda dized
communica ion p o ocol
A1.1: The p o ocol is open, ee and
uni e sally implemen able
A1.2: The p o ocol allows o an
au hen ica ion and au ho iza ion p ocedu e
whe e necessa y
A2: Me ada a should be accessible e en
when he da a is no longe a ailable
I
R
I1: (Me a)da a use a o mal, accessible, sha ed,
and b oadly applicable language o knowledge
ep esen a ion
I2: (Me a)da a use ocabula ies ha ollow he
FAIR p inciples
I3: (Me a)da a include quali ied e e ences o
o he (me a)da a
R1: (Me a)da a a e ichly desc ibed wi h a
plu ali y o accu a e and ele an a ibu es
R1.1: (Me a)da a a e eleased wi h a clea and
accessible da a usage license
R1.2: (Me a)da a a e associa ed wi h de ailed
p o enance
R1.3: (Me a)da a mee domain- ele an
communi y s anda ds
❑B ie ecap on FAIR p inciples: he me ada a ole
S uc u al In e ope abili y:
Da a ha e o use he same
model ep esen a ion o be
p ocessed by di e en
app/algo i hm
Seman ic
In e ope abili y:
Da a ha e o use
common
ocabula ies in
o de o be
unde s ood in hei
meaning bo h by
humans and no
humans
Technical
In e ope abili y:
Da a ha e o be
unde s ood by
di e en app,
exchanged by
common p o ocols
I o
FAIR
❑B ie ecap on FAIR p inciples: he in e ope abili y
challenge
Slides by Elena Giglia DOI 10.5281/zenodo.6761944
Managing da a p ope ly is in he p ima y
in e es o any esea che ,
as he whole esea ch p ocess esul s
s eamlined and mo e e ec i e
FAIRness VS OPENness
MANAGED
FAIR
1. DATA SHOULD BE AS OPEN AS POSSIBLE
2. BUT IF DATA ARE NOT «FAIR», OPENING IS RISKY
(MISUSE, MISINTERPRETATION, …)
3. IF DATA ARE NOT PROPERLY MANAGED FROM THE BEGINNING, IT’S
ALMOST IMPOSSIBLE TO MAKE THEM «FAIR» [WITH EOSC MANAGED/FAIR
INCREASINGLY OVERLAPPING, «FAIR-BY-DESIGN»]
FAIR ≠ OPEN
In Ho izon Eu ope da a should be «as open as possible and as closed as necessa y»
OPEN
Me ada a + in e ope abili y
=
S anda d o ma
A GOOD CHOICE IS GIVEN BY
THE NEXUS DATA FORMAT
NeXus da a o ma
NeXus is a common da a exchange o ma o neu on, X- ay, and muon expe imen s. NeXus is
buil on op o he scien i ic da a o ma HDF5 and adds domain-speci ic ules o o ganizing
da a wi hin HDF5 iles in addi ion o a dic iona y o well-de ined domain-speci ic ield names.
Applica ion de ini ion a e supe ised/ egula ed by NIAC
The NeXus da a o ma has h ee pu poses:
•Raw da a: NeXus de ines a o ma ha can se e as a con aine o all ele an da a
associa ed wi h a scien i ic ins umen o beamline.
•P ocessed da a: NeXus also de ines s anda ds o p ocessed da a. This is da a which has
unde wen some o m o da a educ ion o da a analysis. NeXus allows s o ing he esul s o
such p ocessing oge he wi h documen a ion abou how he p ocessed da a was
gene a ed.
•S anda ds: NeXus de ines s anda ds in he o m o applica ion de ini ions o he exchange
o da a be ween applica ions. NeXus p o ides s anda ds o bo h aw and p ocessed da a.
Wha is HDF5?
Hie a chical Da a Fo ma
Le ’s pu e e y hing oge he …
An example: Nxem
(con ibu ed de ini ion Pa ne conso ia in he Ge man Na ional Resea ch Da a
In as uc u e a e he e e.g. NFDI-Ma We k, NFDI4Ing, NFDI-BioImage, NFDI-
Mic obio a, NFDI4Heal h, and e.g. NFDI-Neu o)
NXem is a NeXus applica ion de ini ion o he no malized ep esen a ion o elec on
mic oscopy esea ch. I is an ex ension o he Nxem_base base class.
This applica ion de ini ion is hus an example o a gene al desc ip ion wi h which o no malize
speci ic pieces o in o ma ion and da a collec ed wi hin elec on mic oscopy esea ch.
This applica ion de ini ion is also a bluep in which shows how use s can build speci ic
applica ion de ini ions by eusing em-speci ic base classes - and hus ep esen elec on-
mic oscopy-speci ic con en .
NXem
<?xml e sion='1.0' encoding='UTF-8'?>
<?xml-s yleshee ype=" ex /xsl" h e ="nxdl o ma .xsl"?>
<de ini ion xmlns="h p://de ini ion.nexus o ma .o g/nxdl/3.1"
xmlns:xsi="h p://www.w3.o g/2001/XMLSchema-ins ance" ca ego y="applica ion" ype="g oup" name="NXem"
ex ends="NXobjec " xsi:schemaLoca ion="h p://de ini ion.nexus o ma .o g/nxdl/3.1 ../nxdl.xsd">
NXem Base Classes
NXem
Base Classes
Nxen y
p o iling
ci eID
De ini ion
( e sion,
alue=Nxe
m)
Expe imen
iden i ie
g oups
ields
Exp
alias
Exp
desc
S a _
ime
End
ime
use ID
se ializedI
D
Coo dina e
sys em se measu emen simula ion oiIDsample
op ional
sugges ed
equi ed
NXem
NXsample
Type
Value=exp
e imen /si
mula ion
Iden i ie
g oups
ields
A om
ypes
Thickness
(uni s)
P epa a i
on da e Name
Pa en iden i ie
Densi y
(uni s)
desc ip ion
op ional
sugges ed
equi ed
NXem
•Nxa ay: his lib a y ake a ays as inpu s and e u ns nexus
•Pynx ool: lib a y ha ex ends NeXus o expe imen s and cha ac e iza ion in Ma e ials
Science and Ma e ials Enginee ing and se e as a NOMAD pa se implemen a ion o
NeXus.
•Nexus- o ma : This package p o ides a Py hon API o open, c ea e, and manipula e NeXus
da a w i en in he HDF5 o ma . The 'nexus o ma ' package p o ides he unde lying API
o NeXpy, which p o ides a GUI in e ace o isualizing and analyzing NeXus da a.
•Py hon-nexus:py hon-nexus p o ides simple nexus ile- o ma eading/w i ing ools, and a
small collec ion o nexus manipula ion sc ip s.
NeXus: py hon lib a ies
Own sc ip s
FINAL REMARKS
❑To be FAIR complian we need
choosing a s anda d
❑NeXus ile o ma is a
easonable choice because i
has behind a huge ac i e
communi y
❑Nxem may desc ibe he
majo i y o EM
expe imen s
Thanks o you a en ion!