diff --git a/applications/NXellipsometry.nxdl.xml b/applications/NXellipsometry.nxdl.xml new file mode 100644 index 0000000000..70a70e52af --- /dev/null +++ b/applications/NXellipsometry.nxdl.xml @@ -0,0 +1,389 @@ + + + + + + + Variables used throughout the document, e.g. dimensions or parameters. + + + + Length of the spectrum array (e.g. wavelength or energy) of the measured + data. + + + + + Number of measurements (1st dimension of measured_data array). This is + equal to the number of parameters scanned. For example, if the experiment + was performed at three different temperatures and two different pressures + N_measurements = 2*3 = 6. + + + + + Number of detection angles of the beam reflected or scattered off the + sample. + + + + + Number of angles of incidence of the incident beam. + + + + + This is the application definition describing ellipsometry experiments. + + Such experiments may be as simple as identifying how a reflected + beam of light with a single wavelength changes its polarization state, + to a variable angle spectroscopic ellipsometry experiment. + + The application definition specializes :ref:`NXoptical_spectroscopy` by + extending the terms and setting specific requirements. + + Information on ellipsometry is provided, e.g. in: + + * H. Fujiwara, Spectroscopic ellipsometry: principles and applications, + John Wiley & Sons, 2007. + * R. M. A. Azzam and N. M. Bashara, Ellipsometry and Polarized Light, + North-Holland Publishing Company, 1977. + * H. G. Tompkins and E. A. Irene, Handbook of Ellipsometry, + William Andrew, 2005. + + Open access sources: + + * https://www.angstromadvanced.com/resource.asp + * https://pypolar.readthedocs.io/en/latest/ + + Review articles: + + * T. E. Jenkins, "Multiple-angle-of-incidence ellipsometry", + J. Phys. D: Appl. Phys. 32, R45 (1999), + https://doi.org/10.1088/0022-3727/32/9/201 + * D. E. Aspnes, "Spectroscopic ellipsometry - Past, present, and future", + Thin Solid Films 571, 334-344 (2014), + https://doi.org/10.1016/j.tsf.2014.03.056 + * R. M. A. Azzam, "Mueller-matrix ellipsometry: a review", + Proc. SPIE 3121, Polarization: Measurement, Analysis, and Remote Sensing, + (3 October 1997), + https://doi.org/10.1117/12.283870 + * E. A. Irene, "Applications of spectroscopic ellipsometry to microelectronics", + Thin Solid Films 233, 96-111 (1993), + https://doi.org/10.1016/0040-6090(93)90069-2 + * S. Zollner et al., "Spectroscopic ellipsometry from 10 to 700 K", + Adv. Opt. Techn., (2022), + https://doi.org/10.1515/aot-2022-0016 + + + + + An application definition for ellipsometry. + + + + Version number to identify which definition of this application + definition was used for this entry/data. + + + + + URL where to find further material (documentation, examples) relevant + to the application definition. + + + + + + + + + + Specify the type of the optical experiment. + + You may specify fundamental characteristics or properties in the experimental sub-type. + + + + + + + + Specify the type of ellipsometry. + + + + + + + + + + + + + Properties of the ellipsometry equipment. + + + + What type of ellipsometry was used? See Fujiwara Table 4.2. + + + + + + + + + + + + + + + + + + + If focusing probes (lenses) were used, please state if the data + were corrected for the window effects. + + + + + + + + + + + + + Were the recorded data corrected by the window effects of the + focusing probes (lenses)? + + + + + Specify the angular spread caused by the focusing probes. + + + + + + Properties of the rotating element defined in + 'instrument/rotating_element_type'. + + + + Define which element rotates, e.g. polarizer or analyzer. + + + + + + + + + + + Define how many revolutions of the rotating element were averaged + for each measurement. If the number of revolutions was fixed to a + certain value use the field 'fixed_revolutions' instead. + + + + + Define how many revolutions of the rotating element were taken + into account for each measurement (if number of revolutions was + fixed to a certain value, i.e. not averaged). + + + + + Specify the maximum value of revolutions of the rotating element + for each measurement. + + + + + + + + Was the backside of the sample roughened? Relevant for infrared + ellipsometry. + + + + + + Measured data, data errors, and varied parameters. This may be used to describe + indirectly derived data or data transformed between different descriptions, + such as: + Raw Data --> Psi + Delta Psi, Delta --> N,C,S + Mueller matrix --> N,C,S + Mueller matrix --> Psi, Delta + etc. + + Other types of data, such as temperature or sample location, may be saved + in a generic (NXdata) concept from :ref:`NXoptical_spectroscopy`, or better + directly in the location of the sample positioner or temperature sensor. + + + + An identifier to correlate data to the experimental conditions, + if several were used in this measurement; typically an index of 0-N. + + + + + Select which type of data was recorded, for example intensity, + reflectivity, transmittance, Psi and Delta etc. + It is possible to have multiple selections. The enumeration list + depends on the type of experiment and may differ for different + application definitions. + + + + + + + + + + + + + + + + Spectral values (e.g. wavelength or energy) used for the measurement. + An array of 1 or more elements. Length defines N_spectrum. Replace + 'SPECTRUM' by the physical quantity that is used, e.g. wavelength. + + + + + + + If applicable, change 'unit: NX_ANY' to the appropriate NXDL unit. + If the unit of the measured data is not covered by NXDL units state + here which unit was used. + + + + + + Resulting data from the measurement, described by 'data_type'. + + The first dimension is defined by the number of measurements taken, + (N_measurements). The instructions on how to order the values + contained in the parameter vectors given in the doc string of + INSTRUMENT/sample_stage/environment_conditions/PARAMETER/values, + define the N_measurements parameter sets. For example, if the + experiment was performed at three different temperatures + (T1, T2, T3), two different pressures (p1, p2) and two different + angles of incidence (a1, a2), the first measurement was taken at the + parameters {a1,p1,T1}, the second measurement at {a1,p1,T2} etc. + + + + + + + + + If applicable, change 'unit: NX_ANY' to the appropriate NXDL unit. + If the unit of the measured data is not covered by NXDL units state + here which unit was used. + + + + + + Specified uncertainties (errors) of the data described by 'data_type' + and provided in 'measured_data'. + + + + + + + + + If applicable, change 'unit: NX_ANY' to the appropriate NXDL unit. + If the unit of the measured data is not covered by NXDL units state + here which unit was used. + + + + + + List of links to the values of the sensors. Add a link for each + varied parameter (i.e. for each sensor). + + + + + + + + :ref:`External link <Design-Links>` to the data field in the NeXus + file which describes the reference data if a reference measurement was performed. + Ideally, the reference measurement was performed using the same conditions as + the actual measurement and should be as close in time to the actual measurement + as possible. + + Ideally, the link uses the relative path with respect to the actual + NeXus file. + + + + + + Commercial or otherwise defined given name of the program that was + used to generate the result file(s) with measured data and/or + metadata (in most cases, this is the same as INSTRUMENT/software). + If home written, one can provide the actual steps in the NOTE + subfield here. + + + + + Either version with build number, commit hash, or description of a + (online) repository where the source code of the program and build + instructions can be found so that the program can be configured in + such a way that result files can be created ideally in a + deterministic manner. + + + + + Website of the software. + + + + + + diff --git a/applications/NXoptical_spectroscopy.nxdl.xml b/applications/NXoptical_spectroscopy.nxdl.xml new file mode 100644 index 0000000000..cc22ff38f8 --- /dev/null +++ b/applications/NXoptical_spectroscopy.nxdl.xml @@ -0,0 +1,1075 @@ + + + + + + + + Variables used throughout the document, e.g. dimensions or parameters. + + + + Length of the spectrum array (e.g. wavelength or energy) of the measured + data. + + + + + Number of measurements (1st dimension of measured data arrays). This is + equal to the number of parameters scanned. For example, if the experiment + was performed at three different temperatures and two different pressures + N_measurements = 2*3 = 6. + + + + + A general application definition of optical spectroscopy elements, which may + be used as a template to derive specialized optical spectroscopy experiments. + + Possible specializations are ellipsometry, Raman spectroscopy, photoluminescence, + reflectivity/transmission spectroscopy. + + A general optical experiment consists of (i) a light/photon source, (ii) a sample, + (iii) a detector. + + For any free-text descriptions, it is recommended to use English, as this ensures + the most FAIR (Findable, Accessible, Interoperable, and Reusable) representation of the information. + + + + + An application definition describing a general optical experiment. + + + + Version number to identify which definition of this application + definition was used for this entry/data. + + + + + URL where to find further material (documentation, examples) relevant + to the application definition. + + + + + + + + + + Datetime of the start of the measurement. + Should be a ISO8601 date/time stamp. It is recommended to add an explicit time zone, + otherwise, the local time zone is assumed per ISO8601. + + It is required to enter at least one of both measurement times, either "start_time" or "end_time". + + + + + Datetime of the end of the measurement. + Should be a ISO8601 date/time stamp. It is recommended to add an explicit time zone, + otherwise the local time zone is assumed per ISO8601. + + It is required to enter at least one of both measurement times, either "start_time" or "end_time". + + + + + + An optional free-text description of the experiment. + + Users are strongly advised to parameterize the description of their experiment + by using respective groups and fields and base classes instead of writing prose + into this field. + + The reason is that such a free-text field is difficult to machine-interpret. + The motivation behind keeping this field for now is to learn how far the + current base classes need extension based on user feedback. + + + + + Specify the type of the optical experiment. + + Use another term if none of these methods are suitable. You may specify + fundamental characteristics or properties in the experimental sub-type. + + For Raman spectroscopy or ellipsometry use the respective specializations + of NXoptical_spectroscopy. + + + + + + + + + + Specify a special property or characteristic of the experiment, which specifies + the generic experiment type. + + + + + + + + + + + This refers to the coordinate system along the beam path. The origin and + base is defined at z=0, where the incident beam hits the sample at the surface. + + + + + This is the default NeXus coordinate system (McStas), if the transformation + does not change the coordinate system at all - i.e. it is unity. + Otherwise, by this a respective transformation of the beam + reference frame to the default reference frame could be made. i.e. + exchange of x and z coordinate, rotation of respective coordinates + towards each other. + + + + + + + Link to transformations defining the sample-normal base coordinate system, + which is defined such that the positive z-axis is parallel to the sample normal, + and the x-y-plane lies inside the sample surface. + + + + + Set of transformations, describing the orientation of the sample-normal coordinate system + with respect to the beam coordinate system (.). + + + + + + Contact information and eventually details of at persons who + performed the measurements. This can be for example the principal + investigator or student. Examples are: name, affiliation, address, telephone + number, email, role as well as identifiers such as orcid or similar. + It is recommended to add multiple users if relevant. + + Due to data privacy concerns, there is no minimum requirement. + If no user with specific name is allowed to be given, it is required to + assign at least an affiliation + + + + + Devices or elements of the optical spectroscopy setup described with its + properties and general information. + + This includes for example: + - The beam device's or instrument's model, company, serial number, construction year, etc. + - Used software or code + - Experiment descriptive parameters as reference frames, resolution, calibration + - Photon beams with their respective properties such as angles and polarization + - Various optical beam path devices, which interact, manipulate or measure optical beams + - Characteristics of the medium surrounding the sample + - "Beam devices" for a beam path description + - Stages(NXmanipulator) + - Sensors and actuators to control or measure sample or beam properties + + + + This can be used to describe properties of a photon beam. + A beam can be connected to components, via their + "inputs" and "outputs". + + It is required to define at least one incident beam which is incident + to the sample. You may specify if this beam parameters are actually measured + or just nominal. + If this beam is the output of a source, chose the same + name appendix as for the NXsource instance (e.g. TYPE=532nm) + + + + Select the reliability of the respective beam characteristics. Either, + the parameters are measured via another device or method or just given + nominally via the properties of a light source properties (532nm, 100mW). + + + + + + + + + + + + + The path to the device which emitted this beam (light source or frequency doubler). + + This parameter is recommended, if the previous optical element is a photon source. + In this way, the properties of the laser or light source can be described + and associated. + The beam should be named with the same appendix as the source, e.g., + for TYPE=532nmlaser, there should be both a NXsource named + "source_532nmlaser" and a NXbeam named "beam_532nmlaser". + + Example: /entry/instrument/source_532nmlaser + + + + + + + + + + + + + Angle of the linear polarized light, with respect to a fixed arbitrary + defined 0° position. Note that the zero reference should be a direction vector for a + :ref:`reference_plane </NXbeam/TRANSFORMATIONS/reference_plane-field>` + normal in an :ref:`NXtransformations` group within :ref:`NXbeam`. + This can be used if no definition of respective + coordinate systems for beam and sample normal is done. If coordinate systems + are defined, refer to beam "incident_polarization". + + + + + + + + + + + + + Description of the detector type. + + + + + + + + + + + + + + + + Contains the raw data collected by the detector before calibration. + The data which is considered raw might change from experiment to experiment + due to hardware pre-processing of the data. + This field ideally collects the data with the lowest level of processing + possible. + + + + + + + + + Raw data before calibration. + + + + + + Specify respective hardware which was used for the detector. For + example special electronics required for time-correlated single photon + counting (TCSPC). + + + + + + + + + + + + + + + + + + + + + + + + + + + If available, name/ID/norm of the light source standard. + + + + + Details about the device information. + + + + + The path to a beam emitted by this source. + Should be named with the same appendix, e.g., + for TYPE=532nmlaser, there should as well be + a NXbeam named "beam_532nmlaser" together with this source + instance named "source_532nmlaser" + + Example: /entry/instrument/beam_532nmlaser + + + + + + + + + Defines the reference frame which is used to describe the sample orientation + with respect to the beam directions. + + A beam centered description is the default and uses 4 angles(similar to XRD): + - Omega (angle between sample surface and incident beam) + - 2Theta (angle between the transmitted beam and the detection beam) + - Chi (sample tilt angle, angle between plane#1 and the surface normal, + plane#1 = spanned by incidence beam and detection + and detection. If Chi=0°, then plane#1 is the plane of + incidence in reflection setups) + - Phi (inplane rotation of sample, rotation axis is the samples + surface normal) + + + A sample normal centered description is possible as well: + - angle of incidence (angle between incident beam and sample surface) + - angle of detection (angle between detection beam and sample surface) + - angle of incident and detection beam + - angle of in-plane sample rotation (direction along the sample's surface normal) + + + + + + + + + Angle between sample incident beam and sample surface. + + + + + Angle between incident and detection beam + + + + + Sample tilt between sample normal, and the plane spanned by detection and + incident beam. + + + + + Inplane rotation of the sample, with rotation axis along sample normal. + + + + + Angle(s) of the incident beam vs. the normal of the bottom reflective + (substrate) surface in the sample. These two directions span the plane + of incidence. + + + + + Detection angle(s) of the beam reflected or scattered off the sample + vs. the normal of the bottom reflective (substrate) surface in the + sample if not equal to the angle(s) of incidence. + These two directions span the plane of detection. + + + + + Angle between the incident and detection beam. + If angle_of_detection + angle_of_incidence = angle_of_incident_and_detection_beam, + then the setup is a reflection setup. + If angle_of_detection + angle_of_incidence != angle_of_incident_and_detection_beam + then the setup may be a light scattering setup. + (i.e. 90° + 90° != 90°, i.e. incident and detection beam in the sample surface, but + the angle source-sample-detector is 90°) + + + + + Angle of the inplane orientation of the sample. This might be an arbitrary, + angle without specific relation to the sample symmetry, + of the angle to a specific sample property (i.e. crystallographic axis or sample + shape such as wafer flat) + + + + + Set of transformations, describing the relative orientation of different + parts of the experiment (beams or sample). You may select one of the specified + angles for incident and detection beam or sample, and then use polar and azimuthal + angles to define the direction via spherical coordinates. + This allows consistent definition between different coordinate system. + You may refer to self defined coordinate system as well. + + + If "angle_reference_frame = beam centered", then this coordinate system is used: + McStas system (NeXus default) + (https://manual.nexusformat.org/design.html#mcstas-and-nxgeometry-system) + + i.e. the z-coordinate math:`[0,0,1]` is along the incident beam direction and + the x-coordinate math:`[1,0,0]` is in the horizontal plane. Hence, usually math:`[0,1,0]` + is vertically oriented. + + If "angle_reference_frame = sample-normal centered", then this coordinate + system is used + z - math:`[0,0,1]` along sample surface normal + x - math:`[1,0,0]` defined by sample surface projected incident beam. + y - math:`[0,1,0]` in the sample surface, orthogonal to z and x. + For this case, x may be ill defined, if the incident beam is perpendicular + to the sample surface. In this case, use the beam centered description. + + + + + + + + + + + Rotation about the y axis (polar rotation within the sample plane). + + + + + + + + + + + + + + Path to a transformation that places the sample surface + into the origin of the arpes_geometry coordinate system. + + + + + + Rotation about the z axis (azimuthal rotation within the sample plane). + + + + + + + + + + + + + + + + + + + + + Specify if there is a lateral offset on the sample surface, between the focal + points of the incident beam and the detection beam. + + + + + Optical components along the optical beam path. + + Every object which interacts or modifies optical beam properties, + may be a component, e.g. Filter, Window, Beamsplitter, Photon Source, + Detector, etc, + + + + + This is the optical element used to focus or collect light. This may + be a generic lens or microcope objectives which are used for the + Raman scattering process. + + + + + + + + + + + + + + + + Polarization filter to prepare light to be measured or to be incident + on the sample. + Generic polarization filter properties may be implemented via NXfilter_pol + at a later stage. + + + + Physical principle of the polarization filter used to create a + defined incident or scattered light state. + + + + + + + + + + + Specific name or type of the polarizer used. + + Free text, for example: Glan-Thompson, Glan-Taylor, Rochon Prism, Wollaston + Polarizer... + + + + + + + Spectral filter used to modify properties of the scattered or incident light. + + + + Type of laser-line filter used to suppress the laser, if measurements + close to the laser-line are performed. + + + + Blocks shorter wavelengths and transmits longer wavelengths. + + + Blocks longer wavelengths and transmits shorter wavelengths. + + + Blocks a narrow wavelength band while transmitting others. + + + Reflects certain wavelength ranges instead of absorbing them. + + + Reduces light intensity uniformly across all wavelengths. + + + + + + Type of laser-line filter used to suppress the laser, if measurements + close to the laser-line are performed. + + + + + + + + + + + Properties of the spectral filter such as wavelength dependent transmission + or reflectivity. + + + + Which property is used to form the spectral properties of light, + i.e. transmission or reflection properties. + + + + + + + + + + + + Allows description of beam properties via matrices, which relate ingoing with + outgoing beam properties. + + + + + Sample stage (or manipulator) for positioning of the sample. This should + only contain the spatial orientation of movement. + + + + Specify the type of the sample stage. + + + + + + + + + + + + + This allows a description of the stages relation or orientation and + position with respect to the sample or beam, if an laboratory or + an stage coordinate system is defined. + + + + + Description of relation of the beam with the sample. How does the + sample hit the beam, e.g. 'center of sample, long edge parallel + to the plane of incidence'. + This is redundant if a full orientation description is done via the + stage's "transformations" entry. + + + + + + + + + + + + + + + + + + Type of control for the sample temperature. Replace TYPE by "cryostat" or + "heater" to specify it. + + + + + + + + + + + + + + + + Hardware used for actuation, i.e. laser, gas lamp, filament, resistive + + + + + + + + + + General device information of the optical spectroscopy setup, if + suitable (e.g. for a tabletop spectrometer or other non-custom build setups). + For custom build setups, this may be limited to the construction year. + + + + + + + + + + Commercial or otherwise defined given name of the program that was + used to control any parts of the optical spectroscopy setup. + The uppercase TYPE should be replaced by a specification name, i.e. + "software_detector" or "software_stage" to specify the respective + program or software components. + + + + Either version with build number, commit hash, or description of a + (online) repository where the source code of the program and build + instructions can be found so that the program can be configured in + such a way that result files can be created ideally in a + deterministic manner. + + + + + Description of the software by persistent resource, where the program, + code, script etc. can be found. + + + + + + + Pre-calibration of an arbitrary device of the instrumental setup, which + has the name DEVICE. You can specify here how, at which time by which method + the calibration was done. As well the accuracy and a link to the calibration + dataset. + + + + Path to the device, which was calibrated. + Example: entry/instrument/DEVICE + + + + + Provide data about the determined accuracy of the device, this may + may be a single value or a dataset like wavelength error vs. wavelength etc. + + + + + Was a calibration performed? If yes, when was it done? If the + calibration time is provided, it should be specified in + calibration_time. + + + + + + + + + + + + If calibration status is 'calibration time provided', specify the + ISO8601 date when calibration was last performed before this + measurement. UTC offset should be specified. + + + + + Generic data which does not fit to the 'NX_FLOAT' fields in NXproces. + This can be for example the instrument response function. + + + + + + The overall resolution of the optical instrument. + + + + + + + + + + Minimum distinguishable wavelength separation of peaks in spectra. + + + + + + + Properties of the sample, such as sample type, layer structure, + chemical formula, atom types, its history etc. + Information about the sample stage and sample environment should be + described in ENTRY/INSTRUMENT/sample_stage. + + + + + Locally unique ID of the sample, used in the research institute or group. + + + + + State the form of the sample, examples are: + thin film, single crystal, poly crystal, amorphous, single layer, + multi layer, liquid, gas, pellet, powder. + Generic properties of liquids or gases see NXsample properties. + + + + + Free text description of the sample. + + + + + Chemical formula of the sample. Use the Hill system (explained here: + https://en.wikipedia.org/wiki/Chemical_formula#Hill_system) to write + the chemical formula. In case the sample consists of several layers, + this should be a list of the chemical formulas of the individual + layers, where the first entry is the chemical formula of the top + layer (the one on the front surface, on which the light incident). + The order must be consistent with layer_structure + + + + + List of comma-separated elements from the periodic table that are + contained in the sample. If the sample substance has multiple + components, all elements from each component must be included in + 'atom_types'. + + + + + ISO 8601 time code with local time zone offset to UTC information + when the specimen was prepared. + + Ideally, report the end of the preparation, i.e. the last known timestamp when + the measured specimen surface was actively prepared. + + + + + A set of activities that occurred to the sample prior to/during the experiment. + + + + + Sample temperature (either controlled or just measured). + + + + If no sensor was available for the determination of temperature, selected + a nominal value which represents approximately the situation of sample temperature. + + + + + + + + + + Temperature sensor measuring the sample temperature. + This should be a link to /entry/instrument/manipulator/temperature_sensor. + + + + + Device to heat the sample. + This should be a link to /entry/instrument/manipulator/sample_heater. + + + + + Device for cooling the sample (Cryostat, Airflow cooler, etc.). + This should be a link to /entry/instrument/manipulator/cryostat. + + + + + + Arbitrary sample property which may be varied during the experiment + and controlled by a device. Examples are pressure, voltage, magnetic field etc. + Similar to the temperature description of the sample. + + + + Medium, in which the sample is placed. + + + + + + + + + + + + + + Array of pairs of complex refractive indices n + ik of the medium + for every measured spectral point/wavelength/energy. + Only necessary if the measurement was performed not in air, or + something very well known, e.g. high purity water. + + + + + + + + + + (Measured) sample thickness. + + The information is recorded to qualify if the light used was likely + able to shine through the sample. + + In this case the value should be set to the actual thickness of + the specimen viewed for an illumination situation where the nominal + surface normal of the specimen is parallel to the optical axis. + + + + + If a thickness if given, please specify how this thickness was estimated or + determined. + + + + + Qualitative description of the layer structure for the sample, + starting with the top layer (i.e. the one on the front surface, on + which the light incident), e.g. native oxide/bulk substrate, or + Si/native oxide/thermal oxide/polymer/peptide. + + + + + Specify the sample orientation, how is its sample normal oriented + relative in the laboratory reference frame, incident beam reference + frame. + + + + + If the sample is grown or fixed on a substrate, specify this here by + a free text description. + + + + + + Here generic types of data may be saved. This may refer to data derived + from single or multiple raw measurements (i.e. several intensities are + evaluated for different parameters: ellipsometry -> psi and delta) - + i.e. non-raw data. + As well plottable data may be stored/linked here, which provides the most suitable + representation of the data (for the respective community). + + You may provide multiple instances of NXdata + + + + Spectrum, i.e. x-axis of the data (e.g. wavelength, energy etc.) + + + + + Spectrum, i.e. y-axis of the data (e.g. counts, intensity) + + + + + + + + Calibrated wavelength axis. + + + + + + + Parameters that are derived from the measured data. + + + + Light loss due to depolarization as a value in [0-1]. + + + + + + + + + + Jones quality factor. + + + + + + + + + + Reflectivity. + + + + + + + + + + Transmittance. + + + + + + + + + + + Commercial or otherwise defined given name of the program that was + used to generate or calculate the derived parameters. + If home written, one can provide the actual steps in the NOTE + subfield here. + + + + + + + diff --git a/applications/NXraman.nxdl.xml b/applications/NXraman.nxdl.xml new file mode 100644 index 0000000000..5bfe38e325 --- /dev/null +++ b/applications/NXraman.nxdl.xml @@ -0,0 +1,205 @@ + + + + + + + Variables used throughout the document, e.g. dimensions or parameters. + + + + Number of scattering configurations used in the measurement. + It is 1 for only parallel polarization measurement, 2 for parallel and cross + polarization measurement or larger, if i.e. the incident and scattered photon + direction is varied. + + + + + An application definition for Raman spectroscopy experiments. + + This application definition supports a wide range of Raman spectroscopy experiments. + These may be as simple as acquiring a single Raman spectrum from spontaneous Raman + scattering, or as complex as Raman imaging with a Raman spectrometer. The scope also + includes surface- and tip-enhanced Raman techniques, X-ray Raman scattering, resonant + Raman scattering, and multidimensional Raman spectra collected under varying conditions + such as temperature, pressure, or electric field. + + The application definition comprises two main components: + + 1. Structures defined in NXoptical_spectroscopy: + * Instrument configuration and data calibration + * Sensors monitoring sample or beam conditions + + 2. Structures specified and extended in NXraman: + * Description of the experiment type + * Metadata and configuration of the optical setup (e.g., source, monochromator, detector, waveplate, lens) + * Detailed description of beam properties and their interaction with the sample + * Sample-specific information + + Information on Raman spectroscopy are provided in: + + General + + * Lewis, Ian R.; Edwards, Howell G. M. + Handbook of Raman Spectroscopy + ISBN 0-8247-0557-2 + + Raman scattering selection rules + + * Dresselhaus, M. S.; Dresselhaus, G.; Jorio, A. + Group Theory - Application to the Physics ofCondensed Matter + ISBN 3540328971 + + Semiconductors + + * Manuel Cardona + Light Scattering in Solids I + eBook ISBN: 978-3-540-37568-5 + DOI: https://doi.org/10.1007/978-3-540-37568-5 + + * Manuel Cardona, Gernot Güntherodt + Light Scattering in Solids II + eBook ISBN: 978-3-540-39075-6 + DOI: https://doi.org/10.1007/3-540-11380-0 + + * See as well other Books from the "Light Scattering in Solids" series: + III: Recent Results + IV: Electronic Scattering, Spin Effects, SERS, and Morphic Effects + V: Superlattices and Other Microstructures + VI: Recent Results, Including High-Tc Superconductivity + VII: Crystal-Field and Magnetic Excitations + VIII: Fullerenes, Semiconductor Surfaces, Coherent Phonons + IX: Novel Materials and Techniques + + Glasses, Liquids, Gasses, ... + + Review articles: + Stimulated Raman scattering, Coherent anti-Stokes Raman scattering, + Surface-enhanced Raman scattering, Tip-enhanced Raman scattering + * https://doi.org/10.1186/s11671-019-3039-2 + + + + + An application definition for Raman spectroscopy. + + + + Version number to identify which definition of this application + definition was used for this entry/data. + + + + + URL where to find further material (documentation, examples) relevant + to the application definition. + + + + + + + + + + Specify the type of the optical experiment. + + You may specify fundamental characteristics or properties in the experimental sub-type. + + + + + + + + Specify the type of Raman experiment. + + + + + + + + + + + + + + + + + + Metadata of the setup, its optical elements and physical properties which + defines the Raman measurement. + + + + Scattering configuration as defined by the porto notation by three + states, which are orthogonal to each other. Example: z(xx)z for + parallel polarized backscattering configuration. + + See: + https://www.cryst.ehu.es/cgi-bin/cryst/programs/nph-doc-raman + + A(BC)D + + A = The propagation direction of the incident light (k_i) + B = The polarization direction of the incident light (E_i) + C = The polarization direction of the scattered light (E_s) + D = The propagation direction of the scattered light (k_s) + + An orthogonal base is assumed. + Linear polarized light is displayed by e.g. "x","y" or "z" + Unpolarized light is displayed by "." + For non-orthogonal vectors, use the attribute porto_notation_vectors. + + + + Scattering configuration as defined by the porto notation given by + respective vectors. + + Vectors in the porto notation are defined as for A, B, C, D above. + Linear light polarization is assumed. + + + + 3 x 4 Matrix, which lists the porto notation vectors A, B, C, D. + A has to be perpendicular to B and C perpendicular to D. + + + + + + + + + + Beam which is incident to the sample. + + + + + + diff --git a/base_classes/NXbeam_transfer_matrix_table.nxdl.xml b/base_classes/NXbeam_transfer_matrix_table.nxdl.xml new file mode 100644 index 0000000000..c094a91989 --- /dev/null +++ b/base_classes/NXbeam_transfer_matrix_table.nxdl.xml @@ -0,0 +1,117 @@ + + + + + + + Variables used throughout the document, e.g. dimensions or parameters. + + + + Length of the array associated to the data type. + + + + + Contains data structures of an experimental optical setup (i.e., multiple + transfer matrix tables). These data structures are used to relate physical + properties of two beams (NXbeam) which have one common optical component + (NXcomponent) (one specific transfer matrix). + One of these beams is an input beam and the other one is an output beam. + + The data describes the change of beam properties, e.g. the intensity of a + beam is reduced because the transmission coefficient of the beam device is + lower than 1. + + + + Select which type of data was recorded, for example aperture and + focal length. + It is possible to have multiple selections. This selection defines + how many columns (N_variables) are stored in the data array. + N in the name, is the index number in which order the given + property is listed. + + + + + + + + + + + Please list in this array the column and row names used in your actual data. + That is in the case of aperture ['diameter'] or focal length ['focal_length_value'] + and for orientation matrix ['OM1', 'OM2', 'OM3'] or for jones matrix + ['JM1','JM2'] + + + + + + + + Contains the datastructure which relates beam properties of an + input and output beam as result of the input beam interaction + with the beam device. + + Transfer matrix relationship between N input beams and M output beams. + It contains a table with the relevant matrices to be used for different + transmitted properties (such as polarization, intensity, phase). + + Data structure for all transfermatrices of a beam device in a setup. + For each combination of N input and M output beams and for L physical + concept (i.e. beam intensity), one matrix can be defined. + + In this way, the transfer matrix table has the dimension NxM. + + For each entry, in this transfer matrix, there are L formalisms. + Each formalism has the dimension math:`dim(L_i)xdim(L_i)`, + whereby math:`L_i` is the specific physical concept (Intensity, polarization, direction). + + A beamsplitter with two input laser beams can have a total of + four transfermatrices (2 Input x 2 Output). + + The dimension of the transfer matrix depends on the parameters. + Examples are: + 1x1 for intensity/power + 2x2 for jones formalism + 3x3 for direction + + + + + + + + Specific name of input beam which the transfer matrix table is related to. + + + + + Specific name of output beam which the transfer matrix table is related to. + + + + diff --git a/contributed_definitions/NXlens_opt.nxdl.xml b/base_classes/NXoptical_lens.nxdl.xml similarity index 53% rename from contributed_definitions/NXlens_opt.nxdl.xml rename to base_classes/NXoptical_lens.nxdl.xml index 4738a7b359..084e5fc4ca 100644 --- a/contributed_definitions/NXlens_opt.nxdl.xml +++ b/base_classes/NXoptical_lens.nxdl.xml @@ -2,9 +2,9 @@ - - + - Size of the wavelength array for which the refractive index of the material - is given. + Size of the wavelength array for which the refractive index of the material + is given. - Size of the wavelength array for which the refractive index of the coating - is given. + Size of the wavelength array for which the refractive index of the coating + is given. - Size of the wavelength array for which the reflectance or transmission of - the lens is given. + Size of the wavelength array for which the reflectance or transmission of + the lens is given. - Description of an optical lens. + Description of an optical lens. - Type of the lens (e.g. concave, convex etc.). + Type of the lens (e.g. concave, convex etc.). - + @@ -59,43 +57,37 @@ - - - - If you chose 'other' as type specify what it is. - - - Is it a chromatic lens? + Is it a chromatic lens? - Diameter of the lens. + Diameter of the lens. - Properties of the substrate material of the lens. If the lens has a - coating specify the coating material and its properties in 'coating'. + Properties of the substrate material of the lens. If the lens has a + coating specify the coating material and its properties in 'coating'. - Specify the substrate material of the lens. + Specify the substrate material of the lens. - Thickness of the lens substrate at the optical axis. + Thickness of the lens substrate at the optical axis. - Complex index of refraction of the lens material. Specify at given - wavelength (or energy, wavenumber etc.) values. + Complex index of refraction of the lens material. Specify at given + wavelength (or energy, wavenumber etc.) values. @@ -103,38 +95,36 @@ - - + - If the lens has a coating describe the material and its properties. - Some basic information can be found e.g. [here] - (https://www.opto-e.com/basics/reflection-transmission-and-coatings). - If the back and front side of the lens are coated with different - materials, use separate COATING(NXsample) fields to describe the coatings - on the front and back side, respectively. For example: - coating_front(NXsample) and coating_back(NXsample). + If the lens has a coating describe the material and its properties. + Some basic information can be found e.g. [here] + (https://www.opto-e.com/basics/reflection-transmission-and-coatings). + If the back and front side of the lens are coated with different + materials, use separate COATING(NXsample) fields to describe the coatings + on the front and back side, respectively. For example: + coating_front(NXsample) and coating_back(NXsample). - Specify the coating type (e.g. dielectric, anti-reflection (AR), - multilayer coating etc.). + Specify the coating type (e.g. dielectric, anti-reflection (AR), + multilayer coating etc.). - Describe the coating material (e.g. MgF2). + Describe the coating material (e.g. MgF2). - Thickness of the coating. + Thickness of the coating. - Complex index of refraction of the coating. Specify at given spectral - values (wavelength, energy, wavenumber etc.). + Complex index of refraction of the coating. Specify at given spectral + values (wavelength, energy, wavenumber etc.). @@ -144,7 +134,7 @@ the lens has different coatings on the front and back side.--> - Reflectance of the lens at given spectral values. + Reflectance of the lens at given spectral values. @@ -152,7 +142,7 @@ the lens has different coatings on the front and back side.--> - Transmission of the lens at given spectral values. + Transmission of the lens at given spectral values. @@ -160,26 +150,36 @@ the lens has different coatings on the front and back side.--> - Focal length of the lens on the front side (first value), i.e. where the - beam is incident, and on the back side (second value). + Focal length of the lens on the front side (first value), i.e. where the + beam is incident, and on the back side (second value). - + + + Curvature radius of the lens. + Instead of 'FACE' in the name of this field, the user is advised to + specify for which surface (e.g. front or back) the curvature is provided: + e.g. curvature_radius_front or curvature_radius_back. The front face is the surface on + which the light beam is incident, while the back face is the one from + which the light beam exits the lens. + + + + + Abbe number (or V-number) of the lens. + + + - Curvature radius of the lens. - Instead of 'FACE' in the name of this field, the user is advised to - specify for which surface (e.g. front or back) the curvature is provided: - e.g. curvature_front or curvature_back. The front face is the surface on - which the light beam is incident, while the back face is the one from - which the light beam exits the lens. + The numerical aperture of the lens. - + - Abbe number (or V-number) of the lens. + Magnification of the lens diff --git a/base_classes/NXoptical_window.nxdl.xml b/base_classes/NXoptical_window.nxdl.xml new file mode 100644 index 0000000000..93ed238397 --- /dev/null +++ b/base_classes/NXoptical_window.nxdl.xml @@ -0,0 +1,126 @@ + + + + + + A window of a cryostat, heater, vacuum chamber or a simple glass slide. + + This describes cryostat windows and other possible influences for ellipsometry + measurements. + + For environmental measurements, the environment (liquid, vapor + etc.) is enclosed in a cell, which has windows both in the + direction of the source (entry window) and the detector (exit + window) (looking from the sample). + + The windows also add a phase shift to the light altering the + measured signal. This shift has to be corrected based on measuring + a known sample (reference sample) or the actual sample of interest + in the environmental cell. State if a window correction has been + performed in 'window_effects_corrected'. Reference measurements should be + considered as a separate experiment (with a separate NeXus file), and + the reference data shall be :ref:`linked <Design-Links>` in + ``reference_data_link``. + + The window is considered to be a part of the sample stage but also + beam path. Hence, its position within the beam path should be + defined by the 'depends_on' field. + + + + Was a window correction performed? If so, describe the window + correction procedure in ``window_correction/procedure``. + + + + + Type of effects due to this window on the measurement. + + + + + + + + + + + Group to describe any window correction - if none performed, then omit this + + + + Describe when (before or after the main measurement + time + stamp in 'date') and how the window effects have been + corrected, i.e. either mathematically or by performing a + reference measurement. In the latter case, provide the link to + to the reference data in ``reference_data_file``. + + + + + :ref:`External link <Design-Links>` to the data field in the NeXus file which describes + the reference data if a reference measurement for window correction + was performed. + + Ideally, the reference measurement was performed on the same sample, + using the same conditions as for the actual measurement, with + and, if possible, without windows. It should have been conducted as close in time + to the actual measurement as possible. + + Ideally, the link uses the relative path with respect to the actual + NeXus file. + + + + + + The material of the window. + + + + + + + + + + + + + + + If you specified 'other' as material, describe here what it is. + + + + + Thickness of the window. + + + + + Angle of the window normal (outer) vs. the substrate normal + (similar to the angle of incidence). + + + diff --git a/base_classes/NXprogram.nxdl.xml b/base_classes/NXprogram.nxdl.xml index 9a9f301e0d..bc906b23b9 100644 --- a/base_classes/NXprogram.nxdl.xml +++ b/base_classes/NXprogram.nxdl.xml @@ -22,30 +22,25 @@ # For further information, see http://www.nexusformat.org --> - - - The symbols used in the schema to specify e.g. dimensions of arrays. - - - Base class to describe a software tool or library. + Base class to describe a software tool or library. - Given name of the program. Program can be a commercial one a script, - or a library or a library component. + Given name of the program. Program can be a commercial one a script, + or a library or a library component. - Program version plus build number, or commit hash. + Program version plus build number, or commit hash. - Description of an ideally ever persistent resource where the source code - of the program or this specific compiled version of the program can be - found so that the program yields repeatably exactly the same numerical - and categorical results. + Description of an ideally ever persistent resource where the source code + of the program or this specific compiled version of the program can be + found so that the program yields repeatably exactly the same numerical + and categorical results. diff --git a/contributed_definitions/NXwaveplate.nxdl.xml b/base_classes/NXwaveplate.nxdl.xml similarity index 51% rename from contributed_definitions/NXwaveplate.nxdl.xml rename to base_classes/NXwaveplate.nxdl.xml index b4fd298c21..2fd59f6fbd 100644 --- a/contributed_definitions/NXwaveplate.nxdl.xml +++ b/base_classes/NXwaveplate.nxdl.xml @@ -2,9 +2,9 @@ - - + - Size of the wavelength array for which the refractive index of the material - and/or coating is given. + Size of the wavelength array for which the refractive index of the material + and/or coating is given. - Number of discrete wavelengths for which the waveplate is designed. If it - operates for a range of wavelengths then N_wavelengths = 2 and the minimum - and maximum values of the range should be provided. + Number of discrete wavelengths for which the waveplate is designed. If it + operates for a range of wavelengths then N_wavelengths = 2 and the minimum + and maximum values of the range should be provided. - A waveplate or retarder. + A waveplate or retarder. - Type of waveplate (e.g. achromatic waveplate or zero-order waveplate). + Type of waveplate (e.g. achromatic or zero-order). - - - - - - - + + + + + - - - - If you selected 'other' in type describe what it is. - - - Specify the retardance of the waveplate (e.g. full-wave, half-wave - (lambda/2), quarter-wave (lambda/4) plate). + Specify the retardance of the waveplate (e.g. full-wave, half-wave + (lambda/2), quarter-wave (lambda/4)). - - - + + + - Discrete wavelengths for which the waveplate is designed. If the - waveplate operates over an entire range of wavelengths, enter the minimum - and maximum values of the wavelength range (in this case - N_wavelengths = 2). + Discrete wavelengths for which the waveplate is designed. If the + waveplate operates over an entire range of wavelengths, enter the minimum + and maximum values of the wavelength range (in this case + N_wavelengths = 2). In this case, also use type="achromatic". + + + Wavelength resolved retardance of the waveplate. + + - Diameter of the waveplate. + Diameter of the waveplate (if the waveplate is circular). - Clear aperture of the device (e.g. 90% of diameter for a disc or 90% of - length/height for square geometry). + Clear aperture of the device (e.g. 90% of diameter for a disc or 90% of + length/height for square geometry). - Describe the material of the substrate of the wave plate in - substrate/substrate_material and provide its index of refraction in - substrate/index_of_refraction_substrate, if known. + Describe the material of the substrate of the waveplate in + substrate/substrate_material and provide its index of refraction in + substrate/index_of_refraction_substrate, if known. - Specify the material of the wave plate. If the device has a - coating it should be described in coating/coating_material. + Specify the material of the waveplate. If the device has a + coating it should be described in coating/coating_material. - Thickness of the wave plate substrate. + Thickness of the waveplate substrate. - + - Complex index of refraction of the wave plate substrate. Specify at - given wavelength (or energy, wavenumber etc.) values. + Complex index of refraction of the waveplate substrate. Specify at + given wavelength (or energy, wavenumber etc.) values. @@ -125,30 +120,30 @@ - Is the wave plate coated? If yes, specify the type and material of the - coating and the wavelength range for which it is designed. If known, you - may also provide its index of refraction. + Is the waveplate coated? If yes, specify the type and material of the + coating and the wavelength range for which it is designed. If known, you + may also provide its index of refraction. - Specify the coating type (e.g. dielectric, anti-reflection (AR), - multilayer coating etc.). + Specify the coating type (e.g. dielectric, anti-reflection (AR), + multilayer coating etc.). - Specify the coating material. + Specify the coating material. - Thickness of the coating. + Thickness of the coating. - Wavelength range for which the coating is designed. Enter the minimum - and maximum values of the wavelength range. + Wavelength range for which the coating is designed. Enter the minimum + and maximum values of the wavelength range. @@ -156,8 +151,8 @@ - Complex index of refraction of the coating. Specify at given spectral - values (wavelength, energy, wavenumber etc.). + Complex index of refraction of the coating. Specify at given spectral + values (wavelength, energy, wavenumber etc.). @@ -167,7 +162,7 @@ - Average reflectance of the waveplate in percentage. + Average reflectance of the waveplate in percentage. diff --git a/contributed_definitions/NXbeam_path.nxdl.xml b/contributed_definitions/NXbeam_path.nxdl.xml deleted file mode 100644 index 670fcd7879..0000000000 --- a/contributed_definitions/NXbeam_path.nxdl.xml +++ /dev/null @@ -1,452 +0,0 @@ - - - - - - - - A beam path consisting of one or more optical elements. - - NXbeam_path is used in NXopt to describe the beam path, i.e. the arrangement - of optical elements between the excitation source and the sample, or between - the sample and the detector unit. - - To describe the order of the elements, use 'order(NXtransformations)', where - each element's position points to the preceding element via '@depends_on'. - Special case beam splitter: A beam splitter is a device which separates the - beam into two or more beams. If such a device is part of the beam path use - two or more NXbeam_paths to describe the beam paths after the beam splitter. - In this case, in the dependency chain of the new beam paths, the first - elements each point to the beam splitter, as this is the previous element. - - Describe the relevant optical elements in the beam path by using the - appropriate base classes. You may use as many elements as needed, also - several elements of the same type as long as each element has its own name. - - - - Entry point of the dependency chain defined by the NXtransformations - field, i.e. a link to the last element in the beam path. - Example: /entry/instrument/beam_path/detector. - - - - - - Specify the order of the optical elements by defining a dependency chain. - For each element, a '@depends_on' attribute should be used to state the - position of the element in the beam path by pointing to the previous - element. For the very first element, use the string "." instead. - - - - For each element in the beam path, one such field must exist with a - '@depends_on' attribute defined to specify its position in the beam - path. Note that also 'NXopt/ENTRY/INSTRUMENT/sample_stage' and windows - ('NXopt/ENTRY/INSTRUMENT/sample_stage/entry_window' and - 'NXopt/ENTRY/INSTRUMENT/sample_stage/exit_window') may be added to the - dependency chain, i.e. may have an entry in this class even if they are - not described in the beam path. - ELEMENT is a place holder for the name of an optical beam path element. - Note that the name of this field must be exactly the same as the - element's field name. - - - - Add a link to the previous beam path element. - - - - - - - Excitation source. One or more may be needed (e.g. two for a pump-probe - setup with one pump and one probe beam). - Depending on the source type, different properties are relevant, which - are provided through the respective base class (e.g. use NXopt_source for - lamps or lasers, NXchem_source for chemical reaction etc.). - Some base classes are incomplete (NXchem_source, NXbio_source); the - expertise of the respective communities is needed. - - - - Use this field to point to the previous optical element. - - - - - Type of excitation source. - - - - - - - - - - - - - - - - - - - - - - - Lifespan of the excitation (typically provided in hours). - - - - - How many hours has the lamp been used? - - - - - Wavelengths or energy vector of the excitation source. This can be a - single value or a spectrum, depending on the type of experiment. - - - - Unit of wavelength or energy. - - - - - - - Two- or three-dimensional beam profile. - - - - - - - - - Power of one light pulse if the source is a pulsed source. - - - - - Is the excitation source continuous wave (CW)? - - - - - Power of CW beam. - - - - - FWHM bandwidth of the excitation source. - - - - - Coherence length. - - - - - Divergence of the excitation beam. - - - - - - Use this field to describe a simple pinhole (round geometry). Define its - dimension using 'diameter'. For more complex geometries, 'NXaperture' - should be used. - - - - - Use this field to describe a simple slit (rectangular geometry). Define - its dimensions using 'x_gap' and 'y_gap'. For more complex geometries, - 'NXaperture' should be used. - - - - - Use this field to describe an aperture. To specify a window, use the - field 'window_NUMBER(NXaperture)'. - - - - - A window, e.g. an entry or exit window of a cryostat. - - - - Use this field to point to the previous optical element. - - - - - The material of the window. - - - - - - - - - - - - - - - If you specified 'other' as material, decsribe here what it is. - - - - - Thickness of the window - - - - - Angle of the window normal (outer) vs. the substrate normal - (similar to the angle of incidence). - - - - - If reference data were measured add a link to the NeXus file where they - are described. - - - - - - - - A device that reduces the intensity of a beam by attenuation. - - - - The transmitted intensity divided by the incident intensity. - - - - - Attenuation of the attenuator in dB. - - - - Unit of the measured data is not covered by NXDL units state - here which unit was used. - - - - - - Input and output aperture of the attenuator. - - - - - Geometry (shape, size etc.) of the attenuator. - - - - - - A diffraction grating. Define relevant parameters in the corresponding - fields, e.g. order of diffration (diffraction_order) or angular - dispersion (angular_dispersion). - - - - Define the type of the grating. - - - - - Dispersion of the grating in nm/mm (or e.g. nm/mrad). - - - - - Number of grooves per mm. - - - - - Blaze wavelength of the grating. - - - - - Efficiency curve versus wavelength or energy. - - - - - - - - Spectral values, e.g. wavelength or energy. Vector of length - N_spectrum. - - - - Unit of wavelength array (e.g. nanometer or Angstrom) - - - - - - - A device blocking the beam in a temporal periodic pattern, e.g. a optical - chopper wheel. Specify the frequency range using 'min_frequency' and - 'max_frequency'. - - - - Minimum frequency in Hertz. - - - - - Maximum frequency in Hertz. - - - - - Frequency resolution in Hertz. - - - - - - A monochromator or spectrometer. - - - - Spectral values of the monochromator, e.g. wavelength or energy values - used for the measurement. - - - - Unit of wavelength array (e.g. nanometer or Angstrom) - - - - - - Diffraction grating. If two or more gratings were used, define the - angular dispersion and the wavelength range (min/max wavelength) for - each grating and make sure that the wavelength ranges do not overlap. - The dispersion should be defined for the entire wavelength range of the - experiment. - - - - Dispersion of the grating in nm/mm. - - - - - Minimum wavelength of the grating. - - - - - Maximum wavelength of the grating. - - - - - - Spectral resolution of the instrument. - - - - - Define the width of the monochromator slit in the subfield x_gap. - - - - Was the slit width fixed? - - - - - If slit width was not fixed, define the maximum slit width. - - - - - - - - - - - - - - diff --git a/contributed_definitions/NXellipsometry.nxdl.xml b/contributed_definitions/NXellipsometry.nxdl.xml deleted file mode 100644 index b082b310c9..0000000000 --- a/contributed_definitions/NXellipsometry.nxdl.xml +++ /dev/null @@ -1,357 +0,0 @@ - - - - - - - - - - - Variables used throughout the document, e.g. dimensions or parameters. - - - - Length of the spectrum array (e.g. wavelength or energy) of the measured - data. - - - - - Number of sensors used to measure parameters that influence the sample, - such as temperature or pressure. - - - - - Number of measurements (1st dimension of measured_data array). This is - equal to the number of parameters scanned. For example, if the experiment - was performed at three different temperatures and two different pressures - N_measurements = 2*3 = 6. - - - - - Number of detection angles of the beam reflected or scattered off the - sample. - - - - - Number of angles of incidence of the incident beam. - - - - - Number of observables that are saved in a measurement. e.g. one for - intensity, reflectivity or transmittance, two for Psi and Delta etc. This - is equal to the second dimension of the data array 'measured_data' and the - number of column names. - - - - - Number of time points measured, the length of NXsample/time_points - - - - - Ellipsometry, complex systems, up to variable angle spectroscopy. - - Information on ellipsometry is provided, e.g. in: - - * H. Fujiwara, Spectroscopic ellipsometry: principles and applications, - John Wiley & Sons, 2007. - * R. M. A. Azzam and N. M. Bashara, Ellipsometry and Polarized Light, - North-Holland Publishing Company, 1977. - * H. G. Tompkins and E. A. Irene, Handbook of Ellipsometry, - William Andrew, 2005. - - Open access sources: - - * https://www.angstromadvanced.com/resource.asp - * https://pypolar.readthedocs.io/en/latest/ - - Review articles: - - * T. E. Jenkins, "Multiple-angle-of-incidence ellipsometry", - J. Phys. D: Appl. Phys. 32, R45 (1999), - https://doi.org/10.1088/0022-3727/32/9/201 - * D. E. Aspnes, "Spectroscopic ellipsometry - Past, present, and future", - Thin Solid Films 571, 334-344 (2014), - https://doi.org/10.1016/j.tsf.2014.03.056 - * R. M. A. Azzam, "Mueller-matrix ellipsometry: a review", - Proc. SPIE 3121, Polarization: Measurement, Analysis, and Remote Sensing, - (3 October 1997), - https://doi.org/10.1117/12.283870 - * E. A. Irene, "Applications of spectroscopic ellipsometry to microelectronics", - Thin Solid Films 233, 96-111 (1993), - https://doi.org/10.1016/0040-6090(93)90069-2 - * S. Zollner et al., "Spectroscopic ellipsometry from 10 to 700 K", - Adv. Opt. Techn., (2022), - https://doi.org/10.1515/aot-2022-0016 - - - - This is the application definition describing ellipsometry experiments. - - Such experiments may be as simple as identifying how a reflected - beam of light with a single wavelength changes its polarization state, - to a variable angle spectroscopic ellipsometry experiment. - - The application definition defines: - - * elements of the experimental instrument - * calibration information if available - * parameters used to tune the state of the sample - * sample description - - - - An application definition for ellipsometry. - - - - Version number to identify which definition of this application - definition was used for this entry/data. - - - - - URL where to find further material (documentation, examples) relevant - to the application definition. - - - - - - - - - An optional free-text description of the experiment. - - However, details of the experiment should be defined in the specific - fields of this application definition rather than in this experiment - description. - - - - - Specify the type of ellipsometry. - - - - - - - - - - - - - - Properties of the ellipsometry equipment. - - - - Name of the company which build the instrument. - - - - - ISO8601 date when the instrument was constructed. - UTC offset should be specified. - - - - - - Commercial or otherwise defined given name of the program that was - used to generate the result file(s) with measured data and metadata. - This program converts the measured signals to ellipsometry data. If - home written, one can provide the actual steps in the NOTE subfield - here. - - - - - - What type of ellipsometry was used? See Fujiwara Table 4.2. - - - - - - - - - - - - - - - - - - - Define which element rotates, e.g. polarizer or analyzer. - - - - - - - - - - - - Specify the used light source. Multiple selection possible. - - - - - - - - - - - - - If focussing probes (lenses) were used, please state if the data - were corrected for the window effects. - - - - Were the recorded data corrected by the window effects of the - focussing probes (lenses)? - - - - - Specify the angular spread caused by the focussing probes. - - - - - - Properties of the detector used. Integration time is the count time - field, or the real time field. See their definition. - - - - - Properties of the rotating element defined in - 'instrument/rotating_element_type'. - - - - Define how many revolutions of the rotating element were averaged - for each measurement. If the number of revolutions was fixed to a - certain value use the field 'fixed_revolutions' instead. - - - - - Define how many revolutions of the rotating element were taken - into account for each measurement (if number of revolutions was - fixed to a certain value, i.e. not averaged). - - - - - Specify the maximum value of revolutions of the rotating element - for each measurement. - - - - - - The spectroscope element of the ellipsometer before the detector, - but often integrated to form one closed unit. Information on the - dispersive element can be specified in the subfield GRATING. Note - that different gratings might be used for different wavelength - ranges. The dispersion of the grating for each wavelength range can - be stored in grating_dispersion. - - - - - - - - Was the backside of the sample roughened? Relevant for infrared - ellipsometry. - - - - - - - Select which type of data was recorded, for example Psi and Delta - (see: https://en.wikipedia.org/wiki/Ellipsometry#Data_acquisition). - It is possible to have multiple selections. Data types may also be - converted to each other, e.g. a Mueller matrix contains N,C,S data - as well. This selection defines how many columns (N_observables) are - stored in the data array. - - - - - - - - - - - - - - diff --git a/contributed_definitions/NXopt.nxdl.xml b/contributed_definitions/NXopt.nxdl.xml deleted file mode 100644 index be636590ff..0000000000 --- a/contributed_definitions/NXopt.nxdl.xml +++ /dev/null @@ -1,868 +0,0 @@ - - - - - - - - - Variables used throughout the document, e.g. dimensions or parameters. - - - - Length of the spectrum array (e.g. wavelength or energy) of the measured - data. - - - - - Number of sensors used to measure parameters that influence the sample, - such as temperature or pressure. - - - - - Number of measurements (1st dimension of measured_data array). This is - equal to the number of parameters scanned. For example, if the experiment - was performed at three different temperatures and two different pressures - N_measurements = 2*3 = 6. - - - - - Number of detection angles of the beam reflected or scattered off the - sample. - - - - - Number of angles of incidence of the incident beam. - - - - - Number of observables that are saved in a measurement. e.g. one for - intensity, reflectivity or transmittance, two for Psi and Delta etc. This - is equal to the second dimension of the data array 'measured_data' and the - number of column names. - - - - - An application definition for optical spectroscopy experiments. - - - - An application definition template for optical spectroscopy experiments. - - A general optical experiment consists of a light or excitation source, a - beam path, a sample + its stage + its environment, and a detection unit. - Examples are reflection or transmission measurements, photoluminescence, - Raman spectroscopy, ellipsometry etc. - - - - An application definition describing a general optical experiment. - - - - Version number to identify which definition of this application - definition was used for this entry/data. - - - - - URL where to find further material (documentation, examples) relevant - to the application definition. - - - - - - - - - A (globally persistent) unique identifier of the experiment. - (i) The identifier is usually defined by the facility or principle - investigator. - (ii) The identifier enables to link experiments to e.g. proposals. - - - - - An optional free-text description of the experiment. - - However, details of the experiment should be defined in the specific - fields of this application definition rather than in this experiment - description. - - - - - Specify the type of the optical experiment. - - - - - Start time of the experiment. UTC offset should be specified. - - - - - Contact information of at least the user of the instrument or the - investigator who performed this experiment. - Adding multiple users, if relevant, is recommended. - - - - Name of the user. - - - - - Name of the affiliation of the user at the point in time when the - experiment was performed. - - - - - Street address of the user's affiliation. - - - - - Email address of the user. - - - - - Author ID defined by https://orcid.org/. - - - - - Telephone number of the user. - - - - - - Properties of the experimental setup. This includes general information - about the instrument (such as model, company etc.), information about - the calibration of the instrument, elements of the beam path including - the excitation or light source and the detector unit, the sample stage - (plus the sample environment, which also includes sensors used to - monitor external conditions) and elements of the beam path. - - Meta data describing the sample should be specified in ENTRY/SAMPLE - outside of ENTRY/INSTRUMENT. - - - - The name of the instrument. - - - - The used version of the hardware if available. If not a commercial - instrument use date of completion of the hardware. - - - - - - Name of the company which build the instrument. - - - - - ISO8601 date when the instrument was constructed. - UTC offset should be specified. - - - - - - Commercial or otherwise defined given name of the program that was - used to measure the data, i.e. the software used to start and - record the measured data and/or metadata. - If home written, one can provide the actual steps in the NOTE - subfield here. - - - - - Either version with build number, commit hash, or description of a - (online) repository where the source code of the program and build - instructions can be found so that the program can be configured in - such a way that result files can be created ideally in a - deterministic manner. - - - - - Website of the software. - - - - - - Commercial or otherwise defined name of the firmware that was used - for the measurement - if available. - - - - Version and build number or commit hash of the software source code. - - - - - Website of the software. - - - - - - Was a calibration performed? If yes, when was it done? If the - calibration time is provided, it should be specified in - ENTRY/INSTRUMENT/calibration/calibration_time. - - - - - - - - - - - - The calibration data and metadata should be described in a separate NeXus file - with the link provided in 'calibration_link'. - - - - If calibtration status is 'calibration time provided', specify the - ISO8601 date when calibration was last performed before this - measurement. UTC offset should be specified. - - - - - Link to the NeXus file containing the calibration data and metadata. - - - - - - Describes an arrangement of optical or other elements, e.g. the beam - path between the light source and the sample, or between the sample - and the detector unit (including the sources and detectors - themselves). - - If a beam splitter (i.e. a device that splits the incoming beam into - two or more beams) is part of the beam path, two or more NXbeam_path - fields may be needed to fully describe the beam paths and the correct - sequence of the beam path elements. - Use as many beam paths as needed to describe the setup. - - - - - Angle(s) of the incident beam vs. the normal of the bottom reflective - (substrate) surface in the sample. - - - - - - - - - Detection angle(s) of the beam reflected or scattered off the sample - vs. the normal of the bottom reflective (substrate) surface in the - sample if not equal to the angle(s) of incidence. - - - - - - - - Sample stage, holding the sample at a specific position in X,Y,Z - (Cartesian) coordinate system and at an orientation defined - by three Euler angles (alpha, beta, gamma). - - - - Specify the type of the sample stage. - - - - - - - - - - - - If there is no motorized stage, we should at least qualify where - the beam hits the sample and in what direction the sample stands - in a free-text description, e.g. 'center of sample, long edge - parallel to the plane of incidence'. - - - - - Specify external parameters that have influenced the sample, such - as the surrounding medium, and varied parameters e.g. temperature, - pressure, pH value, optical excitation etc. - - - - Describe what was the medium above or around the sample. The - common model is built up from the substrate to the medium on the - other side. Both boundaries are assumed infinite in the model. - Here, define the name of the medium (e.g. water, air, UHV, etc.). - - - - - Array of pairs of complex refractive indices n + ik of the medium - for every measured spectral point/wavelength/energy. - Only necessary if the measurement was performed not in air, or - something very well known, e.g. high purity water. - - - - - - - - - A sensor used to monitor an external condition influencing the - sample, such as temperature or pressure. It is suggested to - replace 'PARAMETER' by the type of the varied parameter defined - in 'parameter_type'. - The measured parameter values should be provided in 'values'. - For each parameter, a 'PARAMETER(NXsensor)' field needs to exist. - In other words, there are N_sensors 'PARAMETER(NXsensor)' fields. - - - - Indicates which parameter was changed. Its definition must exist - below. The specified variable has to be N_measurements long, - providing the parameters for each data set. If you vary more than - one parameter simultaneously. - If the measured parameter is not contained in the list `other` - should be specified and the `parameter_type_name` should be provided. - - - - - - - - - - - - - - - - - - - - - - - - - If the parameter_type is `other` a name should be specified here. - - - - - Number of different parameter values at which the measurement - was performed. For example, if the measurement was performed at - temperatures of 4, 77 and 300 K, then number_of_parameters = 3. - - - - - Vector containing the values of the varied parameter. Its - length is equal to N_measurements. The order of the values - should be as follows: - - * Order the sensors according to number_of_parameters starting - with the lowest number. If number_of_parameters is equal for - two sensors order them alphabetically (sensor/parameter name). - * The first sensor's j parameters should be ordered in the - following way. The first N_measurements/number_of_parameters - entries of the vector contain the first parameter (a1), the - second N_measurements/number_of_parameters contain the second - parameter (a2) etc., so the vector looks like: - [ - a1,a1,...,a1, - a2,a2,...,a2, - ... - aj,aj,...aj - ] - * The kth sensor's m parameters should be ordered in the - following way: - [ - p1,...p1,p2,...,p2,...pm,...,pm, - p1,...p1,p2,...,p2,...pm,...,pm, - ... - p1,...p1,p2,...,p2,...pm,...,pm - ] - * The last sensor's n parameters should be ordered in the - following way: - [ - z1,z2,...,zn, - z1,z2,...,zn, - ... - z1,z2,...,zn] - - For example, if the experiment was performed at three different - temperatures (T1, T2, T3), two different pressures (p1, p2) and - two different angles of incidence (a1, a2), then - N_measurements = 12 and the order of the values for the various - parameter vectors is: - - * angle_of_incidence: [a1,a1,a1,a1,a1,a1,a2,a2,a2,a2,a2,a2] - * pressure: [p1,p1,p1,p2,p2,p2,p1,p1,p1,p2,p2,p2] - * temperature: [T1,T2,T3,T1,T2,T3,T1,T2,T3,T1,T2,T3] - - - - - - - - - - For environmental measurements, the environment (liquid, vapor - etc.) is enclosed in a cell, which has windows both in the - direction of the source (entry window) and the detector (exit - window) (looking from the sample). In case that the entry and exit - windows are not the same type and do not have the same properties, - use a second 'WINDOW(MXaperture)' field. - - The windows also add a phase shift to the light altering the - measured signal. This shift has to be corrected based on measuring - a known sample (reference sample) or the actual sample of interest - in the environmental cell. State if a window correction has been - performed in 'window_effects_corrected'. Reference data should be - considered as a separate experiment, and a link to the NeXus file - should be added in reference_data_link in measured_data. - - The window is considered to be a part of the sample stage but also - beam path. Hence, its position within the beam path should be - defined by the 'depends_on' field. - - - - Specify the position of the window in the beam path by pointing - to the preceding element in the sequence of beam path elements. - - - - - Was a window correction performed? If 'True' describe the window - correction procedure in 'window_correction/procedure'. - - - - - Was a window correction performed? If 'True' describe the - window correction procedure in '' - - - - Describe when (before or after the main measurement + time - stamp in 'date') and how the window effects have been - corrected, i.e. either mathematically or by performing a - reference measurement. In the latter case, provide the link to - to the reference data in 'reference_data_link'. - - - - - Link to the NeXus file which describes the reference data if a - reference measurement for window correction was performed. - Ideally, the reference measurement was performed on a reference - sample and on the same sample, and using the same conditions as - for the actual measurement with and without windows. It should - have been conducted as close in time to the actual measurement - as possible. - - - - - - The material of the window. - - - - - - - - - - - - - - - If you specified 'other' as material, decsribe here what it is. - - - - - Thickness of the window. - - - - - Angle of the window normal (outer) vs. the substrate normal - (similar to the angle of incidence). - - - - - - - - Properties of the sample, such as sample type, layer structure, - chemical formula, atom types, its history etc. - Information about the sample stage and sample environment should be - described in ENTRY/INSTRUMENT/sample_stage. - - - - Descriptive name of the sample - - - - - Specify the type of sample, e.g. thin film, single crystal etc. - - - - - - - - - - - - Qualitative description of the layer structure for the sample, - starting with the top layer (i.e. the one on the front surface, on - which the light incident), e.g. native oxide/bulk substrate, or - Si/native oxide/thermal oxide/polymer/peptide. - - - - - Chemical formula of the sample. Use the Hill system (explained here: - https://en.wikipedia.org/wiki/Chemical_formula#Hill_system) to write - the chemical formula. In case the sample consists of several layers, - this should be a list of the chemical formulas of the individual - layers, where the first entry is the chemical formula of the top - layer (the one on the front surface, on which the light incident). - The order must be consistent with layer_structure - - - - - List of comma-separated elements from the periodic table that are - contained in the sample. If the sample substance has multiple - components, all elements from each component must be included in - 'atom_types'. - - - - - Ideally, a reference to the location or a unique (globally - persistent) identifier (e.g.) of e.g. another file which gives - as many as possible details of the material, its microstructure, - and its thermo-chemo-mechanical processing/preparation history. - In the case that such a detailed history of the sample is not - available, use this field as a free-text description to specify - details of the sample and its preparation. - - - - - ISO8601 date with time zone (UTC offset) specified. - - - - - Description of the substrate. - - - - - Specify the sample orientation. - - - - - - Measured data, data errors, and varied parameters. If reference data - were measured they should be considered a separate experiment and a - link to its NeXus file should be added in reference_data_link. - - - - An identifier to correlate data to the experimental conditions, - if several were used in this measurement; typically an index of 0-N. - - - - - Select which type of data was recorded, for example intensity, - reflectivity, transmittance, Psi and Delta etc. - It is possible to have multiple selections. The enumeration list - depends on the type of experiment and may differ for different - application definitions. - - - - - - - - - - - - - - - - - Spectral values (e.g. wavelength or energy) used for the measurement. - An array of 1 or more elements. Length defines N_spectrum. Replace - 'SPECTRUM' by the physical quantity that is used, e.g. wavelength. - - - - - - - If applicable, change 'unit: NX_ANY' to the appropriate NXDL unit. - If the unit of the measured data is not covered by NXDL units state - here which unit was used. - - - - - - Resulting data from the measurement, described by 'data_type'. - - The first dimension is defined by the number of measurements taken, - (N_measurements). The instructions on how to order the values - contained in the parameter vectors given in the doc string of - INSTRUMENT/sample_stage/environment_conditions/PARAMETER/values, - define the N_measurements parameter sets. For example, if the - experiment was performed at three different temperatures - (T1, T2, T3), two different pressures (p1, p2) and two different - angles of incidence (a1, a2), the first measurement was taken at the - parameters {a1,p1,T1}, the second measurement at {a1,p1,T2} etc. - - - - - - - - - If applicable, change 'unit: NX_ANY' to the appropriate NXDL unit. - If the unit of the measured data is not covered by NXDL units state - here which unit was used. - - - - - - Specified uncertainties (errors) of the data described by 'data_type' - and provided in 'measured_data'. - - - - - - - - - If applicable, change 'unit: NX_ANY' to the appropriate NXDL unit. - If the unit of the measured data is not covered by NXDL units state - here which unit was used. - - - - - - List of links to the values of the sensors. Add a link for each - varied parameter (i.e. for each sensor). - - - - - - - - Link to the NeXus file which describes the reference data if a - reference measurement was performed. Ideally, the reference - measurement was performed using the same conditions as the actual - measurement and should be as close in time to the actual measurement - as possible. - - - - - - Commercial or otherwise defined given name of the program that was - used to generate the result file(s) with measured data and/or - metadata (in most cases, this is the same as INSTRUMENT/software). - If home written, one can provide the actual steps in the NOTE - subfield here. - - - - - Either version with build number, commit hash, or description of a - (online) repository where the source code of the program and build - instructions can be found so that the program can be configured in - such a way that result files can be created ideally in a - deterministic manner. - - - - - Website of the software. - - - - - - A plot of the multi-dimensional data array provided in - ENTRY/data/measured_data. - - - - Spectrum, i.e. x-axis of the data (e.g. wavelength, energy etc.) - - - - - - - Parameters that are derived from the measured data. - - - - Light loss due to depolarization as a value in [0-1]. - - - - - - - - - - Jones quality factor. - - - - - - - - - - Reflectivity. - - - - - - - - - - Transmittance. - - - - - - - - - - - Commercial or otherwise defined given name of the program that was - used to generate or calculate the derived parameters. - If home written, one can provide the actual steps in the NOTE - subfield here. - - - - - Either version with build number, commit hash, or description of a - (online) repository where the source code of the program and build - instructions can be found so that the program can be configured in - such a way that result files can be created ideally in a - deterministic manner. - - - - - - - A default view of the data provided in ENTRY/data_collection/measured_data. This - should be the part of the data set which provides the most suitable - representation of the data. - - - - Spectrum, i.e. x-axis of the data (e.g. wavelength, energy etc.) - - - - - diff --git a/dev_tools/tests/test_nxdl_utils.py b/dev_tools/tests/test_nxdl_utils.py index ef1a66f341..532bffd51d 100644 --- a/dev_tools/tests/test_nxdl_utils.py +++ b/dev_tools/tests/test_nxdl_utils.py @@ -47,9 +47,8 @@ def test_get_node_at_nxdl_path(): ) assert node.attrib["name"] == "long_name" - nxdl_file_path = ( - local_dir.parent.parent / "contributed_definitions" / "NXiv_temp.nxdl.xml" - ) + nxdl_file_path = local_dir / "../../contributed_definitions/NXiv_temp.nxdl.xml" + elem = ET.parse(nxdl_file_path).getroot() node = nexus.get_node_at_nxdl_path( "/ENTRY/INSTRUMENT/ENVIRONMENT/voltage_controller", elem=elem @@ -69,7 +68,7 @@ def test_get_inherited_nodes(): elem = ET.parse(nxdl_file_path).getroot() (_, _, elist) = nexus.get_inherited_nodes(nxdl_path="/ENTRY/NXODD_name", elem=elem) - assert len(elist) == 3 + assert len(elist) == 5 nxdl_file_path = ( local_dir.parent.parent / "contributed_definitions" / "NXiv_temp.nxdl.xml" @@ -79,44 +78,75 @@ def test_get_inherited_nodes(): (_, _, elist) = nexus.get_inherited_nodes( nxdl_path="/ENTRY/INSTRUMENT/ENVIRONMENT", elem=elem ) - assert len(elist) == 3 + assert len(elist) == 4 (_, _, elist) = nexus.get_inherited_nodes( nxdl_path="/ENTRY/INSTRUMENT/ENVIRONMENT/voltage_controller", elem=elem ) - assert len(elist) == 5 + assert len(elist) == 6 (_, _, elist) = nexus.get_inherited_nodes( nxdl_path="/ENTRY/INSTRUMENT/ENVIRONMENT/voltage_controller", nx_name="NXiv_temp", ) - assert len(elist) == 5 + assert len(elist) == 6 @pytest.mark.parametrize( - "hdf_name,concept_name,should_fit", + "hdf_name,concept_name, name_type, should_fit", [ - ("source_pump", "sourceType", False), - ("source_pump", "sourceTYPE", True), - ("source pump", "sourceTYPE", False), - ("source", "sourceTYPE", False), - ("source123", "SOURCE", True), - ("1source", "SOURCE", True), - ("_source", "SOURCE", True), - ("same_name", "same_name", True), - ("angular_energy_resolution", "angularNresolution", True), - ("angularresolution", "angularNresolution", False), - ("Name with some whitespaces in it", "ENTRY", False), - ("simple_name", "TEST", True), - (".test", "TEST", False), + ("same_name", "same_name", "specified", True), + ("same_name", "same_name", "any", True), + ("same_name", "same_name", "partial", True), + ("source_pump", "source", "specified", False), + ("source_pump", "source", "any", True), + ("source_pump", "source", "partial", False), + ("source_pump", "sourceType", "specified", False), + ("source_pump", "sourceType", "any", True), + ("source_pump", "sourceType", "partial", False), + ("source_pump", "sourceTYPE", "specified", False), + ("source_pump", "sourceTYPE", "any", True), + ("source_pump", "sourceTYPE", "partial", True), + ("source pump", "sourceTYPE", "specified", False), + ("source pump", "sourceTYPE", "any", False), + ("source pump", "sourceTYPE", "partial", False), + ("Name with some whitespaces in it", "ENTRY", "specified", False), + ("Name with some whitespaces in it", "ENTRY", "any", False), + ("Name with some whitespaces in it", "ENTRY", "partial", False), + ("source", "sourceTYPE", "specified", False), + ("source", "sourceTYPE", "any", True), + ("source", "sourceTYPE", "partial", True), + ("SOURCE", "SOURCE", "specified", True), + ("SOURCE", "SOURCE", "any", True), + ("SOURCE", "SOURCE", "partial", True), + ("source123", "SOURCE", "specified", False), + ("source123", "SOURCE", "any", True), + ("source123", "SOURCE", "partial", True), + ("1source", "SOURCE", "specified", False), + ("1source", "SOURCE", "any", True), + ("1source", "SOURCE", "partial", True), + ("_source", "SOURCE", "specified", False), + ("_source", "SOURCE", "any", True), + ("_source", "SOURCE", "partial", True), + ("angular_energy_resolution", "angularNresolution", "specified", False), + ("angular_energy_resolution", "angularNresolution", "any", True), + ("angular_energy_resolution", "angularNresolution", "partial", True), + (".test", "TEST", "specified", False), + (".test", "TEST", "any", False), + (".test", "TEST", "partial", False), ], ) -def test_namefitting(hdf_name, concept_name, should_fit): +def test_namefitting(hdf_name, concept_name, name_type, should_fit): """Test namefitting of nexus concept names""" + name_any = name_type == "any" + name_partial = name_type == "partial" + if should_fit: - assert nexus.get_nx_namefit(hdf_name, concept_name, name_partial=True) > -1 + assert nexus.get_nx_namefit(hdf_name, concept_name, name_any, name_partial) > -1 else: - assert nexus.get_nx_namefit(hdf_name, concept_name, name_partial=True) == -1 + assert ( + nexus.get_nx_namefit(hdf_name, concept_name, name_any, name_partial) == -1 + ) @pytest.mark.parametrize( diff --git a/dev_tools/utils/nxdl_utils.py b/dev_tools/utils/nxdl_utils.py index c74b02e74e..f0a4f4bfbd 100644 --- a/dev_tools/utils/nxdl_utils.py +++ b/dev_tools/utils/nxdl_utils.py @@ -197,12 +197,12 @@ def get_nx_namefit( int: -1 if no match is found or the number of matching characters (case insensitive). """ - path_regex = r"([a-zA-Z0-9_.]+)" + path_regex = r"([a-zA-Z0-9_.]*)" if name == hdf_name: return len(name) * 2 - if hdf_name.startswith(".") or hdf_name.endswith("."): - # Don't match anything with a dot at the beginning or end + + if " " in hdf_name or hdf_name.startswith(".") or hdf_name.endswith("."): return -1 uppercase_parts = re.findall(r"[A-Z]+(?:_[A-Z]+)*", name) @@ -378,7 +378,8 @@ def belongs_to(nxdl_elem, child, name, class_type=None, hdf_name=None): def get_local_name_from_xml(element): """Helper function to extract the element tag without the namespace.""" - return remove_namespace_from_tag(element.tag) + type = remove_namespace_from_tag(element.tag) + return "field" if type == "link" else type def get_own_nxdl_child_reserved_elements(child, name, nxdl_elem): @@ -639,7 +640,7 @@ def other_attrs( def get_node_concept_path(elem): """get the short version of nxdlbase:nxdlpath""" - return f'{elem.get("nxdlbase").split("/")[-1]}:{elem.get("nxdlpath")}' + return f"{elem.get('nxdlbase').split('/')[-1]}:{elem.get('nxdlpath')}" def get_doc(node, ntype, nxhtml, nxpath): @@ -752,7 +753,7 @@ def add_base_classes(elist, nx_name=None, elem: ET.Element = None): elem.set("nxdlpath", "") elist.append(elem) # add inherited base class - if "extends" in elem.attrib and elem.attrib["extends"] != "NXobject": + if "extends" in elem.attrib: add_base_classes(elist, elem.attrib["extends"]) else: add_base_classes(elist) @@ -857,13 +858,12 @@ def get_best_child(nxdl_elem, hdf_node, hdf_name, hdf_class_name, nexus_type): ): name_any = is_name_type(child, "any") name_partial = is_name_type(child, "partial") - if name_partial or name_any: - fit = get_nx_namefit( - hdf_name, - get_node_name(child), - name_any=name_any, - name_partial=name_partial, - ) + fit = get_nx_namefit( + hdf_name, + get_node_name(child), + name_any=name_any, + name_partial=name_partial, + ) if fit > bestfit: bestfit = fit bestchild = set_nxdlpath(child, nxdl_elem) diff --git a/manual/source/classes/contributed_definitions/ellipsometry-structure.rst b/manual/source/classes/contributed_definitions/ellipsometry-structure.rst index 1f3ddbfafc..134e245698 100644 --- a/manual/source/classes/contributed_definitions/ellipsometry-structure.rst +++ b/manual/source/classes/contributed_definitions/ellipsometry-structure.rst @@ -24,7 +24,7 @@ In the application definition we provide a minimum set of description elements a Application Definitions ----------------------- - :ref:`NXopt`: + :ref:`NXoptical_spectroscopy`: A generic application definition for optical spectroscopy measurements, including complex systems up to variable angle spectroscopic ellipsometry. :ref:`NXellipsometry`: @@ -35,14 +35,7 @@ Base Classes ------------ This is the set of base classes for describing an optical experiment. - - :ref:`NXbeam_path` - A beam path consisting of one or more optical elements. - - NXbeam_path is used in NXopt to describe the beam path, i.e. the arrangement - of optical elements between the excitation source and the sample, or between - the sample and the detector unit. - + :ref:`NXbeam_splitter` A beam splitter, i.e. a device splitting the light into two or more beams. @@ -53,7 +46,7 @@ This is the set of base classes for describing an optical experiment. :ref:`NXfiber` An optical fiber, e.g. glass fiber. - :ref:`NXlens_opt` + :ref:`NXoptical_lens` Description of an optical lens. :ref:`NXpolarizer_opt`