Convert your first ellipsometry dataset¶
Who is this tutorial for?¶
Anyone who has pynxtools-ellips installed and wants to see, hands-on, how an ellipsometry measurement turns into a standardized NXellipsometry file.
What should you know before this tutorial?¶
- You should have
pynxtools-ellipsinstalled — see the installation guide. - You should have a copy of the
pynxtools-ellipsrepository, since this tutorial uses the example files that ship with it.
What will you know at the end of this tutorial?¶
- How the pieces of a conversion — raw data, an ELN file, and the
pynx convertcommand — fit together. - What a converted
NXellipsometryfile looks like. - Where to go if you want to add a second vendor format.
The example dataset¶
The repository ships a small, self-contained example under examples/: a J.A. Woollam VASE/CompleteEASE Psi/Delta scan of a 2nm SiO2 layer on Si, measured on an RC2 ellipsometer.
examples/
├── test-data.dat # the raw VASE/CompleteEASE export
└── eln_data.yaml # metadata the raw export doesn't carry, plus its own column layout
Open test-data.dat: the first three lines are a title and acquisition-method header, then a flat table — one row per (angle of incidence, wavelength) pair, repeated in blocks for each of the three measured angles (50°, 60°, 70°). Open eln_data.yaml too: besides the usual instrument/sample/user metadata, it also declares colnames, sep, and skip — the column layout test-data.dat needs to be parsed at all, since the raw export doesn't describe its own columns.
Steps¶
1. Run the conversion¶
From the root of the repository:
pynx convert examples/eln_data.yaml examples/test-data.dat --reader ellips --nxdl NXellipsometry --output SiO2onSi_example.nxs
You're passing three things:
- the
.yamlELN file, - the
.datraw data file, --reader ellips --nxdl NXellipsometry, selectingpynxtools-ellips's reader and theNXellipsometryapplication definition.
The reader figures out which input file is which by extension, and reads the .yaml file first regardless of the order you pass them in — the .dat file's column layout depends on it (see Learn > Reader architecture).
2. Read the output¶
The command prints a handful of warnings about missing documentation for a few fields and attributes — expected for this example, and they don't stop the conversion.
At the end you should see:
3. Inspect the file¶
SiO2onSi_example.nxs is a regular HDF5 file. Open it with H5Web in your browser, the VS Code H5Web extension, or any HDF5 viewer. You should find, among others:
entry/data_collection/measured_data: the full(3, 2, 1088)result array — 3 angles, 2 observables (Psi, Delta), 1088 wavelength points.entry/data_collection/Psi_50deg,Delta_50deg, ...: 1D virtual-dataset slices ofmeasured_data, one per angle/observable — these are what the default plot actually shows, and why they have to be 1D rather than the full 3D array (see Learn > Application definitions).entry/sample/name:2nm SiO2 on Si, taken straight fromeln_data.yaml.- The default plot itself, rendered by any NeXus-aware viewer from
data_collection's@signal/@axes/@auxiliary_signalsattributes.
Where to go next¶
- If you want to understand what's actually happening during the conversion, Learn > Reader architecture explains the design, and Learn > Application definitions explains the NeXus concepts involved.
- For the bare command without the explanations, see How-to > Convert data.
- If you're adding a second vendor format, Learn > Reader architecture has the checklist.