diff --git a/contributed_definitions/NXbeam_transfer_matrix_table.nxdl.xml b/contributed_definitions/NXbeam_transfer_matrix_table.nxdl.xml index 614fb183b0..74bf4c2aa0 100644 --- a/contributed_definitions/NXbeam_transfer_matrix_table.nxdl.xml +++ b/contributed_definitions/NXbeam_transfer_matrix_table.nxdl.xml @@ -70,7 +70,7 @@ - + Contains the datastructure which relates beam properties of an input and output beam as result of the input beam interaction diff --git a/contributed_definitions/NXellipsometry.nxdl.xml b/contributed_definitions/NXellipsometry.nxdl.xml index 66734f248a..1b0436e11f 100644 --- a/contributed_definitions/NXellipsometry.nxdl.xml +++ b/contributed_definitions/NXellipsometry.nxdl.xml @@ -147,21 +147,15 @@ This explicitly refers to a wish to add: "exposure time, number of scans"--> Specify the type of ellipsometry. - + - - - - If the ellipsometry_experiment_type is `other`, a name should be specified here. - - Properties of the ellipsometry equipment. @@ -170,7 +164,7 @@ This explicitly refers to a wish to add: "exposure time, number of scans"--> What type of ellipsometry was used? See Fujiwara Table 4.2. - + @@ -183,15 +177,8 @@ This explicitly refers to a wish to add: "exposure time, number of scans"--> - - - - If the ellipsometer_type is `other`, a specific ellipsometry_type" should be - added here. - - Define which element rotates, e.g. polarizer or analyzer. @@ -209,12 +196,11 @@ This explicitly refers to a wish to add: "exposure time, number of scans"--> were corrected for the window effects. - + - diff --git a/contributed_definitions/NXlens_opt.nxdl.xml b/contributed_definitions/NXlens_opt.nxdl.xml index fac73aee1c..3b8aa578ad 100644 --- a/contributed_definitions/NXlens_opt.nxdl.xml +++ b/contributed_definitions/NXlens_opt.nxdl.xml @@ -190,7 +190,7 @@ the lens has different coatings on the front and back side.--> - + Magnification of the lens diff --git a/contributed_definitions/NXoptical_spectroscopy.nxdl.xml b/contributed_definitions/NXoptical_spectroscopy.nxdl.xml index 6b26be7a76..8c06ec9ae8 100644 --- a/contributed_definitions/NXoptical_spectroscopy.nxdl.xml +++ b/contributed_definitions/NXoptical_spectroscopy.nxdl.xml @@ -110,26 +110,7 @@ TODO: It is required to enter at least one of both measurement times, either "start_time" or "end_time". - - - A (globally persistent) unique identifier of the experiment. - (i) The identifier is usually defined by the facility, laboratory or - principal investigator. - (ii) The identifier enables to link experiments to e.g. proposals. - - - - Select the range of validity of this identier. - Local: Setup#1 at Institute building #2 in Room #3 - Global: Unique identification of with by unique location and unique - globally persistent time stamp. - - - - - - - + An optional free-text description of the experiment. @@ -153,11 +134,10 @@ TODO: For Raman spectroscopy or ellipsometry use the respective specializations of NXoptical_spectroscopy. - + - @@ -165,58 +145,43 @@ TODO: Specify a special property or characteristic of the experiment, which specifies the generic experiment type. - + - - - - If "other" was selected in "experiment_type" and/or in "experiment_sub_type", - specify the experiment here with a free text name, which is knwon in the - respective community of interest. - - - - - Description of one or more coordinate systems that are specific to the - experiment. Examples are beam centered, sample-normal centered, - laboratory-system centered, sample-stage centered, crystal-symmetry centered. - - - - - 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. - - + + + + 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 (.). - - + + + + + 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 (.). + @@ -318,7 +283,7 @@ TODO: Description of the detector type. - + @@ -328,14 +293,8 @@ TODO: - - - - Type of detector, if "other" was selected in "detector_type". - - Contains the raw data collected by the detector before calibration. @@ -391,7 +350,7 @@ Unit category: NX_ANGLE (° or rad) - + @@ -406,14 +365,8 @@ Unit category: NX_ANGLE (° or rad) - - - - Specification of type, may also go to name. - - @@ -606,35 +559,14 @@ Unit category: NX_ANGLE (° or rad) points of the incident beam and the detection beam. - + - Describes the order of respective beam devices in the optical beam - path. + Optical components along the optical beam path. - Everything object which interacts or modifies optical beam properties, - may be an beam device, e.g. Filter, Window, Beamsplitter, Photon Source, + Every object which interacts or modifies optical beam properties, + may be a component, e.g. Filter, Window, Beamsplitter, Photon Source, Detector, etc, - - It is intended, to include this functionality later to "older" beam - components, such as NXsource, NXdetector, NXlens, etc. - Until this is possbible, auxillary beam devices have to be created, - for each "older" beam component instead, to allow a beam path description. - To link the auxillary beam device to the real device properties, the - attribute \@device should be used. - - - Reference to beam device, which is described by a NeXus concept - (e.g. for NXsource, entry/instrument/source_TYPE). - - - - - Reference to the previous beam device, from which the photon beam came - to reach this beam device. A photon source is related as origin by ".". - This enables a logical order description of the optical setup. - - @@ -643,19 +575,18 @@ Unit category: NX_ANGLE (° or rad) Raman scattering process. - + - - + polarization filter to prepare light to be measured or to be incident on the sample. @@ -667,12 +598,11 @@ Unit category: NX_ANGLE (° or rad) Physical principle of the polarization filter used to create a defined incident or scattered light state. - + - @@ -685,7 +615,7 @@ Unit category: NX_ANGLE (° or rad) - + Spectral filter used to modify properties of the scattered or incident light. Genereric spectral filter porperties may be implemented via NXfilter_spec @@ -696,13 +626,12 @@ Unit category: NX_ANGLE (° or rad) Type of laserline filter used to supress the laser, if measurements close to the laserline are performed. - + - @@ -710,12 +639,11 @@ Unit category: NX_ANGLE (° or rad) Type of laserline filter used to supress the laser, if measurements close to the laserline are performed. - + - @@ -756,22 +684,15 @@ Can be used to describe a beam splitter as optical element.--> Specify the type of the sample stage. - + - - - - If "other" was chosen in stage_type, enter here a free text description - of the stage type. - - This allows a description of the stages relation or orientation and @@ -1000,7 +921,7 @@ Can be used to describe a beam splitter as optical element.--> A set of activities that occurred to the sample prior to/during the experiment. - + Sample temperature (either controlled or just measured). @@ -1009,19 +930,12 @@ Can be used to describe a beam splitter as optical element.--> If no sensor was available for the determination of temperature, selected a nominal value which represents approximately the situation of sample temperature. - + - - - - If temperature_nominal is "other", enter here a nominal/assumed/estimated - sample temperature. - - Temperature sensor measuring the sample temperature. @@ -1051,7 +965,7 @@ Can be used to describe a beam splitter as optical element.--> Medium, in which the sample is placed. - + @@ -1059,7 +973,6 @@ Can be used to describe a beam splitter as optical element.--> - @@ -1141,6 +1054,8 @@ NXdata. The detailed inclusion of a data collection description (i.e. raw data from ellipsometry as polarization values to the usually used psi and delta values), will be done later after the NXopt workshop.--> + >>This section is transfered from the first NXoptical_spectroscopy version and might +require a reqwork.<<<--> Parameters that are derived from the measured data. diff --git a/contributed_definitions/NXraman.nxdl.xml b/contributed_definitions/NXraman.nxdl.xml index 5179fa3c8f..b158adbb67 100644 --- a/contributed_definitions/NXraman.nxdl.xml +++ b/contributed_definitions/NXraman.nxdl.xml @@ -78,7 +78,7 @@ dataset examples (i.e. NXdata_raman)--> Number of scattering configurations used in the measurement. - It is 1 for only parallel polarization meausement, 2 for parallel and cross + It is 1 for only parallel polarization meausement, 2 for parallel and cross polarization measurement or larger, if i.e. the incident and scattered photon direction is varied. @@ -86,52 +86,52 @@ dataset examples (i.e. NXdata_raman)--> An application definition for Raman spectrocopy experiments. - + Such experiments may be as simple a single Raman spectrum from spontanous Raman scattering and range to Raman imaging Raman spectrometer, surface- and tip-enhanced Raman techniques, x-Ray Raman scattering, as well as resonant Raman scattering phenomena or multidimenional Raman spectra (i.e. varying temperature, pressure, electric field, ....) - + The application definition contains two things: 1. The structures in the application definition of NXopt: * Instrument and data calibrations * Sensors for sample or beam conditions - + AND - + 2. The strucutres specified and extended in NXraman: * description of the experiment type * descroption of the setup's meta data and optical elements (source, monochromator, detector, waveplate, lens, etc.) * description of beam properties and their relations to the sample * sample 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 @@ -140,9 +140,9 @@ dataset examples (i.e. NXdata_raman)--> 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 @@ -173,7 +173,7 @@ dataset examples (i.e. NXdata_raman)--> Specify the type of the optical experiment. - + You may specify fundamental characteristics or properties in the experimental sub-type. @@ -184,7 +184,7 @@ dataset examples (i.e. NXdata_raman)--> Specify the type of Raman experiment. - + @@ -196,15 +196,8 @@ dataset examples (i.e. NXdata_raman)--> - - - - - If the raman_experiment_type is `other`, a name should be specified here. - - Metadata of the setup, its optical elements and physical properites which @@ -215,17 +208,17 @@ dataset examples (i.e. NXdata_raman)--> Scattering configuration as defined by the porto notation by three states, which are othogonal 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 "." @@ -235,11 +228,15 @@ dataset examples (i.e. NXdata_raman)--> 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. + diff --git a/contributed_definitions/nyaml/NXbeam_transfer_matrix_table.yaml b/contributed_definitions/nyaml/NXbeam_transfer_matrix_table.yaml index eae072f18a..ed89e9dd6e 100644 --- a/contributed_definitions/nyaml/NXbeam_transfer_matrix_table.yaml +++ b/contributed_definitions/nyaml/NXbeam_transfer_matrix_table.yaml @@ -36,6 +36,7 @@ NXbeam_transfer_matrix_table(NXobject): rank: 1 dim: (N_variables,) TRANSFER_MATRIX(NX_NUMBER): + nameType: any doc: | Contains the datastructure which relates beam properties of an input and output beam as result of the input beam interaction @@ -74,7 +75,7 @@ NXbeam_transfer_matrix_table(NXobject): Specific name of output beam which the transfermatrix table is related to. # ++++++++++++++++++++++++++++++++++ SHA HASH ++++++++++++++++++++++++++++++++++ -# 3c72efd3163790099d59b3bf6be34cc1057f31649bf49712963a10e0ae19e95b +# 9940847e741800c15ace27c9433c59cef1d722790ee2710bef59ed4895a37d4d # # # # +# >>This section is transfered from the first NXoptical_spectroscopy version and might +# require a reqwork.<<<--> # # Parameters that are derived from the measured data. # diff --git a/contributed_definitions/nyaml/NXraman.yaml b/contributed_definitions/nyaml/NXraman.yaml index a36daffc24..f96d966cae 100644 --- a/contributed_definitions/nyaml/NXraman.yaml +++ b/contributed_definitions/nyaml/NXraman.yaml @@ -12,7 +12,7 @@ doc: | 1. The structures in the application definition of NXopt: * Instrument and data calibrations * Sensors for sample or beam conditions - + AND 2. The strucutres specified and extended in NXraman: @@ -132,13 +132,9 @@ NXraman(NXoptical_spectroscopy): raman_experiment_type: doc: | Specify the type of Raman experiment. - enumeration: [in situ Raman spectroscopy, resonant Raman spectroscopy, non-resonant Raman spectroscopy, Raman imaging, tip-enhanced Raman spectroscopy (TERS), surface-enhanced Raman spectroscopy (SERS), surface plasmon polariton enhanced Raman scattering (SPPERS), hyper Raman spectroscopy (HRS), stimulated Raman spectroscopy (SRS), inverse Raman spectroscopy (IRS), coherent anti-Stokes Raman spectroscopy (CARS), other] - - # enumeration: [in situ, resonant, non-resonant, imaging, tip-enhanced (TERS), surface-enhanced (SERS), surface plasmon polariton enhanced (SPPERS), hyper Raman spectroscopy (HRS), stimulated (SRS), inverse (IRS), coherent anti-Stokes (CARS), other] - raman_experiment_type_other: - exists: optional - doc: | - If the raman_experiment_type is `other`, a name should be specified here. + enumeration: + open_enum: true + items: [in situ Raman spectroscopy, resonant Raman spectroscopy, non-resonant Raman spectroscopy, Raman imaging, tip-enhanced Raman spectroscopy (TERS), surface-enhanced Raman spectroscopy (SERS), surface plasmon polariton enhanced Raman scattering (SPPERS), hyper Raman spectroscopy (HRS), stimulated Raman spectroscopy (SRS), inverse Raman spectroscopy (IRS), coherent anti-Stokes Raman spectroscopy (CARS)] (NXinstrument): doc: | Metadata of the setup, its optical elements and physical properites which @@ -173,6 +169,9 @@ NXraman(NXoptical_spectroscopy): Linear light polarization is assumed. dimensions: rank: 3 + doc: | + 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. dim: (4, 3, N_scattering_configurations) beam_incident(NXbeam): doc: | @@ -180,7 +179,7 @@ NXraman(NXoptical_spectroscopy): wavelength(NX_NUMBER): # ++++++++++++++++++++++++++++++++++ SHA HASH ++++++++++++++++++++++++++++++++++ -# 0743d0752a85409093d945899358c0a1d92c57fdecf6c361ca2de262356c9531 +# 952b7a5b402472555b296cc917a0c81aff4303a215eaa4b4f915c98bca146fa7 # # # -# -# -# If the raman_experiment_type is `other`, a name should be specified here. -# -# # # # Metadata of the setup, its optical elements and physical properites which @@ -398,17 +390,17 @@ NXraman(NXoptical_spectroscopy): # Scattering configuration as defined by the porto notation by three # states, which are othogonal 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 "." @@ -418,11 +410,15 @@ NXraman(NXoptical_spectroscopy): # # 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. +# # # # diff --git a/dev_tools/utils/nxdl_utils.py b/dev_tools/utils/nxdl_utils.py index 3719be714f..f0a4f4bfbd 100644 --- a/dev_tools/utils/nxdl_utils.py +++ b/dev_tools/utils/nxdl_utils.py @@ -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): @@ -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)