From d49e9a4ff18626dfadffaa94fde730910de81710 Mon Sep 17 00:00:00 2001 From: Russ Berg Date: Mon, 13 Dec 2021 11:27:31 -0600 Subject: [PATCH 01/11] cleaned up so code for writing the scripts --- nxdl/nxdl_to_hdf5.py | 130 ++++++++++++++++++++++++++----------------- 1 file changed, 78 insertions(+), 52 deletions(-) mode change 100644 => 100755 nxdl/nxdl_to_hdf5.py diff --git a/nxdl/nxdl_to_hdf5.py b/nxdl/nxdl_to_hdf5.py old mode 100644 new mode 100755 index 744111c..e247f59 --- a/nxdl/nxdl_to_hdf5.py +++ b/nxdl/nxdl_to_hdf5.py @@ -598,6 +598,12 @@ def get_nx_data_by_type(nx_type, dimensions=None, sym_dct={}): return (data) else: return (1) + elif (nx_type.find('NX_DIMENSIONLESS') > -1): + if (use_dims): + return (data) + else: + return (1) + def get_units(nx_type): @@ -617,11 +623,21 @@ def make_timestamp_now(): t = datetime.datetime.now().isoformat() return (t) +def fatal_error(msg): + ''' + a fatal error has occurred, print message + ''' + print('\tFATAL_ERROR: %s' % msg) + + def get_entry(nf): ''' return the name of the entry in the file ''' keys = list(nf.keys()) + if len(keys) == 0: + #fatal_error('File does not contain NXentry group') + return(None, None) s1 = 'entry' for k in keys: if s1.casefold() == k.casefold(): @@ -1109,7 +1125,7 @@ def create_fields(nf, sym_dct={}, category=''): else: data = get_nx_data_by_type(_type, use_dim_dct_lst, sym_dct) if(data is None): - print('\t\tError: There is an issue with a non standard field for fieldname [%s]' % name) + print('\t\tError: There is an issue with a non standard field for fieldname [%s]: ' % name) return(False) # if name.find('depends_on'): @@ -1343,19 +1359,19 @@ def print_nxsfrmt_close(class_nm): nxsfrmt_script_lst.append('root.save(\'%s.nxs\', \'w\')\n\n' % class_nm) -def make_class_as_nf_file(clss_nm, dest_dir, symbol_dct={}): +def make_class_as_nf_file(class_nm, dest_dir, symbol_dct={}): ''' create an hdf5 file of the application definition (class_nm) in the specified destination directory ''' - print('\texporting: [%s]' % clss_nm) + print('\texporting: [%s]' % class_nm) res = True category = def_dir = get_category() if (not os.path.exists(dest_dir)): os.makedirs(dest_dir) - fpath = os.path.join(dest_dir, '%s.hdf5' % clss_nm) + fpath = os.path.join(dest_dir, '%s.hdf5' % class_nm) nf = h5py.File(fpath, 'w') sym_dct = {} @@ -1424,6 +1440,9 @@ def make_class_as_nf_file(clss_nm, dest_dir, symbol_dct={}): _string_attr(nf, 'h5py_version', h5py.version.version, do_print=False) #_string_attr(nf, 'NEXUS_release_ver', rel_ver) entry_grp, entry_nm = get_entry(nf) + if entry_grp is None: + fatal_error('File does not contain an NXentry group') + return(None) #ensure the definition is correct entry_grp['definition'][()] = get_cur_def_name() _string_attr(nf, 'default', entry_nm) @@ -1435,7 +1454,7 @@ def make_class_as_nf_file(clss_nm, dest_dir, symbol_dct={}): _string_attr(nx_data_grp, 'signal', dset_nm) _string_attr(nx_data_grp[dset_nm], 'signal', '1') - _dataset(nf, 'README', readme_string % (rel_ver, clss_nm), 'NX_CHAR', nx_units='NX_UNITLESS', dset={}, do_print=False) + _dataset(nf, 'README', readme_string % (rel_ver, class_nm), 'NX_CHAR', nx_units='NX_UNITLESS', dset={}, do_print=False) prune_extended_entries(nf) @@ -1445,13 +1464,10 @@ def make_class_as_nf_file(clss_nm, dest_dir, symbol_dct={}): print('Failed exporting [%s]' % fpath) nf.close() - print_script_versions(class_nm) print_script_close(class_nm) - write_script_file(class_nm) - - + write_script_files(class_nm) return(res) @@ -1480,31 +1496,45 @@ def print_nxsfrmt_versions(class_nm): # nxsfrmt_script_lst.append('root.attrs[\'HDF5_Version\'] = h5py.version.hdf5_version') pass -def write_script_file(class_nm): - write_h5py_script(os.path.join(os.getcwd(), '..', 'autogenerated_examples','nxdl', 'python_scripts','h5py'), class_nm, h5py_script_lst) - write_nxsfrmt_script(os.path.join(os.getcwd(), '..', 'autogenerated_examples','nxdl', 'python_scripts', 'nexusformat'), class_nm, nxsfrmt_script_lst) - -def write_h5py_script(path, class_nm, script_lst): - if not os.path.exists(path): - os.makedirs(path) - f = open(os.path.join(path, 'ex_h5py_%s.py' % class_nm), 'w') - for l in script_lst: - f.write(l + '\n') - f.close() +def write_script_files(class_nm): + mod_name = 'h5py' + write_h5py_script(mod_name, os.path.join(os.getcwd(), '..', 'autogenerated_examples','nxdl', 'python_scripts', mod_name), class_nm, h5py_script_lst) + mod_name = 'nexusformat' + write_nxsfrmt_script(os.path.join(mod_name, os.getcwd(), '..', 'autogenerated_examples','nxdl', 'python_scripts', mod_name), class_nm, nxsfrmt_script_lst) -def write_nxsfrmt_script(path, class_nm, script_lst): +def write_script(mod_name, path, class_nm, script_lst): + ''' + Take a module name of the script type, path to output the script to, the definition class name and a list + of strings for the script and write it to disk + ''' if not os.path.exists(path): - os.mkdir(path) - - f = open(os.path.join(path, 'ex_nexusformat_%s.py' % class_nm), 'w') + os.makedirs(path) + f = open(os.path.join(path, 'ex_%s_%s.py' % (mod_name,class_nm)), 'w') for l in script_lst: f.write(l + '\n') f.close() +# def write_h5py_script(path, class_nm, script_lst): +# if not os.path.exists(path): +# os.makedirs(path) +# f = open(os.path.join(path, 'ex_h5py_%s.py' % class_nm), 'w') +# for l in script_lst: +# f.write(l + '\n') +# f.close() +# +# def write_nxsfrmt_script(path, class_nm, script_lst): +# if not os.path.exists(path): +# os.mkdir(path) +# +# f = open(os.path.join(path, 'ex_nexusformat_%s.py' % class_nm), 'w') +# for l in script_lst: +# f.write(l + '\n') +# f.close() + def build_class_db(class_dir='base_classes', desired_class=None, defdir=None, sym_args_dct={},report_symbols_only=False): ''' build a nxdl definition into a dict - class_dir: either 'applications' or 'base_classes' + class_dir: one of the following: 'applications','base_classes' or 'contributed_definitions' desired_class: the name of a desired class definition such as 'NXstxm', if left as None then all class definitions\ will be returned. defdir: if the definitions are located somewhere other than in a subdir of nexpy @@ -1523,7 +1553,7 @@ def build_class_db(class_dir='base_classes', desired_class=None, defdir=None, sy class_nm = nxdl_file.replace('.nxdl.xml', '') if(class_nm.find(os.path.sep) > -1): class_nm = class_nm.split(os.path.sep)[-1] - print('\nProcessing [%s]' % nxdl_file) + print('\nProcessing [%s]' % nxdl_file.replace(os.path.dirname(__file__),'.')) resp_dict, syms, docs = get_xml_paths(nxdl_file, sym_args_dct=sym_args_dct, report_symbols_only=report_symbols_only) dct[class_nm] = resp_dict return(dct, syms, docs) @@ -1536,6 +1566,20 @@ def symbol_args_to_dict(arg_lst): return(dct) +def process_nxdl(class_nm, def_subdir): + ''' + given the class name and the destination directory, parse the nxdl file and produce an hdf5 file + as well as example scripts using h5py and nexusformat + ''' + if class_nm.find('.nxdl.xml') > -1: + class_nm = class_nm.replace('.nxdl.xml', '') + build_class_db(def_subdir, desired_class=class_nm, + defdir=def_dir, sym_args_dct=sym_args_dct, + report_symbols_only=report_symbols_only) + dest_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'autogenerated_examples', 'nxdl', def_subdir) + make_class_as_nf_file(class_nm, dest_dir, symbol_dct=sym_args_dct) + + if __name__ == '__main__': import argparse @@ -1567,8 +1611,7 @@ def symbol_args_to_dict(arg_lst): print('\tProcess this entire directory [%s]' % args.directory) def_subdirs = [args.directory] else: - print('\tError: neither a specific definition or directory was specified so nothing to do') - exit() + print('Processing the definitions in the following sub directories', def_subdirs) if args.symbols: print('\tProcess using the following symbols [%s]' % args.symbols) @@ -1606,35 +1649,18 @@ def symbol_args_to_dict(arg_lst): if(class_path is None): print('Error: the class name [%s.nxdl.xml] doesnt exist in either of the applications or contributed_definitions subdirectories' % class_nm) exit() + else: + process_nxdl(class_path, def_subdir) + exit() files = None for def_subdir in def_subdirs: files = sorted(os.listdir(os.path.join(def_dir, def_subdir))) - dest_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)),'..', 'autogenerated_examples', 'nxdl', def_subdir) - # FOR TESTING ##################### - #dest_dir = 'G:/github/nexusformat/exampledata/autogenerated_examples/nxdl/applications' - ################################## - if (class_nm is None): - do_exit = False - else: - do_exit = True for class_path in files: - if class_path.find('.nxdl.xml') > -1: - if class_nm is None: - class_nm = class_path.replace('.nxdl.xml','') - - # path_dct, syms, docs = build_class_db(def_subdir, desired_class=class_nm, - # defdir=def_dir, sym_args_dct=sym_args_dct, - # report_symbols_only=report_symbols_only) - build_class_db(def_subdir, desired_class=class_nm, - defdir=def_dir, sym_args_dct=sym_args_dct, - report_symbols_only=report_symbols_only) - res = make_class_as_nf_file(class_nm, dest_dir, symbol_dct=sym_args_dct) - - init_database() - class_nm = None - if do_exit: - exit() + process_nxdl(class_path, def_subdir) + init_database() + + From 4f79851e1cf23b3a08de8adbc92f3318f46000e4 Mon Sep 17 00:00:00 2001 From: "russ.berg@lightsource.ca" Date: Mon, 13 Dec 2021 13:45:17 -0600 Subject: [PATCH 02/11] consolodated scriptwiring to write_script_files() and write_script() --- nxdl/nxdl_to_hdf5.py | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/nxdl/nxdl_to_hdf5.py b/nxdl/nxdl_to_hdf5.py index e247f59..feb2dbf 100755 --- a/nxdl/nxdl_to_hdf5.py +++ b/nxdl/nxdl_to_hdf5.py @@ -1498,9 +1498,15 @@ def print_nxsfrmt_versions(class_nm): def write_script_files(class_nm): mod_name = 'h5py' - write_h5py_script(mod_name, os.path.join(os.getcwd(), '..', 'autogenerated_examples','nxdl', 'python_scripts', mod_name), class_nm, h5py_script_lst) + write_script(mod_name, + os.path.join(os.getcwd(), '..', 'autogenerated_examples','nxdl', 'python_scripts', mod_name), + class_nm, + h5py_script_lst) mod_name = 'nexusformat' - write_nxsfrmt_script(os.path.join(mod_name, os.getcwd(), '..', 'autogenerated_examples','nxdl', 'python_scripts', mod_name), class_nm, nxsfrmt_script_lst) + write_script(mod_name, + os.path.join(mod_name, os.getcwd(), '..', 'autogenerated_examples','nxdl', 'python_scripts', mod_name), + class_nm, + nxsfrmt_script_lst) def write_script(mod_name, path, class_nm, script_lst): ''' @@ -1514,23 +1520,6 @@ def write_script(mod_name, path, class_nm, script_lst): f.write(l + '\n') f.close() -# def write_h5py_script(path, class_nm, script_lst): -# if not os.path.exists(path): -# os.makedirs(path) -# f = open(os.path.join(path, 'ex_h5py_%s.py' % class_nm), 'w') -# for l in script_lst: -# f.write(l + '\n') -# f.close() -# -# def write_nxsfrmt_script(path, class_nm, script_lst): -# if not os.path.exists(path): -# os.mkdir(path) -# -# f = open(os.path.join(path, 'ex_nexusformat_%s.py' % class_nm), 'w') -# for l in script_lst: -# f.write(l + '\n') -# f.close() - def build_class_db(class_dir='base_classes', desired_class=None, defdir=None, sym_args_dct={},report_symbols_only=False): ''' build a nxdl definition into a dict From 4c4603b6b3b821d2c98ddf5eceb3a5cec37b2092 Mon Sep 17 00:00:00 2001 From: Russ Berg Date: Mon, 13 Dec 2021 15:10:09 -0600 Subject: [PATCH 03/11] switch to using pathlib as much as possible --- nxdl/nxdl_to_hdf5.py | 64 +++++++++++++++++++++++--------------------- 1 file changed, 34 insertions(+), 30 deletions(-) diff --git a/nxdl/nxdl_to_hdf5.py b/nxdl/nxdl_to_hdf5.py index feb2dbf..1187e6a 100755 --- a/nxdl/nxdl_to_hdf5.py +++ b/nxdl/nxdl_to_hdf5.py @@ -1,4 +1,4 @@ -from pathlib import Path +import pathlib import os import pkg_resources import h5py @@ -45,7 +45,8 @@ def init_database(): global db, query, tables_dct - if os.path.exists('db.json'): + + if pathlib.Path('db.json').exists(): # reset database to nothing if db is not None: db.close() @@ -798,7 +799,8 @@ def process_symbols(soup, sym_args_dct={}): def get_extending_class(fname, cls_nm, sym_args_dct={}, dct={}, docs=[], report_symbols_only=False): fparts = fname.split('\\') eclass_file = fname.replace(fparts[-1], '%s.nxdl.xml' % cls_nm) - if (not os.path.exists(eclass_file)): + + if not pathlib.Path(eclass_file).exists(): print('get_extending_class: XML file [%s] does not exist' % eclass_file) return({}, {}, {}) print('extending with [%s]' % cls_nm) @@ -806,16 +808,16 @@ def get_extending_class(fname, cls_nm, sym_args_dct={}, dct={}, docs=[], report_ return (dct, syms, docs) -def get_xml_root(fname): +def get_xml_root(fpath): ''' takes the path to teh nxdl.xml file and returns a dict of element category lists of the entire structure ''' - if(not fname.exists()): - print('XML file [%s] does not exist' % str(fname.absolute())) + if not fpath.exists(): + print('XML file [%s] does not exist' % str(fpath)) return(None) - infile = open(fname, "r") + infile = open(str(fpath), "r") contents = infile.read() infile.close() contents = contents.replace('xmlns="http://definition.nexusformat.org/nxdl/3.1"','') @@ -839,13 +841,13 @@ def walk_extends_chain(fpath, root): main_clss = main_clss.replace('.nxdl.xml','') ext_lst = [main_clss] extends_clss = root.get('extends') - fpath = Path(str(fpath.absolute()).replace(main_clss, f'{extends_clss}')) + fpath = pathlib.Path(str(fpath.absolute()).replace(main_clss, f'{extends_clss}')) while extends_clss != 'NXobject': #(dct, syms, docs) = ext_lst.append(extends_clss) _root, _soup = get_xml_root(fpath) extends_clss = _root.get('extends') - fpath = Path(str(fpath.absolute()).replace(ext_lst[-1], f'{extends_clss}')) + fpath = pathlib.Path(str(fpath.absolute()).replace(ext_lst[-1], f'{extends_clss}')) ext_lst.reverse() return(ext_lst) @@ -855,14 +857,14 @@ def get_xml_paths(fname, sym_args_dct={}, dct={}, docs=[], report_symbols_only=F ''' fname = fname.replace('\\', '/') - fpath = Path(fname) + fpath = pathlib.Path(fname) _root, _soup = get_xml_root(fpath) if _root is None: return extends_lst = walk_extends_chain(fpath, _root) def_lst = [] for ext_clss in extends_lst: - fpath = Path(str(fpath.absolute()).replace(fpath.name, f'{ext_clss}.nxdl.xml')) + fpath = pathlib.Path(str(fpath.absolute()).replace(fpath.name, f'{ext_clss}.nxdl.xml')) tables_dct['main'].insert({'filename': str(fpath.name)}) _root, _soup = get_xml_root(fpath) def_lst.append(get_definition_details(_root, _soup)) @@ -1368,10 +1370,10 @@ def make_class_as_nf_file(class_nm, dest_dir, symbol_dct={}): res = True category = def_dir = get_category() - if (not os.path.exists(dest_dir)): + if not pathlib.Path(dest_dir).exists(): os.makedirs(dest_dir) - fpath = os.path.join(dest_dir, '%s.hdf5' % class_nm) + fpath = str(pathlib.PurePath(dest_dir, '%s.hdf5' % class_nm)) nf = h5py.File(fpath, 'w') sym_dct = {} @@ -1499,12 +1501,12 @@ def print_nxsfrmt_versions(class_nm): def write_script_files(class_nm): mod_name = 'h5py' write_script(mod_name, - os.path.join(os.getcwd(), '..', 'autogenerated_examples','nxdl', 'python_scripts', mod_name), + pathlib.PurePath(os.getcwd(), '..', 'autogenerated_examples','nxdl', 'python_scripts', mod_name), class_nm, h5py_script_lst) mod_name = 'nexusformat' write_script(mod_name, - os.path.join(mod_name, os.getcwd(), '..', 'autogenerated_examples','nxdl', 'python_scripts', mod_name), + pathlib.PurePath(mod_name, os.getcwd(), '..', 'autogenerated_examples','nxdl', 'python_scripts', mod_name), class_nm, nxsfrmt_script_lst) @@ -1513,9 +1515,10 @@ def write_script(mod_name, path, class_nm, script_lst): Take a module name of the script type, path to output the script to, the definition class name and a list of strings for the script and write it to disk ''' - if not os.path.exists(path): + + if not pathlib.Path(path).exists(): os.makedirs(path) - f = open(os.path.join(path, 'ex_%s_%s.py' % (mod_name,class_nm)), 'w') + f = open(pathlib.PurePath(path, 'ex_%s_%s.py' % (mod_name,class_nm)), 'w') for l in script_lst: f.write(l + '\n') f.close() @@ -1531,18 +1534,19 @@ def build_class_db(class_dir='base_classes', desired_class=None, defdir=None, sy if(defdir is None): class_path = pkg_resources.resource_filename('nexpy', 'definitions/%s' % class_dir) else: - class_path = os.path.join(defdir, class_dir) + class_path = pathlib.PurePath(defdir, class_dir) - nxdl_files = list(map(os.path.basename, glob.glob(os.path.join(class_path, '*.nxdl.xml')))) + nxdl_files = list(map(os.path.basename, glob.glob(str(pathlib.PurePath(class_path, '*.nxdl.xml'))))) dct = {} if(desired_class): - nxdl_files = [os.path.join(class_path, '%s.nxdl.xml' % desired_class)] + nxdl_files = [pathlib.PurePath(class_path, '%s.nxdl.xml' % desired_class)] for nxdl_file in nxdl_files: + nxdl_file = str(nxdl_file) class_nm = nxdl_file.replace('.nxdl.xml', '') - if(class_nm.find(os.path.sep) > -1): - class_nm = class_nm.split(os.path.sep)[-1] - print('\nProcessing [%s]' % nxdl_file.replace(os.path.dirname(__file__),'.')) + if(class_nm.find(pathlib.os.sep) > -1): + class_nm = class_nm.split(pathlib.os.sep)[-1] + print('\nProcessing [%s]' % nxdl_file.replace(pathlib.os.getcwd(),'.')) resp_dict, syms, docs = get_xml_paths(nxdl_file, sym_args_dct=sym_args_dct, report_symbols_only=report_symbols_only) dct[class_nm] = resp_dict return(dct, syms, docs) @@ -1565,7 +1569,7 @@ def process_nxdl(class_nm, def_subdir): build_class_db(def_subdir, desired_class=class_nm, defdir=def_dir, sym_args_dct=sym_args_dct, report_symbols_only=report_symbols_only) - dest_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', 'autogenerated_examples', 'nxdl', def_subdir) + dest_dir = pathlib.PurePath(pathlib.os.getcwd(), '..', 'autogenerated_examples', 'nxdl', def_subdir) make_class_as_nf_file(class_nm, dest_dir, symbol_dct=sym_args_dct) @@ -1611,11 +1615,11 @@ def process_nxdl(class_nm, def_subdir): def_dir = args.nxdefdir else: #use the definitions in the installed nexpy - def_dir = os.path.join(os.path.dirname(__file__), '..', '..', 'definitions') + def_dir = pathlib.PurePath(pathlib.os.getcwd(), '..', '..', 'definitions') #get the release version of the definitions - if os.path.exists(os.path.join(def_dir, 'NXDL_VERSION')): - f = open(os.path.join(def_dir, 'NXDL_VERSION'), 'r') + if pathlib.Path(pathlib.PurePath(def_dir, 'NXDL_VERSION')).exists(): + f = open(pathlib.PurePath(def_dir, 'NXDL_VERSION'), 'r') l = f.readlines() f.close() rel_ver = l[0].replace('\n','') @@ -1629,8 +1633,8 @@ def process_nxdl(class_nm, def_subdir): #only search in applications and contributed_definitions subdirectories if(class_nm): for def_subdir in def_subdirs: - class_path = os.path.join(def_dir, def_subdir, class_nm + '.nxdl.xml') - if(os.path.exists(class_path)): + class_path = pathlib.PurePath(def_dir, def_subdir, class_nm + '.nxdl.xml') + if pathlib.Path(class_path).exists(): break else: class_path = None @@ -1644,7 +1648,7 @@ def process_nxdl(class_nm, def_subdir): files = None for def_subdir in def_subdirs: - files = sorted(os.listdir(os.path.join(def_dir, def_subdir))) + files = sorted(os.listdir(pathlib.PurePath(def_dir, def_subdir))) for class_path in files: process_nxdl(class_path, def_subdir) init_database() From 9a0fe12de375e60320864616053a077667b29c7a Mon Sep 17 00:00:00 2001 From: "russ.berg@lightsource.ca" Date: Mon, 13 Dec 2021 15:36:06 -0600 Subject: [PATCH 04/11] added a paragraph about generating contributed_definitions --- nxdl/README.md | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/nxdl/README.md b/nxdl/README.md index 2628e79..4d4d59e 100644 --- a/nxdl/README.md +++ b/nxdl/README.md @@ -15,7 +15,20 @@ The result of executing **nxdl_to_hdf5 -d applications** is the following which - A python script to create the definition using h5py is created in **exampledata/autogenerated_examples/nxdl/h5py** - A python script to create the definition using nexusformat is created in **exampledata/autogenerated_examples/nxdl/nexusformat** -**Dependancies** +## Contributed Definition testing + +A good way to stay on track while developing a new application definition is to use ```nxdl_to_hdf5.py``` +to try and generate your definition, if there are basic errors they will be reported, and if your +definition generates an hdf5 file without errors there is a good chance that it will also pass ```cnxvalidate```. +As with any other definition, a python script using both **h5py** and **nexusformat** modules will also be created +to give you a tangible example of what is needed to create a compliant file for your definition. + +To generate your definition, save your definitions **.nxdl.xml** file to the +`nexusformat/definitions/contributed_definitions` folder, then generate the file by executing: + + `python nxdl_to_hdf5.py -d contributed_definitions` + +### **Dependancies** nxdl_to_hdf5 requires the following modules: @@ -27,7 +40,7 @@ nxdl_to_hdf5 requires the following modules: - bs4 - tinydb -**Arguments and Usage:** +### **Arguments and Usage:** ``` >python nxdl_to_hdf5.py --help usage: nxdl_to_hdf5.py [-h] [-f FILE | -d DIRECTORY] From 5ead471797db1a61cf614fa929f24566b0fec64a Mon Sep 17 00:00:00 2001 From: "russ.berg@lightsource.ca" Date: Mon, 13 Dec 2021 17:17:36 -0600 Subject: [PATCH 05/11] missed some os.path lines --- nxdl/nxdl_to_hdf5.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nxdl/nxdl_to_hdf5.py b/nxdl/nxdl_to_hdf5.py index 1187e6a..1b08416 100755 --- a/nxdl/nxdl_to_hdf5.py +++ b/nxdl/nxdl_to_hdf5.py @@ -1501,12 +1501,12 @@ def print_nxsfrmt_versions(class_nm): def write_script_files(class_nm): mod_name = 'h5py' write_script(mod_name, - pathlib.PurePath(os.getcwd(), '..', 'autogenerated_examples','nxdl', 'python_scripts', mod_name), + pathlib.PurePath(pathlib.os.getcwd(), '..', 'autogenerated_examples','nxdl', 'python_scripts', mod_name), class_nm, h5py_script_lst) mod_name = 'nexusformat' write_script(mod_name, - pathlib.PurePath(mod_name, os.getcwd(), '..', 'autogenerated_examples','nxdl', 'python_scripts', mod_name), + pathlib.PurePath(mod_name, pathlib.os.getcwd(), '..', 'autogenerated_examples','nxdl', 'python_scripts', mod_name), class_nm, nxsfrmt_script_lst) From a92773b320b8d9c5a256bfd1b4abb8d6c778a05f Mon Sep 17 00:00:00 2001 From: Pete R Jemian Date: Tue, 14 Dec 2021 12:33:44 -0600 Subject: [PATCH 06/11] MNT changes to use contexts and pathlib ops --- nxdl/nxdl_to_hdf5.py | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/nxdl/nxdl_to_hdf5.py b/nxdl/nxdl_to_hdf5.py index 1b08416..2016817 100755 --- a/nxdl/nxdl_to_hdf5.py +++ b/nxdl/nxdl_to_hdf5.py @@ -1612,17 +1612,25 @@ def process_nxdl(class_nm, def_subdir): if args.nxdefdir: print('\tUsing the following definitions base directory [%s]' % args.nxdefdir) - def_dir = args.nxdefdir + def_dir = pathlib.Path(args.nxdefdir) else: - #use the definitions in the installed nexpy - def_dir = pathlib.PurePath(pathlib.os.getcwd(), '..', '..', 'definitions') + #use the definitions in a neighboring directory + def_dir = pathlib.Path("This non-existing path is used for testing.") + cwd = pathlib.Path(__file__).parent + for _path in ( + (cwd.parent / "definitions"), + (cwd.parent.parent / "definitions"), + ): + if _path.exists(): + def_dir = _path + break + if not def_dir.exists(): + raise FileNotFoundError("NeXus definitions not found here: " + str(def_dir)) #get the release version of the definitions - if pathlib.Path(pathlib.PurePath(def_dir, 'NXDL_VERSION')).exists(): - f = open(pathlib.PurePath(def_dir, 'NXDL_VERSION'), 'r') - l = f.readlines() - f.close() - rel_ver = l[0].replace('\n','') + if (def_dir / 'NXDL_VERSION').exists(): + with open(pathlib.PurePath(def_dir, 'NXDL_VERSION'), 'r') as f: + rel_ver = f.readline().replace('\n','') if args.report: #just repolrt on the symbols that are defined in @@ -1648,9 +1656,9 @@ def process_nxdl(class_nm, def_subdir): files = None for def_subdir in def_subdirs: - files = sorted(os.listdir(pathlib.PurePath(def_dir, def_subdir))) + files = sorted((def_dir / def_subdir).iterdir()) for class_path in files: - process_nxdl(class_path, def_subdir) + process_nxdl(str(class_path), def_subdir) init_database() From d4fa92ac353ca73d6c3bd45599e6daa881c041db Mon Sep 17 00:00:00 2001 From: Pete R Jemian Date: Wed, 15 Dec 2021 14:02:56 -0600 Subject: [PATCH 07/11] MNT #30 main() --- nxdl/nxdl_to_hdf5.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nxdl/nxdl_to_hdf5.py b/nxdl/nxdl_to_hdf5.py index 2016817..1c963a3 100755 --- a/nxdl/nxdl_to_hdf5.py +++ b/nxdl/nxdl_to_hdf5.py @@ -1573,7 +1573,7 @@ def process_nxdl(class_nm, def_subdir): make_class_as_nf_file(class_nm, dest_dir, symbol_dct=sym_args_dct) -if __name__ == '__main__': +def main(): import argparse init_database() @@ -1663,5 +1663,6 @@ def process_nxdl(class_nm, def_subdir): - +if __name__ == '__main__': + main() From 06dd214be65c73f9b47085fbcf929361212ec3cc Mon Sep 17 00:00:00 2001 From: Russ Berg Date: Wed, 15 Dec 2021 15:33:53 -0600 Subject: [PATCH 08/11] fixed execution instruction to include python explicitly --- nxdl/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nxdl/README.md b/nxdl/README.md index 4d4d59e..9e1e230 100644 --- a/nxdl/README.md +++ b/nxdl/README.md @@ -9,7 +9,7 @@ a master dictionary separated into the different XML tags (group, field, link, a create the file with this dict in a controlled order, this made it much easier to debug and section off where errors were during the process. -The result of executing **nxdl_to_hdf5 -d applications** is the following which is true for each application definition: +The result of executing **python nxdl_to_hdf5.py -d applications** is the following which is true for each application definition: - Hdf5 file is created in **exampledata/autogenerated_examples/nxdl/applications** - A python script to create the definition using h5py is created in **exampledata/autogenerated_examples/nxdl/h5py** From 0ffbab473c467bde512cb0609188abdcefc07e32 Mon Sep 17 00:00:00 2001 From: Russ Berg Date: Wed, 15 Dec 2021 15:34:29 -0600 Subject: [PATCH 09/11] changes following review --- nxdl/nxdl_to_hdf5.py | 381 ++++++++++++++++++++++--------------------- 1 file changed, 192 insertions(+), 189 deletions(-) diff --git a/nxdl/nxdl_to_hdf5.py b/nxdl/nxdl_to_hdf5.py index 2016817..856ff08 100755 --- a/nxdl/nxdl_to_hdf5.py +++ b/nxdl/nxdl_to_hdf5.py @@ -1,3 +1,4 @@ +#! /usr/bin/env python import pathlib import os import pkg_resources @@ -12,10 +13,10 @@ readme_string = """ - Autogenerated using version [%s] of the NEXUS definitions. + Autogenerated using version [{}] of the NEXUS definitions. The file generated by this script is intended to give the user an example of a -file that conforms to the [%s] application definition such that it will pass +file that conforms to the [{}] application definition such that it will pass validation with cnxvalidate. There are some attributes that have been added for informational purposes to help the user know what is a required field or group, the informational only attributes have the prefix 'EX_', for example if a group @@ -82,29 +83,28 @@ def _string_attr(nxgrp, name, sdata, do_print=True, skip_nxsfrmt=False): if do_print: s_data = sdata.replace(__file__.replace('/nxdl_to_hdf5.py', ''), '') s_data = s_data.replace('/..', '..') - if sdata.find('.hdf5') > -1: + if sdata.find('.h5') > -1: #just use the file name - h5py_script_lst.append('root[\'%s\'].attrs[\'%s\'] = \'%s\'' % (nxgrp.name, name, s_data.split('/')[-1])) + h5py_script_lst.append(f"root['{nxgrp.name}'].attrs['{name}'] = '{s_data.split('/')[-1]}'") if not skip_nxsfrmt: - nxsfrmt_script_lst.append('root[\'{}\'].attrs[\'{}\'] = \'{}\''.format(nxgrp.name, name, s_data)) + nxsfrmt_script_lst.append(f"root['{nxgrp.name}'].attrs['{name}'] = '{s_data}'") else: - h5py_script_lst.append('root[\'%s\'].attrs[\'%s\'] = \'%s\'' % (nxgrp.name, name, sdata)) + h5py_script_lst.append(f"root['{nxgrp.name}'].attrs['{name}'] = '{s_data.split('/')[-1]}'") if not skip_nxsfrmt: if name.find('default') > -1: if nxgrp.name == '/': #need to set the 'default' attribute for the file to point to the default entry name - nxsfrmt_script_lst.append('root.attrs[\'default\'] = \'{}\''.format(s_data)) + nxsfrmt_script_lst.append(f"root.attrs[\'default\'] = \'{s_data}\'") else: - #nxsfrmt_script_lst.append('root[\'{}/{}\'].set_default()'.format(nxgrp.name, s_data)) if s_data == 'SAMPLE-CHAR-DATA': #this is the /entry default attribute - nxsfrmt_script_lst.append('root[\'{}/{}\'] = NXdata()'.format(nxgrp.name, s_data)) - nxsfrmt_script_lst.append('root[\'{}/{}\'].set_default()'.format(nxgrp.name, s_data)) + nxsfrmt_script_lst.append(f"root[\'{nxgrp.name}/{s_data}\'] = NXdata()") + nxsfrmt_script_lst.append(f"root[\'{nxgrp.name}/{s_data}\'].set_default()") else: - nxsfrmt_script_lst.append('root[\'{}/{}\'].set_default()'.format(nxgrp.name, s_data)) + nxsfrmt_script_lst.append(f"root[\'{nxgrp.name}/{s_data}\'].set_default()") else: - nxsfrmt_script_lst.append('root[\'{}\'].attrs[\'{}\'] = \'{}\''.format(nxgrp.name, name, s_data)) + nxsfrmt_script_lst.append(f"root[\'{nxgrp.name}\'].attrs[\'{name}\'] = \'{s_data}\'") def _num_attr(nxgrp, name, data, do_print=True): ''' @@ -115,8 +115,7 @@ def _num_attr(nxgrp, name, data, do_print=True): nxgrp.attrs[name] = data if do_print: - h5py_script_lst.append('root[\'%s\'].attrs[\'%s\'] = \'%s\'' % (nxgrp.name, name, str(data))) - #print('root[\'%s\'].attrs[\'%s\'] = \'%s\'' % (nxgrp.name, name, sdata.replace('\'', '"'))) + h5py_script_lst.append(f"root[\'{nxgrp.name}\'].attrs[\'{name}\'] = \'{str(data)}\'") def _list_attr(nxgrp, name, lstdata, do_print=True): ''' @@ -135,15 +134,13 @@ def print_list_attr(nxgrp, name, lstdata, do_print=True): if do_print: h5py_script_lst.append(' ') nxsfrmt_script_lst.append(' ') - #h5py_script_lst.append('root[\'%s\'].attrs[\'%s\'] = \'%s\'' % (nxgrp.name, name, str(lstdata))) - #h5py_script_lst.append('# the allowable values for root[\'%s\'].attrs[\'%s\'] are: \'%s\'' % (nxgrp.name, name, str(lstdata))) h5py_script_lst.append( - '# Valid enumeration values for root[\'%s\'][\'%s\'] are: ' % (nxgrp.name, name)) + f"# Valid enumeration values for root[\'{nxgrp.name}\'][\'{name}\'] are: ") nxsfrmt_script_lst.append( - '# Valid enumeration values for root[\'%s\'][\'%s\'] are: ' % (nxgrp.name, name)) + f"# Valid enumeration values for root[\'{nxgrp.name}\'][\'{name}\'] are: ") for i in lstdata: - h5py_script_lst.append('#\t %s' % i) - nxsfrmt_script_lst.append('#\t %s' % i) + h5py_script_lst.append(f"#\t {i}") + nxsfrmt_script_lst.append(f"#\t {i}") def check_for_duplicate_grp_names(nxgrp, name, nxdata_type): @@ -151,7 +148,7 @@ def check_for_duplicate_grp_names(nxgrp, name, nxdata_type): i = 1 _name = name while name in nxgrp.keys() and i < 100: - name = _name + '_%d' % i + name = _name + f"_{i}" i += 1 return(True) return(False) @@ -200,6 +197,8 @@ def _dataset(nxgrp, name, data, nxdata_type, nx_units='', dset={}, do_print=True ''' # grp = nxgrp.create_dataset(name=name, data=data, maxshape=None) #strip any units off of nxdata_type + if name.find('data_x_y') > -1: + print() _dt = nxdata_type.split('-') nxdata_type = _dt[0] @@ -211,10 +210,10 @@ def _dataset(nxgrp, name, data, nxdata_type, nx_units='', dset={}, do_print=True data = data.replace('\' ', '\' , ') data = data.encode("ascii", "ignore") h5py_script_lst.append(' ') - h5py_script_lst.append('root[\'{}\'][\'{}\'] = {}'.format(nxgrp.name, name, data)) + h5py_script_lst.append(f"root[\'{nxgrp.name}\'][\'{name}\'] = {data}") elif (type(data) == np.ndarray): - #print('creating np.ndarray dataset [%s]' % name) + #print('creating np.ndarray dataset [{}]'.format(name) grp = nxgrp.create_dataset(name=name, data=data, maxshape=None, compression="gzip") if nxdata_type == 'NX_FLOAT': @@ -223,28 +222,27 @@ def _dataset(nxgrp, name, data, nxdata_type, nx_units='', dset={}, do_print=True elif nxdata_type in ['NX_INT', 'NX_NUMBER', 'NX_POSINT', 'NX_UINT']: s = str(data.astype(int)).replace('\n', ',') else: - print('_dataset: UNSUPPORTED ndarray TYPE %s' % nxdata_type) + print(f"_dataset: UNSUPPORTED ndarray TYPE {nxdata_type}") if s.find('. ') > -1: data = s.replace('. ', '. , ').replace('\n', ',') h5py_script_lst .append(' ') - h5py_script_lst.append('root[\'%s\'].create_dataset(name=\'%s\', data=%s, maxshape=None, compression="gzip")' % (nxgrp.name, name, str(data))) - - #h5py_script_lst.append('root[\'{}\'][\'{}\'] = {}'.format(nxgrp.name, name, data)) - + #h5py_script_lst.append('root[\'{}\'].create_dataset(name=\'{}\', data={}, maxshape=None, compression="gzip")'.format(nxgrp.name, name, str(data))) + h5py_script_lst.append( + f"root[\'{nxgrp.name}\'].create_dataset(name=\'{name}\', data={str(data)}, maxshape=None, compression=""gzip") else: - #print('name[%s] data[%s]' % (name, data)) + #print('name[{}] data[{}]'.format(name, data)) if(data is None): data = '' if node_exists(nxgrp, name): # update the contents - #print('modify [%s] = %s' % (nxgrp.name + '/' + name, data)) - nxgrp['%s' % nxgrp.name + '/' + name][()] = data + #print('modify [{}] = {}'.format(nxgrp.name + '/' + name, data)) + nxgrp[f"{nxgrp.name}/{name}"][()] = data #TODO: now add this mod to h5py_script_lst return - #print('creating dataset [%s]' % name) + #print('creating dataset [{}]'.format(name) if nxdata_type == 'NX_INT': grp = nxgrp.create_dataset(name=name, data=data, dtype=np.int64, maxshape=None) else: @@ -255,14 +253,18 @@ def _dataset(nxgrp, name, data, nxdata_type, nx_units='', dset={}, do_print=True s_data = fix_non_standard_definition_name(s_data) if nxdata_type == 'NX_BOOLEAN': s_data = 'np.int8(0)' + if nxdata_type == 'NX_UINT': + #s_data = 'np.intc(1)' + s_data = 'np.ushort(1)' if type(data) is str: if do_print: h5py_script_lst.append(' ') nxsfrmt_script_lst.append(' ') - h5py_script_lst.append('root[\'%s\'].create_dataset(name=\'%s\', data=\'%s\', maxshape=None)' % (nxgrp.name, name, s_data)) + h5py_script_lst.append( + f"root[\'{nxgrp.name}\'].create_dataset(name=\'{name}\', data=\'{s_data}\', maxshape=None)") - nxsfrmt_script_lst.append('root[\'{}/{}\'] = NXfield(\'{}\')'.format(nxgrp.name, name, s_data)) + nxsfrmt_script_lst.append(f"root[\'{nxgrp.name}/{name}\'] = NXfield(\'{s_data}\')") else: if do_print: h5py_script_lst.append(' ') @@ -270,16 +272,14 @@ def _dataset(nxgrp, name, data, nxdata_type, nx_units='', dset={}, do_print=True if s_data.find('array') > -1: # make sure it reads correctly as a numpy array s_data = s_data.replace('array', 'np.array') - h5py_script_lst.append('root[\'%s\'].create_dataset(name=\'%s\', data=%s, maxshape=None)' % (nxgrp.name, name, s_data)) + h5py_script_lst.append( + f"root[\'{nxgrp.name}\'].create_dataset(name=\'{name}\', data={s_data}, maxshape=None)") # catch if it is a NX_BOOLEAN, cnxvalidate needs a specific type not just 0 for False it must be an np.int8 if nxdata_type == 'NX_BOOLEAN': - nxsfrmt_script_lst.append('root[\'{}/{}\'] = NXfield(np.int8(0))'.format(nxgrp.name, name)) + nxsfrmt_script_lst.append(f"root[\'{nxgrp.name}/{name}\'] = NXfield(np.int8(0))") else: - nxsfrmt_script_lst.append('root[\'{}/{}\'] = NXfield({})'.format(nxgrp.name, name, data)) - - # grp_name = get_last_name_from_abspath(dct['abspath']) - # print('root[\'%s\'] = h5py.create_group(\'%s\')' % (get_parent_path(dct['abspath']), grp_name)) + nxsfrmt_script_lst.append(f"root[\'{nxgrp.name}/{name}\'] = NXfield({data})") _string_attr(grp, 'type', nxdata_type, do_print) @@ -329,7 +329,7 @@ def abspath_lst_to_str(l): # print() s = '/' for n in l: - s += '%s/' % fix_nx_name(n) + s += f"{fix_nx_name(n)}/" return(s) def get_children_list_of_lists(e): @@ -386,7 +386,7 @@ def get_type(d): if 'units' in d['attrib'].keys(): #return a concatenation of the default for no specified type 'NX_CHAR' and '- - return ('NX_CHAR-%s' % d['attrib']['units']) + return (f"NX_CHAR-{d['attrib']['units']}") #return ('NX_CHAR') return ('') else: @@ -417,7 +417,7 @@ def get_min_occurs(d, category): ''' valid_categories = ['base', 'application', 'contributed'] if category not in valid_categories: - print('Error: invalid definition category [%s]' % (category)) + print(f"Error: invalid definition category [{category}]") print('\t must be one of ', valid_categories) exit() if ('minOccurs' in d['attrib'].keys()): @@ -459,20 +459,20 @@ def sanity_check_dimensions(dct, sym_dct={}, show_warnings=True): if show_warnings: print( '\t\tNote: rank designation is using an expression, expressions are currently not supported for generation, the value of 1 will be used') - print('\t\t The expression used in the definition is: [%s]' % (dct['attrib']['rank'])) + print(f"\t\t The expression used in the definition is: [{dct['attrib']['rank']}]") else: if show_warnings: print( '\t\tError: rank designation is using a symbol that has not been defined in Symbols table or it is a comment') - print('\t\t [%s]' % (dct['attrib']['rank'])) + print(f"\t\t [{dct['attrib']['rank']}]") return(False) if(rank <= len(dct['attrib']['dim'])): return(True) else: if show_warnings: - print('\t\tError: Incorrect number of dim sections for this dimensions specification, should be at least [%d] found [%d]' % (rank, len(dct['attrib']['dim']))) - print('\t\t[%s]' % dct['abspath']) + print(f"\t\tError: Incorrect number of dim sections for this dimensions specification, should be at least [{rank}] found [{len(dct['attrib']['dim'])}]") + print(f"\t\t[{dct['abspath']}]") return (False) else: #print('\t\tError: dimensions must specify a rank, this does not >', dct) @@ -506,7 +506,7 @@ def get_nx_data_by_type(nx_type, dimensions=None, sym_dct={}): if 'value' in dimensions.keys(): if not has_numbers(dimensions['value']): if dimensions['value'] not in sym_dct.keys(): - print('\t-Most likely this [%s] should be a symbol but has not been defined in the Symbols table as one' % dimensions['value']) + print(f"\t-Most likely this [{dimensions['value']}] should be a symbol but has not been defined in the Symbols table as one") rank = 1 sym_dct[dimensions['value']] = rank else: @@ -517,7 +517,7 @@ def get_nx_data_by_type(nx_type, dimensions=None, sym_dct={}): for r in range(0, rank): #verify length of dim as teh number of dim entries must equal rank size if (len(dimensions['dim']) < rank): - print('\t-Invalid NXDL file, the number of DIM entries must equal the size of specified rank [%d]' % rank) + print(f"\t-Invalid NXDL file, the number of DIM entries must equal the size of specified rank [{rank}]") errors = True return(None) # check if symbol was used in defining a dim value @@ -529,7 +529,7 @@ def get_nx_data_by_type(nx_type, dimensions=None, sym_dct={}): return (None) if not has_numbers(str(dimensions['dim'][r]['value'])): if dimensions['dim'][r]['value'] not in sym_dct.keys(): - print('\t-Most likely this [%s] should be a symbol but has not been entered in the definition as one' % dimensions['dim'][r]['value']) + print(f"\t-Most likely this [{dimensions['dim'][r]['value']}] should be a symbol but has not been entered in the definition as one") val = 1 sym_dct[dimensions['dim'][r]['value']] = val @@ -596,9 +596,11 @@ def get_nx_data_by_type(nx_type, dimensions=None, sym_dct={}): return (1) elif (nx_type.find('NX_UINT') > -1): if (use_dims): - return (data) + #return (data) + return(np.uintc(data)) #force a unit32 else: - return (1) + #return (1) + return(np.uintc(1)) elif (nx_type.find('NX_DIMENSIONLESS') > -1): if (use_dims): return (data) @@ -628,7 +630,7 @@ def fatal_error(msg): ''' a fatal error has occurred, print message ''' - print('\tFATAL_ERROR: %s' % msg) + print(f"\tFATAL_ERROR: {msg}") def get_entry(nf): @@ -733,12 +735,12 @@ def process_symbols(soup, sym_args_dct={}): if(sym_nm in sym_args_dct.keys()): #use the user passed in value for this symbol val = sym_args_dct[sym_nm] - print('\tsymbol [%s] will use the value [%s] passed in by user' % (sym_nm, str(val))) + print(f"\tsymbol [{sym_nm}] will use the value [{ str(val)}] passed in by user") else: if(sym_nm == 'dataRank'): - print('\tsymbol [%s] was not defined and passed in in the usr_args, so it will be auto calculated at every occurance' % (sym_nm)) + print(f"\tsymbol [{sym_nm}] was not defined and passed in in the usr_args, so it will be auto calculated at every occurance") else: - print('\tsymbol [%s] was not defined and passed in in the usr_args, so using default value of 1 for [%s]' % (sym_nm,sym_nm)) + print(f"\tsymbol [{sym_nm}] was not defined and passed in in the usr_args, so using default value of 1 for [{sym_nm}]") if(type(val) is dict): #if users passed in symbols from the command line these will be in a dict @@ -798,12 +800,12 @@ def process_symbols(soup, sym_args_dct={}): def get_extending_class(fname, cls_nm, sym_args_dct={}, dct={}, docs=[], report_symbols_only=False): fparts = fname.split('\\') - eclass_file = fname.replace(fparts[-1], '%s.nxdl.xml' % cls_nm) + eclass_file = fname.replace(fparts[-1], f"{cls_nm}.nxdl.xml") if not pathlib.Path(eclass_file).exists(): - print('get_extending_class: XML file [%s] does not exist' % eclass_file) + print(f"get_extending_class: XML file [{eclass_file}] does not exist") return({}, {}, {}) - print('extending with [%s]' % cls_nm) + print(f"extending with [{cls_nm}]") dct, syms, docs = get_xml_paths(eclass_file, sym_args_dct=sym_args_dct, dct=dct, docs=docs, report_symbols_only=report_symbols_only, allow_extend=True) return (dct, syms, docs) @@ -814,12 +816,14 @@ def get_xml_root(fpath): ''' if not fpath.exists(): - print('XML file [%s] does not exist' % str(fpath)) + print(f"XML file [{fpath}] does not exist") return(None) - infile = open(str(fpath), "r") - contents = infile.read() - infile.close() + #infile = open(str(fpath), "r") + #contents = infile.read() + #infile.close() + with open(str(fpath), "r") as infile: + contents = infile.read() contents = contents.replace('xmlns="http://definition.nexusformat.org/nxdl/3.1"','') contents = contents.replace('xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\n', '') contents = contents.replace('xsi:schemaLocation="http://definition.nexusformat.org/nxdl/3.1 ../nxdl.xsd"', '') @@ -950,7 +954,7 @@ def get_parent_group(nf, ppath): pgrp = nf else: if ppath not in nf: - print('\t\tError: why doesnt [%s] exist?' % ppath) + print(f'\t\tError: why doesnt [{ppath}] exist?') else: pgrp = nf[ppath] return(pgrp) @@ -990,22 +994,20 @@ def print_script_group(dct): #grp_name = dct['abspath'].replace('/','') parent_grp = get_parent_path(dct['abspath']) grp_name = get_last_name_from_abspath(dct['abspath']) - #print('root[\'%s\'] = root.create_group(\'%s\')' % (get_parent_path(dct['abspath']), grp_name)) + #print('root[\'{}\'] = root.create_group(\'{}\')'.format(get_parent_path(dct['abspath']), grp_name)) if len(parent_grp) > 1: - #print('root[\'%s\'].create_group(\'%s\')' % (parent_grp, grp_name)) + #print('root[\'{}\'].create_group(\'{}\')'.format(parent_grp, grp_name)) h5py_script_lst.append(' ') - h5py_script_lst.append('root[\'%s\'].create_group(\'%s\')' % (parent_grp, grp_name)) + h5py_script_lst.append(f"root[\'{parent_grp}\'].create_group(\'{grp_name}\')") - nxsfrmt_script_lst.append('root[\'%s\'] = %s()' % (dct['abspath'], dct['attrib']['type'])) + nxsfrmt_script_lst.append(f"root[\'{dct['abspath']}\'] = {dct['attrib']['type']}()") else: - #print('root.create_group(\'%s\')' % (grp_name)) + #print('root.create_group(\'{}\')'.format(grp_name)) h5py_script_lst.append(' ') - h5py_script_lst.append('root.create_group(\'%s\')' % (grp_name)) - #h5py_script_lst.append('root[\'%s%s\'] = [()]' % (parent_grp, grp_name)) + h5py_script_lst.append(f"root.create_group(\'{grp_name}\')") - - nxsfrmt_script_lst.append('root[\'%s\'] = %s()' % (dct['abspath'], dct['attrib']['type'])) + nxsfrmt_script_lst.append(f"root[\'{dct['abspath']}\'] = {dct['attrib']['type']}()") def get_category(): ''' @@ -1065,7 +1067,7 @@ def create_groups(nf): doc = get_doc(d) if (doc): _string_attr(_grp, 'doc', doc) - #print('created: GROUP [%s]' % fix_nx_path(d['abspath'])) + #print('created: GROUP [{}]'.format(fix_nx_path(d['abspath'])) @@ -1127,7 +1129,7 @@ def create_fields(nf, sym_dct={}, category=''): else: data = get_nx_data_by_type(_type, use_dim_dct_lst, sym_dct) if(data is None): - print('\t\tError: There is an issue with a non standard field for fieldname [%s]: ' % name) + print(f"\t\tError: There is an issue with a non standard field for fieldname [{name}]: ") return(False) # if name.find('depends_on'): @@ -1135,7 +1137,7 @@ def create_fields(nf, sym_dct={}, category=''): # data = ppath _dset = _dataset(pgrp, name, data, _type, nx_units=units) - #print('created: FIELD [%s]' % fix_nx_path(d['abspath'])) + #print('created: FIELD [{}]'.format(fix_nx_path(d['abspath'])) _string_attr(_dset, 'EX_required', get_min_occurs(d, category)) doc = get_doc(d) if (doc): @@ -1182,8 +1184,8 @@ def fix_link_target(nf, trgt_dct, hdf5_path_lst): ''' ppath = get_parent_path(trgt_dct['abspath']) if ppath not in nf: - print('\t-Error: while checking the links, this parent path [%s] not exist in generated file' % ppath) - print('\t\ttarget path: [%s] ' % trgt_dct['abspath']) + print(f"\t-Error: while checking the links, this parent path [{ppath}] not exist in generated file") + print(f"\t\ttarget path: [{trgt_dct['abspath']}] ") exit() else: add_line_to_scripts('# Create the LINKS ', with_prec_newline=True) @@ -1205,8 +1207,8 @@ def fix_link_target(nf, trgt_dct, hdf5_path_lst): link_nm = get_last_name_in_path(trgt_dct['abspath']) #if(target_str not in nf): if (pstr not in nf): - #print('\t-Error: The link path [%s] specified in NXDL file for [%s] does not exist in the generated file' % (target_str, trgt_dct['abspath'])) - print('\t-Link Error: This field [%s] specifies a link target that does not exist in the generated file [%s]' % (trgt_dct['abspath'], target_str)) + #print('\t-Error: The link path [{}] specified in NXDL file for [{}] does not exist in the generated file'.format(target_str, trgt_dct['abspath'])) + print(f"\t-Link Error: This field [{trgt_dct['abspath']}] specifies a link target that does not exist in the generated file [{target_str}]") #exit() else: #force the link to be what we found in the file @@ -1214,12 +1216,12 @@ def fix_link_target(nf, trgt_dct, hdf5_path_lst): pgrp[link_nm].attrs['target'] = pstr #need to add this to the list oof script items - h5py_script_lst.append('root[\'%s%s\'] = h5py.SoftLink(\'%s\')' % (ppath, link_nm, pstr)) - h5py_script_lst.append('root[\'%s\'].attrs[\'%s\'] = \'%s\'' % (trgt_dct['abspath'], 'target', target_str)) + h5py_script_lst.append(f"root[\'{ppath}{link_nm}\'] = h5py.SoftLink(\'{pstr}\')") + h5py_script_lst.append(f"root[\'{trgt_dct['abspath']}\'].attrs[\'target\'] = \'{target_str}\'") - nxsfrmt_script_lst.append('root[\'%s%s\'] = NXlink(target=\'%s\')' % (ppath, link_nm, pstr)) + nxsfrmt_script_lst.append(f"root[\'{ppath}{link_nm}\'] = NXlink(target=\'{pstr}\')") #root['/entry/data/data'] = NXlink(target='/entry/instrument/detector/data') - #nxsfrmt_script_lst.append('root[\'%s\'].attrs[\'%s\'] = \'%s\'' % (trgt_dct['abspath'], 'target', target_str)) + #nxsfrmt_script_lst.append('root[\'{}\'].attrs[\'{}\'] = \'{}\''.format(trgt_dct['abspath'], 'target', target_str)) @@ -1243,7 +1245,7 @@ def create_attributes(nf):#, dct): #print(d) ppath = get_parent_path(d['abspath']) if ppath not in nf: - print('\t-Error: while creating Attributes, this parent path [%s] not exist in generated file' % ppath) + print(f"\t-Error: while creating Attributes, this parent path [{ppath}] not exist in generated file") exit() else: pgrp = nf[ppath] @@ -1280,7 +1282,7 @@ def add_docs(nf, docs): # print(d) ppath = d['abspath'] if ppath not in nf: - #print('\t-Error: while adding doc strings, this parent path [%s] not exist in generated file' % ppath) + #print('\t-Error: while adding doc strings, this parent path [{}] not exist in generated file'.format(ppath) #exit() #just skip it continue @@ -1312,7 +1314,7 @@ def print_nxsfrmt_ex_start(fname): nxsfrmt_script_lst.append('import numpy as np') nxsfrmt_script_lst.append('from nexusformat.nexus import *') nxsfrmt_script_lst.append(' ') - nxsfrmt_script_lst.append('# Note this example script was generated by nxdl_to_hdf5.py using the current \n# installed version of the NEXUS definitions ver[%s] ' % rel_ver) + nxsfrmt_script_lst.append(f"# Note this example script was generated by nxdl_to_hdf5.py using the current \n# installed version of the NEXUS definitions ver[{rel_ver}] ") nxsfrmt_script_lst.append(' ') nxsfrmt_script_lst.append('root = NXroot()') @@ -1332,9 +1334,9 @@ def print_h5py_ex_start(fname): h5py_script_lst.append('import os') h5py_script_lst.append(' ') h5py_script_lst.append( - '# Note this example script was generated by nxdl_to_hdf5.py using the current \n# installed version of the NEXUS definitions ver[%s] ' % rel_ver) + f"# Note this example script was generated by nxdl_to_hdf5.py using the current \n# installed version of the NEXUS definitions ver[{rel_ver}] ") h5py_script_lst.append(' ') - h5py_script_lst.append('root = h5py.File(\'%s.h5\', \'w\')' % (fname)) + h5py_script_lst.append(f"root = h5py.File(\'{fname}.h5\', \'w\')") def print_script_close(class_nm): ''' @@ -1358,7 +1360,7 @@ def print_nxsfrmt_close(class_nm): append the proper lines to close each example script for nexusformat ''' nxsfrmt_script_lst.append('\n# Save the file') - nxsfrmt_script_lst.append('root.save(\'%s.nxs\', \'w\')\n\n' % class_nm) + nxsfrmt_script_lst.append(f"root.save(\'{class_nm}.nxs\', \'w\')\n\n") def make_class_as_nf_file(class_nm, dest_dir, symbol_dct={}): @@ -1366,105 +1368,102 @@ def make_class_as_nf_file(class_nm, dest_dir, symbol_dct={}): create an hdf5 file of the application definition (class_nm) in the specified destination directory ''' - print('\texporting: [%s]' % class_nm) + print(f"\texporting: [{class_nm}]") res = True category = def_dir = get_category() if not pathlib.Path(dest_dir).exists(): os.makedirs(dest_dir) - fpath = str(pathlib.PurePath(dest_dir, '%s.hdf5' % class_nm)) - nf = h5py.File(fpath, 'w') + fpath = str(pathlib.PurePath(dest_dir, f'{class_nm}.h5')) + with h5py.File(fpath, 'w') as nf: - sym_dct = {} - # process SYMBOLS - for d in tables_dct['symbols'].all(): - sym_nm = d['name'] - if (True): - #sym_nm = d['name'] - val = int(d['value']) - else: - #sym_nm = d['name'] - val = default_symbol_val + sym_dct = {} + # process SYMBOLS + for d in tables_dct['symbols'].all(): + sym_nm = d['name'] + if (True): + #sym_nm = d['name'] + val = int(d['value']) + else: + #sym_nm = d['name'] + val = default_symbol_val + + sym_dct[sym_nm] = val - sym_dct[sym_nm] = val + #create the symbol string attrs in the root of the file + _string_attr(nf, sym_nm, d['doc']) - #create the symbol string attrs in the root of the file - _string_attr(nf, sym_nm, d['doc']) + for l in tables_dct['dimensions'].all(): + if 'rank' in l['attrib'].keys(): + if l['attrib']['rank'] == sym_nm: + # substitute the value + l['attrib']['rank'] = val - for l in tables_dct['dimensions'].all(): - if 'rank' in l['attrib'].keys(): - if l['attrib']['rank'] == sym_nm: - # substitute the value - l['attrib']['rank'] = val + for l in tables_dct['dim'].all(): + if 'value' in l['attrib'].keys(): + if l['attrib']['value'] == sym_nm: + #substitute the value + l['attrib']['value'] = val for l in tables_dct['dim'].all(): if 'value' in l['attrib'].keys(): - if l['attrib']['value'] == sym_nm: - #substitute the value - l['attrib']['value'] = val + val = l['attrib']['value'] + if not has_numbers(val): + # does it also contain spaces? if so then it is not a symbol + if val.find(' ') == -1: + if val not in sym_dct.keys(): + print(f"\t-Symbol Warning: the symbol [{val}] is being used but has not been defined in the Symbols table, setting to default value of 1") + sym_dct[val] = 1 + l['attrib']['value'] = 1 - for l in tables_dct['dim'].all(): - if 'value' in l['attrib'].keys(): - val = l['attrib']['value'] - if not has_numbers(val): - # does it also contain spaces? if so then it is not a symbol - if val.find(' ') == -1: - if val not in sym_dct.keys(): - print('\t-Symbol Warning: the symbol [%s] is being used but has not been defined in the Symbols table, setting to default value of 1' % val) - sym_dct[val] = 1 - l['attrib']['value'] = 1 + print_script_start(class_nm) - print_script_start(class_nm) + # create GROUPs + create_groups(nf) - # create GROUPs - create_groups(nf) + # # create FIELDs + res = create_fields(nf, sym_dct, category) - # # create FIELDs - res = create_fields(nf, sym_dct, category) + # create Links + create_links(nf) - # create Links - create_links(nf) + # add the docs from fields and groups now that they exist + add_docs(nf, tables_dct['doc'].all()) - # add the docs from fields and groups now that they exist - add_docs(nf, tables_dct['doc'].all()) - - h5py_script_lst.append(' ') - nxsfrmt_script_lst.append(' ') + h5py_script_lst.append(' ') + nxsfrmt_script_lst.append(' ') - if(res): - # create Attributes - create_attributes(nf) - - _string_attr(nf, 'file_name', fpath.replace('\\', '/'), do_print=False) - _string_attr(nf, 'file_time', make_timestamp_now(), do_print=False) - _string_attr(nf, 'HDF5_Version', h5py.version.hdf5_version, do_print=False) - _string_attr(nf, 'h5py_version', h5py.version.version, do_print=False) - #_string_attr(nf, 'NEXUS_release_ver', rel_ver) - entry_grp, entry_nm = get_entry(nf) - if entry_grp is None: - fatal_error('File does not contain an NXentry group') - return(None) - #ensure the definition is correct - entry_grp['definition'][()] = get_cur_def_name() - _string_attr(nf, 'default', entry_nm) - nx_data_grp, nx_data_nm = get_NXdata_nm(nf) - if (nx_data_nm): - _string_attr(entry_grp, 'default', nx_data_nm) - dset_nm = get_NXdataset_nm(nx_data_grp) - if (dset_nm): - _string_attr(nx_data_grp, 'signal', dset_nm) - _string_attr(nx_data_grp[dset_nm], 'signal', '1') - - _dataset(nf, 'README', readme_string % (rel_ver, class_nm), 'NX_CHAR', nx_units='NX_UNITLESS', dset={}, do_print=False) - - prune_extended_entries(nf) - - nf.close() - #print('finished exporting to [%s]' % fpath) - else: - print('Failed exporting [%s]' % fpath) - nf.close() + if(res): + # create Attributes + create_attributes(nf) + + _string_attr(nf, 'file_name', fpath.replace('\\', '/'), do_print=False) + _string_attr(nf, 'file_time', make_timestamp_now(), do_print=False) + _string_attr(nf, 'HDF5_Version', h5py.version.hdf5_version, do_print=False) + _string_attr(nf, 'h5py_version', h5py.version.version, do_print=False) + #_string_attr(nf, 'NEXUS_release_ver', rel_ver) + entry_grp, entry_nm = get_entry(nf) + if entry_grp is None: + fatal_error('File does not contain an NXentry group') + return(None) + #ensure the definition is correct + entry_grp['definition'][()] = get_cur_def_name() + _string_attr(nf, 'default', entry_nm) + nx_data_grp, nx_data_nm = get_NXdata_nm(nf) + if (nx_data_nm): + _string_attr(entry_grp, 'default', nx_data_nm) + dset_nm = get_NXdataset_nm(nx_data_grp) + if (dset_nm): + _string_attr(nx_data_grp, 'signal', dset_nm) + _string_attr(nx_data_grp[dset_nm], 'signal', '1') + + _dataset(nf, 'README', readme_string.format(rel_ver, class_nm), 'NX_CHAR', nx_units='NX_UNITLESS', dset={}, do_print=False) + + prune_extended_entries(nf) + #print('finished exporting to [{}]'.format(fpath) + else: + print(f"Failed exporting [{fpath}]") print_script_versions(class_nm) print_script_close(class_nm) @@ -1485,14 +1484,14 @@ def print_script_versions(fname): print_nxsfrmt_versions(fname) def print_h5py_versions(class_nm): - h5py_script_lst.append('root.attrs[\'file_name\'] = os.path.abspath(\'%s\')' % class_nm) + h5py_script_lst.append(f"root.attrs[\'file_name\'] = os.path.abspath(\'{class_nm}\')") h5py_script_lst.append('root.attrs[\'file_time\'] = datetime.datetime.now().isoformat()') h5py_script_lst.append('root.attrs[\'h5py_version\'] = h5py.version.version') h5py_script_lst.append('root.attrs[\'HDF5_Version\'] = h5py.version.hdf5_version') def print_nxsfrmt_versions(class_nm): - # nxsfrmt_script_lst.append('root.attrs[\'file_name\'] = os.path.abspath(\'%s\')' % class_nm) + # nxsfrmt_script_lst.append('root.attrs[\'file_name\'] = os.path.abspath(\'{}\')'.format(class_nm) # nxsfrmt_script_lst.append('root.attrs[\'file_time\'] = datetime.datetime.now().isoformat()') # nxsfrmt_script_lst.append('root.attrs[\'nexusformat_version\'] = nexusformat.__version__') # nxsfrmt_script_lst.append('root.attrs[\'HDF5_Version\'] = h5py.version.hdf5_version') @@ -1518,35 +1517,36 @@ def write_script(mod_name, path, class_nm, script_lst): if not pathlib.Path(path).exists(): os.makedirs(path) - f = open(pathlib.PurePath(path, 'ex_%s_%s.py' % (mod_name,class_nm)), 'w') - for l in script_lst: - f.write(l + '\n') - f.close() + + with open(pathlib.PurePath(path, f"ex_{mod_name}_{pathlib.PurePath(class_nm).name}.py"), 'w') as f: + for l in script_lst: + f.write(l + '\n') + def build_class_db(class_dir='base_classes', desired_class=None, defdir=None, sym_args_dct={},report_symbols_only=False): ''' build a nxdl definition into a dict - class_dir: one of the following: 'applications','base_classes' or 'contributed_definitions' - desired_class: the name of a desired class definition such as 'NXstxm', if left as None then all class definitions\ + class_dir: one of the following: ``applications``,``base_classes`` or ``contributed_definitions`` + desired_class: the name of a desired class definition such as ``NXstxm``, if left as None then all class definitions\ will be returned. defdir: if the definitions are located somewhere other than in a subdir of nexpy ''' if(defdir is None): - class_path = pkg_resources.resource_filename('nexpy', 'definitions/%s' % class_dir) + class_path = pathlib.PurePath(pkg_resources.resource_filename('nexpy', f'definitions/{class_dir}')) else: class_path = pathlib.PurePath(defdir, class_dir) nxdl_files = list(map(os.path.basename, glob.glob(str(pathlib.PurePath(class_path, '*.nxdl.xml'))))) dct = {} if(desired_class): - nxdl_files = [pathlib.PurePath(class_path, '%s.nxdl.xml' % desired_class)] + nxdl_files = [class_path / f"{desired_class}.nxdl.xml"] for nxdl_file in nxdl_files: nxdl_file = str(nxdl_file) class_nm = nxdl_file.replace('.nxdl.xml', '') if(class_nm.find(pathlib.os.sep) > -1): class_nm = class_nm.split(pathlib.os.sep)[-1] - print('\nProcessing [%s]' % nxdl_file.replace(pathlib.os.getcwd(),'.')) + print(f"\nProcessing [{nxdl_file.replace(pathlib.os.getcwd(),'.')}]") resp_dict, syms, docs = get_xml_paths(nxdl_file, sym_args_dct=sym_args_dct, report_symbols_only=report_symbols_only) dct[class_nm] = resp_dict return(dct, syms, docs) @@ -1564,8 +1564,8 @@ def process_nxdl(class_nm, def_subdir): given the class name and the destination directory, parse the nxdl file and produce an hdf5 file as well as example scripts using h5py and nexusformat ''' - if class_nm.find('.nxdl.xml') > -1: - class_nm = class_nm.replace('.nxdl.xml', '') + if class_nm.name.find('.nxdl.xml') > -1: + class_nm = class_nm.name.replace('.nxdl.xml', '') build_class_db(def_subdir, desired_class=class_nm, defdir=def_dir, sym_args_dct=sym_args_dct, report_symbols_only=report_symbols_only) @@ -1598,25 +1598,25 @@ def process_nxdl(class_nm, def_subdir): class_path = None report_symbols_only = False if args.file: - print('\tProcess this specific definition [%s]' % args.file) + print(f"\tProcess this specific definition [{args.file}]") class_nm = args.file elif args.directory: - print('\tProcess this entire directory [%s]' % args.directory) + print(f"\tProcess this entire directory [{args.directory}]") def_subdirs = [args.directory] else: print('Processing the definitions in the following sub directories', def_subdirs) if args.symbols: - print('\tProcess using the following symbols [%s]' % args.symbols) + print(f"\tProcess using the following symbols [{args.symbols}]") sym_args_dct = symbol_args_to_dict(args.symbols) if args.nxdefdir: - print('\tUsing the following definitions base directory [%s]' % args.nxdefdir) + print(f"\tUsing the following definitions base directory [{args.nxdefdir}]") def_dir = pathlib.Path(args.nxdefdir) else: #use the definitions in a neighboring directory def_dir = pathlib.Path("This non-existing path is used for testing.") - cwd = pathlib.Path(__file__).parent + cwd = pathlib.Path(pathlib.os.getcwd()) for _path in ( (cwd.parent / "definitions"), (cwd.parent.parent / "definitions"), @@ -1648,7 +1648,10 @@ def process_nxdl(class_nm, def_subdir): class_path = None if(class_path is None): - print('Error: the class name [%s.nxdl.xml] doesnt exist in either of the applications or contributed_definitions subdirectories' % class_nm) + raise ValueError( + f'''Error: the class name [{class_nm}.nxdl.xml] doesnt exist in ''' + '''either of the applications or contributed_definitions subdirectories''' + ) exit() else: process_nxdl(class_path, def_subdir) @@ -1658,7 +1661,7 @@ def process_nxdl(class_nm, def_subdir): for def_subdir in def_subdirs: files = sorted((def_dir / def_subdir).iterdir()) for class_path in files: - process_nxdl(str(class_path), def_subdir) + process_nxdl(class_path, def_subdir) init_database() From 75153b32be6ef5b3a27a3fc3d09fd708cad61bc5 Mon Sep 17 00:00:00 2001 From: rb Date: Thu, 3 Mar 2022 14:39:01 -0600 Subject: [PATCH 10/11] added ability to generate contributed definitions --- .gitignore | 3 + .../{NXarchive.hdf5 => NXarchive.h5} | Bin 34848 -> 34848 bytes .../applications/{NXarpes.hdf5 => NXarpes.h5} | Bin 30744 -> 30744 bytes .../{NXcanSAS.hdf5 => NXcanSAS.h5} | Bin 76032 -> 76032 bytes .../{NXdirecttof.hdf5 => NXdirecttof.h5} | Bin 36016 -> 36016 bytes .../applications/{NXfluo.hdf5 => NXfluo.h5} | Bin 23520 -> 23520 bytes .../{NXindirecttof.hdf5 => NXindirecttof.h5} | Bin 34080 -> 34080 bytes .../{NXiqproc.hdf5 => NXiqproc.h5} | Bin 28592 -> 28592 bytes .../{NXlauetof.hdf5 => NXlauetof.h5} | Bin 27080 -> 27080 bytes .../{NXmonopd.hdf5 => NXmonopd.h5} | Bin 28736 -> 28736 bytes .../nxdl/applications/{NXmx.hdf5 => NXmx.h5} | Bin 85296 -> 85296 bytes .../nxdl/applications/NXpeem.h5 | Bin 0 -> 28720 bytes .../{NXrefscan.hdf5 => NXrefscan.h5} | Bin 24912 -> 24912 bytes .../{NXreftof.hdf5 => NXreftof.h5} | Bin 30136 -> 30136 bytes .../applications/{NXsas.hdf5 => NXsas.h5} | Bin 39312 -> 39312 bytes .../{NXsastof.hdf5 => NXsastof.h5} | Bin 37464 -> 37464 bytes .../applications/{NXscan.hdf5 => NXscan.h5} | Bin 19184 -> 19184 bytes .../applications/{NXspe.hdf5 => NXspe.h5} | Bin 23256 -> 23256 bytes .../applications/{NXsqom.hdf5 => NXsqom.h5} | Bin 29208 -> 29208 bytes .../applications/{NXstxm.hdf5 => NXstxm.h5} | Bin 34448 -> 34448 bytes .../applications/{NXtas.hdf5 => NXtas.h5} | Bin 35952 -> 35952 bytes .../{NXtofnpd.hdf5 => NXtofnpd.h5} | Bin 29768 -> 29768 bytes .../{NXtofraw.hdf5 => NXtofraw.h5} | Bin 31304 -> 31304 bytes .../{NXtofsingle.hdf5 => NXtofsingle.h5} | Bin 30184 -> 30184 bytes .../applications/{NXtomo.hdf5 => NXtomo.h5} | Bin 30256 -> 30256 bytes .../{NXtomophase.hdf5 => NXtomophase.h5} | Bin 33464 -> 33464 bytes .../{NXtomoproc.hdf5 => NXtomoproc.h5} | Bin 28048 -> 28048 bytes .../applications/{NXxas.hdf5 => NXxas.h5} | Bin 24968 -> 24968 bytes .../{NXxasproc.hdf5 => NXxasproc.h5} | Bin 18584 -> 18584 bytes .../applications/{NXxbase.hdf5 => NXxbase.h5} | Bin 32288 -> 32288 bytes .../{NXxeuler.hdf5 => NXxeuler.h5} | Bin 37080 -> 37080 bytes .../{NXxkappa.hdf5 => NXxkappa.h5} | Bin 37496 -> 37496 bytes .../applications/{NXxlaue.hdf5 => NXxlaue.h5} | Bin 41120 -> 41120 bytes .../{NXxlaueplate.hdf5 => NXxlaueplate.h5} | Bin 42008 -> 42008 bytes .../applications/{NXxnb.hdf5 => NXxnb.h5} | Bin 36088 -> 36088 bytes .../applications/{NXxrot.hdf5 => NXxrot.h5} | Bin 38808 -> 38808 bytes .../contributed_definitions/NXcontainer.h5 | Bin 0 -> 6144 bytes .../nxdl/contributed_definitions/NXcsg.h5 | Bin 0 -> 6144 bytes .../contributed_definitions/NXcxi_ptycho.h5 | Bin 0 -> 31416 bytes .../NXelectrostatic_kicker.h5 | Bin 0 -> 6144 bytes .../NXmagnetic_kicker.h5 | Bin 0 -> 6144 bytes .../nxdl/contributed_definitions/NXquadric.h5 | Bin 0 -> 6144 bytes .../NXquadrupole_magnet.h5 | Bin 0 -> 6144 bytes .../contributed_definitions/NXseparator.h5 | Bin 0 -> 6144 bytes .../contributed_definitions/NXsnsevent.h5 | Bin 0 -> 96104 bytes .../contributed_definitions/NXsnshisto.h5 | Bin 0 -> 101912 bytes .../NXsolenoid_magnet.h5 | Bin 0 -> 6144 bytes .../NXsolid_geometry.h5 | Bin 0 -> 6144 bytes .../contributed_definitions/NXspecdata.h5 | Bin 0 -> 52344 bytes .../contributed_definitions/NXspin_rotator.h5 | Bin 0 -> 6144 bytes .../nxdl/contributed_definitions/NXxpcs.h5 | Bin 0 -> 60464 bytes .../python_scripts/h5py/ex_h5py_NXarchive.py | 4 +- .../python_scripts/h5py/ex_h5py_NXarpes.py | 2 +- .../python_scripts/h5py/ex_h5py_NXcanSAS.py | 32 +- .../h5py/ex_h5py_NXcxi_ptycho.py | 179 +++++ .../h5py/ex_h5py_NXdirecttof.py | 2 +- .../python_scripts/h5py/ex_h5py_NXfluo.py | 2 +- .../h5py/ex_h5py_NXindirecttof.py | 2 +- .../python_scripts/h5py/ex_h5py_NXmonopd.py | 6 +- .../nxdl/python_scripts/h5py/ex_h5py_NXmx.py | 22 +- .../python_scripts/h5py/ex_h5py_NXpeem.py | 150 ++++ .../python_scripts/h5py/ex_h5py_NXrefscan.py | 4 +- .../python_scripts/h5py/ex_h5py_NXreftof.py | 4 +- .../nxdl/python_scripts/h5py/ex_h5py_NXsas.py | 6 +- .../python_scripts/h5py/ex_h5py_NXsastof.py | 2 +- .../python_scripts/h5py/ex_h5py_NXscan.py | 4 +- .../python_scripts/h5py/ex_h5py_NXsnsevent.py | 620 +++++++++++++++++ .../python_scripts/h5py/ex_h5py_NXsnshisto.py | 644 ++++++++++++++++++ .../nxdl/python_scripts/h5py/ex_h5py_NXspe.py | 2 +- .../python_scripts/h5py/ex_h5py_NXspecdata.py | 304 +++++++++ .../python_scripts/h5py/ex_h5py_NXstxm.py | 6 +- .../nxdl/python_scripts/h5py/ex_h5py_NXtas.py | 2 +- .../python_scripts/h5py/ex_h5py_NXtofnpd.py | 2 +- .../python_scripts/h5py/ex_h5py_NXtofraw.py | 2 +- .../h5py/ex_h5py_NXtofsingle.py | 2 +- .../python_scripts/h5py/ex_h5py_NXtomo.py | 4 +- .../h5py/ex_h5py_NXtomophase.py | 4 +- .../python_scripts/h5py/ex_h5py_NXtomoproc.py | 2 +- .../nxdl/python_scripts/h5py/ex_h5py_NXxas.py | 2 +- .../python_scripts/h5py/ex_h5py_NXxasproc.py | 4 +- .../python_scripts/h5py/ex_h5py_NXxbase.py | 2 +- .../python_scripts/h5py/ex_h5py_NXxeuler.py | 2 +- .../python_scripts/h5py/ex_h5py_NXxkappa.py | 2 +- .../python_scripts/h5py/ex_h5py_NXxlaue.py | 2 +- .../h5py/ex_h5py_NXxlaueplate.py | 2 +- .../nxdl/python_scripts/h5py/ex_h5py_NXxnb.py | 2 +- .../python_scripts/h5py/ex_h5py_NXxpcs.py | 314 +++++++++ .../python_scripts/h5py/ex_h5py_NXxrot.py | 2 +- .../nexusformat/ex_nexusformat_NXarchive.py | 4 +- .../nexusformat/ex_nexusformat_NXarpes.py | 2 +- .../nexusformat/ex_nexusformat_NXcanSAS.py | 6 +- .../ex_nexusformat_NXcxi_ptycho.py | 158 +++++ .../nexusformat/ex_nexusformat_NXdirecttof.py | 2 +- .../nexusformat/ex_nexusformat_NXfluo.py | 2 +- .../ex_nexusformat_NXindirecttof.py | 2 +- .../nexusformat/ex_nexusformat_NXmonopd.py | 2 +- .../nexusformat/ex_nexusformat_NXmx.py | 8 +- .../nexusformat/ex_nexusformat_NXpeem.py | 130 ++++ .../nexusformat/ex_nexusformat_NXrefscan.py | 4 +- .../nexusformat/ex_nexusformat_NXreftof.py | 4 +- .../nexusformat/ex_nexusformat_NXsas.py | 4 +- .../nexusformat/ex_nexusformat_NXsastof.py | 2 +- .../nexusformat/ex_nexusformat_NXscan.py | 4 +- .../nexusformat/ex_nexusformat_NXsnsevent.py | 545 +++++++++++++++ .../nexusformat/ex_nexusformat_NXsnshisto.py | 567 +++++++++++++++ .../nexusformat/ex_nexusformat_NXspecdata.py | 268 ++++++++ .../nexusformat/ex_nexusformat_NXstxm.py | 4 +- .../nexusformat/ex_nexusformat_NXtas.py | 2 +- .../nexusformat/ex_nexusformat_NXtofnpd.py | 2 +- .../nexusformat/ex_nexusformat_NXtofraw.py | 2 +- .../nexusformat/ex_nexusformat_NXtofsingle.py | 2 +- .../nexusformat/ex_nexusformat_NXtomo.py | 4 +- .../nexusformat/ex_nexusformat_NXtomophase.py | 4 +- .../nexusformat/ex_nexusformat_NXtomoproc.py | 2 +- .../nexusformat/ex_nexusformat_NXxas.py | 2 +- .../nexusformat/ex_nexusformat_NXxasproc.py | 2 +- .../nexusformat/ex_nexusformat_NXxbase.py | 2 +- .../nexusformat/ex_nexusformat_NXxeuler.py | 2 +- .../nexusformat/ex_nexusformat_NXxkappa.py | 2 +- .../nexusformat/ex_nexusformat_NXxlaue.py | 2 +- .../ex_nexusformat_NXxlaueplate.py | 2 +- .../nexusformat/ex_nexusformat_NXxnb.py | 2 +- .../nexusformat/ex_nexusformat_NXxpcs.py | 278 ++++++++ .../nexusformat/ex_nexusformat_NXxrot.py | 2 +- nxdl/db.json | 0 nxdl/nxdl_to_hdf5.py | 44 +- 126 files changed, 4297 insertions(+), 131 deletions(-) rename autogenerated_examples/nxdl/applications/{NXarchive.hdf5 => NXarchive.h5} (89%) rename autogenerated_examples/nxdl/applications/{NXarpes.hdf5 => NXarpes.h5} (94%) rename autogenerated_examples/nxdl/applications/{NXcanSAS.hdf5 => NXcanSAS.h5} (91%) rename autogenerated_examples/nxdl/applications/{NXdirecttof.hdf5 => NXdirecttof.h5} (94%) rename autogenerated_examples/nxdl/applications/{NXfluo.hdf5 => NXfluo.h5} (94%) rename autogenerated_examples/nxdl/applications/{NXindirecttof.hdf5 => NXindirecttof.h5} (94%) rename autogenerated_examples/nxdl/applications/{NXiqproc.hdf5 => NXiqproc.h5} (95%) rename autogenerated_examples/nxdl/applications/{NXlauetof.hdf5 => NXlauetof.h5} (93%) rename autogenerated_examples/nxdl/applications/{NXmonopd.hdf5 => NXmonopd.h5} (94%) rename autogenerated_examples/nxdl/applications/{NXmx.hdf5 => NXmx.h5} (94%) create mode 100644 autogenerated_examples/nxdl/applications/NXpeem.h5 rename autogenerated_examples/nxdl/applications/{NXrefscan.hdf5 => NXrefscan.h5} (83%) rename autogenerated_examples/nxdl/applications/{NXreftof.hdf5 => NXreftof.h5} (93%) rename autogenerated_examples/nxdl/applications/{NXsas.hdf5 => NXsas.h5} (94%) rename autogenerated_examples/nxdl/applications/{NXsastof.hdf5 => NXsastof.h5} (93%) rename autogenerated_examples/nxdl/applications/{NXscan.hdf5 => NXscan.h5} (94%) rename autogenerated_examples/nxdl/applications/{NXspe.hdf5 => NXspe.h5} (93%) rename autogenerated_examples/nxdl/applications/{NXsqom.hdf5 => NXsqom.h5} (95%) rename autogenerated_examples/nxdl/applications/{NXstxm.hdf5 => NXstxm.h5} (94%) rename autogenerated_examples/nxdl/applications/{NXtas.hdf5 => NXtas.h5} (94%) rename autogenerated_examples/nxdl/applications/{NXtofnpd.hdf5 => NXtofnpd.h5} (94%) rename autogenerated_examples/nxdl/applications/{NXtofraw.hdf5 => NXtofraw.h5} (93%) rename autogenerated_examples/nxdl/applications/{NXtofsingle.hdf5 => NXtofsingle.h5} (94%) rename autogenerated_examples/nxdl/applications/{NXtomo.hdf5 => NXtomo.h5} (94%) rename autogenerated_examples/nxdl/applications/{NXtomophase.hdf5 => NXtomophase.h5} (94%) rename autogenerated_examples/nxdl/applications/{NXtomoproc.hdf5 => NXtomoproc.h5} (95%) rename autogenerated_examples/nxdl/applications/{NXxas.hdf5 => NXxas.h5} (94%) rename autogenerated_examples/nxdl/applications/{NXxasproc.hdf5 => NXxasproc.h5} (80%) rename autogenerated_examples/nxdl/applications/{NXxbase.hdf5 => NXxbase.h5} (94%) rename autogenerated_examples/nxdl/applications/{NXxeuler.hdf5 => NXxeuler.h5} (92%) rename autogenerated_examples/nxdl/applications/{NXxkappa.hdf5 => NXxkappa.h5} (92%) rename autogenerated_examples/nxdl/applications/{NXxlaue.hdf5 => NXxlaue.h5} (94%) rename autogenerated_examples/nxdl/applications/{NXxlaueplate.hdf5 => NXxlaueplate.h5} (94%) rename autogenerated_examples/nxdl/applications/{NXxnb.hdf5 => NXxnb.h5} (94%) rename autogenerated_examples/nxdl/applications/{NXxrot.hdf5 => NXxrot.h5} (94%) create mode 100644 autogenerated_examples/nxdl/contributed_definitions/NXcontainer.h5 create mode 100644 autogenerated_examples/nxdl/contributed_definitions/NXcsg.h5 create mode 100644 autogenerated_examples/nxdl/contributed_definitions/NXcxi_ptycho.h5 create mode 100644 autogenerated_examples/nxdl/contributed_definitions/NXelectrostatic_kicker.h5 create mode 100644 autogenerated_examples/nxdl/contributed_definitions/NXmagnetic_kicker.h5 create mode 100644 autogenerated_examples/nxdl/contributed_definitions/NXquadric.h5 create mode 100644 autogenerated_examples/nxdl/contributed_definitions/NXquadrupole_magnet.h5 create mode 100644 autogenerated_examples/nxdl/contributed_definitions/NXseparator.h5 create mode 100644 autogenerated_examples/nxdl/contributed_definitions/NXsnsevent.h5 create mode 100644 autogenerated_examples/nxdl/contributed_definitions/NXsnshisto.h5 create mode 100644 autogenerated_examples/nxdl/contributed_definitions/NXsolenoid_magnet.h5 create mode 100644 autogenerated_examples/nxdl/contributed_definitions/NXsolid_geometry.h5 create mode 100644 autogenerated_examples/nxdl/contributed_definitions/NXspecdata.h5 create mode 100644 autogenerated_examples/nxdl/contributed_definitions/NXspin_rotator.h5 create mode 100644 autogenerated_examples/nxdl/contributed_definitions/NXxpcs.h5 create mode 100644 autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXcxi_ptycho.py create mode 100644 autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXpeem.py create mode 100644 autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXsnsevent.py create mode 100644 autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXsnshisto.py create mode 100644 autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXspecdata.py create mode 100644 autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxpcs.py create mode 100644 autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXcxi_ptycho.py create mode 100644 autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXpeem.py create mode 100644 autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXsnsevent.py create mode 100644 autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXsnshisto.py create mode 100644 autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXspecdata.py create mode 100644 autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxpcs.py create mode 100644 nxdl/db.json diff --git a/.gitignore b/.gitignore index ee3d1d9..7e82c6d 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,6 @@ # Microsoft VSCode settings.json launch.json + +#pyCharm +.idea diff --git a/autogenerated_examples/nxdl/applications/NXarchive.hdf5 b/autogenerated_examples/nxdl/applications/NXarchive.h5 similarity index 89% rename from autogenerated_examples/nxdl/applications/NXarchive.hdf5 rename to autogenerated_examples/nxdl/applications/NXarchive.h5 index ca542b4612851da9f99f6b15414fd8053486d4bb..6698ffbf99685d71e89dd3935438385e43624828 100644 GIT binary patch delta 620 zcmZ25foZ`6rVYQj#Ef(ejDaY`(8S8v#LCc6&(zSw*mANUcaS)CDf7)$+?QlooYfSQ zHV0^yaDrKr12kPG^BBK?b2i(UJYa+P$bTpFa&4wop59m=0qW+CZCB$;{1t0a5n42!NO1= zp#~a;6B1!zcpwQT=8(bz3C+y`=~tlM1BF*k7A(9#yf@iB9E=&0D@*dUO*t7LKnhA5 z85m*4wuz~kiNR#4QfUb@1_o}ZN>(UstY@TWxY@UqnT@ewb6|Bo`{V^V4x4{8O<-co O*xcFr7#eK_?Hd5q-nZ8P delta 672 zcmZ25foZ`6rVYQj#0+%}jCGAHLkvx=ObxA!jrEL-%#F<^3vvgEV@eqt8=D(!uHwEV z%ktDaDPePfW(g;lH90`jWipTP3pi)9jmZN>h$00u9Vjcn9L8#}*uo4`YcaXN<_m(e zz!u6mkmR!Yj-3TW?_>}!#sS6yS$D?~VcldNX9Q=njY|a+%s`jPf83CybUaQVq&C}l zqbT%6D4eY0kKk;M2|!jS6O53W>=S~-sR>2mtO-MKHs1+HHepT_LTd7vXe7>`7zAgt zP8=)@1rlnYVK^ZX7KR6sU}6p_Jdn`b9FTqm>OD|+W;tB_b_h#=wvaRmlpajrEN53^%_Osh4JPR#QycTwqYb31&?$ zFtC`cVD$yYaoHSW{eTgo$ia3G6PUHhK?f>i;0R+SIPow;lohx_m2EcgfXjNqSQETd zAcjm%aB|uF$HxL<63||k%{6`v5ZrT53X0An|&_4WLdr5TOFqb0ETH kvQE?kh-(C*VKzI&z?>g{ft4|1^TiZzh(Vhb(tij50JW%oCIA2c diff --git a/autogenerated_examples/nxdl/applications/NXcanSAS.hdf5 b/autogenerated_examples/nxdl/applications/NXcanSAS.h5 similarity index 91% rename from autogenerated_examples/nxdl/applications/NXcanSAS.hdf5 rename to autogenerated_examples/nxdl/applications/NXcanSAS.h5 index a6b9b6cd99099065574fe9bbcba7847689181a30..e7261a2e10a837f291ba2b64750f4e5110624c78 100644 GIT binary patch delta 1211 zcmZvaUr19?9LIN#*Ro+HQo6*4@%_y-{;CR0a=MHWYfQ z?M!aW7av5Hid{X*ltzpmB*X{XQ&7PkReG4-_P&+`~A-O{jM)6 z_@aW=n~f^Q7VgkkcK!|Qt|UXAvx2kqTr1H$PU5Mk8H?l)?N*TF9TDhU#r{z;`Lc#g z)pn7h_L8KLI$S%L1Ui_itv4c4)X9|ZHmE=sQ(8k4BKh4+iEdEudeX7RM9iCxH8&wV znK=#BJOPX~4k&kx2uCf*TBsFy(s; zy$w|dlURHTt@El#u`4wh8c`s*+RyBcc2Mi%Ohq~pF*P0Qgi<1(+Es_KEdz+d<)q&3 z0?3(39@E P;YOr+%0o^Q3g`U=TTg$< delta 1206 zcmZvaQAkr^6vuZyuVuq*NNuuwut6`D<8HdSi4PM7QxkHcqVr;6q6{pCqL2)nR%U9Z zeZ~!akq}uLaqCMqL1IrLVGurq4?V1&)Tc$SK6K{p-Mz!^%g6tB{^xw>obN^sxX1w~ zP2|Jf#gE-AnO|H-qCPq&lyOIQdV8oOc&XrPqJ|3`6Y5VdE+z`7(S ztZ?J3Wfr=p2Qa95wdaIDnX0Ax=;!HmzvAx?0Jv108bIw)bts7W^{S2xV!Sz9@6$sp z*Q16Lp#V^`-;!y@GlZ(VRaS{%RDm`nHiBxVU5Smh5UTIUDC+ThS@@9=he_+tNCECN-p%r9F>jl8Soi&gWg)J0$~;-$j#K z2V`1pf~HNSv0d^em$9ZemYSK@6yM**>+}m6@^i-sB(ARRtWV*~TDh3ypa5>tKSw4y zee7j@$1jcN_u}MjE_cJL41t@i>sPq(&hw<5>7B{a)O1$W&x)+j9}g-7aa&=vw`atCWwLnUzf=`9xosq z16P;LF`gC>ML@kSo9}oPKoo8c@a16!tJ<6pPy;pQK_HBk5PSrx3uH!4r~y>hf^e7$ zg~&Znu?NvGX9&c?#4f}`#Wp3DKn()AZ1bKZm}5Z3+N4w<$^A*SfcgO>SCer9iPw{j btdA!bSx%e&DQ34M7# delta 487 zcmdlmlW7AG&E^s})HN{HHL?sbG_^7{v@$l=GcYzbF*Vz~iHnbiF=z5Yv4Z-PG*bp3 zC;$;aAO)cqj0}u0HCq~(n3+Hn6hhUpL1{xhLjygaToIJd3Z;$oEcFb4>|!XN14{cv zl;o!sC6;gAAihR{<)wF0!sY~v5>7B{a)O1$W&x)+j9}g-7aa&=vw`atCWwLnUzf=` z9xosq16P;LF`gC>ML@kSo9}oPKoo8c@a16!tJ<6pPy;pQK_HBk5PSrx3uH!4r~y>h zf^e7$g~&Znu?NvGX9&c?#4f}`#Wp3DKn()AZ1bKZm}5Z3+N4w<$^A*SfcgO>SCer9 fiPw{jtdA!bSx%e&DQ12UBY diff --git a/autogenerated_examples/nxdl/applications/NXfluo.hdf5 b/autogenerated_examples/nxdl/applications/NXfluo.h5 similarity index 94% rename from autogenerated_examples/nxdl/applications/NXfluo.hdf5 rename to autogenerated_examples/nxdl/applications/NXfluo.h5 index e60c4622883539f758f5665cb778304b44e68f81..9b91948dcade8aab3be2aa4967392983dabdcf1c 100644 GIT binary patch delta 295 zcmaE`o$<_riNC==6XhE#wMm_n}fL4u`s4jX5`P-OGz_j zuw{S%DJX4ZV1%jD(%i(Qu;m~3G81;%lioMZn2&e=T2p@Ip{n;heekeb}%0_9BbcGoJy6*Oe;CUlNChH0*}%hP^P1okpocdLMo2?6Pd13&002G!Tr~gy diff --git a/autogenerated_examples/nxdl/applications/NXindirecttof.hdf5 b/autogenerated_examples/nxdl/applications/NXindirecttof.h5 similarity index 94% rename from autogenerated_examples/nxdl/applications/NXindirecttof.hdf5 rename to autogenerated_examples/nxdl/applications/NXindirecttof.h5 index 4964aa6c4988bfca028491ccdf33dad80c17b2b9..0aa8234289644ad802b82c4d27b8b2ccbf7758af 100644 GIT binary patch delta 448 zcmZ3`#k8P{X+tuXxRI`bF%X3qnphc|SQ#4YnV1-v8JKUb;$q`w%$eLMT9jnU00fyJ z0tloa6oZk05vEpiV+#{Yh=MGrIyNY6sAp)PXU4#g4dt^!X=6PjJ;TkRV&!ryu4;-& zn=hD@aDrKrFPKNSAWI@%jL1{xhLjye%28L`XpA||Q=~?O-Yz`GGmt%S9 zos_Wof=LM{m^Jx=iN)pyyElvw@d5`OC~JY^7AA;_1D-CE=eWFpa27baY(C>^0Z|0h z?6TR%y#S(c^8rsDW{5Etd}^S^1o**N7yOSvb%D&d6KDX{B@hBrF(GshR4gC@=8T3& zn3zKhOspWb1Zon{X`6N8VXgt0yC$ImNiHYJ0_q8n+?$jWNW4Gk$ogtBzpyjrZ7wX7 LhI(N_$piraN!^lA diff --git a/autogenerated_examples/nxdl/applications/NXiqproc.hdf5 b/autogenerated_examples/nxdl/applications/NXiqproc.h5 similarity index 95% rename from autogenerated_examples/nxdl/applications/NXiqproc.hdf5 rename to autogenerated_examples/nxdl/applications/NXiqproc.h5 index 2dd0fef791363334682ff9f4b190fa4cbc466367..cf354aafcfc369abee0eef2a2273faa1b91100b7 100644 GIT binary patch delta 312 zcmdmRpK${aaR@P{Pv#WL)iGu8Vt@cCC~ah5WTb0g3`8M@CRWBKR))rUrj`~KhGvsj z2}w(sF);W*RkA{9V?851!^wArni)52P86QcGWkFN-{gG?T$=?XLgZLn)fAH^Kd^V% zyvEFc6U^KEz+Qz3A@1W;f#6N%aeV=onr!2S#L00-a5m5JK-LuFjgXq$8O%@6EVm=NMVP8A5=WFFTSaH+{QZb+OQcLZni91mno zG2RHN$vr*@&gMP71rWnG8w7|j!%Vi=+z{--2&v5cxp>C!XESnAW=do;(_#?{Vs-~E#})| z`3WWj?~IiJBSeu+4TQ0|!4}HeWM6`$a*v}0L;=_o8)qnQk{-}VmkNZ!$u;gT;O0+W r;{oA-l-=<}RyN1y0a)4Q245Yh%^UnO*cmf6ONMQR7`ORC#18=g5vWr@ delta 353 zcmX?cneoJB#tj@oj9HU8h4SiC(o7k^zzsq%NI_{M10zFS17lqy%Me3TD^o)&V+%cF zb7K=z1Be25s5&+%ZK!8xpl8Cs-~r{cLTMvCOFfVlPbi-gO8Z6RB$lR5ekWAKxL|Xl z@N||<5`RQlUU?@aY|<;?1T!W#*t%@qV}61O!8>DRzz9)fQv+daZm@;2HrbaTsodje z0Z{-p#l{)Ro1_Oc(xn2SaB_|N3%L1{*LXlUAZ2$vk(JHyc>q?nxxrTlYV!ua40gt> Q&5~i8A;xXK5b;9*0M$!pQ~&?~ diff --git a/autogenerated_examples/nxdl/applications/NXmonopd.hdf5 b/autogenerated_examples/nxdl/applications/NXmonopd.h5 similarity index 94% rename from autogenerated_examples/nxdl/applications/NXmonopd.hdf5 rename to autogenerated_examples/nxdl/applications/NXmonopd.h5 index 61d450cf3f0ed6231c1cd732bbf0465de08f3c3c..2d5e669bf41f47d4d3218b0d297a62365da36628 100644 GIT binary patch delta 318 zcmX@`fbqZs#tqqA;zqg##y}KeXkuk-Vr6KoXJKYyY+70te}Y?3%5!{Vx@ zn6&wVNeL&IHTi;x#pDLNFEEbFv_!TL8R`0jyK0E31qQ+9i7}hu_S$T2iQgjt E08~s_egFUf delta 372 zcmX@`fbqZs#tqqA;)c2g#=1t9A%><_riNC=7J8%L1{xhLjye%1_o~^pA||Q=~?O-0NFlJJ_nTc zi^$E-n><%2o9PG3WkT>Oedh&jS$N<_F$2j9~qn6MXkT#S{WyVhaLc dVhJHS5Os?ugaQL@^Te3VaC>bwx5V!e002#XEO-EQPa#ZcKoQJ6K$9o$DM7OHO(}x2S*E-KYA4X3 z&37tbE(IAory6Q(Lk-N>4Yf5;uN&0oKwPkSL1PQlh=dN8%{k2mP!$VW_CQ^m&;ir+ zptA(3c0mi!f^MiwKpM~VzY_p4F^PQC((BN9oVl!D~4Mg!~fwc$&Z6=qjg9<0ChuJt`1I*z9n_#R7n|+`z zd$1LzU0|)tWS{L&CrsGvGP!04jI+UI^O~J7pG^SrbatPBx&@@rW*?Hmoc+iO-yDD@ zfXx>UK^?T|2+S1?N3Xz40h&4I1hPh%Q*hp9pxkL#oPz9&IR~>3DAjYmMwHc9&q&X3 zGw;*c`i#lbSBfxZ%0My_KO`$Kut8}xW zZT=9U!w6w1M8Q}A(JD+xYGW&)JcBHk%{2)y9?+c0HpwsG3Mc2JKsg|Fb5boJ=7Q~$ zNq+$0ZOVjMVvxnd46)cDcMH@4g+ic_1rMO^DTFBvD1x~MX!7JeB}jI@DMfHL%am6@ z?F1UM`A!AQr66PHR6~tzsDT-~p|%F_bwRvmaUE zn*-1Uu=&CvsDm~gfw`jL=oOeLKr`o@K-MU83eMXMlsgTJQ;>Zz=V0~$rFzcSh_V{# zS?U>V=6yO_pD}g%N)g6PnUpkBU{2zPWG4nTC~c@`XrO1ZT~Czpt~h4aGBO3`9@Fhg Yx{P)#jH%lb4H=~&k-xpcgmHre00psi=Kufz diff --git a/autogenerated_examples/nxdl/applications/NXpeem.h5 b/autogenerated_examples/nxdl/applications/NXpeem.h5 new file mode 100644 index 0000000000000000000000000000000000000000..30552ba3e2900d1d6af2e520ed4eb15dd40d2311 GIT binary patch literal 28720 zcmeHQO?1>o5|&{J&IC42HoGC&zYh7qNz8a`AaT6e#11x?tT8+=$*|eHL7tH$h|zj#TP?-zQgBxhxEme@vMQ*PH_4N z^H+y;LYXrzUz?vdfKvF&nX|*d~PC1Cq92fBIbiC*@h26z8gM>i|G0A->?9~u=Oea9fCr! z{nC#@KXp`-e94rZ?83tDG~p=I4^B@O0%8~LbF**px%B7$;vjZm3xyqy@1D}S{2OF{;69bl*|6%Na$I#&)ttbpMvmtarkHOh`f`d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nmsF~wd>rL#Q0tLC_m}g1bkRx?xhH27f;9OJ% z_;Ue^g{V{9ITR`w>zznGOwE-Ih@z1cIm!VQ<+cO=jgWnO(5S-GTE~xiugh?7%V5#%AW_7U z?I`lY>2V%_idCTv~H|x8>~aeIhnRaM3P~{*;4$6)8viT6Qj{fBTph`Mp8w nd!1grXTf!bv=gyS`NwsM@X>3Po$>lF5!d09 literal 0 HcmV?d00001 diff --git a/autogenerated_examples/nxdl/applications/NXrefscan.hdf5 b/autogenerated_examples/nxdl/applications/NXrefscan.h5 similarity index 83% rename from autogenerated_examples/nxdl/applications/NXrefscan.hdf5 rename to autogenerated_examples/nxdl/applications/NXrefscan.h5 index ff2733b979129d9e08f61a2b0206fecd2cd9e681..a7144ba64cc164b3d960c8da0826d4d30528fc0a 100644 GIT binary patch delta 369 zcmca`i1ET9#tqh7az?ra#y}KeXkuk-Vr6KeXK7+&WMa+$24a&Ba>-Aw;L;Yuu59y8 zuKBEt8IvOg^0Z7nAbJ?2ptO;J5vDFva|_GKKLunY%orHFpbA-`w6UI%p5bO)!DhC} zg>3Q@4_I!JsF7iDQ&UXZ++b3|31&@hFtM0yVD|;VNw9}=TsF^fc)$qN;k1Vd!g6rc zfr=Hl!B`92S(xEQY<}Q%2degf?-7Vvpgk^|&-hnB#3wIsciG$%WPv2d6M`f+`Apag Xh;bl=f5KaUfwH+VRvK!@f`knKJMLsD delta 373 zcmca`i1ET9#tqh7a)!DF#=1t9A%><_riNA~270E(hUS)r3}7HO`5>44g&A(d<_BJPplT2J9)YL@+T*hMjDH10eDVT!m(4vv7D#eDAxLtQ b&xE~z7za}LC%gq1Fq<1=rJ;5#NZ0@XPFi$G diff --git a/autogenerated_examples/nxdl/applications/NXreftof.hdf5 b/autogenerated_examples/nxdl/applications/NXreftof.h5 similarity index 93% rename from autogenerated_examples/nxdl/applications/NXreftof.hdf5 rename to autogenerated_examples/nxdl/applications/NXreftof.h5 index e10b3cd80f11b4d3bb1a32201bc950857cc435f6..19f921cf0bf3a692d7c0ea6215ef8023ba6f9d81 100644 GIT binary patch delta 442 zcmdn-nsLW##tqS2az?ra#y}KeXkuk-Vr6KmXJBS-WN6L+24a&Ra>-Ag!KE#ZL)qqA zT+7%Q(Hl{KmrqiI?Mr%zNW)0M(=5R|7S4f&U(; zSV9m?>_IS0Y(ZEF)HIND10tX<1X=1o|jWK;QXOcABi8h;4QbPm)(nNCI delta 427 zcmdn-nsLW##tqS2a)!DF#=1t9A%><_riNA~26~nT=H?cb3}7HO`5~A5c2I|5NK`GAAV<~JS|NW2^`WZoNZ1E?MazZ$5a3;g#$ z#S(&GVh@60Vhh4bpr(PG8xR3?A;_Yh$O?qiW{2n#Y>b(kIg_N}PPEyak{Tia00Hrc Ap#T5? diff --git a/autogenerated_examples/nxdl/applications/NXsas.hdf5 b/autogenerated_examples/nxdl/applications/NXsas.h5 similarity index 94% rename from autogenerated_examples/nxdl/applications/NXsas.hdf5 rename to autogenerated_examples/nxdl/applications/NXsas.h5 index 915a5350ba368ffd304694a58ed0527d78b43536..0527428c415b9c2cc420b4963ea391de68022cb0 100644 GIT binary patch delta 482 zcmbQRnQ6jirVY&8;zqg##y}KeXkuk-Vr6KmXJlq*VrV*9iaSsai=45Efh7YNC`?x5 zmfyUBJH?E}T}?4*vw%|xCzv%^z{z6r0q-ve&Icbj$7QpQ-vdUdj(|N(5Y~kt9f;Vb z5GZ4_K`0M1MA9JwCRPv$(_j!&12tqrEKJ>j1elmZ5{z{q8OCx*ErD1z*&x(q^PhAJ zh<-4yCKH+WCkvTZlXC(|Ur+u7sFM|nV6F-%hPg_h3})Mea+p{^6--@2^#e}El*x&$ zS^B1+5M+adBZCx_HZm~63~);WV+*s%zgndw%orFrpek9Rw6UI%p5bQQw#odHC0ckk PpP4EE39`u#W^4ce|G<_riNA~hI+;(2IiKAlcl%=<*>*Zn_E~gfPunf zMQ-`cE4Wk4Sl)UkC2SUOD&YjPCJQ)OOg`ZK1;P2?1LwGG*71A52-Oj=hY7;E5TpYU z+Y|z2Y&HnxVTMRLM8L!fB4HW~Vrrm0)aJCFbqb4Y@*4kW`^4yh#&%O)Fyx@`WF zZUNB`=G9~(^ZsNZ^J;QVAnEJLp8$2TLJ`bW0mU#^36#NXn@|oD3#fvrYp8y}$(S}d zu{BFSCC!w9fejLl3{p_q$iN6Az)g%y%q=Y@|7w+%FkxWefU0DL>Cm&(GuW)#HkqF> QZS%pY(vSd~{9wig0J-&?j{pDw diff --git a/autogenerated_examples/nxdl/applications/NXsastof.hdf5 b/autogenerated_examples/nxdl/applications/NXsastof.h5 similarity index 93% rename from autogenerated_examples/nxdl/applications/NXsastof.hdf5 rename to autogenerated_examples/nxdl/applications/NXsastof.h5 index 5317890e8766cf044ca64016b832ee43a64be48f..573c44d83ef8bda768cf5f7492ed8816c3273e22 100644 GIT binary patch delta 514 zcmcbygz3f-rVXFD#EovH2w z8JHO$KnhA585m*2fT^*$sig@-0SiIC9kHlGQyV1((i z*z6E;1!@LJE+!l%2jbm{K<33nA@lA;8$k4J7Kp2Xn74UCJd7of2xCo1;$a5cws}D+ zvQ2w3V5VKLbD3ZgNi11BlrH#Ydoi0{fy=g_ALJa${Yt zNlKb20|YQbX(=deWMG656BdS+7KR3srRt?6Oc)qgp(V)h eb4*Tf=b9YUXU3ShxwB6i;!R+b*-U;iu>=5H7q1@x diff --git a/autogenerated_examples/nxdl/applications/NXscan.hdf5 b/autogenerated_examples/nxdl/applications/NXscan.h5 similarity index 94% rename from autogenerated_examples/nxdl/applications/NXscan.hdf5 rename to autogenerated_examples/nxdl/applications/NXscan.h5 index 9b2804be3afa52b33693c1acd920d6a4ef2b4a50..bc789869977bae4e172594c471063adfe6e7e9da 100644 GIT binary patch delta 261 zcmew`mGQ$=#tq6`Vn(_K#y}KeXkuk-Vr6KmXJ%kvU@_T}D@YEzlo7^>f}bAY&}z;um(hqK?+J685m(2VrXh^U^H2ZS6TvSlonJaE0i|YGtx8M?901e zfyG@-F=>-t2`88_NzY>P2J<_riNA~hI*Ffh6a|CExCf^ut=F0n42?zf%s%c zF8R$TxOOlyrcZ9<$<|9rGiA_#$T3JkX(Iz8OhYWp3@i*LOYurem@qJCK~=KCbm&>? z8Ep3DU9Z6M);lR-lU@lYm@!GuV)6#_FL3q)3mDsFvy9aZMwrBA1DiWcV9sU%dlqK6 VaDdYV7RL0=itf@7vB?fz8vvv~L}>s3 diff --git a/autogenerated_examples/nxdl/applications/NXspe.hdf5 b/autogenerated_examples/nxdl/applications/NXspe.h5 similarity index 93% rename from autogenerated_examples/nxdl/applications/NXspe.hdf5 rename to autogenerated_examples/nxdl/applications/NXspe.h5 index a7e7c014b7a619e544d7de5143a08ab982d862b0..d8f6b016d7bb2c84a5fb388e4e00a93146ea8365 100644 GIT binary patch delta 332 zcmcbymGQ<_#tjSj8B-=NMKWdH&<5CH^I5Q@Rbz{p6~z!-=^3{9+zO{@$}^~?>7 z42{huTM0-@m@zPTKvl9rX=6PjJ;Tkp0{Jp5?rMrjn;+MiNi$_&aASY~DJX4ZU}UIkV61Co8DeN^Wol?;Vx(ti zW?*h&Fxg5#TEc{Z!2_z26{bVaQqN#>u0XyF%RBF+gv}3hN;tu+$q#f~CeJZ@0pT35 zcG-N!`~VX~(F7|UMhNSGbq$o|V9Ub{5esmDiCu7nu>zc7tP3tB5L18_SWIqk{{pc9 z#M$5h<$!E^<7ojg8SIc8Z>U3n>NZdCxq>ia^8$Ya&t>wSAS8tkf;E^K(>8O4OGBIn IF)Att092uN0ssI2 diff --git a/autogenerated_examples/nxdl/applications/NXsqom.hdf5 b/autogenerated_examples/nxdl/applications/NXsqom.h5 similarity index 95% rename from autogenerated_examples/nxdl/applications/NXsqom.hdf5 rename to autogenerated_examples/nxdl/applications/NXsqom.h5 index 4c1b066c0f0143e0264fd87a35fb01620f0059c9..86620224e80914e7c0eefbda147d039f79d75eb8 100644 GIT binary patch delta 327 zcmbR7gmK0b#tkO~8B-^p6wFREWnf?k0Adi3f=~=b21Z7@2F5@XVrXJzY+_|-s%K$h zWNu~*Q4k1K#|EVh^$ZR4%orGgpnO&+ZLDXcXSjK)kiIgDyP9IsWCwef%{*oXoM7H& z2YVGJg!mfA3IuO*j>`+U)Z{s?NSrfn2+rm|?#P<%7n<6sU7*jWA#z{kUIoR85K9U$B002MyR6GCx delta 327 zcmbR7gmK0b#tkO~8Pg}96wFRcNi$^#V1NKAC~ah5WTtfy@j^&Ve&dbcY?kpYfEd1cg1-ne x#N>hym(6d28Wtz=31cb5z*rCBV5|j+FjhhejHQrX12uU;2F&COnNZfIY?zQi&I&HZ)X6u? zvJ*{#9%qO6o@dA>N<-pmhTPfre#A delta 400 zcmbQx%QT^vX~S!7IYV6oV_hT55JOWdQ$s5gBRz8qa}!e&1~5>VT*xCoS%XJg3{#n< zfr-iHOrBs9mUrGs37Zc%lyHJslMgspOfK;Hg5WIhhI3pt-|>0C2-V@YhY7-J2-Ja! zZ3u#~9t6W=7lgrB36U_CLJW-cAP&Y_kO*TXq`+7T=`~Q37i7RpzK{uJZOVoT8RV?s zVoaZWvn)F?CC!w99pZZiDJX4ZV1(g+3nNQ-FmXWDu|a7=JwpRMU=VUb`K&N=^epuZ XHZLu2=4MRatl7L7;{C}FS~mayYrlIO diff --git a/autogenerated_examples/nxdl/applications/NXtas.hdf5 b/autogenerated_examples/nxdl/applications/NXtas.h5 similarity index 94% rename from autogenerated_examples/nxdl/applications/NXtas.hdf5 rename to autogenerated_examples/nxdl/applications/NXtas.h5 index 928a9b08f103071de431e0eb31f6aa87088ebe4a..4002e78aa28a8d947d1fe2588a5b6ab1f474429e 100644 GIT binary patch delta 448 zcmew`gXzNzrVYhhVn(_K#y}KeXkuk-Vr6KiXJlq{KgF`W#H|yS;j+v87#Hgz`KSK!rI^y0uh@G zQsEO|0TBoD&IB4jc$<_riNA~#(G9(#)jsbJGt7q7}F*Tie~Ajq?s}> zlrlho6qGhHFv8GjY-D0+ZZUb4sI-I$14B7fB`Zvao~53_=DVW$N-XcalM*%ySd?&r zS(61UEG8dt`~u^+O#b8a0?yg2<5Ix{=S_a&29+}KcG)cBA;1il+HBxm!w6w*@Ckv4 zO$Mp(39x{OgL!8H4IsQt!6HbCV!~jG1T0)O-wB7=2QpwzR0Gstg_t8qM(M=C#5cqv zi|s#41o*~ zAO)p?N-*`A8k(4zLKFl+)v-ZoLp?(SJu?P|U?`szN*n7L=^0KwD%{L;f_d{oqkYVq zBy1#EJk%7EHai%WaDrKr9Skitf3SMP2oZl^qXT6L*zqt!#1tI2FhSH_2zS{m<8lIt zr{it`Q9oJ0&Smo&4`iN>R|C|n4c;YCJs?#%elS%IhAx}m_*X#XK)f|UFdk6lt90I#fJWdHyG delta 371 zcmX@{g7L%)#tqtB;)c2g#=1t9A%><_riNA~#(HK3W~P>=o1M7UaWH01{wS1dl9Fc1 z00DteS_(=V85m*eH!(7`u$bH>EG=Qezz_^o$qLh3uNjLQimo{qZ( zMEzs|JD1ICJdk-hUJX#QHh7mn^?+36_`y^;7`kkJ<6i-l1M$`b!FWKGlXF5}Kr9An kn-gXLHSR)q4U`oS>A}vJxp`)SG{mhy-`H&ak{luc01;($fB*mh diff --git a/autogenerated_examples/nxdl/applications/NXtofraw.hdf5 b/autogenerated_examples/nxdl/applications/NXtofraw.h5 similarity index 93% rename from autogenerated_examples/nxdl/applications/NXtofraw.hdf5 rename to autogenerated_examples/nxdl/applications/NXtofraw.h5 index 423654590a3b9dcf388e9267e82127c0d5a4f20e..bcf205a48c74257dc39d12dcdd461d8e40c8f463 100644 GIT binary patch delta 397 zcmX@{h4I7}#tqtB;zqg##y}KeXkuk-Vr6KiXKHC=U}Cn}iE9}rWBTNm!nr!84ABe_ zAO)q342&@JnHiXynORKk5|NfLV_=Ads$_-I#(GA2hLiV-G&5e<>?pdQY2pEnO%gVe zEFNl#Nt+!EOE|%-$qt4Vn?G2+VT6c3u+f3C1njmjK~xyHxlHD9d;#GI*tu-Bak79Y z0%~^IyvMl!qHwc;8xJ$Y7zfW9s4)k;U@QlpBT!u+Gkp9Ept>3Ypei;6?STp%2!Xlc zLnusaLj+9hL1YQkAfU@O&xwXP24t*EYz30sowz;hjOm+arb$EG1$3{?<}aBc0s!|| BYcBu* delta 449 zcmX@{h4I7}#tqtB;)c2g#=1t9A%><_riNA~#(I{fmIkJ#o1M6paWZC3ekq(=pOR+E z00GfZS_(=V85p7IH_o15n-7ElT>-Lg^M_EN7?`yo0_L&@ktI;;fiBxT mCmQA$kke#hE0E;w#O+~c%-lRPO_~{O2++MYo4;g+2mk<8eS|3h diff --git a/autogenerated_examples/nxdl/applications/NXtofsingle.hdf5 b/autogenerated_examples/nxdl/applications/NXtofsingle.h5 similarity index 94% rename from autogenerated_examples/nxdl/applications/NXtofsingle.hdf5 rename to autogenerated_examples/nxdl/applications/NXtofsingle.h5 index 5cf1af3eb762934c7c869188075bb5a4027a449b..a795a102f506b2c1720e10fde382a2d1867d0f9f 100644 GIT binary patch delta 423 zcmaFyn(@VJ#tqe6;zqg##y}KeXkuk-Vr6KiXKrR}VPUX&64yBn#;nPS!UgrF3}6rn zp%|o~w2^@kre;f1BQpz#f-tB$HYjbVXK0{j#=sB`<+DO*V?851Lm)c>%IAjCei0@4 zX~mg&n*&6a$g+5-DJD%Wu(sH2U}VDy=4~#pR$+pRPrhLL1;SDAaoNmcUjdZ@@y<9} zFv1mXc5tqN$ZbC0D#DD=BjX8E1=2Ies{x{Cvw}|zl(oRO1YzOkfPfYRZ?Zrz)OwH` t9YSDIK%*w}gug)8ViREiHLV~LX6}b54|c|^&6Y{hQ0IWmn2;JF005Q$WdHyG delta 423 zcmaFyn(@VJ#tqe6;)c2g#=1t9A%><_riNA~CVEB|=4KYAnQ$ zO8Z5W15WX6Ql2mt`=4|%@; diff --git a/autogenerated_examples/nxdl/applications/NXtomo.hdf5 b/autogenerated_examples/nxdl/applications/NXtomo.h5 similarity index 94% rename from autogenerated_examples/nxdl/applications/NXtomo.hdf5 rename to autogenerated_examples/nxdl/applications/NXtomo.h5 index bf4d8b7f11673d4cc62a56a6c58f8c2f8e121fd1..7f10d6402d9a9fccb14c10d7d904ab1bc3e07851 100644 GIT binary patch delta 409 zcmdn+hH(QB6?2Ih=^7XVQHY_5m9dGHp_!hgk%5u%7B{@&rSR$qv?E5S#)VILBr48ruhqP#yMrm>{eGCmpC*gR=^R1u|vx1D7ih6<{+z zxI>Le@N?O$<7oj^2;!~rLgwlC7(fk9@PipV!5_vt5CF5bA@~TA89kxMX7Gd~^Lip+ XCLV}7z|NSuxiLwa8RGT@sS^YMqkV8> delta 409 zcmdn+hH(QB6?2Ih>KYj98d-)Inp&9}TA7&WnVA|G8&2-z3c@C3WNf(kBiDNl#`MV# zg|qci(o7k`7$86jN*fs%VVY?P)MzrfN<>=1gn=Ofs*)9^L(fvrVDnm$`!Xyayps|( zPcSUu1hXbjFtnKLVEqNbDX@WaTsE(Rat3X&FQ#Lz@Jw1-6i diff --git a/autogenerated_examples/nxdl/applications/NXtomophase.hdf5 b/autogenerated_examples/nxdl/applications/NXtomophase.h5 similarity index 94% rename from autogenerated_examples/nxdl/applications/NXtomophase.hdf5 rename to autogenerated_examples/nxdl/applications/NXtomophase.h5 index 5b2229062d3d2a1eaa213f379f7f7f90d768bc83..c49e6aeabd9d91a132a769fc821b90bcc0554108 100644 GIT binary patch delta 497 zcmdnd%Cw`EX+t%)oRO}9F%X3qnphc|SQ(n@8Je1ynp!Y`f$U^P9{I^TxV6PFm6;nD zT5SHwZO+b^HQ7+OpxzXsB>_S)NI_{M10zhm7N!;kh7bjbP<3oj+ECBXK+lYUAqmQ7 zh0?})MtUGE$xuEwl=h1#$P($fr>e}?_mPVZt{Xj8hEQfBqvV@aM?V^=LAFnh&OqS{{x6w69RacA*=<#$jW&_ zk(J9tyZ|ej?2zcP*(cHhYA%R(CJLG76Jr3eWphIu)Ipma5|1FM_en-pe^{ delta 497 zcmdnd%Cw`EX+t%)oT09Pv96J2h@q*KsiBpLsh)wUxv{AM0~p9oX5^8dyn|a?3{#nz zfwAf4pWNo`j5(7Hg$wFa(o8{m62KZ67^I-Ik%1A0UPD6*V^d>@f<&k~HYjbVXK0{j z!oZLO<+DO*BRxw!kgJlRd~PW17g3U*n_rNzSwW;lmF1&%Qo`g0SC`FiEDbopyv+*E zI*brjfD4S(;JODY=HR}E2`szG3nppctpbspJR!hk^BkWO5CtIK# diff --git a/autogenerated_examples/nxdl/applications/NXtomoproc.hdf5 b/autogenerated_examples/nxdl/applications/NXtomoproc.h5 similarity index 95% rename from autogenerated_examples/nxdl/applications/NXtomoproc.hdf5 rename to autogenerated_examples/nxdl/applications/NXtomoproc.h5 index 67a686bd17ca41c2ee6774fcc6c2c3a7f0930494..c8ac4a8086a99cdac1413a06a22265111becc407 100644 GIT binary patch delta 328 zcmbPmn{mQz#tq#(Vn(_K#y}KeXkuk-Vr6KqXKZL-ZoYXT4?7!U=H!(^`9`J;5a0`? zrJ%Htff1%=BQs-5F>gKp1q$ZznhjT0@fAIJMH(|4mR{_NE x%?o@)m?7c~fi9c>_%|?ud7B#ok3d+HLE=5ZA;8es{4jDe+)Xx{uf*&T004a6Sy})9 delta 328 zcmbPmn{mQz#tq#(Vurc~#=1t9A%><_riNA~rh3NarpBh57xJ*PF=kI*DU@%Nl4i;P z0={69fk6sN8yOg3Xf`o0Fg7ut>?JHMVZy-R4^_zu)1hanXRx_eI9#6Pqjyrmu1g!mr23IuO*jpGZr)Z{fz2+rm^&dBQKxFMt_pK*tCEGB>O_yRX! zvyN8*#PH1vd_6&Sd&5GJ;5Qs(AfMiax>gbHk+@+>=6I} D4jO6f diff --git a/autogenerated_examples/nxdl/applications/NXxas.hdf5 b/autogenerated_examples/nxdl/applications/NXxas.h5 similarity index 94% rename from autogenerated_examples/nxdl/applications/NXxas.hdf5 rename to autogenerated_examples/nxdl/applications/NXxas.h5 index 45dde21b29ff9e8bb16b85dc29d6a825800530fa..7b727bd48398086ba2dba453c156c1e6e05c5ddd 100644 GIT binary patch delta 306 zcmeA;%-C_5aYHeen31l5F%X3qnphc|SQ(n@nHZazn{4jn`p&|bGP#jIOW%|M2pm8J z5J*8N1|tI_Or55N#%5-dr39oU%orG)pek9Rw6UI%p5bO+f&J<%o@$Con*}UNIKiyR z0u~mN4>*2-aa<<lQz!@LGUal2ZX-?Te8_9qJot%W%JHhX=a42GKo0=t_e=@ delta 306 zcmeA;%-C_5aYHeen4zwLv96J2h@q*KsiBpLsh*jUnX&2SPOk4PjA@e_`Lpy>(o7i` z92g)#3Q8Lp7-8x(GdDIho-8FGEn&jI-~?643e%xysb{d+S75(7%SZ2|gv|mLC7fW^ zWC06{$p;+2z&I|G|2VyXb2jU^R4~DLli#=@q$bOFz&RG19X!uK)NK~<*#l)=@H>Lg oyZKHal1ZEAgdlhplLNxvfGyeV5K+O(n6`OmtTZ#iR++>c05K$9egFUf diff --git a/autogenerated_examples/nxdl/applications/NXxasproc.hdf5 b/autogenerated_examples/nxdl/applications/NXxasproc.h5 similarity index 80% rename from autogenerated_examples/nxdl/applications/NXxasproc.hdf5 rename to autogenerated_examples/nxdl/applications/NXxasproc.h5 index e430ac80a6b26f80653b90589f223cad8406c23a..1ee11d1f3824fb9f1f46e8930d1c40ed59288839 100644 GIT binary patch delta 275 zcmbO+k#WXE#tpl<#Ef(ejDaY`(8S8v#LCcI&(z4$#C-EbE_Y_ejLDLGdD^B13=kj% zrHu@XuO0%p5&SJ&@VPP(CM=_KT=U zEH2pmk1vajX$I5gLeV~^O%i7WSw4CvC2YQ+S;7fsO}?P%GP%e21)Q^ak4Xg+oHx0~ y93eG%jRl-zG5Lb!7r3&`Jl05>HlMLQ0XM>8^96?=z`)pi(nXpXu3@r{M-Bi4%37-c diff --git a/autogenerated_examples/nxdl/applications/NXxbase.hdf5 b/autogenerated_examples/nxdl/applications/NXxbase.h5 similarity index 94% rename from autogenerated_examples/nxdl/applications/NXxbase.hdf5 rename to autogenerated_examples/nxdl/applications/NXxbase.h5 index ed582dc3e12c44d5df58f2df3668503cdd275b47..45ea9e801cba1678392516494c2d9fc211b8706e 100644 GIT binary patch delta 436 zcmZ4RhjGCl#tq$E;zqg##y}KeXkuk-Vr6KqXJ%n)W?{5>5m%KKi>I1m(q;wI5>7B{ zvVy6_ujpJPt45oXs|l6-;p6&k!iaHu<5r_-2P39YIKt6x4120Olfc A>;M1& delta 436 zcmZ4RhjGCl#tq$E;)c2g#=1t9A%><_riNA~W_pIkX2zz5n-_6aX|a6rPDAfg7QHL?WiK#+Ag zF)#}hOkFm=iG?{HC^vac0+M_0B#JOIW^DeLlFr7MF*!0jCnY7#l$iknq@c8sfe~g% zS{fLe8$lGXK-IB9X+u3j13eQ4239B^MjPo_>KOpV*d{*|7vJoVqaz3jl7iX|0DQQM A-~a#s diff --git a/autogenerated_examples/nxdl/applications/NXxeuler.hdf5 b/autogenerated_examples/nxdl/applications/NXxeuler.h5 similarity index 92% rename from autogenerated_examples/nxdl/applications/NXxeuler.hdf5 rename to autogenerated_examples/nxdl/applications/NXxeuler.h5 index 96794845d464dd28a1ca51ecc2398f8c65526355..8dbdc9a92f3f116be7df2948b61bd05f5ad5bd7f 100644 GIT binary patch delta 454 zcmcbykm<%krVYEf#Eo&t<2ODGhX3nzn?2PG?Z`S7O zm@@D)K!6mKHZm~63}y=>QzN6vRdv!5W(*91P?fAu+E~v>&v5hFI%77*3!5Ld>}Q_T T>9hGshXXq-JZvVXOeg^W1ulq* delta 506 zcmcbykm<%krVYEf#0_-~jCGAHLkvx=Obx9}%=FC64a`kVH(%nqrOWckJ1JrF28$9- zFl+J#3yaMOPHz|?;sGu?P*#KM9wvyGg9l8kz!Sz=;Kjm>(Eq^q4pi-dfEuWNhaed1 zKyV2}3}n~jg3vE8jV_zlgjGN^PF~>UGC3#m1w;zOnG=P?ITMZGZ2l8t0W}Y(ZgWkX z0o3jd2{0QCl3;HCkOFhDLK;kVK{`w}A?pZ|NjW(J5I=2h$nRid%-qabcAlLvbMnpF z-1?L>Qw9j&htg6|+Q`5NBe=~?3=Iv9AqoVb>e!&Pp`M|Eo(ThkAe7GvrH%9~^$dV) pAt;{(N~a{2Br_o`q|g8W diff --git a/autogenerated_examples/nxdl/applications/NXxkappa.hdf5 b/autogenerated_examples/nxdl/applications/NXxkappa.h5 similarity index 92% rename from autogenerated_examples/nxdl/applications/NXxkappa.hdf5 rename to autogenerated_examples/nxdl/applications/NXxkappa.h5 index 016115db01fc42a97126d1c9e186310ac5597737..d8a01f15c14ac109da30ba85a0c197d878e39e05 100644 GIT binary patch delta 466 zcmeydgz3i;rVYEf#Ef(ejDaY`(8S8v#LCb@&&bH!+<5avuG_jSUTTU-n>SdLaDrKr zH&|F~PH=j|2oVo((SfoWT=y_R#2h?eVg;Ts)&egUW`zC+zIUK%4+PXe^*aQ?SOmixtvfvJ28n5SDI^$!dVQ_(66E)K6e@^P%FK3LV%O(>FVoA7^Jw zpUhdGt8L04zyJYKP}<1A2s6k{Ee#AOudJ7mFk@g4f+}Q%(#Cp5dWM_t)+e(uuGs9@ YHl2C$f-axUGF>a!VS!^anPpN50G7dvp#T5? delta 475 zcmeydgz3i;rVYEf#0+%}jCGAHLkvx=Obx9}%=L^+%#1BJU*x*2%ktSfDPi*lixN&S zYw`vQi_Hm6Zx|us0WLaFR)gyvCWx4W2TZKM6UJKL#lnox|G@VSRPBL)8mNAUAQ26NSV%6OG_({u5&XH4mt6b4{E9 z)b0%lFdGe$U~d1A0&}rK8ccRUdI`eP%`sUGP!~VQ4uSd!Y;HbOd{dzV8)N2X$MWOs zjG2=;>vN4$(o7j3KmbZhL1`lcBaEOoHa0XfoxHGKM#6-FK?tgl6{bPYQqN%X)%s*M erUlHK3$3OxPj={X*(}qwf*lr0Hj`Nh)dZ>eJd diff --git a/autogenerated_examples/nxdl/applications/NXxlaue.hdf5 b/autogenerated_examples/nxdl/applications/NXxlaue.h5 similarity index 94% rename from autogenerated_examples/nxdl/applications/NXxlaue.hdf5 rename to autogenerated_examples/nxdl/applications/NXxlaue.h5 index 106d6d46a3de20b51bd2838de0f4c1763b9e4380..70549fed1b7c406f1ec73ccc0172f1fc7cf7578f 100644 GIT binary patch delta 494 zcmZ2*kZHj|rVZZQ;zqg##y}KeXkuk-Vr6KdXKG?#Xlk}OiCfBy#Y;^wX>)^P2`88} zxxvw5vw`;;Mu@nAuMU(I;0I$h_`_Hm0${8Mfh^1j{R*LXn83VE5j9Zl4UtgRrsxug z5Xh#<8)Ck|w7G146I%h%Hu*uI%j7i)FCbDN&YeUg4o@11`s1Q ze@KT}U68p4DrS%ab8kW}O!h%u3BuCNa|)47lPN~#%_%v7q;gGp1Jr8<_riNA~=6aS!7G@?Eo0GVu%ve5qCnaoda4g{j zvnDq#un3ZZwHz`8a?)Iha2 zL_%4cqDvrVgH%r55c375&1LhO*a{{H??Ir;pr*}x zQVk$RZ2piAv=Hovg3LWoF@qeSd%)^P2`88} zxxvw5vw`;;Mu@nAuMU(I;0I$h_`_Hm0${8Mfh^1j{R*LXn83VE5j9Zl4UtgRrsxug z5Xh#<8)Ck|w7G146I%h%Hu*uI%j7i)FCbDN&YeUg4o@11`s1Q ze@KT}U68p4DrS%ab8kW}O!h%u3BuCNa|)47lPN~#%_%v7q;gGp1Jr8<_riNA~7J6ouCWa=)o0GVu%vip7Cnaoda4g{j zvnDqFo*#$2uMLF1|tI_jOa2q zw=gj`gD4P(s$+xFhI)nudL|4E5>P%Xls3|{)H49GB_{_?65kv!NkkA9&^D8oEG_{6 DYVEr9 diff --git a/autogenerated_examples/nxdl/applications/NXxnb.hdf5 b/autogenerated_examples/nxdl/applications/NXxnb.h5 similarity index 94% rename from autogenerated_examples/nxdl/applications/NXxnb.hdf5 rename to autogenerated_examples/nxdl/applications/NXxnb.h5 index f90bfb1567902481ef25ec5ad52807b08454ebd0..1175f1a1decf79e8f87cd7d39ced5f40e0db98ef 100644 GIT binary patch delta 432 zcmew{lj+AyrVYEf#Eoo>zFvHivz|72Ga#xkKgc$<^KU5_vls48g(lgw=x2jzb=5w3LEj=XwpC^AB delta 432 zcmew{lj+AyrVYEf#0_-~jCGAHLkvx=Obx9}EcJ|xElo@eH(%nqrOWcwJ1JrF28$9- zFl+J#3yaMOPHz|?;sGu?P*#KM9wvyGg9l8kz!Sz=;Kjm>(Eq^q4pi-dfEuWNhaed1 zKyV2}3}n~jg3vE8jV_zlgjGN^PF~>UGC3#m1w;zOnG=P?ITMZGZ2l8t0W}Y(ZgWkX z0o3jd2{0QCl3;HCkOFhDLK;kVK{`w}A?pZ|NjW(xY>a7}ClyuQc&8+zz8FJjg1UUj4da3RY^;jFfi~#RkFf#=vnF+Y~EYdE(r6v&E%Gz5&&tP Bn_~a~ diff --git a/autogenerated_examples/nxdl/applications/NXxrot.hdf5 b/autogenerated_examples/nxdl/applications/NXxrot.h5 similarity index 94% rename from autogenerated_examples/nxdl/applications/NXxrot.hdf5 rename to autogenerated_examples/nxdl/applications/NXxrot.h5 index 62c00b1b7e48fe8750fa6c920dc42f7daf518d1c..ea926b5323d300a1fc0bee271749ead290360eb0 100644 GIT binary patch delta 471 zcmbQSo@vH7B{ zvV)Dq<`1rK7$M>h+;yNV0na^55U~s1P_a$EFi8VH7G{L@g1|dar2!!|Q0*5&VXT1g z5{MYcs!5SwVESA(+eB4B^i4MKbD8`n<^@Cw#L5%wIGcMCETF~#)otcUGJsm` zkOH&tKq}1T4H+;8Z^(qn8f2FsEZzJj7umF&d}Q96f)hw8{}eYsz1C3rfQ>PAb7IYU z4#w2Ug00zlrVI=W0zeD`QV@#4$iN6Q8cfWLjEp9)YL%8SV_*=1s$_-I#(GA2hMVuU OvJ1k3$Y!$2^b!D}FN2N% delta 471 zcmbQSo@vHJ$rmPR;K#y@&|VOD2dXq6qz0<}LMV(C z5MBZi16egG@(WC#%VwLX3W&bR27WG+|HQn2NP##yaY&q)cm!v2Pl5&1IH0=CJV^#n zs~u8c79L22xx66*=HLyPFj<4_5`?9j-{c~jmXnXndsA=%N#&p72B_B>N*}N>rf*KH zSk^Q|4yLOKE06)dH})%`v!FeOI2%fu99=- z59}_~>tbDRk&d`4M7*y=_J~Oa!I*m?n{as7fnlhfvf6ct>l5eqB$IjYC8Y05y);-_ zuTs#HNIvz->U`pw*S$L)CqWd-)bGx>QP7iDby06rpFVky%j>Nd^dvU|T-6i@B!C2d zg}_DY`cm~I{j)sppQ=BJ6SbPwLlmZQG)}BxkdCsx74lh@45E0#Qj5>nWIEThNSRi)MQC++@Z|kbBiM3O8 zoTI8MK3%)kbZbq=rYCOWq;agV!QTm@`j&9n)UHwy)4hfe)qjNFr4F_A7B!mNg#}KL b01`j~NB{{S0VIF~kN^@u0!RP}{80iQ4VQFH literal 0 HcmV?d00001 diff --git a/autogenerated_examples/nxdl/contributed_definitions/NXcsg.h5 b/autogenerated_examples/nxdl/contributed_definitions/NXcsg.h5 new file mode 100644 index 0000000000000000000000000000000000000000..b9c34a0f20ccfc4cd1bfc9e0545cb8e98a8b7de7 GIT binary patch literal 6144 zcmeH}%}T>S5XU!uhGMaT2kprhFlmxjX>U@iJ&1}F=`E(swhg37Nj6g7K;Ohi@vU?} zCN&hnf(Jn-gq_{l+5c{S%uf5#J-;ZIswE;GT_+o)BD;C>4i7m{p2Zjf9>8i~pTWMa zsg6driI{`sTwUoOt*iMNEbQHNI>M9d=T=2w``-z4J7>3oK_5WqVBa9mU?_7<^ks1F z{DIwrd|l4#9n$4@h4B4KWS{6{6ok}`yeWmf4mC}#6xps)T%9<-C$Wfwj}X2u^;od7 zUbUbnkbLTu<@xwEZ@Bj~NrN~Nq2HZvtDq;Y>ayOXF?(_!SJ&Gt=m~BFxXLazNB{}^ z3W3Y^&6TW4>SuXTKV^O5Cu+CMVH~j}4pVa+ut_#BBRbF0QJhRYX41JgorTo*m}f?F zKQs-)^fDHYX+#r`QQw7#R832*V33I!pN@hkV7wru=5>FVj*Ur!djOk1dv;%NPmG>s`GZoG*N_S(ejbRmR|yc$~qtt9ke z@8$~N4&V;*mw#LWm(x3db4F)YyNV}rX&-o=K1WS=c4yAKbIv;-8t=zDf8E@;cg23& zw(y#tx4vP$qMqu9f7A8Pr)7?Qt;?U#lQ~NNLg}*$<&!z`Ey12bCkM6+0TNf61{51`vi^1FPxe$zyt5T7#{MZ=l$P~v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r^ zN&caxW*yJJnT-1<=f_jJn}mm2oYlE1^NK$Z0dWvFFi!n@DwG)2=dp$q~{<(~^U zo&!Jv8F~Vcj?=hE7KM#5&Vt5KIG%P!`GICh3Uaz5vC!`I7eG%MKs1Q~lBf`c4cTQQ z(D0;Ls19K&V&n)kp|J-h@q!?B7=mwrJ5>Q(SN1kYWs~eQo=CAMpfMmB&{3UxQbF@x zS*vq39PycI8vU<^kg&5v4g&BK$?@WWfP*%06k>Yln$t_Qgqgv*Gu3|L`#{)ZnVGrHhaoHn3>AUKMpBPP_4AU!@=BS^2j zTo}%tku-;}wu;pUer%ut0H-CCs--~j?186iw)j}- zU{8-*=!f`|8A)R&BUHQL1&S;hY9_Udlzv z*XPMV{y}G}yWQT`3hbr9=lY-kvgd>uUiviUPF~3% Uw5InXaQ~>^k0|$)FMi+UKQ5uEUH||9 literal 0 HcmV?d00001 diff --git a/autogenerated_examples/nxdl/contributed_definitions/NXelectrostatic_kicker.h5 b/autogenerated_examples/nxdl/contributed_definitions/NXelectrostatic_kicker.h5 new file mode 100644 index 0000000000000000000000000000000000000000..871e08bec34ec76927245c87e98a6aa8b9e3d4f6 GIT binary patch literal 6144 zcmeH}%}&BV5XTok36ZFY2j%1o*wXS5YMl|zLoCB z6bUhr#Dj^>hIF>Gv;Q4_nH_j(onPd0g&dJ1n{cN z@GAr^8#h;~C+VN%dHXO*(Z) z2c}_|?u18u8q(P1)OR2v(aTDUbtiJgr#%)jE*er|UUz6fJ#kFJUCumb$h;wqjX@=C z@2bCvoa~})pA<{t)3(a>Qn_wh#%bBERckt7_*+3#{}L|Cu!=^Ns9r52R38$yWY~r! i9qHIjCuorX5tRPqSj!$R5$vEt7d%y8=JTFx{9RwsWn+R|91k7`ss~g&;k$^*f*#%c+|C~e4U&I ze_(f^UKi_ni!|h2A@Y4$vPUe^Vk$AOeR^ zyCcW8ogfimpK=-nf_8n#h|RLrV(mn&bZL)qCS*g3ovYS3=yNJq#~-rJkVf{Pta+sE zUH3N`@d}=IR4B?%(=AntrK;!JmGVjHq+;;F-wLApmkhbKTdC01`j~NB{{S0VIF~kN^@u0!ZNR5%>VVHg>Q8 literal 0 HcmV?d00001 diff --git a/autogenerated_examples/nxdl/contributed_definitions/NXquadric.h5 b/autogenerated_examples/nxdl/contributed_definitions/NXquadric.h5 new file mode 100644 index 0000000000000000000000000000000000000000..9cf2ba637e24cf39bb1d38bceebaa76baa9a8986 GIT binary patch literal 6144 zcmeH}%}&BV5XZNEHbkN(9+Zty&NR!fHKMcNszKM_GTj_pG zkq{F}JecTg$j)?j_TS}~*@2h#=~=l{DG@nLldO;}^u(`QJy18abN2K&0C z9fPbBxdz*Xy4K%c*6U-~*tu!7WTen9tj@yuzY}P;POc?`E`Tt>zCoSAqpCIOtK=g1 z1G^3NI$zftq%H0W5$`LJ9b%F}5OO#2MjYO?XBcXytae@E`ozUONo5{<2^srRFAEmd ztIX(0B%gX^bv|*;>+UU2(jbmx>UZZ`o6(b3bzW~+A3wQ|i|eh<=t*t_xGEPXB!C2d zg}{09>O%D-{j)snpQ=BJ6Ez#GA4gddhbg-cvSHq15ufDgAWlYJ#`we=jYIBxna84u zA2LdrmuK-kk9gu`+;<@()yqmN=;d<7=Yt>$GSQGycG-Q%JwFNhbXZp$ingx$nus`- z;~ZF3@#)yLMzz*(YCn5tZpV-=h` ze_%HuUuW}rjkLsDA>zCO*&-(C1w-bAbj0AS9m7yNWwz@S*Ei1J$&-wOFCl$j>hWN1 zz0#DPMDnRuRQD6lyz1SsBn_fahJJUyl_@>>RA==D)%ekSm|t&sN>6elz*P;gLjp+P zR|uRnF3(j>(m%_S`l;%ZxKX2S-$fx$qG4+H13t*QcF4wA+KZAA zUfxxG6LYuhx_jk{__Uq_Jho)6F>0VIF~kN^@u0!RP}AOR$R1dsp{_tN;K2 literal 0 HcmV?d00001 diff --git a/autogenerated_examples/nxdl/contributed_definitions/NXseparator.h5 b/autogenerated_examples/nxdl/contributed_definitions/NXseparator.h5 new file mode 100644 index 0000000000000000000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frPiq{O(P8Wy)rhrh_dhHj;wW!Ey5k^Xs**RHo4emx4jUbitv|Y{= zs$fM*1-fjQWwLR*K@zswWF{u}^%lVop~!?E#T+sO+e@&X$DmNSFTumGidC*a$$0`w zy1&bQR_$)^6awp^@HyW`hoB7(9!|hzLe7~=rC8p-lQ&QFrVG=i4HSq?-!cZjO>6Yr zeX<*sH@7UDr^QR(mq<{{x^lBTweM{Sv?b7%KwAQB3A829mOxtq*P{g7@tx+^`^k6& K^(}+Pcm6->Y{EzY literal 0 HcmV?d00001 diff --git a/autogenerated_examples/nxdl/contributed_definitions/NXsolenoid_magnet.h5 b/autogenerated_examples/nxdl/contributed_definitions/NXsolenoid_magnet.h5 new file mode 100644 index 0000000000000000000000000000000000000000..7814e68747ce1796e8c1bd92702bd793b206d5ec GIT binary patch literal 6144 zcmeH}%}T>S5XU!uhGJ2{gZAVLm^4W%(wo$3527MPdW+F)+d#4@$wn%^fWC>3;#=u{ zOlm2D1rLJGQg$Y@v;S;=%uf5#JvpsbY84`fX_6JPrQC9Qhe39AWcmyVw_pvh&tPAd zv}2HUBG+KMP}lnV%X)nb8++HCj*OK0rPWzD|91l2&heFG&<7AE*f*#%cvQ6}eU)4W ze_*$vUgzt2gLK7RA>w@%vO`QVh+^uqAffQCJ;P8tWwq-P*C#IT$&<{3FCk-J>hWk{ zz1obPMDnRuRp%4eyy@T2ERRwqQ@=ak+KisOs`GlI=J?TnSX^&)Mo)4hz*V_8Aps=t zD+JEkm*=V{>7V6k|5W`+oT%Nh?^DLJG|uf|#7D)Q&FG}a2WgfB+@_Nt8OJmXcwnTe?A)?N3Y?uk#&X|%jX%k`|rk?T6H#s_~Zi0WS=ty(K$Fsvc5A>V&^Pf>d@J3L zDH38Li3by%4cVE_&i=dnGCT0nK07a$DkUO^X_7UvqugS8he7srWcCaR_h1dM&tP9y zv}2G>BG+KMP}lm0t9pG58#}kHmW&koh1FR&|91lI*6EF8&;<}C*f*#%cvQ6}eU)4U ze_(f^UKi_ni?qdEA>w@{vPVqP4l+~_FT%WkOCr>gDzJ!c@smH^m z^(u3E63M4tS)ET@^SXD((kx73nfl%NHs%x{bDzeO zAflE<{hTKQ7PHjnEbt&B)5}UL?B#MLVEr%-xoAikz3OI36b9aaB_qbusWq%?97TIq z{Y`|Ns^c70UGeGIwT4@3IIdMYaU9#x`S7=bsQx8Fwq;kXW1@Ps%uszuSl4naTLy}; fT{viw01`j~NB{{S0VIF~kN^@u0!RP}{5=96&zp8$ literal 0 HcmV?d00001 diff --git a/autogenerated_examples/nxdl/contributed_definitions/NXspecdata.h5 b/autogenerated_examples/nxdl/contributed_definitions/NXspecdata.h5 new file mode 100644 index 0000000000000000000000000000000000000000..2d45f0d6e7c849f0f42497c61aca8f0916c4cc29 GIT binary patch literal 52344 zcmeHQOLQF9acz*YgutW(eQeXRV?CL&ID`QZ;76ii#{vX`1Z5I{2uL1VR%RMA4NQyk zQ+E#m$e%FIk4|zD9w+hP$%?Clwqu*lm&eJ1OD??Nl1naiPBvU}=TyC_nx1LQLj#ze zi7ie`#Or>as#o__)%#BO4`xrD-aqjCfQ46ozx9|ksBh)ZZ}?jOHO0uYq-Xi2kHae* z-q=GoeOAAPX$Lrdkm;vyQN(R7xO8D=#)6zeUqUWs-TxTf^-DxAe54SVotaudfzvFt z=+hn6GXcXX2i^ueT$q_UbzW-}rA$hO9fp0@Kui5iJwb%-GCk7Yy+-}L{d{x&o8O@4 zbuNGHb-KC3&%NNIg@EX9mi=A7ILxn+oPE|4E%of~5T%Qrnetse(wtAwTb!Fe)o1Mq zz50JkO6ySktJ+KHQq5U@F0dbNUHYRN`!pjM#bKW{3wOMn}_M4Yn1+W{fD}^RiL2$ z_ssPCIb9d5AY4uLg6Fw3c~o(;()=rS(RU!7)dHlaYc5@?l-;1>@iStBSG1fwKTgTO zCvOL~Wy!Oo3m6fGOetJ{>n(u&;aJRTg-p_2xPwo9#Lw!ES@uDYShtsoD7pxZy`4z{9?UtE)>-_68 z7dZY!L%Gj$ytLEe)cJ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>e;IC39{CWEssczmGXRslge@Q6i2IR{8m zJSl<+P{P4OP~st)+(K)M1e3tZVQFm-cnD?yV8EkL0NAKHORhyH)~aBmXhr&%oS7h) zB4pW6KAf=uE7B@3puAdH;r3uAsALNHl@p^?eXs-0NN~I9S|Gqaweu2G3ilBk1lFnA z71a0HCkE74^loIMpMiF$e6?v~a;pu=21&qWg8YRbsQME}c(Zd9=8dKePt0xcu#3Lq z3I2O7ox#0&Yp?d^mPKpiIv&n!ES;NKT;voA9^$4z@9H7YL!gI14}l&6Jp_6P^bq*S XA`q^->}>x7$C0ugL1W9U*IoV(-k|qi literal 0 HcmV?d00001 diff --git a/autogenerated_examples/nxdl/contributed_definitions/NXspin_rotator.h5 b/autogenerated_examples/nxdl/contributed_definitions/NXspin_rotator.h5 new file mode 100644 index 0000000000000000000000000000000000000000..73cf2434e805f472638b5a02a88f1c13c334c9d0 GIT binary patch literal 6144 zcmeH}%}T>S5XU!uhGJ2{gZAVLm^4W%wl}HO9z;co^cGXIZ3Af%l8wYS&^Pf>d@J3L zNi9XN;6cz?%FbkV_Mh#K*=b*TXXn*QtwO}mb+Sfwq+3q!Fvz}&%$_0P9;^oT8SLwd zax}6@#2Rep>Pr7`Rjntmv47j`ib$znT9t+Ke<#rEp56!s0|23eeSNB%gX!c|Ly4o9-P=vmlN{>UZbcn9~ziby089OrG4w<@MI*^aM8oT&0T>5fx+DC-who|M{Tqhw$Bs7Jjd<*KBz$|eu0JgHKt z+I;7)yQhKXfWQpaw$P%`-S_9*d(S=R+;h%7x94YbGZ#NN^vNNQt`jG`_jxDz(f<6s zUSt1TQtaLG%ldFk@3-~->V5KX%=>^xd5>xONrmr@OTvqqzI=6d)%9;FIQ)$XD%~ENzRlNxX1g$O0QYEe#n~w zuMou^_depC@ao(<&-=u&V_bu{NO(dh*7)NQYF~+%(qevin=(A_RVyg3fbo8YW8<~* z#!zo+IpLrCa`~tFDJeLmSA&*oth;6-thXbDV`BIH3TRkmcNmkOO%ec3&vgWsa z&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0o#|mF#K(QxV-um@B m5M(bK-I5KR%>M&SXS|_`^t^uC_{hFCIAU{~2OAl?T>l?-o}Lo` literal 0 HcmV?d00001 diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXarchive.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXarchive.py index 86f3df8..9076bc7 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXarchive.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXarchive.py @@ -57,11 +57,11 @@ root['/entry/entry_identifier'].attrs['type'] = 'NX_CHAR' root['/entry/entry_identifier'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='start_time', data='2021-03-29T15:51:33.227367', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:11.514397', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='end_time', data='2021-03-29T15:51:33.233370', maxshape=None) +root['/entry'].create_dataset(name='end_time', data='2022-03-03T14:34:11.514397', maxshape=None) root['/entry/end_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/end_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXarpes.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXarpes.py index 69964dc..5c5d981 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXarpes.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXarpes.py @@ -45,7 +45,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='start_time', data='2021-03-29T15:51:33.838489', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:11.686229', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXcanSAS.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXcanSAS.py index fba0355..9131669 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXcanSAS.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXcanSAS.py @@ -315,7 +315,7 @@ root['/entry/process/name'].attrs['type'] = 'NX_CHAR' root['/entry/process/name'].attrs['EX_required'] = 'false' -root['/entry/process'].create_dataset(name='date', data='2021-03-29T15:51:36.547895', maxshape=None) +root['/entry/process'].create_dataset(name='date', data='2022-03-03T14:34:12.880239', maxshape=None) root['/entry/process/date'].attrs['type'] = 'NX_DATE_TIME' root['/entry/process/date'].attrs['EX_required'] = 'false' @@ -346,15 +346,15 @@ # Create the DOC strings root['/entry'].attrs['EX_doc'] = '.. index:: NXcanSAS (applications); SASentry Place the canSAS ``SASentry`` group as a child of a NeXus ``NXentry`` group (when data from multiple techniques are being stored) or as a replacement for the ``NXentry`` group. Note: It is required for all numerical objects to provide a *units* attribute that describes the engineering units. Use the Unidata UDunits [#]_ specification as this is compatible with various community standards. .. [#] The UDunits specification also includes instructions for derived units. ' root['/entry/definition'].attrs['EX_doc'] = 'Official NeXus NXDL schema to which this subentry conforms. ' -root['/entry/data'].attrs['EX_doc'] = 'A *SASData* group contains a single reduced small-angle scattering data set that can be represented as :math:`I(\vec{Q})` or :math:`I(|\vec{Q}|)`. *Q* can be either a vector (:math:`\vec{Q}`) or a vector magnitude (:math:`|\vec{Q}|`) The name of each *SASdata* group must be unique within a SASentry group. Suggest using names such as ``sasdata01``. NOTE: For the first *SASdata* group, be sure to write the chosen name into the `SASentry/@default` attribute, as in:: SASentry/@default="sasdata01" A *SASdata* group has several attributes: * I_axes * Q_indices * Mask_indices To indicate the dependency relationships of other varied parameters, use attributes similar to ``@Mask_indices`` (such as ``@Temperature_indices`` or ``@Pressure_indices``). ' -root['/entry/data/Q'].attrs['EX_doc'] = '.. index:: NXcanSAS (applications); Q Array of :math:`Q` data to accompany :math:`I`. .. figure:: canSAS/Q-geometry.jpg :width: 60% The :math:`\vec{Q}` geometry. (:download:`full image `) :math:`Q` may be represented as either the three-dimensional scattering vector :math:`\vec{Q}` or the magnitude of the scattering vector, :math:`|\vec{Q}|`. .. math:: |\vec{Q}| = (4\pi/\lambda) sin(\theta) When we write :math:`Q`, we may refer to either or both of :math:`|\vec{Q}|` or :math:`\vec{Q}`, depending on the context. ' -root['/entry/data/I'].attrs['EX_doc'] = '.. index:: NXcanSAS (applications); I Array of intensity (:math:`I`) data. The intensity may be represented in one of these forms: **absolute units**: :math:`d\Sigma/d\Omega(Q)` differential cross-section per unit volume per unit solid angle (such as: 1/cm/sr or 1/m/sr) **absolute units**: :math:`d\sigma/d\Omega(Q)` differential cross-section per unit atom per unit solid angle (such as: cm^2 or m^2) **arbitrary units**: :math:`I(Q)` usually a ratio of two detectors but units are meaningless (such as: a.u. or counts) This presents a few problems for analysis software to sort out when reading the data. Fortunately, it is possible to analyze the *units* to determine which type of intensity is being reported and make choices at the time the file is read. But this is an area for consideration and possible improvement. One problem arises with software that automatically converts data into some canonical units used by that software. The software should not convert units between these different types of intensity indiscriminately. A second problem is that when arbitrary units are used, then the set of possible analytical results is restricted. With such units, no meaningful volume fraction or number density can be determined directly from :math:`I(Q)`. In some cases, it is possible to apply a factor to convert the arbitrary units to an absolute scale. This should be considered as a possibility of the analysis process. Where this documentation says *typical units*, it is possible that small-angle data may be presented in other units and still be consistent with NeXus. See the :ref:`design-units` section. ' -root['/entry/data/Idev'].attrs['EX_doc'] = '.. index:: NXcanSAS (applications); Idev Estimated **uncertainty** (usually standard deviation) in :math:`I`. Must have the same units as :math:`I`. When present, the name of this field is also recorded in the *uncertainties* attribute of *I*, as in:: I/@uncertainties="Idev" ' -root['/entry/data/Qdev'].attrs['EX_doc'] = '.. index:: NXcanSAS (applications); Qdev Estimated :math:`Q` **resolution** (usually standard deviation). Must have the same units as :math:`Q`. When present, the name of this field is also recorded in the *resolutions* attribute of *Q*, as in:: Q/@resolutions="Qdev" or:: Q/@resolutions="dQw", "dQl" ' -root['/entry/data/dQw'].attrs['EX_doc'] = '.. index:: NXcanSAS (applications); dQw :math:`Q` **resolution** along the axis of scanning (the high-resolution *slit width* direction). Useful for defining resolution data from slit-smearing instruments such as Bonse-Hart geometry. Must have the same units as :math:`Q`. When present, the name of this field is also recorded in the *resolutions* attribute of *Q*, as in:: Q/@resolutions="dQw", "dQl" ' -root['/entry/data/dQl'].attrs['EX_doc'] = '.. index:: NXcanSAS (applications); dQl :math:`Q` **resolution** perpendicular to the axis of scanning (the low-resolution *slit length* direction). Useful for defining resolution data from slit-smearing instruments such as Bonse-Hart geometry. Must have the same units as :math:`Q`. When present, the name of this field is also recorded in the *resolutions* attribute of *Q*, as in:: Q/@resolutions="dQw", "dQl" ' +root['/entry/data'].attrs['EX_doc'] = '@default="sasdata01" A *SASdata* group has several attributes: * I_axes * Q_indices * Mask_indices To indicate the dependency relationships of other varied parameters, use attributes similar to ``@Mask_indices`` (such as ``@Temperature_indices`` or ``@Pressure_indices``). ' +root['/entry/data/Q'].attrs['EX_doc'] = '\lambda) sin(\theta) When we write :math:`Q`, we may refer to either or both of :math:`|\vec{Q}|` or :math:`\vec{Q}`, depending on the context. ' +root['/entry/data/I'].attrs['EX_doc'] = 'd\Omega(Q)` differential cross-section per unit atom per unit solid angle (such as: cm^2 or m^2) **arbitrary units**: :math:`I(Q)` usually a ratio of two detectors but units are meaningless (such as: a.u. or counts) This presents a few problems for analysis software to sort out when reading the data. Fortunately, it is possible to analyze the *units* to determine which type of intensity is being reported and make choices at the time the file is read. But this is an area for consideration and possible improvement. One problem arises with software that automatically converts data into some canonical units used by that software. The software should not convert units between these different types of intensity indiscriminately. A second problem is that when arbitrary units are used, then the set of possible analytical results is restricted. With such units, no meaningful volume fraction or number density can be determined directly from :math:`I(Q)`. In some cases, it is possible to apply a factor to convert the arbitrary units to an absolute scale. This should be considered as a possibility of the analysis process. Where this documentation says *typical units*, it is possible that small-angle data may be presented in other units and still be consistent with NeXus. See the :ref:`design-units` section. ' +root['/entry/data/Idev'].attrs['EX_doc'] = '@uncertainties="Idev" ' +root['/entry/data/Qdev'].attrs['EX_doc'] = '@resolutions="dQw", "dQl" ' +root['/entry/data/dQw'].attrs['EX_doc'] = '@resolutions="dQw", "dQl" ' +root['/entry/data/dQl'].attrs['EX_doc'] = '@resolutions="dQw", "dQl" ' root['/entry/data/Qmean'].attrs['EX_doc'] = 'Mean value of :math:`Q` for this data point. Useful when describing data that has been binned from higher-resolution data. It is expected that ``Q`` is provided and that both ``Q`` and ``Qmean`` will have the same units. ' -root['/entry/data/ShadowFactor'].attrs['EX_doc'] = 'A numerical factor applied to pixels affected by the beam stop penumbra. Used in data files from NIST/NCNR instruments. See: J.G. Barker and J.S. Pedersen (1995) *J. Appl. Cryst.* **28**, 105-114. ' +root['/entry/data/ShadowFactor'].attrs['EX_doc'] = 'NCNR instruments. See: J.G. Barker and J.S. Pedersen (1995) *J. Appl. Cryst.* **28**, 105-114. ' root['/entry/title'].attrs['EX_doc'] = 'Title of this *SASentry*. Make it so that you can recognize the data by its title. Could be the name of the sample, the name for the measured data, or something else representative. ' root['/entry/run'].attrs['EX_doc'] = 'Run identification for this *SASentry*. For many facilities, this is an integer, such as en experiment number. Use multiple instances of ``run`` as needed, keeping in mind that HDF5 requires unique names for all entities in a group. ' root['/entry/instrument'].attrs['EX_doc'] = 'Description of the small-angle scattering instrument. Consider, carefully, the relevance to the SAS data analysis process when adding subgroups in this **NXinstrument** group. Additional information can be added but will likely be ignored by standardized data anlysis processes. The NeXus :ref:`NXbeam` base class may be added as a subgroup of this **NXinstrument** group *or* as a subgroup of the **NXsample** group to describe properties of the beam at any point downstream from the source. ' @@ -363,7 +363,7 @@ root['/entry/instrument/aperture/x_gap'].attrs['EX_doc'] = 'opening along the :math:`x` axis ' root['/entry/instrument/aperture/y_gap'].attrs['EX_doc'] = 'opening along the :math:`y` axis ' root['/entry/instrument/collimator'].attrs['EX_doc'] = 'Description of a collimating element (defines the divergence of the beam) in the instrument. To document a slit, pinhole, or the beam, refer to the documentation of the ``NXinstrument`` group above. ' -root['/entry/instrument/collimator/length'].attrs['EX_doc'] = 'Amount/length of collimation inserted (as on a SANS instrument) ' +root['/entry/instrument/collimator/length'].attrs['EX_doc'] = 'length of collimation inserted (as on a SANS instrument) ' root['/entry/instrument/collimator/distance'].attrs['EX_doc'] = 'Distance from this collimation element to the sample ' root['/entry/instrument/detector'].attrs['EX_doc'] = 'Description of a detector in the instrument. ' root['/entry/instrument/detector/name'].attrs['EX_doc'] = 'Identifies the name of this detector ' @@ -390,7 +390,7 @@ root['/entry/sample'].attrs['EX_doc'] = 'Description of the sample. ' root['/entry/sample/name'].attrs['EX_doc'] = '**ID**: Text string that identifies this sample. ' root['/entry/sample/thickness'].attrs['EX_doc'] = 'Thickness of this sample ' -root['/entry/sample/transmission'].attrs['EX_doc'] = 'Transmission (:math:`I/I_0`) of this sample. There is no *units* attribute as this number is dimensionless. Note: the ability to store a transmission *spectrum*, instead of a single value, is provided elsewhere in the structure, in the *SAStransmission_spectrum* element. ' +root['/entry/sample/transmission'].attrs['EX_doc'] = 'I_0`) of this sample. There is no *units* attribute as this number is dimensionless. Note: the ability to store a transmission *spectrum*, instead of a single value, is provided elsewhere in the structure, in the *SAStransmission_spectrum* element. ' root['/entry/sample/temperature'].attrs['EX_doc'] = 'Temperature of this sample. ' root['/entry/sample/details'].attrs['EX_doc'] = 'Any additional sample details. ' root['/entry/sample/x_position'].attrs['EX_doc'] = 'Location of the sample in :math:`x` ' @@ -400,7 +400,7 @@ root['/entry/sample/yaw'].attrs['EX_doc'] = 'Rotation of the sample about the :math:`y` axis (yaw) ' root['/entry/process'].attrs['EX_doc'] = 'Description of a processing or analysis step. Add additional fields as needed to describe value(s) of any variable, parameter, or term related to the *SASprocess* step. Be sure to include *units* attributes for all numerical fields. ' root['/entry/process/name'].attrs['EX_doc'] = 'Optional name for this data processing or analysis step ' -root['/entry/process/date'].attrs['EX_doc'] = 'Optional date for this data processing or analysis step. [#iso8601]_ .. [#iso8601] ISO-8601 standard time representation. NeXus dates and times are reported in ISO-8601 (e.g., ``yyyy-mm-ddThh:mm:ss``) or modified ISO-8601 (e.g., ``yyyy-mm-dd hh:mm:ss``). See: http://www.w3.org/TR/NOTE-datetime or http://en.wikipedia.org/wiki/ISO_8601 for more details. ' +root['/entry/process/date'].attrs['EX_doc'] = 'ISO_8601 for more details. ' root['/entry/process/description'].attrs['EX_doc'] = 'Optional description for this data processing or analysis step ' root['/entry/process/term'].attrs['EX_doc'] = 'Specifies the value of a single variable, parameter, or term (while defined here as a string, it could be a number) related to the *SASprocess* step. Note: The name *term* is not required, it could take any name, as long as the name is unique within this group. ' root['/entry/process/note'].attrs['EX_doc'] = 'Any additional notes or subprocessing steps will be documented here. An **NXnote** group can be added to any NeXus group at or below the **NXentry** group. It is shown here as a suggestion of a good place to *consider* its use. ' @@ -408,8 +408,8 @@ root['/entry/collection'].attrs['EX_doc'] = 'Free form description of anything not covered by other elements. ' root['/entry/TRANSMISSION_SPECTRUM'].attrs['EX_doc'] = 'The *SAStransmission_spectrum* element This describes certain data obtained from a variable-wavelength source such as pulsed-neutron source. ' root['/entry/TRANSMISSION_SPECTRUM/lambda'].attrs['EX_doc'] = 'Wavelength of the radiation. This array is of the same shape as ``T`` and ``Tdev``. ' -root['/entry/TRANSMISSION_SPECTRUM/T'].attrs['EX_doc'] = 'Transmission values (:math:`I/I_0`) as a function of wavelength. This array is of the same shape as ``lambda`` and ``Tdev``. ' -root['/entry/TRANSMISSION_SPECTRUM/Tdev'].attrs['EX_doc'] = '.. index:: NXcanSAS (applications); Tdev Estimated uncertainty (usually standard deviation) in :math:`T`. Must have the same units as :math:`T`. This is the field is named in the *uncertainties* attribute of *T*, as in:: T/@uncertainties="Tdev" This array is of the same shape as ``lambda`` and ``T``. ' +root['/entry/TRANSMISSION_SPECTRUM/T'].attrs['EX_doc'] = 'I_0`) as a function of wavelength. This array is of the same shape as ``lambda`` and ``Tdev``. ' +root['/entry/TRANSMISSION_SPECTRUM/Tdev'].attrs['EX_doc'] = '@uncertainties="Tdev" This array is of the same shape as ``lambda`` and ``T``. ' # Create the ATTRIBUTES @@ -422,7 +422,7 @@ root['/entry/data'].attrs['Q_indices'] = '1' root['/entry/data'].attrs['mask'] = 'SAMPLE-CHAR-DATA' root['/entry/data'].attrs['Mask_indices'] = 'SAMPLE-CHAR-DATA' -root['/entry/data'].attrs['timestamp'] = '2021-03-29T15:51:36.601894' +root['/entry/data'].attrs['timestamp'] = '2022-03-03T14:34:12.911481' root['/entry/data/Q'].attrs['units'] = 'SAMPLE-CHAR-DATA' root['/entry/data/Q'].attrs['uncertainties'] = 'SAMPLE-CHAR-DATA' root['/entry/data/Q'].attrs['resolutions'] = 'SAMPLE-CHAR-DATA' @@ -449,7 +449,7 @@ root['/entry/TRANSMISSION_SPECTRUM'].attrs['signal'] = 'SAMPLE-CHAR-DATA' root['/entry/TRANSMISSION_SPECTRUM'].attrs['T_axes'] = 'SAMPLE-CHAR-DATA' root['/entry/TRANSMISSION_SPECTRUM'].attrs['name'] = 'SAMPLE-CHAR-DATA' -root['/entry/TRANSMISSION_SPECTRUM'].attrs['timestamp'] = '2021-03-29T15:51:36.609872' +root['/entry/TRANSMISSION_SPECTRUM'].attrs['timestamp'] = '2022-03-03T14:34:12.927101' root['/entry/TRANSMISSION_SPECTRUM/T'].attrs['uncertainties'] = 'SAMPLE-CHAR-DATA' root['/'].attrs['default'] = 'entry' root['/entry'].attrs['default'] = 'TRANSMISSION_SPECTRUM' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXcxi_ptycho.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXcxi_ptycho.py new file mode 100644 index 0000000..19a0476 --- /dev/null +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXcxi_ptycho.py @@ -0,0 +1,179 @@ + +import numpy as np +import datetime +import h5py +import os + +# Note this example script was generated by nxdl_to_hdf5.py using the current +# installed version of the NEXUS definitions ver[v2020.10] + +root = h5py.File('NXcxi_ptycho.h5', 'w') + +# Create the GROUPS + +root.create_group('entry_1') +root['/entry_1'].attrs['NX_class'] = 'NXentry' +root['/entry_1'].attrs['EX_required'] = 'false' + +root['/entry_1/'].create_group('instrument_1') +root['/entry_1/instrument_1'].attrs['NX_class'] = 'NXinstrument' +root['/entry_1/instrument_1'].attrs['EX_required'] = 'true' + +root['/entry_1/instrument_1/'].create_group('source_1') +root['/entry_1/instrument_1/source_1'].attrs['NX_class'] = 'NXsource' +root['/entry_1/instrument_1/source_1'].attrs['EX_required'] = 'true' + +root['/entry_1/instrument_1/'].create_group('beam_1') +root['/entry_1/instrument_1/beam_1'].attrs['NX_class'] = 'NXbeam' +root['/entry_1/instrument_1/beam_1'].attrs['EX_required'] = 'true' + +root['/entry_1/instrument_1/'].create_group('detector_1') +root['/entry_1/instrument_1/detector_1'].attrs['NX_class'] = 'NXdetector' +root['/entry_1/instrument_1/detector_1'].attrs['EX_required'] = 'true' + +root['/entry_1/instrument_1/detector_1/'].create_group('transformations') +root['/entry_1/instrument_1/detector_1/transformations'].attrs['NX_class'] = 'NXtransformations' +root['/entry_1/instrument_1/detector_1/transformations'].attrs['EX_required'] = 'false' + +root['/entry_1/instrument_1/'].create_group('monitor') +root['/entry_1/instrument_1/monitor'].attrs['NX_class'] = 'NXmonitor' +root['/entry_1/instrument_1/monitor'].attrs['EX_required'] = 'false' + +# Create the FIELDS + +root['/entry_1'].create_dataset(name='title', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry_1/title'].attrs['type'] = 'NX_CHAR' +root['/entry_1/title'].attrs['EX_required'] = 'false' + +root['/entry_1'].create_dataset(name='start_time', data='2022-03-03T14:34:21.896003', maxshape=None) +root['/entry_1/start_time'].attrs['type'] = 'NX_DATE_TIME' +root['/entry_1/start_time'].attrs['EX_required'] = 'false' + +root['/entry_1'].create_dataset(name='end_time', data='2022-03-03T14:34:21.896003', maxshape=None) +root['/entry_1/end_time'].attrs['type'] = 'NX_DATE_TIME' +root['/entry_1/end_time'].attrs['EX_required'] = 'false' + +# Valid enumeration values for root['/entry_1']['definition'] are: +# NXcxi_ptycho + +root['/entry_1'].create_dataset(name='definition', data='NXcxi_ptycho', maxshape=None) +root['/entry_1/definition'].attrs['type'] = 'NX_CHAR' +root['/entry_1/definition'].attrs['EX_required'] = 'true' + +root['/entry_1/instrument_1/source_1'].create_dataset(name='name', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry_1/instrument_1/source_1/name'].attrs['type'] = 'NX_CHAR' +root['/entry_1/instrument_1/source_1/name'].attrs['EX_required'] = 'true' + +root['/entry_1/instrument_1/source_1'].create_dataset(name='energy', data=1.0, maxshape=None) +root['/entry_1/instrument_1/source_1/energy'].attrs['type'] = 'NX_FLOAT' +root['/entry_1/instrument_1/source_1/energy'].attrs['EX_required'] = 'true' + +root['/entry_1/instrument_1/source_1'].create_dataset(name='probe', data=1.0, maxshape=None) +root['/entry_1/instrument_1/source_1/probe'].attrs['type'] = 'NX_FLOAT' +root['/entry_1/instrument_1/source_1/probe'].attrs['EX_required'] = 'true' + +root['/entry_1/instrument_1/source_1'].create_dataset(name='type', data=1.0, maxshape=None) +root['/entry_1/instrument_1/source_1/type'].attrs['type'] = 'NX_FLOAT' +root['/entry_1/instrument_1/source_1/type'].attrs['EX_required'] = 'true' + +root['/entry_1/instrument_1/beam_1'].create_dataset(name='energy', data=1.0, maxshape=None) +root['/entry_1/instrument_1/beam_1/energy'].attrs['type'] = 'NX_FLOAT' +root['/entry_1/instrument_1/beam_1/energy'].attrs['EX_required'] = 'true' + +root['/entry_1/instrument_1/beam_1'].create_dataset(name='extent', data=1.0, maxshape=None) +root['/entry_1/instrument_1/beam_1/extent'].attrs['type'] = 'NX_FLOAT' +root['/entry_1/instrument_1/beam_1/extent'].attrs['EX_required'] = 'false' + +root['/entry_1/instrument_1/beam_1'].create_dataset(name='incident_beam_divergence', data=1.0, maxshape=None) +root['/entry_1/instrument_1/beam_1/incident_beam_divergence'].attrs['type'] = 'NX_FLOAT' +root['/entry_1/instrument_1/beam_1/incident_beam_divergence'].attrs['EX_required'] = 'false' + +root['/entry_1/instrument_1/beam_1'].create_dataset(name='incident_beam_energy', data=1.0, maxshape=None) +root['/entry_1/instrument_1/beam_1/incident_beam_energy'].attrs['type'] = 'NX_FLOAT' +root['/entry_1/instrument_1/beam_1/incident_beam_energy'].attrs['EX_required'] = 'true' + +root['/entry_1/instrument_1/beam_1'].create_dataset(name='incident_energy_spread', data=1.0, maxshape=None) +root['/entry_1/instrument_1/beam_1/incident_energy_spread'].attrs['type'] = 'NX_FLOAT' +root['/entry_1/instrument_1/beam_1/incident_energy_spread'].attrs['EX_required'] = 'true' + +root['/entry_1/instrument_1/detector_1/transformations'].create_dataset(name='vector', data=1.0, maxshape=None) +root['/entry_1/instrument_1/detector_1/transformations/vector'].attrs['type'] = 'NX_NUMBER' +root['/entry_1/instrument_1/detector_1/transformations/vector'].attrs['EX_required'] = 'true' + +root['/entry_1/instrument_1/detector_1'].create_dataset(name='translation', data=1.0, maxshape=None) +root['/entry_1/instrument_1/detector_1/translation'].attrs['type'] = 'NX_FLOAT' +root['/entry_1/instrument_1/detector_1/translation'].attrs['EX_required'] = 'true' +root['/entry_1/instrument_1/detector_1/translation'].attrs['units'] = 'NX_LENGTH' + +root['/entry_1/instrument_1/detector_1'].create_dataset(name='data', data=1, maxshape=None) +root['/entry_1/instrument_1/detector_1/data'].attrs['type'] = 'NX_INT' +root['/entry_1/instrument_1/detector_1/data'].attrs['EX_required'] = 'true' +root['/entry_1/instrument_1/detector_1/data'].attrs['signal'] = '1' + +root['/entry_1/instrument_1/detector_1'].create_dataset(name='x_pixel_size', data=1.0, maxshape=None) +root['/entry_1/instrument_1/detector_1/x_pixel_size'].attrs['type'] = 'NX_FLOAT' +root['/entry_1/instrument_1/detector_1/x_pixel_size'].attrs['EX_required'] = 'true' +root['/entry_1/instrument_1/detector_1/x_pixel_size'].attrs['units'] = 'NX_LENGTH' + +root['/entry_1/instrument_1/detector_1'].create_dataset(name='y_pixel_size', data=1.0, maxshape=None) +root['/entry_1/instrument_1/detector_1/y_pixel_size'].attrs['type'] = 'NX_FLOAT' +root['/entry_1/instrument_1/detector_1/y_pixel_size'].attrs['EX_required'] = 'true' +root['/entry_1/instrument_1/detector_1/y_pixel_size'].attrs['units'] = 'NX_LENGTH' + +root['/entry_1/instrument_1/detector_1'].create_dataset(name='distance', data=1.0, maxshape=None) +root['/entry_1/instrument_1/detector_1/distance'].attrs['type'] = 'NX_FLOAT' +root['/entry_1/instrument_1/detector_1/distance'].attrs['EX_required'] = 'true' +root['/entry_1/instrument_1/detector_1/distance'].attrs['units'] = 'NX_LENGTH' + +root['/entry_1/instrument_1/detector_1'].create_dataset(name='beam_center_x', data=1.0, maxshape=None) +root['/entry_1/instrument_1/detector_1/beam_center_x'].attrs['type'] = 'NX_FLOAT' +root['/entry_1/instrument_1/detector_1/beam_center_x'].attrs['EX_required'] = 'false' +root['/entry_1/instrument_1/detector_1/beam_center_x'].attrs['units'] = 'NX_LENGTH' + +root['/entry_1/instrument_1/detector_1'].create_dataset(name='beam_center_y', data=1.0, maxshape=None) +root['/entry_1/instrument_1/detector_1/beam_center_y'].attrs['type'] = 'NX_FLOAT' +root['/entry_1/instrument_1/detector_1/beam_center_y'].attrs['EX_required'] = 'false' +root['/entry_1/instrument_1/detector_1/beam_center_y'].attrs['units'] = 'NX_LENGTH' + +root['/entry_1/instrument_1/monitor'].create_dataset(name='data', data=1.0, maxshape=None) +root['/entry_1/instrument_1/monitor/data'].attrs['type'] = 'NX_FLOAT' +root['/entry_1/instrument_1/monitor/data'].attrs['EX_required'] = 'false' + +# Create the LINKS +root['/entry_1/instrument_1/detector_1/data_1'] = h5py.SoftLink('/entry_1/title') +root['/entry_1/instrument_1/detector_1/data_1/'].attrs['target'] = '/entry/instrument/detector/data' + +# Create the DOC strings +root['/entry_1/definition'].attrs['EX_doc'] = 'Official NeXus NXDL schema to which this file conforms ' +root['/entry_1/instrument_1/source_1/energy'].attrs['EX_doc'] = 'This is the energy of the machine, not the beamline. ' +root['/entry_1/instrument_1/detector_1/translation'].attrs['EX_doc'] = 'This is an array of shape (npts_x*npts_y, 3) and can be a Virtual Dataset of x and y ' +root['/entry_1/instrument_1/detector_1/data_1'].attrs['EX_doc'] = 'This data must always have shape (npts_x*npts_y, frame_size_x, frame_size_y) regardless of the scan pattern. Use hdf5 virtual dataset to achieve this. ' +root['/entry_1/instrument_1/detector_1/distance'].attrs['EX_doc'] = 'The distance between the detector and the sample ' + + +# Create the ATTRIBUTES +root['/entry_1/instrument_1/beam_1/energy'].attrs['units'] = 'SAMPLE-CHAR-DATA' +root['/entry_1/instrument_1/beam_1/extent'].attrs['units'] = 'SAMPLE-CHAR-DATA' +root['/entry_1/instrument_1/beam_1/incident_beam_divergence'].attrs['units'] = 'SAMPLE-CHAR-DATA' +root['/entry_1/instrument_1/beam_1/incident_beam_energy'].attrs['units'] = 'SAMPLE-CHAR-DATA' +root['/entry_1/instrument_1/beam_1/incident_energy_spread'].attrs['units'] = 'SAMPLE-CHAR-DATA' +root['/entry_1/instrument_1/detector_1'].attrs['axes'] = 'SAMPLE-CHAR-DATA' +root['/entry_1/instrument_1/detector_1'].attrs['signal'] = 'SAMPLE-CHAR-DATA' +root['/entry_1/instrument_1/detector_1/translation'].attrs['units'] = 'SAMPLE-CHAR-DATA' +root['/entry_1/instrument_1/detector_1/translation'].attrs['axes'] = 'SAMPLE-CHAR-DATA' +root['/entry_1/instrument_1/detector_1/translation'].attrs['interpretation'] = 'SAMPLE-CHAR-DATA' +root['/entry_1/instrument_1/detector_1/x_pixel_size'].attrs['units'] = 'SAMPLE-CHAR-DATA' +root['/entry_1/instrument_1/detector_1/y_pixel_size'].attrs['units'] = 'SAMPLE-CHAR-DATA' +root['/entry_1/instrument_1/detector_1/distance'].attrs['units'] = 'SAMPLE-CHAR-DATA' +root['/entry_1/instrument_1/detector_1/beam_center_x'].attrs['units'] = 'SAMPLE-CHAR-DATA' +root['/entry_1/instrument_1/detector_1/beam_center_y'].attrs['units'] = 'SAMPLE-CHAR-DATA' +root['/'].attrs['default'] = 'entry_1' +root.attrs['file_name'] = os.path.abspath('NXcxi_ptycho') +root.attrs['file_time'] = datetime.datetime.now().isoformat() +root.attrs['h5py_version'] = h5py.version.version +root.attrs['HDF5_Version'] = h5py.version.hdf5_version + +# Close the file +root.close() + + diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXdirecttof.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXdirecttof.py index 3d77526..28d6c72 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXdirecttof.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXdirecttof.py @@ -53,7 +53,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='start_time', data='2021-03-29T15:51:37.033456', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:13.114561', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXfluo.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXfluo.py index 5074518..964a46a 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXfluo.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXfluo.py @@ -49,7 +49,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='start_time', data='2021-03-29T15:51:37.263456', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:13.239528', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXindirecttof.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXindirecttof.py index d7d15df..0e9852b 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXindirecttof.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXindirecttof.py @@ -49,7 +49,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='start_time', data='2021-03-29T15:51:37.731456', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:13.442607', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXmonopd.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXmonopd.py index f60cd60..50b27c8 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXmonopd.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXmonopd.py @@ -49,7 +49,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='start_time', data='2021-03-29T15:51:38.596455', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:13.864380', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' @@ -135,8 +135,8 @@ root['/entry/monitor/mode'].attrs['EX_doc'] = 'Count to a preset value based on either clock time (timer) or received monitor counts (monitor). ' root['/entry/monitor/preset'].attrs['EX_doc'] = 'preset value for time or monitor ' root['/entry/monitor/integral'].attrs['EX_doc'] = 'Total integral monitor counts ' -root['/entry/data/polar_angle'].attrs['EX_doc'] = 'Link to polar angle in /NXentry/NXinstrument/NXdetector ' -root['/entry/data/data'].attrs['EX_doc'] = 'Link to data in /NXentry/NXinstrument/NXdetector ' +root['/entry/data/polar_angle'].attrs['EX_doc'] = 'NXdetector ' +root['/entry/data/data'].attrs['EX_doc'] = 'NXdetector ' # Create the ATTRIBUTES diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXmx.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXmx.py index 94f1b19..ca14d55 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXmx.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXmx.py @@ -73,15 +73,15 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'false' -root['/entry'].create_dataset(name='start_time', data='2021-03-29T15:51:40.027458', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:14.520473', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='end_time', data='2021-03-29T15:51:40.030457', maxshape=None) +root['/entry'].create_dataset(name='end_time', data='2022-03-03T14:34:14.536095', maxshape=None) root['/entry/end_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/end_time'].attrs['EX_required'] = 'false' -root['/entry'].create_dataset(name='end_time_estimated', data='2021-03-29T15:51:40.039474', maxshape=None) +root['/entry'].create_dataset(name='end_time_estimated', data='2022-03-03T14:34:14.536095', maxshape=None) root['/entry/end_time_estimated'].attrs['type'] = 'NX_DATE_TIME' root['/entry/end_time_estimated'].attrs['EX_required'] = 'true' @@ -113,7 +113,7 @@ root['/entry/instrument/name'].attrs['type'] = 'NX_CHAR' root['/entry/instrument/name'].attrs['EX_required'] = 'true' -root['/entry/instrument'].create_dataset(name='time_zone', data='2021-03-29T15:51:40.065477', maxshape=None) +root['/entry/instrument'].create_dataset(name='time_zone', data='2022-03-03T14:34:14.551718', maxshape=None) root['/entry/instrument/time_zone'].attrs['type'] = 'NX_DATE_TIME' root['/entry/instrument/time_zone'].attrs['EX_required'] = 'true' @@ -344,15 +344,15 @@ # Create the DOC strings root['/entry'].attrs['EX_doc'] = 'Note, it is recommended that ``file_name`` and ``file_time`` are included as attributes at the root of a file that includes :ref:`NXmx`. See :ref:`NXroot`. ' -root['/entry/start_time'].attrs['EX_doc'] = 'ISO 8601 time/date of the first data point collected in UTC, using the Z suffix to avoid confusion with local time. Note that the time zone of the beamline should be provided in NXentry/NXinstrument/time_zone. ' -root['/entry/end_time'].attrs['EX_doc'] = 'ISO 8601 time/date of the last data point collected in UTC, using the Z suffix to avoid confusion with local time. Note that the time zone of the beamline should be provided in NXentry/NXinstrument/time_zone. This field should only be filled when the value is accurately observed. If the data collection aborts or otherwise prevents accurate recording of the end_time, this field should be omitted. ' -root['/entry/end_time_estimated'].attrs['EX_doc'] = 'ISO 8601 time/date of the last data point collected in UTC, using the Z suffix to avoid confusion with local time. Note that the time zone of the beamline should be provided in NXentry/NXinstrument/time_zone. This field may be filled with a value estimated before an observed value is available. ' +root['/entry/start_time'].attrs['EX_doc'] = 'time_zone. ' +root['/entry/end_time'].attrs['EX_doc'] = 'time_zone. This field should only be filled when the value is accurately observed. If the data collection aborts or otherwise prevents accurate recording of the end_time, this field should be omitted. ' +root['/entry/end_time_estimated'].attrs['EX_doc'] = 'time_zone. This field may be filled with a value estimated before an observed value is available. ' root['/entry/definition'].attrs['EX_doc'] = 'NeXus NXDL schema to which this file conforms ' root['/entry/data/data'].attrs['EX_doc'] = 'For a dimension-2 detector, the rank of the data array will be 3. For a dimension-3 detector, the rank of the data array will be 4. This allows for the introduction of the frame number as the first index. ' root['/entry/sample/name'].attrs['EX_doc'] = 'Descriptive name of sample ' root['/entry/sample/depends_on'].attrs['EX_doc'] = 'This is a requirement to describe for any scan experiment. The axis on which the sample position depends may be stored anywhere, but is normally stored in the NXtransformations group within the NXsample group. If there is no goniometer, e.g. with a jet, depends_on should be set to "." ' root['/entry/sample/transformations'].attrs['EX_doc'] = 'This is the recommended location for sample goniometer and other related axes. This is a requirement to describe for any scan experiment. The reason it is optional is mainly to accommodate XFEL single shot exposures. Use of the depends_on field and the NXtransformations group is strongly recommended. As noted above this should be an absolute requirement to have for any scan experiment. The reason it is optional is mainly to accommodate XFEL single shot exposures. ' -root['/entry/instrument/name'].attrs['EX_doc'] = 'Name of instrument. Consistency with the controlled vocabulary beamline naming in https://mmcif.wwpdb.org/dictionaries/mmcif_pdbx_v50.dic/Items/_diffrn_source.pdbx_synchrotron_beamline.html and https://mmcif.wwpdb.org/dictionaries/mmcif_pdbx_v50.dic/Items/_diffrn_source.type.html is highly recommended. ' +root['/entry/instrument/name'].attrs['EX_doc'] = '_diffrn_source.type.html is highly recommended. ' root['/entry/instrument/time_zone'].attrs['EX_doc'] = 'ISO 8601 time_zone offset from UTC. ' root['/entry/instrument/NXdetector_group'].attrs['EX_doc'] = 'Optional logical grouping of detectors. Each detector is represented as an NXdetector with its own detector data array. Each detector data array may be further decomposed into array sections by use of NXdetector_module groups. Detectors can be grouped logically together using NXdetector_group. Groups can be further grouped hierarchically in a single NXdetector_group (for example, if there are multiple detectors at an endstation or multiple endstations at a facility). Alternatively, multiple NXdetector_groups can be provided. The groups are defined hierarchically, with names given in the group_names field, unique identifying indices given in the field group_index, and the level in the hierarchy given in the group_parent field. For example if an x-ray detector group, DET, consists of four detectors in a rectangular array:: DTL DTR DLL DLR We could have:: group_names: ["DET", "DTL", "DTR", "DLL", "DLR"] group_index: [1, 2, 3, 4, 5] group_parent: [-1, 1, 1, 1, 1] ' root['/entry/instrument/NXdetector_group/group_names'].attrs['EX_doc'] = 'An array of the names of the detectors or the names of hierarchical groupings of detectors. ' @@ -363,7 +363,7 @@ root['/entry/instrument/detector/transformations'].attrs['EX_doc'] = 'Location for axes (transformations) to do with the detector. In the case of a single-module detector, the axes of the detector axis chain may be stored here. ' root['/entry/instrument/detector/collection'].attrs['EX_doc'] = 'Suggested container for detailed non-standard detector information like corrections applied automatically or performance settings. ' root['/entry/instrument/detector/data'].attrs['EX_doc'] = 'For a dimension-2 detector, the rank of the data array will be 3. For a dimension-3 detector, the rank of the data array will be 4. This allows for the introduction of the frame number as the first index. ' -root['/entry/instrument/detector/description'].attrs['EX_doc'] = 'name/manufacturer/model/etc. information. ' +root['/entry/instrument/detector/description'].attrs['EX_doc'] = 'etc. information. ' root['/entry/instrument/detector/time_per_channel'].attrs['EX_doc'] = 'For a time-of-flight detector this is the scaling factor to convert from the numeric value reported to the flight time for a given measurement. ' root['/entry/instrument/detector/NXdetector_module'].attrs['EX_doc'] = 'Many detectors consist of multiple smaller modules that are operated in sync and store their data in a common dataset. To allow consistent parsing of the experimental geometry, this application definiton requires all detectors to define a detector module, even if there is only one. This group specifies the hyperslab of data in the data array associated with the detector that contains the data for this module. If the module is associated with a full data array, rather than with a hyperslab within a larger array, then a single module should be defined, spanning the entire array. ' root['/entry/instrument/detector/NXdetector_module/data_origin'].attrs['EX_doc'] = 'A dimension-2 or dimension-3 field which gives the indices of the origin of the hyperslab of data for this module in the main area detector image in the parent NXdetector module. The data_origin is 0-based. The frame number dimension (nP) is omitted. Thus the data_origin field for a dimension-2 dataset with indices (nP, i, j) will be an array with indices (i, j), and for a dimension-3 dataset with indices (nP, i, j, k) will be an array with indices (i, j, k). The :ref:`order ` of indices (i, j or i, j, k) is slow to fast. ' @@ -406,8 +406,8 @@ root['/entry/instrument/beam/total_flux'].attrs['EX_doc'] = 'Flux incident on beam plane in photons per second. In the case of a beam that varies in total flux shot-to-shot, this is an array of values, one for each recorded shot. ' root['/entry/instrument/beam/incident_beam_size'].attrs['EX_doc'] = 'Two-element array of FWHM (if Gaussian or Airy function) or diameters (if top hat) or widths (if rectangular) of the beam in the order x, y ' root['/entry/instrument/beam/profile'].attrs['EX_doc'] = 'The beam profile, Gaussian, Airy function, top-hat or rectangular. The profile is given in the plane of incidence of the beam on the sample. ' -root['/entry/source'].attrs['EX_doc'] = 'The neutron or x-ray storage ring/facility. Note, the NXsource base class has many more fields available, but at present we only require the name. ' -root['/entry/source/name'].attrs['EX_doc'] = 'Name of source. Consistency with the naming in https://mmcif.wwpdb.org/dictionaries/mmcif_pdbx_v50.dic/Items/_diffrn_source.pdbx_synchrotron_site.html controlled vocabulary is highly recommended. ' +root['/entry/source'].attrs['EX_doc'] = 'facility. Note, the NXsource base class has many more fields available, but at present we only require the name. ' +root['/entry/source/name'].attrs['EX_doc'] = '_diffrn_source.pdbx_synchrotron_site.html controlled vocabulary is highly recommended. ' # Create the ATTRIBUTES diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXpeem.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXpeem.py new file mode 100644 index 0000000..5147d07 --- /dev/null +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXpeem.py @@ -0,0 +1,150 @@ + +import numpy as np +import datetime +import h5py +import os + +# Note this example script was generated by nxdl_to_hdf5.py using the current +# installed version of the NEXUS definitions ver[v2020.10] + +root = h5py.File('NXpeem.h5', 'w') + +# Create the GROUPS + +root.create_group('entry') +root['/entry'].attrs['NX_class'] = 'NXentry' +root['/entry'].attrs['EX_required'] = 'true' + +root['/entry/'].create_group('instrument') +root['/entry/instrument'].attrs['NX_class'] = 'NXinstrument' +root['/entry/instrument'].attrs['EX_required'] = 'true' + +root['/entry/instrument/'].create_group('source') +root['/entry/instrument/source'].attrs['NX_class'] = 'NXsource' +root['/entry/instrument/source'].attrs['EX_required'] = 'true' + +root['/entry/instrument/'].create_group('monochromator') +root['/entry/instrument/monochromator'].attrs['NX_class'] = 'NXmonochromator' +root['/entry/instrument/monochromator'].attrs['EX_required'] = 'true' + +root['/entry/instrument/'].create_group('detector') +root['/entry/instrument/detector'].attrs['NX_class'] = 'NXdetector' +root['/entry/instrument/detector'].attrs['EX_required'] = 'true' + +root['/entry/'].create_group('sample') +root['/entry/sample'].attrs['NX_class'] = 'NXsample' +root['/entry/sample'].attrs['EX_required'] = 'true' + +root['/entry/'].create_group('data') +root['/entry/data'].attrs['NX_class'] = 'NXdata' +root['/entry/data'].attrs['EX_required'] = 'true' + +# Create the FIELDS + +root['/entry'].create_dataset(name='title', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/title'].attrs['type'] = 'NX_CHAR' +root['/entry/title'].attrs['EX_required'] = 'true' + +root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:14.801656', maxshape=None) +root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' +root['/entry/start_time'].attrs['EX_required'] = 'true' + +root['/entry'].create_dataset(name='end_time', data='2022-03-03T14:34:14.801656', maxshape=None) +root['/entry/end_time'].attrs['type'] = 'NX_DATE_TIME' +root['/entry/end_time'].attrs['EX_required'] = 'true' + +# Valid enumeration values for root['/entry']['definition'] are: +# NXpeem + +root['/entry'].create_dataset(name='definition', data='NXpeem', maxshape=None) +root['/entry/definition'].attrs['type'] = 'NX_CHAR' +root['/entry/definition'].attrs['EX_required'] = 'true' + +root['/entry/instrument/source'].create_dataset(name='type', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/instrument/source/type'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/source/type'].attrs['EX_required'] = 'true' + +root['/entry/instrument/source'].create_dataset(name='name', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/instrument/source/name'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/source/name'].attrs['EX_required'] = 'true' + +root['/entry/instrument/source'].create_dataset(name='probe', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/instrument/source/probe'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/source/probe'].attrs['EX_required'] = 'true' + +root['/entry/instrument/monochromator'].create_dataset(name='energy', data=1.0, maxshape=None) +root['/entry/instrument/monochromator/energy'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/monochromator/energy'].attrs['EX_required'] = 'true' + +root['/entry/instrument/detector'].create_dataset(name='data', data=1.0, maxshape=None) +root['/entry/instrument/detector/data'].attrs['type'] = 'NX_NUMBER' +root['/entry/instrument/detector/data'].attrs['EX_required'] = 'true' + +root['/entry/sample'].create_dataset(name='rotation_angle', data=1.0, maxshape=None) +root['/entry/sample/rotation_angle'].attrs['type'] = 'NX_FLOAT' +root['/entry/sample/rotation_angle'].attrs['EX_required'] = 'true' + +# Valid enumeration values for root['/entry/data']['peem_scan_type'] are: +# single image scan +# stack scan +# focus scan +# single variable scan +# two variable scan +# time scan + +root['/entry/data'].create_dataset(name='peem_scan_type', data='single image scan', maxshape=None) +root['/entry/data/peem_scan_type'].attrs['type'] = 'NX_CHAR' +root['/entry/data/peem_scan_type'].attrs['EX_required'] = 'true' + +root['/entry/data'].create_dataset(name='img_data', data=1.0, maxshape=None) +root['/entry/data/img_data'].attrs['type'] = 'NX_NUMBER' +root['/entry/data/img_data'].attrs['EX_required'] = 'true' + +root['/entry/data'].create_dataset(name='spec_data', data=1.0, maxshape=None) +root['/entry/data/spec_data'].attrs['type'] = 'NX_NUMBER' +root['/entry/data/spec_data'].attrs['EX_required'] = 'true' +root['/entry/data/spec_data'].attrs['signal'] = '1' + +root['/entry/data'].create_dataset(name='energy', data=1.0, maxshape=None) +root['/entry/data/energy'].attrs['type'] = 'NX_FLOAT' +root['/entry/data/energy'].attrs['EX_required'] = 'true' + +root['/entry/data'].create_dataset(name='polarization', data=1.0, maxshape=None) +root['/entry/data/polarization'].attrs['type'] = 'NX_FLOAT' +root['/entry/data/polarization'].attrs['EX_required'] = 'false' + +root['/entry/data'].create_dataset(name='averages', data=1, maxshape=None) +root['/entry/data/averages'].attrs['type'] = 'NX_INTEGER' +root['/entry/data/averages'].attrs['EX_required'] = 'true' + +root['/entry/data'].create_dataset(name='count_time', data=1.0, maxshape=None) +root['/entry/data/count_time'].attrs['type'] = 'NX_FLOAT' +root['/entry/data/count_time'].attrs['EX_required'] = 'true' + +# Create the DOC strings +root['/entry/definition'].attrs['EX_doc'] = 'Official NeXus NXDL schema to which this file conforms ' +root['/entry/instrument/detector/data'].attrs['EX_doc'] = 'Detector data should be presented with the first dimension corresponding to the scan point and subsequent dimensions corresponding to the output of the detector. Detectors that provide more than one value per scan point should have a data array of rank 1+d, where d is the dimensions of the array provided per scan point. For example, an area detector should have an NXdetector data array of 3 dimensions, with the first being the set of scan points and the latter two being the x- and y- extent of the detector ' +root['/entry/data'].attrs['EX_doc'] = 'This will contain all the data for a particular ROI ' +root['/entry/data/peem_scan_type'].attrs['EX_doc'] = 'Label for typical scan types as a convenience for humans. Each label corresponds to a specific set of axes being scanned to produce a data array of shape: * single image scan: (photon_energy, 2D image data) * stack scan: (photon_energy, polarization, 2D image data + 1D spectra) * focus scan: (photon_energy, 2D image data) * single variable scan: (variable, 2D image data + 1D spectra) * two variable scan: (variable1, variable2, 2D image data + 1D spectra) * time scan: (time, 2D image data + 1D spectra) The "single image scan" string is to be used when none of the other choices are appropriate. ' +root['/entry/data/img_data'].attrs['EX_doc'] = 'This will contain a multi dimensonal array that with the columns determined by the scan type ' +root['/entry/data/spec_data'].attrs['EX_doc'] = 'This will contain a multi dimensonal array that with the columns determined by the scan type ' +root['/entry/data/energy'].attrs['EX_doc'] = 'List of photon energies of the X-ray beam. If scanned through multiple values, then an "axis" attribute will be required to link the field to the appropriate data array dimension. ' +root['/entry/data/polarization'].attrs['EX_doc'] = 'List of polarizations. If scanned through multiple values, then an "axis" attribute will be required to link the field to the appropriate data array dimension. ' +root['/entry/data/averages'].attrs['EX_doc'] = 'List of Y positions on the sample. If scanned through multiple values, then an "axis" attribute will be required to link the field to the appropriate data array dimension. ' +root['/entry/data/count_time'].attrs['EX_doc'] = 'List of dwell times for each point in the scan, they may vary point to point, then an "axis" attribute will be required to link the field to the appropriate data array dimension. ' + + +# Create the ATTRIBUTES +root['/'].attrs['default'] = 'entry' +root['/entry'].attrs['default'] = 'data' +root['/entry/data'].attrs['signal'] = 'averages' +root['/entry/data/averages'].attrs['signal'] = '1' +root.attrs['file_name'] = os.path.abspath('NXpeem') +root.attrs['file_time'] = datetime.datetime.now().isoformat() +root.attrs['h5py_version'] = h5py.version.version +root.attrs['HDF5_Version'] = h5py.version.hdf5_version + +# Close the file +root.close() + + diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXrefscan.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXrefscan.py index 499466b..7a5e34a 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXrefscan.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXrefscan.py @@ -49,11 +49,11 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='start_time', data='2021-03-29T15:51:40.531791', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:14.942247', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='end_time', data='2021-03-29T15:51:40.534797', maxshape=None) +root['/entry'].create_dataset(name='end_time', data='2022-03-03T14:34:14.942247', maxshape=None) root['/entry/end_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/end_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXreftof.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXreftof.py index 9464053..b8009bc 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXreftof.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXreftof.py @@ -45,11 +45,11 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='start_time', data='2021-03-29T15:51:40.907789', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:15.067217', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='end_time', data='2021-03-29T15:51:40.911793', maxshape=None) +root['/entry'].create_dataset(name='end_time', data='2022-03-03T14:34:15.067217', maxshape=None) root['/entry/end_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/end_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXsas.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXsas.py index d038baf..636e586 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXsas.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXsas.py @@ -61,11 +61,11 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='start_time', data='2021-03-29T15:51:41.340791', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:15.261415', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='end_time', data='2021-03-29T15:51:41.343788', maxshape=None) +root['/entry'].create_dataset(name='end_time', data='2022-03-03T14:34:15.263409', maxshape=None) root['/entry/end_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/end_time'].attrs['EX_required'] = 'true' @@ -203,7 +203,7 @@ root['/entry/instrument/source/type'].attrs['EX_doc'] = 'type of radiation source ' root['/entry/instrument/source/name'].attrs['EX_doc'] = 'Name of the radiation source ' root['/entry/instrument/monochromator/wavelength'].attrs['EX_doc'] = 'The wavelength of the radiation ' -root['/entry/instrument/monochromator/wavelength_spread'].attrs['EX_doc'] = 'delta_lambda/lambda (:math:`\Delta\lambda/\lambda`): Important for resolution calculations ' +root['/entry/instrument/monochromator/wavelength_spread'].attrs['EX_doc'] = '\lambda`): Important for resolution calculations ' root['/entry/instrument/collimator/geometry/shape/size'].attrs['EX_doc'] = 'The collimation length ' root['/entry/instrument/detector/data'].attrs['EX_doc'] = 'This is area detector data, of number of x-pixel versus number of y-pixels. Since the beam center is to be determined as a step of data reduction, it is not necessary to document or assume the position of the beam center in acquired data. ' root['/entry/instrument/detector/distance'].attrs['EX_doc'] = 'The distance between detector and sample ' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXsastof.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXsastof.py index c32a892..44d203e 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXsastof.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXsastof.py @@ -57,7 +57,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='start_time', data='2021-03-29T15:51:41.758791', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:15.490730', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXscan.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXscan.py index 3db3fec..2f0fb49 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXscan.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXscan.py @@ -41,11 +41,11 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='start_time', data='2021-03-29T15:51:41.971096', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:15.600086', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='end_time', data='2021-03-29T15:51:41.974077', maxshape=None) +root['/entry'].create_dataset(name='end_time', data='2022-03-03T14:34:15.600086', maxshape=None) root['/entry/end_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/end_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXsnsevent.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXsnsevent.py new file mode 100644 index 0000000..1539ef6 --- /dev/null +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXsnsevent.py @@ -0,0 +1,620 @@ + +import numpy as np +import datetime +import h5py +import os + +# Note this example script was generated by nxdl_to_hdf5.py using the current +# installed version of the NEXUS definitions ver[v2020.10] + +root = h5py.File('NXsnsevent.h5', 'w') + +# Create the GROUPS + +root.create_group('entry') +root['/entry'].attrs['NX_class'] = 'NXentry' +root['/entry'].attrs['EX_required'] = 'true' + +root['/entry/'].create_group('DASlogs') +root['/entry/DASlogs'].attrs['NX_class'] = 'NXcollection' +root['/entry/DASlogs'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/'].create_group('log') +root['/entry/DASlogs/log'].attrs['NX_class'] = 'NXlog' +root['/entry/DASlogs/log'].attrs['EX_required'] = 'true' + +root['/entry/DASlogs/'].create_group('positioner') +root['/entry/DASlogs/positioner'].attrs['NX_class'] = 'NXpositioner' +root['/entry/DASlogs/positioner'].attrs['EX_required'] = 'false' + +root['/entry/'].create_group('SNSHistoTool') +root['/entry/SNSHistoTool'].attrs['NX_class'] = 'NXnote' +root['/entry/SNSHistoTool'].attrs['EX_required'] = 'false' + +root['/entry/'].create_group('data') +root['/entry/data'].attrs['NX_class'] = 'NXdata' +root['/entry/data'].attrs['EX_required'] = 'true' + +root['/entry/'].create_group('NXevent_data') +root['/entry/NXevent_data'].attrs['NX_class'] = 'NXevent_data' +root['/entry/NXevent_data'].attrs['EX_required'] = 'true' + +root['/entry/'].create_group('instrument') +root['/entry/instrument'].attrs['NX_class'] = 'NXinstrument' +root['/entry/instrument'].attrs['EX_required'] = 'false' + +root['/entry/instrument/'].create_group('SNS') +root['/entry/instrument/SNS'].attrs['NX_class'] = 'NXsource' +root['/entry/instrument/SNS'].attrs['EX_required'] = 'false' + +root['/entry/instrument/'].create_group('detector') +root['/entry/instrument/detector'].attrs['NX_class'] = 'NXdetector' +root['/entry/instrument/detector'].attrs['EX_required'] = 'true' + +root['/entry/instrument/detector/'].create_group('origin') +root['/entry/instrument/detector/origin'].attrs['NX_class'] = 'NXgeometry' +root['/entry/instrument/detector/origin'].attrs['EX_required'] = 'false' + +root['/entry/instrument/detector/origin/'].create_group('orientation') +root['/entry/instrument/detector/origin/orientation'].attrs['NX_class'] = 'NXorientation' +root['/entry/instrument/detector/origin/orientation'].attrs['EX_required'] = 'false' + +root['/entry/instrument/detector/origin/'].create_group('shape') +root['/entry/instrument/detector/origin/shape'].attrs['NX_class'] = 'NXshape' +root['/entry/instrument/detector/origin/shape'].attrs['EX_required'] = 'false' + +root['/entry/instrument/detector/origin/'].create_group('translation') +root['/entry/instrument/detector/origin/translation'].attrs['NX_class'] = 'NXtranslation' +root['/entry/instrument/detector/origin/translation'].attrs['EX_required'] = 'false' + +root['/entry/instrument/'].create_group('NXdisk_chopper') +root['/entry/instrument/NXdisk_chopper'].attrs['NX_class'] = 'NXdisk_chopper' +root['/entry/instrument/NXdisk_chopper'].attrs['EX_required'] = 'false' + +root['/entry/instrument/'].create_group('moderator') +root['/entry/instrument/moderator'].attrs['NX_class'] = 'NXmoderator' +root['/entry/instrument/moderator'].attrs['EX_required'] = 'false' + +root['/entry/instrument/'].create_group('aperture') +root['/entry/instrument/aperture'].attrs['NX_class'] = 'NXaperture' +root['/entry/instrument/aperture'].attrs['EX_required'] = 'false' + +root['/entry/instrument/aperture/'].create_group('origin') +root['/entry/instrument/aperture/origin'].attrs['NX_class'] = 'NXgeometry' +root['/entry/instrument/aperture/origin'].attrs['EX_required'] = 'false' + +root['/entry/instrument/aperture/origin/'].create_group('orientation') +root['/entry/instrument/aperture/origin/orientation'].attrs['NX_class'] = 'NXorientation' +root['/entry/instrument/aperture/origin/orientation'].attrs['EX_required'] = 'false' + +root['/entry/instrument/aperture/origin/'].create_group('shape') +root['/entry/instrument/aperture/origin/shape'].attrs['NX_class'] = 'NXshape' +root['/entry/instrument/aperture/origin/shape'].attrs['EX_required'] = 'false' + +root['/entry/instrument/aperture/origin/'].create_group('translation') +root['/entry/instrument/aperture/origin/translation'].attrs['NX_class'] = 'NXtranslation' +root['/entry/instrument/aperture/origin/translation'].attrs['EX_required'] = 'false' + +root['/entry/instrument/'].create_group('attenuator') +root['/entry/instrument/attenuator'].attrs['NX_class'] = 'NXattenuator' +root['/entry/instrument/attenuator'].attrs['EX_required'] = 'false' + +root['/entry/instrument/'].create_group('polarizer') +root['/entry/instrument/polarizer'].attrs['NX_class'] = 'NXpolarizer' +root['/entry/instrument/polarizer'].attrs['EX_required'] = 'false' + +root['/entry/instrument/'].create_group('crystal') +root['/entry/instrument/crystal'].attrs['NX_class'] = 'NXcrystal' +root['/entry/instrument/crystal'].attrs['EX_required'] = 'false' + +root['/entry/instrument/crystal/'].create_group('origin') +root['/entry/instrument/crystal/origin'].attrs['NX_class'] = 'NXgeometry' +root['/entry/instrument/crystal/origin'].attrs['EX_required'] = 'false' + +root['/entry/instrument/crystal/origin/'].create_group('orientation') +root['/entry/instrument/crystal/origin/orientation'].attrs['NX_class'] = 'NXorientation' +root['/entry/instrument/crystal/origin/orientation'].attrs['EX_required'] = 'false' + +root['/entry/instrument/crystal/origin/'].create_group('shape') +root['/entry/instrument/crystal/origin/shape'].attrs['NX_class'] = 'NXshape' +root['/entry/instrument/crystal/origin/shape'].attrs['EX_required'] = 'false' + +root['/entry/instrument/crystal/origin/'].create_group('translation') +root['/entry/instrument/crystal/origin/translation'].attrs['NX_class'] = 'NXtranslation' +root['/entry/instrument/crystal/origin/translation'].attrs['EX_required'] = 'false' + +root['/entry/'].create_group('monitor') +root['/entry/monitor'].attrs['NX_class'] = 'NXmonitor' +root['/entry/monitor'].attrs['EX_required'] = 'false' + +root['/entry/'].create_group('sample') +root['/entry/sample'].attrs['NX_class'] = 'NXsample' +root['/entry/sample'].attrs['EX_required'] = 'false' + +root['/entry/'].create_group('user') +root['/entry/user'].attrs['NX_class'] = 'NXuser' +root['/entry/user'].attrs['EX_required'] = 'true' + +# Create the FIELDS + +root['/entry/DASlogs/log'].create_dataset(name='average_value', data=1.0, maxshape=None) +root['/entry/DASlogs/log/average_value'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/log/average_value'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/log'].create_dataset(name='average_value_error', data=1.0, maxshape=None) +root['/entry/DASlogs/log/average_value_error'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/log/average_value_error'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/log'].create_dataset(name='average_value_errors', data=1.0, maxshape=None) +root['/entry/DASlogs/log/average_value_errors'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/log/average_value_errors'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/log'].create_dataset(name='description', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/DASlogs/log/description'].attrs['type'] = 'NX_CHAR' +root['/entry/DASlogs/log/description'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/log'].create_dataset(name='duration', data=1.0, maxshape=None) +root['/entry/DASlogs/log/duration'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/log/duration'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/log'].create_dataset(name='maximum_value', data=1.0, maxshape=None) +root['/entry/DASlogs/log/maximum_value'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/log/maximum_value'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/log'].create_dataset(name='minimum_value', data=1.0, maxshape=None) +root['/entry/DASlogs/log/minimum_value'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/log/minimum_value'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/log'].create_dataset(name='time', data=1.0, maxshape=None) +root['/entry/DASlogs/log/time'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/log/time'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/log'].create_dataset(name='value', data=1.0, maxshape=None) +root['/entry/DASlogs/log/value'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/log/value'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/positioner'].create_dataset(name='average_value', data=1.0, maxshape=None) +root['/entry/DASlogs/positioner/average_value'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/positioner/average_value'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/positioner'].create_dataset(name='average_value_error', data=1.0, maxshape=None) +root['/entry/DASlogs/positioner/average_value_error'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/positioner/average_value_error'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/positioner'].create_dataset(name='average_value_errors', data=1.0, maxshape=None) +root['/entry/DASlogs/positioner/average_value_errors'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/positioner/average_value_errors'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/positioner'].create_dataset(name='description', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/DASlogs/positioner/description'].attrs['type'] = 'NX_CHAR' +root['/entry/DASlogs/positioner/description'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/positioner'].create_dataset(name='duration', data=1.0, maxshape=None) +root['/entry/DASlogs/positioner/duration'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/positioner/duration'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/positioner'].create_dataset(name='maximum_value', data=1.0, maxshape=None) +root['/entry/DASlogs/positioner/maximum_value'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/positioner/maximum_value'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/positioner'].create_dataset(name='minimum_value', data=1.0, maxshape=None) +root['/entry/DASlogs/positioner/minimum_value'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/positioner/minimum_value'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/positioner'].create_dataset(name='time', data=1.0, maxshape=None) +root['/entry/DASlogs/positioner/time'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/positioner/time'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/positioner'].create_dataset(name='value', data=1.0, maxshape=None) +root['/entry/DASlogs/positioner/value'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/positioner/value'].attrs['EX_required'] = 'false' + +root['/entry/SNSHistoTool'].create_dataset(name='SNSbanking_file_name', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/SNSHistoTool/SNSbanking_file_name'].attrs['type'] = 'NX_CHAR' +root['/entry/SNSHistoTool/SNSbanking_file_name'].attrs['EX_required'] = 'false' + +root['/entry/SNSHistoTool'].create_dataset(name='SNSmapping_file_name', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/SNSHistoTool/SNSmapping_file_name'].attrs['type'] = 'NX_CHAR' +root['/entry/SNSHistoTool/SNSmapping_file_name'].attrs['EX_required'] = 'false' + +root['/entry/SNSHistoTool'].create_dataset(name='author', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/SNSHistoTool/author'].attrs['type'] = 'NX_CHAR' +root['/entry/SNSHistoTool/author'].attrs['EX_required'] = 'false' + +root['/entry/SNSHistoTool'].create_dataset(name='command1', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/SNSHistoTool/command1'].attrs['type'] = 'NX_CHAR' +root['/entry/SNSHistoTool/command1'].attrs['EX_required'] = 'false' + +root['/entry/SNSHistoTool'].create_dataset(name='date', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/SNSHistoTool/date'].attrs['type'] = 'NX_CHAR' +root['/entry/SNSHistoTool/date'].attrs['EX_required'] = 'false' + +root['/entry/SNSHistoTool'].create_dataset(name='description', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/SNSHistoTool/description'].attrs['type'] = 'NX_CHAR' +root['/entry/SNSHistoTool/description'].attrs['EX_required'] = 'false' + +root['/entry/SNSHistoTool'].create_dataset(name='version', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/SNSHistoTool/version'].attrs['type'] = 'NX_CHAR' +root['/entry/SNSHistoTool/version'].attrs['EX_required'] = 'false' + +root['/entry'].create_dataset(name='collection_identifier', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/collection_identifier'].attrs['type'] = 'NX_CHAR' +root['/entry/collection_identifier'].attrs['EX_required'] = 'false' + +root['/entry'].create_dataset(name='collection_title', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/collection_title'].attrs['type'] = 'NX_CHAR' +root['/entry/collection_title'].attrs['EX_required'] = 'false' + +# Valid enumeration values for root['/entry']['definition'] are: +# NXsnsevent + +root['/entry'].create_dataset(name='definition', data='NXsnsevent', maxshape=None) +root['/entry/definition'].attrs['type'] = 'NX_CHAR' +root['/entry/definition'].attrs['EX_required'] = 'false' + +root['/entry'].create_dataset(name='duration', data=1.0, maxshape=None) +root['/entry/duration'].attrs['type'] = 'NX_FLOAT' +root['/entry/duration'].attrs['EX_required'] = 'false' +root['/entry/duration'].attrs['units'] = 'NX_TIME' + +root['/entry'].create_dataset(name='end_time', data='2022-03-03T14:34:22.583376', maxshape=None) +root['/entry/end_time'].attrs['type'] = 'NX_DATE_TIME' +root['/entry/end_time'].attrs['EX_required'] = 'false' + +root['/entry'].create_dataset(name='entry_identifier', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/entry_identifier'].attrs['type'] = 'NX_CHAR' +root['/entry/entry_identifier'].attrs['EX_required'] = 'false' + +root['/entry'].create_dataset(name='experiment_identifier', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/experiment_identifier'].attrs['type'] = 'NX_CHAR' +root['/entry/experiment_identifier'].attrs['EX_required'] = 'false' + +root['/entry/instrument/SNS'].create_dataset(name='frequency', data=1.0, maxshape=None) +root['/entry/instrument/SNS/frequency'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/SNS/frequency'].attrs['EX_required'] = 'false' +root['/entry/instrument/SNS/frequency'].attrs['units'] = 'NX_FREQUENCY' + +root['/entry/instrument/SNS'].create_dataset(name='name', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/instrument/SNS/name'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/SNS/name'].attrs['EX_required'] = 'false' + +root['/entry/instrument/SNS'].create_dataset(name='probe', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/instrument/SNS/probe'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/SNS/probe'].attrs['EX_required'] = 'false' + +root['/entry/instrument/SNS'].create_dataset(name='type', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/instrument/SNS/type'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/SNS/type'].attrs['EX_required'] = 'false' + +root['/entry/instrument'].create_dataset(name='SNSdetector_calibration_id', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/instrument/SNSdetector_calibration_id'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/SNSdetector_calibration_id'].attrs['EX_required'] = 'false' + +root['/entry/instrument'].create_dataset(name='SNSgeometry_file_name', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/instrument/SNSgeometry_file_name'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/SNSgeometry_file_name'].attrs['EX_required'] = 'false' + +root['/entry/instrument'].create_dataset(name='SNStranslation_service', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/instrument/SNStranslation_service'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/SNStranslation_service'].attrs['EX_required'] = 'false' + +root['/entry/instrument/detector'].create_dataset(name='azimuthal_angle', data=1.0, maxshape=None) +root['/entry/instrument/detector/azimuthal_angle'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/detector/azimuthal_angle'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector/azimuthal_angle'].attrs['units'] = 'NX_ANGLE' + +root['/entry/instrument/detector'].create_dataset(name='data_x_y', data=np.ushort(1), maxshape=None) +root['/entry/instrument/detector/data_x_y'].attrs['type'] = 'NX_UINT' +root['/entry/instrument/detector/data_x_y'].attrs['EX_required'] = 'false' + +root['/entry/instrument/detector'].create_dataset(name='distance', data=1.0, maxshape=None) +root['/entry/instrument/detector/distance'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/detector/distance'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector/distance'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/detector'].create_dataset(name='event_index', data=np.ushort(1), maxshape=None) +root['/entry/instrument/detector/event_index'].attrs['type'] = 'NX_UINT' +root['/entry/instrument/detector/event_index'].attrs['EX_required'] = 'false' + +root['/entry/instrument/detector'].create_dataset(name='event_pixel_id', data=np.ushort(1), maxshape=None) +root['/entry/instrument/detector/event_pixel_id'].attrs['type'] = 'NX_UINT' +root['/entry/instrument/detector/event_pixel_id'].attrs['EX_required'] = 'false' + +root['/entry/instrument/detector'].create_dataset(name='event_time_of_flight', data=1.0, maxshape=None) +root['/entry/instrument/detector/event_time_of_flight'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/detector/event_time_of_flight'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector/event_time_of_flight'].attrs['units'] = 'NX_TIME_OF_FLIGHT' + +root['/entry/instrument/detector/origin/orientation'].create_dataset(name='value', data=1.0, maxshape=None) +root['/entry/instrument/detector/origin/orientation/value'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/detector/origin/orientation/value'].attrs['EX_required'] = 'false' + +root['/entry/instrument/detector/origin/shape'].create_dataset(name='description', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/instrument/detector/origin/shape/description'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/detector/origin/shape/description'].attrs['EX_required'] = 'false' + +root['/entry/instrument/detector/origin/shape'].create_dataset(name='shape', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/instrument/detector/origin/shape/shape'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/detector/origin/shape/shape'].attrs['EX_required'] = 'false' + +root['/entry/instrument/detector/origin/shape'].create_dataset(name='size', data=1.0, maxshape=None) +root['/entry/instrument/detector/origin/shape/size'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/detector/origin/shape/size'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector/origin/shape/size'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/detector/origin/translation'].create_dataset(name='distance', data=1.0, maxshape=None) +root['/entry/instrument/detector/origin/translation/distance'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/detector/origin/translation/distance'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector/origin/translation/distance'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/detector'].create_dataset(name='pixel_id', data=np.ushort(1), maxshape=None) +root['/entry/instrument/detector/pixel_id'].attrs['type'] = 'NX_UINT' +root['/entry/instrument/detector/pixel_id'].attrs['EX_required'] = 'false' + +root['/entry/instrument/detector'].create_dataset(name='polar_angle', data=1.0, maxshape=None) +root['/entry/instrument/detector/polar_angle'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/detector/polar_angle'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector/polar_angle'].attrs['units'] = 'NX_ANGLE' + +root['/entry/instrument/detector'].create_dataset(name='pulse_time', data=1.0, maxshape=None) +root['/entry/instrument/detector/pulse_time'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/detector/pulse_time'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector/pulse_time'].attrs['units'] = 'NX_TIME' + +root['/entry/instrument/detector'].create_dataset(name='total_counts', data=np.ushort(1), maxshape=None) +root['/entry/instrument/detector/total_counts'].attrs['type'] = 'NX_UINT' +root['/entry/instrument/detector/total_counts'].attrs['EX_required'] = 'false' + +root['/entry/instrument/detector'].create_dataset(name='x_pixel_offset', data=1.0, maxshape=None) +root['/entry/instrument/detector/x_pixel_offset'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/detector/x_pixel_offset'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector/x_pixel_offset'].attrs['axis'] = '1' +root['/entry/instrument/detector/x_pixel_offset'].attrs['primary'] = '1' +root['/entry/instrument/detector/x_pixel_offset'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/detector'].create_dataset(name='y_pixel_offset', data=1.0, maxshape=None) +root['/entry/instrument/detector/y_pixel_offset'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/detector/y_pixel_offset'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector/y_pixel_offset'].attrs['axis'] = '2' +root['/entry/instrument/detector/y_pixel_offset'].attrs['primary'] = '1' +root['/entry/instrument/detector/y_pixel_offset'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument'].create_dataset(name='beamline', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/instrument/beamline'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/beamline'].attrs['EX_required'] = 'false' + +root['/entry/instrument/NXdisk_chopper'].create_dataset(name='distance', data=1.0, maxshape=None) +root['/entry/instrument/NXdisk_chopper/distance'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/NXdisk_chopper/distance'].attrs['EX_required'] = 'false' +root['/entry/instrument/NXdisk_chopper/distance'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/moderator'].create_dataset(name='coupling_material', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/instrument/moderator/coupling_material'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/moderator/coupling_material'].attrs['EX_required'] = 'false' + +root['/entry/instrument/moderator'].create_dataset(name='distance', data=1.0, maxshape=None) +root['/entry/instrument/moderator/distance'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/moderator/distance'].attrs['EX_required'] = 'false' +root['/entry/instrument/moderator/distance'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/moderator'].create_dataset(name='temperature', data=1.0, maxshape=None) +root['/entry/instrument/moderator/temperature'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/moderator/temperature'].attrs['EX_required'] = 'false' +root['/entry/instrument/moderator/temperature'].attrs['units'] = 'NX_TEMPERATURE' + +root['/entry/instrument/moderator'].create_dataset(name='type', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/instrument/moderator/type'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/moderator/type'].attrs['EX_required'] = 'false' + +root['/entry/instrument'].create_dataset(name='name', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/instrument/name'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/name'].attrs['EX_required'] = 'false' + +root['/entry/instrument/aperture/origin/orientation'].create_dataset(name='value', data=1.0, maxshape=None) +root['/entry/instrument/aperture/origin/orientation/value'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/aperture/origin/orientation/value'].attrs['EX_required'] = 'false' + +root['/entry/instrument/aperture/origin/shape'].create_dataset(name='description', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/instrument/aperture/origin/shape/description'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/aperture/origin/shape/description'].attrs['EX_required'] = 'false' + +root['/entry/instrument/aperture/origin/shape'].create_dataset(name='shape', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/instrument/aperture/origin/shape/shape'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/aperture/origin/shape/shape'].attrs['EX_required'] = 'false' + +root['/entry/instrument/aperture/origin/shape'].create_dataset(name='size', data=1.0, maxshape=None) +root['/entry/instrument/aperture/origin/shape/size'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/aperture/origin/shape/size'].attrs['EX_required'] = 'false' +root['/entry/instrument/aperture/origin/shape/size'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/aperture/origin/translation'].create_dataset(name='distance', data=1.0, maxshape=None) +root['/entry/instrument/aperture/origin/translation/distance'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/aperture/origin/translation/distance'].attrs['EX_required'] = 'false' +root['/entry/instrument/aperture/origin/translation/distance'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/aperture'].create_dataset(name='x_pixel_offset', data=1.0, maxshape=None) +root['/entry/instrument/aperture/x_pixel_offset'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/aperture/x_pixel_offset'].attrs['EX_required'] = 'false' +root['/entry/instrument/aperture/x_pixel_offset'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/attenuator'].create_dataset(name='distance', data=1.0, maxshape=None) +root['/entry/instrument/attenuator/distance'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/attenuator/distance'].attrs['EX_required'] = 'false' +root['/entry/instrument/attenuator/distance'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/crystal/origin'].create_dataset(name='description', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/instrument/crystal/origin/description'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/crystal/origin/description'].attrs['EX_required'] = 'false' + +root['/entry/instrument/crystal/origin/orientation'].create_dataset(name='value', data=1.0, maxshape=None) +root['/entry/instrument/crystal/origin/orientation/value'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/crystal/origin/orientation/value'].attrs['EX_required'] = 'false' + +root['/entry/instrument/crystal/origin/shape'].create_dataset(name='description', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/instrument/crystal/origin/shape/description'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/crystal/origin/shape/description'].attrs['EX_required'] = 'false' + +root['/entry/instrument/crystal/origin/shape'].create_dataset(name='shape', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/instrument/crystal/origin/shape/shape'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/crystal/origin/shape/shape'].attrs['EX_required'] = 'false' + +root['/entry/instrument/crystal/origin/shape'].create_dataset(name='size', data=1.0, maxshape=None) +root['/entry/instrument/crystal/origin/shape/size'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/crystal/origin/shape/size'].attrs['EX_required'] = 'false' +root['/entry/instrument/crystal/origin/shape/size'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/crystal/origin/translation'].create_dataset(name='distance', data=1.0, maxshape=None) +root['/entry/instrument/crystal/origin/translation/distance'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/crystal/origin/translation/distance'].attrs['EX_required'] = 'false' +root['/entry/instrument/crystal/origin/translation/distance'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/crystal'].create_dataset(name='type', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/instrument/crystal/type'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/crystal/type'].attrs['EX_required'] = 'false' + +root['/entry/instrument/crystal'].create_dataset(name='wavelength', data=1.0, maxshape=None) +root['/entry/instrument/crystal/wavelength'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/crystal/wavelength'].attrs['EX_required'] = 'false' +root['/entry/instrument/crystal/wavelength'].attrs['units'] = 'NX_WAVELENGTH' + +root['/entry/monitor'].create_dataset(name='data', data=np.ushort(1), maxshape=None) +root['/entry/monitor/data'].attrs['type'] = 'NX_UINT' +root['/entry/monitor/data'].attrs['EX_required'] = 'false' + +root['/entry/monitor'].create_dataset(name='distance', data=1.0, maxshape=None) +root['/entry/monitor/distance'].attrs['type'] = 'NX_FLOAT' +root['/entry/monitor/distance'].attrs['EX_required'] = 'false' +root['/entry/monitor/distance'].attrs['units'] = 'NX_LENGTH' + +root['/entry/monitor'].create_dataset(name='mode', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/monitor/mode'].attrs['type'] = 'NX_CHAR' +root['/entry/monitor/mode'].attrs['EX_required'] = 'false' + +root['/entry/monitor'].create_dataset(name='time_of_flight', data=1.0, maxshape=None) +root['/entry/monitor/time_of_flight'].attrs['type'] = 'NX_FLOAT' +root['/entry/monitor/time_of_flight'].attrs['EX_required'] = 'false' +root['/entry/monitor/time_of_flight'].attrs['units'] = 'NX_TIME' + +root['/entry'].create_dataset(name='notes', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/notes'].attrs['type'] = 'NX_CHAR' +root['/entry/notes'].attrs['EX_required'] = 'false' + +root['/entry'].create_dataset(name='proton_charge', data=1.0, maxshape=None) +root['/entry/proton_charge'].attrs['type'] = 'NX_FLOAT' +root['/entry/proton_charge'].attrs['EX_required'] = 'false' +root['/entry/proton_charge'].attrs['units'] = 'NX_CHARGE' + +root['/entry'].create_dataset(name='raw_frames', data=1, maxshape=None) +root['/entry/raw_frames'].attrs['type'] = 'NX_INT' +root['/entry/raw_frames'].attrs['EX_required'] = 'false' + +root['/entry'].create_dataset(name='run_number', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/run_number'].attrs['type'] = 'NX_CHAR' +root['/entry/run_number'].attrs['EX_required'] = 'false' + +root['/entry/sample'].create_dataset(name='changer_position', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/sample/changer_position'].attrs['type'] = 'NX_CHAR' +root['/entry/sample/changer_position'].attrs['EX_required'] = 'false' + +root['/entry/sample'].create_dataset(name='holder', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/sample/holder'].attrs['type'] = 'NX_CHAR' +root['/entry/sample/holder'].attrs['EX_required'] = 'false' + +root['/entry/sample'].create_dataset(name='identifier', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/sample/identifier'].attrs['type'] = 'NX_CHAR' +root['/entry/sample/identifier'].attrs['EX_required'] = 'false' + +root['/entry/sample'].create_dataset(name='name', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/sample/name'].attrs['type'] = 'NX_CHAR' +root['/entry/sample/name'].attrs['EX_required'] = 'false' + +root['/entry/sample'].create_dataset(name='nature', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/sample/nature'].attrs['type'] = 'NX_CHAR' +root['/entry/sample/nature'].attrs['EX_required'] = 'false' + +root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:22.708346', maxshape=None) +root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' +root['/entry/start_time'].attrs['EX_required'] = 'false' + +root['/entry'].create_dataset(name='title', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/title'].attrs['type'] = 'NX_CHAR' +root['/entry/title'].attrs['EX_required'] = 'false' + +root['/entry'].create_dataset(name='total_counts', data=np.ushort(1), maxshape=None) +root['/entry/total_counts'].attrs['type'] = 'NX_UINT' +root['/entry/total_counts'].attrs['EX_required'] = 'false' +root['/entry/total_counts'].attrs['units'] = 'NX_UNITLESS' + +root['/entry'].create_dataset(name='total_uncounted_counts', data=np.ushort(1), maxshape=None) +root['/entry/total_uncounted_counts'].attrs['type'] = 'NX_UINT' +root['/entry/total_uncounted_counts'].attrs['EX_required'] = 'false' +root['/entry/total_uncounted_counts'].attrs['units'] = 'NX_UNITLESS' + +root['/entry/user'].create_dataset(name='facility_user_id', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/user/facility_user_id'].attrs['type'] = 'NX_CHAR' +root['/entry/user/facility_user_id'].attrs['EX_required'] = 'false' + +root['/entry/user'].create_dataset(name='name', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/user/name'].attrs['type'] = 'NX_CHAR' +root['/entry/user/name'].attrs['EX_required'] = 'false' + +root['/entry/user'].create_dataset(name='role', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/user/role'].attrs['type'] = 'NX_CHAR' +root['/entry/user/role'].attrs['EX_required'] = 'false' + +# Create the LINKS +root['/entry/data/data_x_y'] = h5py.SoftLink('/entry/instrument/detector/data_x_y') +root['/entry/data/data_x_y/'].attrs['target'] = '/entry/instrument/detector/data_x_y' + +# Create the LINKS +root['/entry/data/x_pixel_offset'] = h5py.SoftLink('/entry/instrument/detector/x_pixel_offset') +root['/entry/data/x_pixel_offset/'].attrs['target'] = '/entry/instrument/detector/x_pixel_offset' + +# Create the LINKS +root['/entry/data/y_pixel_offset'] = h5py.SoftLink('/entry/instrument/detector/y_pixel_offset') +root['/entry/data/y_pixel_offset/'].attrs['target'] = '/entry/instrument/detector/y_pixel_offset' + +# Create the LINKS +root['/entry/NXevent_data/event_index'] = h5py.SoftLink('/entry/instrument/detector/event_index') +root['/entry/NXevent_data/event_index/'].attrs['target'] = '/entry/instrument/detector/event_index' + +# Create the LINKS +root['/entry/NXevent_data/event_pixel_id'] = h5py.SoftLink('/entry/instrument/detector/event_pixel_id') +root['/entry/NXevent_data/event_pixel_id/'].attrs['target'] = '/entry/instrument/detector/event_pixel_id' + +# Create the LINKS +root['/entry/NXevent_data/event_time_of_flight'] = h5py.SoftLink('/entry/instrument/detector/event_time_of_flight') +root['/entry/NXevent_data/event_time_of_flight/'].attrs['target'] = '/entry/instrument/detector/event_time_of_flight' + +# Create the LINKS +root['/entry/NXevent_data/pulse_time'] = h5py.SoftLink('/entry/instrument/detector/pulse_time') +root['/entry/NXevent_data/pulse_time/'].attrs['target'] = '/entry/instrument/detector/pulse_time' + +# Create the DOC strings +root['/entry/DASlogs'].attrs['EX_doc'] = 'Details of all logs, both from cvinfo file and from HistoTool (frequency and proton_charge). ' +root['/entry/DASlogs/positioner'].attrs['EX_doc'] = 'Motor logs from cvinfo file. ' +root['/entry/SNSHistoTool/command1'].attrs['EX_doc'] = 'Command string for event2nxl. ' +root['/entry/definition'].attrs['EX_doc'] = 'Official NXDL schema after this file goes to applications. ' +root['/entry/instrument/SNSdetector_calibration_id'].attrs['EX_doc'] = 'Detector calibration id from DAS. ' +root['/entry/instrument/detector/data_x_y'].attrs['EX_doc'] = 'expect ``signal=2 axes="x_pixel_offset,y_pixel_offset``" ' +root['/entry/instrument/detector/origin/orientation/value'].attrs['EX_doc'] = 'Six out of nine rotation parameters. ' +root['/entry/instrument/aperture/origin/orientation/value'].attrs['EX_doc'] = 'Six out of nine rotation parameters. ' +root['/entry/instrument/crystal/origin/orientation/value'].attrs['EX_doc'] = 'Six out of nine rotation parameters. ' +root['/entry/monitor/data'].attrs['EX_doc'] = 'expect ``signal=1 axes="time_of_flight"`` ' +root['/entry/sample/name'].attrs['EX_doc'] = 'Descriptive name of sample ' + + +# Create the ATTRIBUTES +root['/'].attrs['default'] = 'entry' +root['/entry'].attrs['default'] = 'data' +root['/entry/data'].attrs['signal'] = 'data_x_y' +root['/entry/data/data_x_y'].attrs['signal'] = '1' +root.attrs['file_name'] = os.path.abspath('NXsnsevent') +root.attrs['file_time'] = datetime.datetime.now().isoformat() +root.attrs['h5py_version'] = h5py.version.version +root.attrs['HDF5_Version'] = h5py.version.hdf5_version + +# Close the file +root.close() + + diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXsnshisto.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXsnshisto.py new file mode 100644 index 0000000..71c5cfe --- /dev/null +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXsnshisto.py @@ -0,0 +1,644 @@ + +import numpy as np +import datetime +import h5py +import os + +# Note this example script was generated by nxdl_to_hdf5.py using the current +# installed version of the NEXUS definitions ver[v2020.10] + +root = h5py.File('NXsnshisto.h5', 'w') + +# Create the GROUPS + +root.create_group('entry') +root['/entry'].attrs['NX_class'] = 'NXentry' +root['/entry'].attrs['EX_required'] = 'true' + +root['/entry/'].create_group('DASlogs') +root['/entry/DASlogs'].attrs['NX_class'] = 'NXcollection' +root['/entry/DASlogs'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/'].create_group('log') +root['/entry/DASlogs/log'].attrs['NX_class'] = 'NXlog' +root['/entry/DASlogs/log'].attrs['EX_required'] = 'true' + +root['/entry/DASlogs/'].create_group('positioner') +root['/entry/DASlogs/positioner'].attrs['NX_class'] = 'NXpositioner' +root['/entry/DASlogs/positioner'].attrs['EX_required'] = 'false' + +root['/entry/'].create_group('SNSHistoTool') +root['/entry/SNSHistoTool'].attrs['NX_class'] = 'NXnote' +root['/entry/SNSHistoTool'].attrs['EX_required'] = 'false' + +root['/entry/'].create_group('data') +root['/entry/data'].attrs['NX_class'] = 'NXdata' +root['/entry/data'].attrs['EX_required'] = 'true' + +root['/entry/'].create_group('instrument') +root['/entry/instrument'].attrs['NX_class'] = 'NXinstrument' +root['/entry/instrument'].attrs['EX_required'] = 'false' + +root['/entry/instrument/'].create_group('SNS') +root['/entry/instrument/SNS'].attrs['NX_class'] = 'NXsource' +root['/entry/instrument/SNS'].attrs['EX_required'] = 'false' + +root['/entry/instrument/'].create_group('detector') +root['/entry/instrument/detector'].attrs['NX_class'] = 'NXdetector' +root['/entry/instrument/detector'].attrs['EX_required'] = 'true' + +root['/entry/instrument/detector/'].create_group('origin') +root['/entry/instrument/detector/origin'].attrs['NX_class'] = 'NXgeometry' +root['/entry/instrument/detector/origin'].attrs['EX_required'] = 'false' + +root['/entry/instrument/detector/origin/'].create_group('orientation') +root['/entry/instrument/detector/origin/orientation'].attrs['NX_class'] = 'NXorientation' +root['/entry/instrument/detector/origin/orientation'].attrs['EX_required'] = 'false' + +root['/entry/instrument/detector/origin/'].create_group('shape') +root['/entry/instrument/detector/origin/shape'].attrs['NX_class'] = 'NXshape' +root['/entry/instrument/detector/origin/shape'].attrs['EX_required'] = 'false' + +root['/entry/instrument/detector/origin/'].create_group('translation') +root['/entry/instrument/detector/origin/translation'].attrs['NX_class'] = 'NXtranslation' +root['/entry/instrument/detector/origin/translation'].attrs['EX_required'] = 'false' + +root['/entry/instrument/'].create_group('NXdisk_chopper') +root['/entry/instrument/NXdisk_chopper'].attrs['NX_class'] = 'NXdisk_chopper' +root['/entry/instrument/NXdisk_chopper'].attrs['EX_required'] = 'false' + +root['/entry/instrument/'].create_group('NXfermi_chopper') +root['/entry/instrument/NXfermi_chopper'].attrs['NX_class'] = 'NXfermi_chopper' +root['/entry/instrument/NXfermi_chopper'].attrs['EX_required'] = 'false' + +root['/entry/instrument/'].create_group('moderator') +root['/entry/instrument/moderator'].attrs['NX_class'] = 'NXmoderator' +root['/entry/instrument/moderator'].attrs['EX_required'] = 'false' + +root['/entry/instrument/'].create_group('aperture') +root['/entry/instrument/aperture'].attrs['NX_class'] = 'NXaperture' +root['/entry/instrument/aperture'].attrs['EX_required'] = 'false' + +root['/entry/instrument/aperture/'].create_group('origin') +root['/entry/instrument/aperture/origin'].attrs['NX_class'] = 'NXgeometry' +root['/entry/instrument/aperture/origin'].attrs['EX_required'] = 'false' + +root['/entry/instrument/aperture/origin/'].create_group('orientation') +root['/entry/instrument/aperture/origin/orientation'].attrs['NX_class'] = 'NXorientation' +root['/entry/instrument/aperture/origin/orientation'].attrs['EX_required'] = 'false' + +root['/entry/instrument/aperture/origin/'].create_group('shape') +root['/entry/instrument/aperture/origin/shape'].attrs['NX_class'] = 'NXshape' +root['/entry/instrument/aperture/origin/shape'].attrs['EX_required'] = 'false' + +root['/entry/instrument/aperture/origin/'].create_group('translation') +root['/entry/instrument/aperture/origin/translation'].attrs['NX_class'] = 'NXtranslation' +root['/entry/instrument/aperture/origin/translation'].attrs['EX_required'] = 'false' + +root['/entry/instrument/'].create_group('attenuator') +root['/entry/instrument/attenuator'].attrs['NX_class'] = 'NXattenuator' +root['/entry/instrument/attenuator'].attrs['EX_required'] = 'false' + +root['/entry/instrument/'].create_group('polarizer') +root['/entry/instrument/polarizer'].attrs['NX_class'] = 'NXpolarizer' +root['/entry/instrument/polarizer'].attrs['EX_required'] = 'false' + +root['/entry/instrument/'].create_group('crystal') +root['/entry/instrument/crystal'].attrs['NX_class'] = 'NXcrystal' +root['/entry/instrument/crystal'].attrs['EX_required'] = 'false' + +root['/entry/instrument/crystal/'].create_group('origin') +root['/entry/instrument/crystal/origin'].attrs['NX_class'] = 'NXgeometry' +root['/entry/instrument/crystal/origin'].attrs['EX_required'] = 'false' + +root['/entry/instrument/crystal/origin/'].create_group('orientation') +root['/entry/instrument/crystal/origin/orientation'].attrs['NX_class'] = 'NXorientation' +root['/entry/instrument/crystal/origin/orientation'].attrs['EX_required'] = 'false' + +root['/entry/instrument/crystal/origin/'].create_group('shape') +root['/entry/instrument/crystal/origin/shape'].attrs['NX_class'] = 'NXshape' +root['/entry/instrument/crystal/origin/shape'].attrs['EX_required'] = 'false' + +root['/entry/instrument/crystal/origin/'].create_group('translation') +root['/entry/instrument/crystal/origin/translation'].attrs['NX_class'] = 'NXtranslation' +root['/entry/instrument/crystal/origin/translation'].attrs['EX_required'] = 'false' + +root['/entry/'].create_group('monitor') +root['/entry/monitor'].attrs['NX_class'] = 'NXmonitor' +root['/entry/monitor'].attrs['EX_required'] = 'false' + +root['/entry/'].create_group('sample') +root['/entry/sample'].attrs['NX_class'] = 'NXsample' +root['/entry/sample'].attrs['EX_required'] = 'false' + +root['/entry/'].create_group('user') +root['/entry/user'].attrs['NX_class'] = 'NXuser' +root['/entry/user'].attrs['EX_required'] = 'true' + +# Create the FIELDS + +root['/entry/DASlogs/log'].create_dataset(name='average_value', data=1.0, maxshape=None) +root['/entry/DASlogs/log/average_value'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/log/average_value'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/log'].create_dataset(name='average_value_error', data=1.0, maxshape=None) +root['/entry/DASlogs/log/average_value_error'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/log/average_value_error'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/log'].create_dataset(name='average_value_errors', data=1.0, maxshape=None) +root['/entry/DASlogs/log/average_value_errors'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/log/average_value_errors'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/log'].create_dataset(name='description', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/DASlogs/log/description'].attrs['type'] = 'NX_CHAR' +root['/entry/DASlogs/log/description'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/log'].create_dataset(name='duration', data=1.0, maxshape=None) +root['/entry/DASlogs/log/duration'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/log/duration'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/log'].create_dataset(name='maximum_value', data=1.0, maxshape=None) +root['/entry/DASlogs/log/maximum_value'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/log/maximum_value'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/log'].create_dataset(name='minimum_value', data=1.0, maxshape=None) +root['/entry/DASlogs/log/minimum_value'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/log/minimum_value'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/log'].create_dataset(name='time', data=1.0, maxshape=None) +root['/entry/DASlogs/log/time'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/log/time'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/log'].create_dataset(name='value', data=1.0, maxshape=None) +root['/entry/DASlogs/log/value'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/log/value'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/positioner'].create_dataset(name='average_value', data=1.0, maxshape=None) +root['/entry/DASlogs/positioner/average_value'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/positioner/average_value'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/positioner'].create_dataset(name='average_value_error', data=1.0, maxshape=None) +root['/entry/DASlogs/positioner/average_value_error'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/positioner/average_value_error'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/positioner'].create_dataset(name='average_value_errors', data=1.0, maxshape=None) +root['/entry/DASlogs/positioner/average_value_errors'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/positioner/average_value_errors'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/positioner'].create_dataset(name='description', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/DASlogs/positioner/description'].attrs['type'] = 'NX_CHAR' +root['/entry/DASlogs/positioner/description'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/positioner'].create_dataset(name='duration', data=1.0, maxshape=None) +root['/entry/DASlogs/positioner/duration'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/positioner/duration'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/positioner'].create_dataset(name='maximum_value', data=1.0, maxshape=None) +root['/entry/DASlogs/positioner/maximum_value'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/positioner/maximum_value'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/positioner'].create_dataset(name='minimum_value', data=1.0, maxshape=None) +root['/entry/DASlogs/positioner/minimum_value'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/positioner/minimum_value'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/positioner'].create_dataset(name='time', data=1.0, maxshape=None) +root['/entry/DASlogs/positioner/time'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/positioner/time'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/positioner'].create_dataset(name='value', data=1.0, maxshape=None) +root['/entry/DASlogs/positioner/value'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/positioner/value'].attrs['EX_required'] = 'false' + +root['/entry/SNSHistoTool'].create_dataset(name='SNSbanking_file_name', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/SNSHistoTool/SNSbanking_file_name'].attrs['type'] = 'NX_CHAR' +root['/entry/SNSHistoTool/SNSbanking_file_name'].attrs['EX_required'] = 'false' + +root['/entry/SNSHistoTool'].create_dataset(name='SNSmapping_file_name', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/SNSHistoTool/SNSmapping_file_name'].attrs['type'] = 'NX_CHAR' +root['/entry/SNSHistoTool/SNSmapping_file_name'].attrs['EX_required'] = 'false' + +root['/entry/SNSHistoTool'].create_dataset(name='author', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/SNSHistoTool/author'].attrs['type'] = 'NX_CHAR' +root['/entry/SNSHistoTool/author'].attrs['EX_required'] = 'false' + +root['/entry/SNSHistoTool'].create_dataset(name='command1', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/SNSHistoTool/command1'].attrs['type'] = 'NX_CHAR' +root['/entry/SNSHistoTool/command1'].attrs['EX_required'] = 'false' + +root['/entry/SNSHistoTool'].create_dataset(name='date', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/SNSHistoTool/date'].attrs['type'] = 'NX_CHAR' +root['/entry/SNSHistoTool/date'].attrs['EX_required'] = 'false' + +root['/entry/SNSHistoTool'].create_dataset(name='description', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/SNSHistoTool/description'].attrs['type'] = 'NX_CHAR' +root['/entry/SNSHistoTool/description'].attrs['EX_required'] = 'false' + +root['/entry/SNSHistoTool'].create_dataset(name='version', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/SNSHistoTool/version'].attrs['type'] = 'NX_CHAR' +root['/entry/SNSHistoTool/version'].attrs['EX_required'] = 'false' + +root['/entry'].create_dataset(name='collection_identifier', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/collection_identifier'].attrs['type'] = 'NX_CHAR' +root['/entry/collection_identifier'].attrs['EX_required'] = 'false' + +root['/entry'].create_dataset(name='collection_title', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/collection_title'].attrs['type'] = 'NX_CHAR' +root['/entry/collection_title'].attrs['EX_required'] = 'false' + +# Valid enumeration values for root['/entry']['definition'] are: +# NXsnshisto + +root['/entry'].create_dataset(name='definition', data='NXsnshisto', maxshape=None) +root['/entry/definition'].attrs['type'] = 'NX_CHAR' +root['/entry/definition'].attrs['EX_required'] = 'false' + +root['/entry'].create_dataset(name='duration', data=1.0, maxshape=None) +root['/entry/duration'].attrs['type'] = 'NX_FLOAT' +root['/entry/duration'].attrs['EX_required'] = 'false' +root['/entry/duration'].attrs['units'] = 'NX_TIME' + +root['/entry'].create_dataset(name='end_time', data='2022-03-03T14:34:23.341632', maxshape=None) +root['/entry/end_time'].attrs['type'] = 'NX_DATE_TIME' +root['/entry/end_time'].attrs['EX_required'] = 'false' + +root['/entry'].create_dataset(name='entry_identifier', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/entry_identifier'].attrs['type'] = 'NX_CHAR' +root['/entry/entry_identifier'].attrs['EX_required'] = 'false' + +root['/entry'].create_dataset(name='experiment_identifier', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/experiment_identifier'].attrs['type'] = 'NX_CHAR' +root['/entry/experiment_identifier'].attrs['EX_required'] = 'false' + +root['/entry/instrument/SNS'].create_dataset(name='frequency', data=1.0, maxshape=None) +root['/entry/instrument/SNS/frequency'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/SNS/frequency'].attrs['EX_required'] = 'false' +root['/entry/instrument/SNS/frequency'].attrs['units'] = 'NX_FREQUENCY' + +root['/entry/instrument/SNS'].create_dataset(name='name', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/instrument/SNS/name'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/SNS/name'].attrs['EX_required'] = 'false' + +root['/entry/instrument/SNS'].create_dataset(name='probe', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/instrument/SNS/probe'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/SNS/probe'].attrs['EX_required'] = 'false' + +root['/entry/instrument/SNS'].create_dataset(name='type', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/instrument/SNS/type'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/SNS/type'].attrs['EX_required'] = 'false' + +root['/entry/instrument'].create_dataset(name='SNSdetector_calibration_id', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/instrument/SNSdetector_calibration_id'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/SNSdetector_calibration_id'].attrs['EX_required'] = 'false' + +root['/entry/instrument'].create_dataset(name='SNSgeometry_file_name', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/instrument/SNSgeometry_file_name'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/SNSgeometry_file_name'].attrs['EX_required'] = 'false' + +root['/entry/instrument'].create_dataset(name='SNStranslation_service', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/instrument/SNStranslation_service'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/SNStranslation_service'].attrs['EX_required'] = 'false' + +root['/entry/instrument/detector'].create_dataset(name='azimuthal_angle', data=1.0, maxshape=None) +root['/entry/instrument/detector/azimuthal_angle'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/detector/azimuthal_angle'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector/azimuthal_angle'].attrs['units'] = 'NX_ANGLE' + +root['/entry/instrument/detector'].create_dataset(name='data', data=np.ushort(1), maxshape=None) +root['/entry/instrument/detector/data'].attrs['type'] = 'NX_UINT' +root['/entry/instrument/detector/data'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector/data'].attrs['axes'] = 'x_pixel_offset,y_pixel_offset,time_of_flight' +root['/entry/instrument/detector/data'].attrs['signal'] = '1' + +root['/entry/instrument/detector'].create_dataset(name='data_x_time_of_flight', data=np.ushort(1), maxshape=None) +root['/entry/instrument/detector/data_x_time_of_flight'].attrs['type'] = 'NX_UINT' +root['/entry/instrument/detector/data_x_time_of_flight'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector/data_x_time_of_flight'].attrs['axes'] = 'x_pixel_offset,time_of_flight' +root['/entry/instrument/detector/data_x_time_of_flight'].attrs['signal'] = '3' + +root['/entry/instrument/detector'].create_dataset(name='data_x_y', data=np.ushort(1), maxshape=None) +root['/entry/instrument/detector/data_x_y'].attrs['type'] = 'NX_UINT' +root['/entry/instrument/detector/data_x_y'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector/data_x_y'].attrs['axes'] = 'x_pixel_offset,y_pixel_offset' +root['/entry/instrument/detector/data_x_y'].attrs['signal'] = '2' + +root['/entry/instrument/detector'].create_dataset(name='data_y_time_of_flight', data=np.ushort(1), maxshape=None) +root['/entry/instrument/detector/data_y_time_of_flight'].attrs['type'] = 'NX_UINT' +root['/entry/instrument/detector/data_y_time_of_flight'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector/data_y_time_of_flight'].attrs['axes'] = 'y_pixel_offset,time_of_flight' +root['/entry/instrument/detector/data_y_time_of_flight'].attrs['signal'] = '4' + +root['/entry/instrument/detector'].create_dataset(name='distance', data=1.0, maxshape=None) +root['/entry/instrument/detector/distance'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/detector/distance'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector/distance'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/detector/origin/orientation'].create_dataset(name='value', data=1.0, maxshape=None) +root['/entry/instrument/detector/origin/orientation/value'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/detector/origin/orientation/value'].attrs['EX_required'] = 'false' + +root['/entry/instrument/detector/origin/shape'].create_dataset(name='description', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/instrument/detector/origin/shape/description'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/detector/origin/shape/description'].attrs['EX_required'] = 'false' + +root['/entry/instrument/detector/origin/shape'].create_dataset(name='shape', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/instrument/detector/origin/shape/shape'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/detector/origin/shape/shape'].attrs['EX_required'] = 'false' + +root['/entry/instrument/detector/origin/shape'].create_dataset(name='size', data=1.0, maxshape=None) +root['/entry/instrument/detector/origin/shape/size'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/detector/origin/shape/size'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector/origin/shape/size'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/detector/origin/translation'].create_dataset(name='distance', data=1.0, maxshape=None) +root['/entry/instrument/detector/origin/translation/distance'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/detector/origin/translation/distance'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector/origin/translation/distance'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/detector'].create_dataset(name='pixel_id', data=np.ushort(1), maxshape=None) +root['/entry/instrument/detector/pixel_id'].attrs['type'] = 'NX_UINT' +root['/entry/instrument/detector/pixel_id'].attrs['EX_required'] = 'false' + +root['/entry/instrument/detector'].create_dataset(name='polar_angle', data=1.0, maxshape=None) +root['/entry/instrument/detector/polar_angle'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/detector/polar_angle'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector/polar_angle'].attrs['units'] = 'NX_ANGLE' + +root['/entry/instrument/detector'].create_dataset(name='time_of_flight', data=1.0, maxshape=None) +root['/entry/instrument/detector/time_of_flight'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/detector/time_of_flight'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector/time_of_flight'].attrs['axis'] = '3' +root['/entry/instrument/detector/time_of_flight'].attrs['primary'] = '1' +root['/entry/instrument/detector/time_of_flight'].attrs['units'] = 'NX_TIME_OF_FLIGHT' + +root['/entry/instrument/detector'].create_dataset(name='total_counts', data=np.ushort(1), maxshape=None) +root['/entry/instrument/detector/total_counts'].attrs['type'] = 'NX_UINT' +root['/entry/instrument/detector/total_counts'].attrs['EX_required'] = 'false' + +root['/entry/instrument/detector'].create_dataset(name='x_pixel_offset', data=1.0, maxshape=None) +root['/entry/instrument/detector/x_pixel_offset'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/detector/x_pixel_offset'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector/x_pixel_offset'].attrs['axis'] = '1' +root['/entry/instrument/detector/x_pixel_offset'].attrs['primary'] = '1' +root['/entry/instrument/detector/x_pixel_offset'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/detector'].create_dataset(name='y_pixel_offset', data=1.0, maxshape=None) +root['/entry/instrument/detector/y_pixel_offset'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/detector/y_pixel_offset'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector/y_pixel_offset'].attrs['axis'] = '2' +root['/entry/instrument/detector/y_pixel_offset'].attrs['primary'] = '1' +root['/entry/instrument/detector/y_pixel_offset'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument'].create_dataset(name='beamline', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/instrument/beamline'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/beamline'].attrs['EX_required'] = 'false' + +root['/entry/instrument/NXdisk_chopper'].create_dataset(name='distance', data=1.0, maxshape=None) +root['/entry/instrument/NXdisk_chopper/distance'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/NXdisk_chopper/distance'].attrs['EX_required'] = 'false' +root['/entry/instrument/NXdisk_chopper/distance'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/NXfermi_chopper'].create_dataset(name='distance', data=1.0, maxshape=None) +root['/entry/instrument/NXfermi_chopper/distance'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/NXfermi_chopper/distance'].attrs['EX_required'] = 'false' +root['/entry/instrument/NXfermi_chopper/distance'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/moderator'].create_dataset(name='coupling_material', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/instrument/moderator/coupling_material'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/moderator/coupling_material'].attrs['EX_required'] = 'false' + +root['/entry/instrument/moderator'].create_dataset(name='distance', data=1.0, maxshape=None) +root['/entry/instrument/moderator/distance'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/moderator/distance'].attrs['EX_required'] = 'false' +root['/entry/instrument/moderator/distance'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/moderator'].create_dataset(name='temperature', data=1.0, maxshape=None) +root['/entry/instrument/moderator/temperature'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/moderator/temperature'].attrs['EX_required'] = 'false' +root['/entry/instrument/moderator/temperature'].attrs['units'] = 'NX_TEMPERATURE' + +root['/entry/instrument/moderator'].create_dataset(name='type', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/instrument/moderator/type'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/moderator/type'].attrs['EX_required'] = 'false' + +root['/entry/instrument'].create_dataset(name='name', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/instrument/name'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/name'].attrs['EX_required'] = 'false' + +root['/entry/instrument/aperture/origin/orientation'].create_dataset(name='value', data=1.0, maxshape=None) +root['/entry/instrument/aperture/origin/orientation/value'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/aperture/origin/orientation/value'].attrs['EX_required'] = 'false' + +root['/entry/instrument/aperture/origin/shape'].create_dataset(name='description', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/instrument/aperture/origin/shape/description'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/aperture/origin/shape/description'].attrs['EX_required'] = 'false' + +root['/entry/instrument/aperture/origin/shape'].create_dataset(name='shape', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/instrument/aperture/origin/shape/shape'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/aperture/origin/shape/shape'].attrs['EX_required'] = 'false' + +root['/entry/instrument/aperture/origin/shape'].create_dataset(name='size', data=1.0, maxshape=None) +root['/entry/instrument/aperture/origin/shape/size'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/aperture/origin/shape/size'].attrs['EX_required'] = 'false' +root['/entry/instrument/aperture/origin/shape/size'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/aperture/origin/translation'].create_dataset(name='distance', data=1.0, maxshape=None) +root['/entry/instrument/aperture/origin/translation/distance'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/aperture/origin/translation/distance'].attrs['EX_required'] = 'false' +root['/entry/instrument/aperture/origin/translation/distance'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/aperture'].create_dataset(name='x_pixel_offset', data=1.0, maxshape=None) +root['/entry/instrument/aperture/x_pixel_offset'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/aperture/x_pixel_offset'].attrs['EX_required'] = 'false' +root['/entry/instrument/aperture/x_pixel_offset'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/attenuator'].create_dataset(name='distance', data=1.0, maxshape=None) +root['/entry/instrument/attenuator/distance'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/attenuator/distance'].attrs['EX_required'] = 'false' +root['/entry/instrument/attenuator/distance'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/crystal/origin'].create_dataset(name='description', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/instrument/crystal/origin/description'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/crystal/origin/description'].attrs['EX_required'] = 'false' + +root['/entry/instrument/crystal/origin/orientation'].create_dataset(name='value', data=1.0, maxshape=None) +root['/entry/instrument/crystal/origin/orientation/value'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/crystal/origin/orientation/value'].attrs['EX_required'] = 'false' + +root['/entry/instrument/crystal/origin/shape'].create_dataset(name='description', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/instrument/crystal/origin/shape/description'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/crystal/origin/shape/description'].attrs['EX_required'] = 'false' + +root['/entry/instrument/crystal/origin/shape'].create_dataset(name='shape', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/instrument/crystal/origin/shape/shape'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/crystal/origin/shape/shape'].attrs['EX_required'] = 'false' + +root['/entry/instrument/crystal/origin/shape'].create_dataset(name='size', data=1.0, maxshape=None) +root['/entry/instrument/crystal/origin/shape/size'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/crystal/origin/shape/size'].attrs['EX_required'] = 'false' +root['/entry/instrument/crystal/origin/shape/size'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/crystal/origin/translation'].create_dataset(name='distance', data=1.0, maxshape=None) +root['/entry/instrument/crystal/origin/translation/distance'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/crystal/origin/translation/distance'].attrs['EX_required'] = 'false' +root['/entry/instrument/crystal/origin/translation/distance'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/crystal'].create_dataset(name='type', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/instrument/crystal/type'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/crystal/type'].attrs['EX_required'] = 'false' + +root['/entry/instrument/crystal'].create_dataset(name='wavelength', data=1.0, maxshape=None) +root['/entry/instrument/crystal/wavelength'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/crystal/wavelength'].attrs['EX_required'] = 'false' +root['/entry/instrument/crystal/wavelength'].attrs['units'] = 'NX_WAVELENGTH' + +root['/entry/monitor'].create_dataset(name='data', data=np.ushort(1), maxshape=None) +root['/entry/monitor/data'].attrs['type'] = 'NX_UINT' +root['/entry/monitor/data'].attrs['EX_required'] = 'false' +root['/entry/monitor/data'].attrs['axes'] = 'time_of_flight' +root['/entry/monitor/data'].attrs['signal'] = '1' + +root['/entry/monitor'].create_dataset(name='distance', data=1.0, maxshape=None) +root['/entry/monitor/distance'].attrs['type'] = 'NX_FLOAT' +root['/entry/monitor/distance'].attrs['EX_required'] = 'false' +root['/entry/monitor/distance'].attrs['units'] = 'NX_LENGTH' + +root['/entry/monitor'].create_dataset(name='mode', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/monitor/mode'].attrs['type'] = 'NX_CHAR' +root['/entry/monitor/mode'].attrs['EX_required'] = 'false' + +root['/entry/monitor'].create_dataset(name='time_of_flight', data=1.0, maxshape=None) +root['/entry/monitor/time_of_flight'].attrs['type'] = 'NX_FLOAT' +root['/entry/monitor/time_of_flight'].attrs['EX_required'] = 'false' +root['/entry/monitor/time_of_flight'].attrs['units'] = 'NX_TIME' + +root['/entry'].create_dataset(name='notes', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/notes'].attrs['type'] = 'NX_CHAR' +root['/entry/notes'].attrs['EX_required'] = 'false' + +root['/entry'].create_dataset(name='proton_charge', data=1.0, maxshape=None) +root['/entry/proton_charge'].attrs['type'] = 'NX_FLOAT' +root['/entry/proton_charge'].attrs['EX_required'] = 'false' +root['/entry/proton_charge'].attrs['units'] = 'NX_CHARGE' + +root['/entry'].create_dataset(name='raw_frames', data=1, maxshape=None) +root['/entry/raw_frames'].attrs['type'] = 'NX_INT' +root['/entry/raw_frames'].attrs['EX_required'] = 'false' + +root['/entry'].create_dataset(name='run_number', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/run_number'].attrs['type'] = 'NX_CHAR' +root['/entry/run_number'].attrs['EX_required'] = 'false' + +root['/entry/sample'].create_dataset(name='changer_position', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/sample/changer_position'].attrs['type'] = 'NX_CHAR' +root['/entry/sample/changer_position'].attrs['EX_required'] = 'false' + +root['/entry/sample'].create_dataset(name='holder', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/sample/holder'].attrs['type'] = 'NX_CHAR' +root['/entry/sample/holder'].attrs['EX_required'] = 'false' + +root['/entry/sample'].create_dataset(name='identifier', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/sample/identifier'].attrs['type'] = 'NX_CHAR' +root['/entry/sample/identifier'].attrs['EX_required'] = 'false' + +root['/entry/sample'].create_dataset(name='name', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/sample/name'].attrs['type'] = 'NX_CHAR' +root['/entry/sample/name'].attrs['EX_required'] = 'false' + +root['/entry/sample'].create_dataset(name='nature', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/sample/nature'].attrs['type'] = 'NX_CHAR' +root['/entry/sample/nature'].attrs['EX_required'] = 'false' + +root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:23.435329', maxshape=None) +root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' +root['/entry/start_time'].attrs['EX_required'] = 'false' + +root['/entry'].create_dataset(name='title', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/title'].attrs['type'] = 'NX_CHAR' +root['/entry/title'].attrs['EX_required'] = 'false' + +root['/entry'].create_dataset(name='total_counts', data=np.ushort(1), maxshape=None) +root['/entry/total_counts'].attrs['type'] = 'NX_UINT' +root['/entry/total_counts'].attrs['EX_required'] = 'false' +root['/entry/total_counts'].attrs['units'] = 'NX_UNITLESS' + +root['/entry'].create_dataset(name='total_uncounted_counts', data=np.ushort(1), maxshape=None) +root['/entry/total_uncounted_counts'].attrs['type'] = 'NX_UINT' +root['/entry/total_uncounted_counts'].attrs['EX_required'] = 'false' +root['/entry/total_uncounted_counts'].attrs['units'] = 'NX_UNITLESS' + +root['/entry/user'].create_dataset(name='facility_user_id', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/user/facility_user_id'].attrs['type'] = 'NX_CHAR' +root['/entry/user/facility_user_id'].attrs['EX_required'] = 'false' + +root['/entry/user'].create_dataset(name='name', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/user/name'].attrs['type'] = 'NX_CHAR' +root['/entry/user/name'].attrs['EX_required'] = 'false' + +root['/entry/user'].create_dataset(name='role', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/user/role'].attrs['type'] = 'NX_CHAR' +root['/entry/user/role'].attrs['EX_required'] = 'false' + +# Create the LINKS +root['/entry/data/data'] = h5py.SoftLink('/entry/instrument/detector/data') +root['/entry/data/data/'].attrs['target'] = '/entry/instrument/detector/data' + +# Create the LINKS +root['/entry/data/data_x_time_of_flight'] = h5py.SoftLink('/entry/instrument/detector/data_x_time_of_flight') +root['/entry/data/data_x_time_of_flight/'].attrs['target'] = '/entry/instrument/detector/data_x_time_of_flight' + +# Create the LINKS +root['/entry/data/data_x_y'] = h5py.SoftLink('/entry/instrument/detector/data_x_y') +root['/entry/data/data_x_y/'].attrs['target'] = '/entry/instrument/detector/data_x_y' + +# Create the LINKS +root['/entry/data/data_y_time_of_flight'] = h5py.SoftLink('/entry/instrument/detector/data_y_time_of_flight') +root['/entry/data/data_y_time_of_flight/'].attrs['target'] = '/entry/instrument/detector/data_y_time_of_flight' + +# Create the LINKS +root['/entry/data/pixel_id'] = h5py.SoftLink('/entry/instrument/detector/pixel_id') +root['/entry/data/pixel_id/'].attrs['target'] = '/entry/instrument/detector/pixel_id' + +# Create the LINKS +root['/entry/data/time_of_flight'] = h5py.SoftLink('/entry/instrument/detector/time_of_flight') +root['/entry/data/time_of_flight/'].attrs['target'] = '/entry/instrument/detector/time_of_flight' + +# Create the LINKS +root['/entry/data/total_counts'] = h5py.SoftLink('/entry/instrument/detector/total_counts') +root['/entry/data/total_counts/'].attrs['target'] = '/entry/instrument/detector/total_counts' + +# Create the LINKS +root['/entry/data/x_pixel_offset'] = h5py.SoftLink('/entry/instrument/detector/x_pixel_offset') +root['/entry/data/x_pixel_offset/'].attrs['target'] = '/entry/instrument/detector/x_pixel_offset' + +# Create the LINKS +root['/entry/data/y_pixel_offset'] = h5py.SoftLink('/entry/instrument/detector/y_pixel_offset') +root['/entry/data/y_pixel_offset/'].attrs['target'] = '/entry/instrument/detector/y_pixel_offset' + +# Create the DOC strings +root['/entry/DASlogs'].attrs['EX_doc'] = 'Details of all logs, both from cvinfo file and from HistoTool (frequency and proton_charge). ' +root['/entry/DASlogs/positioner'].attrs['EX_doc'] = 'Motor logs from cvinfo file. ' +root['/entry/SNSHistoTool/command1'].attrs['EX_doc'] = 'Command string for event2histo_nxl. ' +root['/entry/definition'].attrs['EX_doc'] = 'Official NXDL schema after this file goes to applications. ' +root['/entry/instrument/SNSdetector_calibration_id'].attrs['EX_doc'] = 'Detector calibration id from DAS. ' +root['/entry/instrument/detector/origin/orientation/value'].attrs['EX_doc'] = 'Six out of nine rotation parameters. ' +root['/entry/instrument/NXdisk_chopper'].attrs['EX_doc'] = 'Original specification called for NXchopper, which is not a valid NeXus base class. Select either NXdisk_chopper or NXfermi_chopper, as appropriate. ' +root['/entry/instrument/NXfermi_chopper'].attrs['EX_doc'] = 'Original specification called for NXchopper, which is not a valid NeXus base class. Select either NXdisk_chopper or NXfermi_chopper, as appropriate. ' +root['/entry/instrument/aperture/origin/orientation/value'].attrs['EX_doc'] = 'Six out of nine rotation parameters. ' +root['/entry/instrument/crystal/origin/orientation/value'].attrs['EX_doc'] = 'Six out of nine rotation parameters. ' +root['/entry/sample/name'].attrs['EX_doc'] = 'Descriptive name of sample ' + + +# Create the ATTRIBUTES +root['/'].attrs['default'] = 'entry' +root['/entry'].attrs['default'] = 'data' +root['/entry/data'].attrs['signal'] = 'data' +root['/entry/data/data'].attrs['signal'] = '1' +root.attrs['file_name'] = os.path.abspath('NXsnshisto') +root.attrs['file_time'] = datetime.datetime.now().isoformat() +root.attrs['h5py_version'] = h5py.version.version +root.attrs['HDF5_Version'] = h5py.version.hdf5_version + +# Close the file +root.close() + + diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXspe.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXspe.py index 2ad5fb4..ab194a4 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXspe.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXspe.py @@ -126,7 +126,7 @@ # Create the DOC strings root['/entry/definition'].attrs['EX_doc'] = 'Official NeXus NXDL schema to which this file conforms. ' root['/entry/NXSPE_info/fixed_energy'].attrs['EX_doc'] = 'The fixed energy used for this file. ' -root['/entry/NXSPE_info/ki_over_kf_scaling'].attrs['EX_doc'] = 'Indicates whether ki/kf scaling has been applied or not. ' +root['/entry/NXSPE_info/ki_over_kf_scaling'].attrs['EX_doc'] = 'kf scaling has been applied or not. ' root['/entry/NXSPE_info/psi'].attrs['EX_doc'] = 'Orientation angle as expected in DCS-MSlice ' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXspecdata.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXspecdata.py new file mode 100644 index 0000000..e78d0b2 --- /dev/null +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXspecdata.py @@ -0,0 +1,304 @@ + +import numpy as np +import datetime +import h5py +import os + +# Note this example script was generated by nxdl_to_hdf5.py using the current +# installed version of the NEXUS definitions ver[v2020.10] + +root = h5py.File('NXspecdata.h5', 'w') + +# Create the GROUPS + +root.create_group('entry') +root['/entry'].attrs['NX_class'] = 'NXentry' +root['/entry'].attrs['EX_required'] = 'false' + +root['/entry/'].create_group('monitor') +root['/entry/monitor'].attrs['NX_class'] = 'NXmonitor' +root['/entry/monitor'].attrs['EX_required'] = 'false' + +root['/entry/'].create_group('data') +root['/entry/data'].attrs['NX_class'] = 'NXdata' +root['/entry/data'].attrs['EX_required'] = 'false' + +root['/entry/'].create_group('counter_cross_reference') +root['/entry/counter_cross_reference'].attrs['NX_class'] = 'NXnote' +root['/entry/counter_cross_reference'].attrs['EX_required'] = 'false' + +root['/entry/'].create_group('positioner_cross_reference') +root['/entry/positioner_cross_reference'].attrs['NX_class'] = 'NXnote' +root['/entry/positioner_cross_reference'].attrs['EX_required'] = 'false' + +root['/entry/'].create_group('spec') +root['/entry/spec'].attrs['NX_class'] = 'NXinstrument' +root['/entry/spec'].attrs['EX_required'] = 'false' + +root['/entry/spec/'].create_group('UB') +root['/entry/spec/UB'].attrs['NX_class'] = 'NXcrystal' +root['/entry/spec/UB'].attrs['EX_required'] = 'false' + +root['/entry/'].create_group('G') +root['/entry/G'].attrs['NX_class'] = 'NXnote' +root['/entry/G'].attrs['EX_required'] = 'false' + +root['/entry/'].create_group('positioners') +root['/entry/positioners'].attrs['NX_class'] = 'NXnote' +root['/entry/positioners'].attrs['EX_required'] = 'false' + +root['/entry/'].create_group('MCA') +root['/entry/MCA'].attrs['NX_class'] = 'NXnote' +root['/entry/MCA'].attrs['EX_required'] = 'false' + +root['/entry/MCA/'].create_group('ROI') +root['/entry/MCA/ROI'].attrs['NX_class'] = 'NXnote' +root['/entry/MCA/ROI'].attrs['EX_required'] = 'false' + +root['/entry/'].create_group('metadata') +root['/entry/metadata'].attrs['NX_class'] = 'NXnote' +root['/entry/metadata'].attrs['EX_required'] = 'false' + +root['/entry/'].create_group('SPEC_user') +root['/entry/SPEC_user'].attrs['NX_class'] = 'NXuser' +root['/entry/SPEC_user'].attrs['EX_required'] = 'false' + +root['/entry/'].create_group('_unrecognized') +root['/entry/_unrecognized'].attrs['NX_class'] = 'NXnote' +root['/entry/_unrecognized'].attrs['EX_required'] = 'false' + +# Create the FIELDS + +# Valid enumeration values for root['/entry']['definition'] are: +# NXspecdata + +root['/entry'].create_dataset(name='definition', data='NXspecdata', maxshape=None) +root['/entry/definition'].attrs['type'] = 'NX_CHAR' +root['/entry/definition'].attrs['EX_required'] = 'false' + +root['/entry'].create_dataset(name='scan_number', data=1.0, maxshape=None) +root['/entry/scan_number'].attrs['type'] = 'NX_NUMBER' +root['/entry/scan_number'].attrs['EX_required'] = 'false' + +root['/entry'].create_dataset(name='title', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/title'].attrs['type'] = 'NX_CHAR' +root['/entry/title'].attrs['EX_required'] = 'false' + +root['/entry'].create_dataset(name='command', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/command'].attrs['type'] = 'NX_CHAR' +root['/entry/command'].attrs['EX_required'] = 'false' + +root['/entry'].create_dataset(name='date', data='2022-03-03T14:34:23.779539', maxshape=None) +root['/entry/date'].attrs['type'] = 'NX_DATE_TIME' +root['/entry/date'].attrs['EX_required'] = 'false' + +# Valid enumeration values for root['/entry/monitor']['mode'] are: +# monitor +# timer + +root['/entry/monitor'].create_dataset(name='mode', data='monitor', maxshape=None) +root['/entry/monitor/mode'].attrs['type'] = 'NX_CHAR' +root['/entry/monitor/mode'].attrs['EX_required'] = 'false' + +root['/entry/monitor'].create_dataset(name='preset', data=1.0, maxshape=None) +root['/entry/monitor/preset'].attrs['type'] = 'NX_NUMBER' +root['/entry/monitor/preset'].attrs['EX_required'] = 'false' + +root['/entry/monitor'].create_dataset(name='data', data=1.0, maxshape=None) +root['/entry/monitor/data'].attrs['type'] = 'NX_NUMBER' +root['/entry/monitor/data'].attrs['EX_required'] = 'false' +root['/entry/monitor/data'].attrs['nameType'] = 'any' + +root['/entry/monitor'].create_dataset(name='count_time', data=1.0, maxshape=None) +root['/entry/monitor/count_time'].attrs['type'] = 'NX_NUMBER' +root['/entry/monitor/count_time'].attrs['EX_required'] = 'false' +root['/entry/monitor/count_time'].attrs['nameType'] = 'any' + +root['/entry'].create_dataset(name='comments', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/comments'].attrs['type'] = 'NX_CHAR' +root['/entry/comments'].attrs['EX_required'] = 'false' + +root['/entry'].create_dataset(name='Q', data=1.0, maxshape=None) +root['/entry/Q'].attrs['type'] = 'NX_NUMBER' +root['/entry/Q'].attrs['EX_required'] = 'false' + +root['/entry'].create_dataset(name='TEMP_SP', data=1.0, maxshape=None) +root['/entry/TEMP_SP'].attrs['type'] = 'NX_NUMBER' +root['/entry/TEMP_SP'].attrs['EX_required'] = 'false' + +root['/entry'].create_dataset(name='DEGC_SP', data=1.0, maxshape=None) +root['/entry/DEGC_SP'].attrs['type'] = 'NX_NUMBER' +root['/entry/DEGC_SP'].attrs['EX_required'] = 'false' + +root['/entry/data'].create_dataset(name='data', data=1.0, maxshape=None) +root['/entry/data/data'].attrs['type'] = 'NX_NUMBER' +root['/entry/data/data'].attrs['EX_required'] = 'false' +root['/entry/data/data'].attrs['nameType'] = 'any' + +root['/entry/data'].create_dataset(name='intensity_factor', data=1.0, maxshape=None) +root['/entry/data/intensity_factor'].attrs['type'] = 'NX_NUMBER' +root['/entry/data/intensity_factor'].attrs['EX_required'] = 'false' + +root['/entry/data'].create_dataset(name='_mca_', data=1.0, maxshape=None) +root['/entry/data/_mca_'].attrs['type'] = 'NX_NUMBER' +root['/entry/data/_mca_'].attrs['EX_required'] = 'false' + +root['/entry/data'].create_dataset(name='_mca_channel_', data=1.0, maxshape=None) +root['/entry/data/_mca_channel_'].attrs['type'] = 'NX_NUMBER' +root['/entry/data/_mca_channel_'].attrs['EX_required'] = 'false' + +root['/entry/data'].create_dataset(name='_mca1_', data=1.0, maxshape=None) +root['/entry/data/_mca1_'].attrs['type'] = 'NX_NUMBER' +root['/entry/data/_mca1_'].attrs['EX_required'] = 'false' + +root['/entry/data'].create_dataset(name='_mca1_channel_', data=1.0, maxshape=None) +root['/entry/data/_mca1_channel_'].attrs['type'] = 'NX_NUMBER' +root['/entry/data/_mca1_channel_'].attrs['EX_required'] = 'false' + +root['/entry/spec/UB'].create_dataset(name='orientation_matrix', data=1.0, maxshape=None) +root['/entry/spec/UB/orientation_matrix'].attrs['type'] = 'NX_FLOAT' +root['/entry/spec/UB/orientation_matrix'].attrs['EX_required'] = 'false' + +root['/entry/G'].create_dataset(name='G0', data=1.0, maxshape=None) +root['/entry/G/G0'].attrs['type'] = 'NX_NUMBER' +root['/entry/G/G0'].attrs['EX_required'] = 'false' + +root['/entry/G'].create_dataset(name='G1', data=1.0, maxshape=None) +root['/entry/G/G1'].attrs['type'] = 'NX_NUMBER' +root['/entry/G/G1'].attrs['EX_required'] = 'false' + +root['/entry/G'].create_dataset(name='G2', data=1.0, maxshape=None) +root['/entry/G/G2'].attrs['type'] = 'NX_NUMBER' +root['/entry/G/G2'].attrs['EX_required'] = 'false' + +root['/entry/G'].create_dataset(name='G4', data=1.0, maxshape=None) +root['/entry/G/G4'].attrs['type'] = 'NX_NUMBER' +root['/entry/G/G4'].attrs['EX_required'] = 'false' + +root['/entry/positioners'].create_dataset(name='positioner', data=1.0, maxshape=None) +root['/entry/positioners/positioner'].attrs['type'] = 'NX_NUMBER' +root['/entry/positioners/positioner'].attrs['EX_required'] = 'false' +root['/entry/positioners/positioner'].attrs['nameType'] = 'any' + +root['/entry/MCA'].create_dataset(name='preset_time', data=1.0, maxshape=None) +root['/entry/MCA/preset_time'].attrs['type'] = 'NX_NUMBER' +root['/entry/MCA/preset_time'].attrs['EX_required'] = 'false' + +root['/entry/MCA'].create_dataset(name='elapsed_live_time', data=1.0, maxshape=None) +root['/entry/MCA/elapsed_live_time'].attrs['type'] = 'NX_NUMBER' +root['/entry/MCA/elapsed_live_time'].attrs['EX_required'] = 'false' + +root['/entry/MCA'].create_dataset(name='elapsed_real_time', data=1.0, maxshape=None) +root['/entry/MCA/elapsed_real_time'].attrs['type'] = 'NX_NUMBER' +root['/entry/MCA/elapsed_real_time'].attrs['EX_required'] = 'false' + +root['/entry/MCA'].create_dataset(name='number_saved', data=1.0, maxshape=None) +root['/entry/MCA/number_saved'].attrs['type'] = 'NX_NUMBER' +root['/entry/MCA/number_saved'].attrs['EX_required'] = 'false' + +root['/entry/MCA'].create_dataset(name='first_saved', data=1, maxshape=None) +root['/entry/MCA/first_saved'].attrs['type'] = 'NX_INT' +root['/entry/MCA/first_saved'].attrs['EX_required'] = 'false' + +root['/entry/MCA'].create_dataset(name='last_saved', data=1, maxshape=None) +root['/entry/MCA/last_saved'].attrs['type'] = 'NX_INT' +root['/entry/MCA/last_saved'].attrs['EX_required'] = 'false' + +root['/entry/MCA'].create_dataset(name='reduction_coef', data=1.0, maxshape=None) +root['/entry/MCA/reduction_coef'].attrs['type'] = 'NX_NUMBER' +root['/entry/MCA/reduction_coef'].attrs['EX_required'] = 'false' + +root['/entry/MCA'].create_dataset(name='calib_a', data=1.0, maxshape=None) +root['/entry/MCA/calib_a'].attrs['type'] = 'NX_NUMBER' +root['/entry/MCA/calib_a'].attrs['EX_required'] = 'false' + +root['/entry/MCA'].create_dataset(name='calib_b', data=1.0, maxshape=None) +root['/entry/MCA/calib_b'].attrs['type'] = 'NX_NUMBER' +root['/entry/MCA/calib_b'].attrs['EX_required'] = 'false' + +root['/entry/MCA'].create_dataset(name='calib_c', data=1.0, maxshape=None) +root['/entry/MCA/calib_c'].attrs['type'] = 'NX_NUMBER' +root['/entry/MCA/calib_c'].attrs['EX_required'] = 'false' + +root['/entry/MCA/ROI'].create_dataset(name='roiN', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/MCA/ROI/roiN'].attrs['type'] = 'NX_CHAR' +root['/entry/MCA/ROI/roiN'].attrs['EX_required'] = 'false' + +root['/entry/SPEC_user'].create_dataset(name='SPEC_user', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/SPEC_user/SPEC_user'].attrs['type'] = 'NX_CHAR' +root['/entry/SPEC_user/SPEC_user'].attrs['EX_required'] = 'false' + +# Create the DOC strings +root['/entry'].attrs['EX_doc'] = 'one scan from a SPEC data file, starts with a **#S** line ' +root['/entry/definition'].attrs['EX_doc'] = 'Official NeXus NXDL schema to which this subentry conforms. ' +root['/entry/scan_number'].attrs['EX_doc'] = 'SPEC scan number ' +root['/entry/title'].attrs['EX_doc'] = 'SPEC scan number and command, from **#S** line SPEC data file line:: #S 1 cscan en 690 750 60 0 *title*:: 1 cscan en 690 750 60 0 ' +root['/entry/command'].attrs['EX_doc'] = 'SPEC scan command, from **#S** line, after the scan number. :SPEC data file line: ``#S 1 cscan en 690 750 60 0`` :command*: ``cscan en 690 750 60 0`` ' +root['/entry/date'].attrs['EX_doc'] = 'date from **#D** line in scan header, in ISO8601 format ' +root['/entry/monitor/mode'].attrs['EX_doc'] = 'Count to a preset value based on either clock time (timer) or received monitor counts (monitor). ' +root['/entry/monitor/preset'].attrs['EX_doc'] = 'preset value for time or monitor * **#M** -- counting against this constant monitor count (see #T) * **#T** -- counting against this constant number of seconds (see #M) ' +root['/entry/monitor/data'].attrs['EX_doc'] = 'array(s) of monitor data ' +root['/entry/monitor/count_time'].attrs['EX_doc'] = 'array(s) of monitor data ' +root['/entry/comments'].attrs['EX_doc'] = 'Any **#C** lines in this scan, stored as one string with newlines between comments ' +root['/entry/Q'].attrs['EX_doc'] = '**#Q** -- :math:`Q` (:math:`hkl`) at start of scan array of [:math:`h` :math:`k` :math:`l`] ' +root['/entry/TEMP_SP'].attrs['EX_doc'] = '**#X** -- temperature set point ' +root['/entry/DEGC_SP'].attrs['EX_doc'] = '**#X** -- temperature set point (C) ' +root['/entry/data'].attrs['EX_doc'] = 'detector (and MCA) data from this scan ' +root['/entry/data/data'].attrs['EX_doc'] = 'one column of data from the scan HDF5 requires that each member of a group must have a unique name. Pick the name of column from **#L** but make it unique which means if the same name is used in more than one column, append a number to the extra instances to make them unique yet preserve their content, just in case they might be different. Example: ``seconds seconds`` becomes ``seconds`` and ``seconda_1``. ' +root['/entry/data/intensity_factor'].attrs['EX_doc'] = '**#I** -- intensity normalizing factor ' +root['/entry/counter_cross_reference'].attrs['EX_doc'] = 'associates values declared in **#J** and **#j** scan header lines ' +root['/entry/positioner_cross_reference'].attrs['EX_doc'] = 'associates values declared in **#O** and **#o** scan header lines ' +root['/entry/spec'].attrs['EX_doc'] = 'various metadata from the SPEC scan header that have well-known NeXus base clases ' +root['/entry/spec/UB'].attrs['EX_doc'] = 'Orientation matrix of single crystal sample using Busing-Levy convention ' +root['/entry/spec/UB/orientation_matrix'].attrs['EX_doc'] = '**#G3** line in scan header ' +root['/entry/G'].attrs['EX_doc'] = 'SPEC geometry variables for this diffractometer geometry (instrument specific) TODO: give interpreted name for each array value (need to figure out how to get the names) ' +root['/entry/G/G0'].attrs['EX_doc'] = 'geometry parameters from G[] array (geo mode, sector, etc) ' +root['/entry/G/G1'].attrs['EX_doc'] = 'geometry parameters from U[] array (lattice constants, orientation reflections) ' +root['/entry/G/G2'].attrs['EX_doc'] = 'not used, although some files has a single zero value ' +root['/entry/G/G4'].attrs['EX_doc'] = 'geometry parameters from Q[] array (lambda, frozen angles, cut points, etc) ' +root['/entry/positioners'].attrs['EX_doc'] = 'names and values of all positioners (**#O** and **#P** lines) in scan header ' +root['/entry/positioners/positioner'].attrs['EX_doc'] = 'one positioner from the scan header HDF5 requires that each member of a group must have a unique name. SPEC assigns a unique name to each positioner, no extra work is neccesary to comply with the HDF5 rule for unique names in a group. ' +root['/entry/MCA'].attrs['EX_doc'] = '**#@CALIB** -- coefficients to compute a scale based on the MCA channel number ' +root['/entry/MCA/ROI/roiN'].attrs['EX_doc'] = 'numbered regions of interest, use an index number as part of the name ' +root['/entry/metadata'].attrs['EX_doc'] = 'SPEC metadata (UNICAT-style #H and #V lines) This is a block that may be unique to SPEC files acquired at certain APS beam lines. Other facilities or instruments may use this block for storing key:value pairs of data where the values have suitable attributes (such as units). ' +root['/entry/SPEC_user/SPEC_user'].attrs['EX_doc'] = 'user name from first **#C** line in file header ' +root['/entry/_unrecognized'].attrs['EX_doc'] = 'Fallback for any SPEC data file control lines not otherwise placed into groups or fields elsewhere in this specification. ' + + +# Create the ATTRIBUTES +root['/entry'].attrs['default'] = 'SAMPLE-CHAR-DATA' +root['/entry/monitor'].attrs['description'] = 'SAMPLE-CHAR-DATA' +root['/entry/monitor/preset'].attrs['units'] = 'SAMPLE-CHAR-DATA' +root['/entry/data'].attrs['description'] = 'SAMPLE-CHAR-DATA' +root['/entry/data'].attrs['signal'] = 'SAMPLE-CHAR-DATA' +root['/entry/data'].attrs['axes'] = 'SAMPLE-CHAR-DATA' +root['/entry/data'].attrs['AXISNAME_indices'] = '1.0' +root['/entry/data/data'].attrs['spec_name'] = 'SAMPLE-CHAR-DATA' +root['/entry/data/data'].attrs['units'] = 'SAMPLE-CHAR-DATA' +root['/entry/counter_cross_reference'].attrs['comment'] = 'SAMPLE-CHAR-DATA' +root['/entry/counter_cross_reference'].attrs['description'] = 'SAMPLE-CHAR-DATA' +root['/entry/positioner_cross_reference'].attrs['comment'] = 'SAMPLE-CHAR-DATA' +root['/entry/positioner_cross_reference'].attrs['description'] = 'SAMPLE-CHAR-DATA' +root['/entry/G'].attrs['comment'] = 'SAMPLE-CHAR-DATA' +root['/entry/G'].attrs['description'] = 'SAMPLE-CHAR-DATA' +root['/entry/positioners'].attrs['description'] = 'SAMPLE-CHAR-DATA' +root['/entry/MCA'].attrs['description'] = 'SAMPLE-CHAR-DATA' +root['/entry/MCA/ROI/roiN'].attrs['description'] = 'SAMPLE-CHAR-DATA' +root['/entry/MCA/ROI/roiN'].attrs['first_channel'] = '1' +root['/entry/MCA/ROI/roiN'].attrs['last_channel'] = '1' +root['/entry/metadata'].attrs['description'] = 'SAMPLE-CHAR-DATA' +root['/entry/_unrecognized'].attrs['comment'] = 'SAMPLE-CHAR-DATA' +root['/entry/_unrecognized'].attrs['description'] = 'SAMPLE-CHAR-DATA' +root['/'].attrs['default'] = 'entry' +root['/entry'].attrs['default'] = 'data' +root['/entry/data'].attrs['signal'] = 'data' +root['/entry/data/data'].attrs['signal'] = '1' +root.attrs['file_name'] = os.path.abspath('NXspecdata') +root.attrs['file_time'] = datetime.datetime.now().isoformat() +root.attrs['h5py_version'] = h5py.version.version +root.attrs['HDF5_Version'] = h5py.version.hdf5_version + +# Close the file +root.close() + + diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXstxm.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXstxm.py index 4603950..dc5fa2a 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXstxm.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXstxm.py @@ -61,11 +61,11 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='start_time', data='2021-03-29T15:51:42.787454', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:16.030189', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='end_time', data='2021-03-29T15:51:42.790449', maxshape=None) +root['/entry'].create_dataset(name='end_time', data='2022-03-03T14:34:16.030189', maxshape=None) root['/entry/end_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/end_time'].attrs['EX_required'] = 'true' @@ -154,7 +154,7 @@ root['/entry/instrument/sample_x'].attrs['EX_doc'] = 'Measurements of the sample position from the x-axis interferometer. ' root['/entry/instrument/sample_y'].attrs['EX_doc'] = 'Measurements of the sample position from the y-axis interferometer. ' root['/entry/instrument/sample_z'].attrs['EX_doc'] = 'Measurements of the sample position from the z-axis interferometer. ' -root['/entry/data/stxm_scan_type'].attrs['EX_doc'] = 'Label for typical scan types as a convenience for humans. Each label corresponds to a specific set of axes being scanned to produce a data array of shape: * sample point spectrum: (photon_energy,) * sample line spectrum: (photon_energy, sample_y/sample_x) * sample image: (sample_y, sample_x) * sample image stack: (photon_energy, sample_y, sample_x) * sample focus: (zoneplate_z, sample_y/sample_x) * osa image: (osa_y, osa_x) * osa focus: (zoneplate_z, osa_y/osa_x) * detector image: (detector_y, detector_x) The "generic scan" string is to be used when none of the other choices are appropriate. ' +root['/entry/data/stxm_scan_type'].attrs['EX_doc'] = 'osa_x) * detector image: (detector_y, detector_x) The "generic scan" string is to be used when none of the other choices are appropriate. ' root['/entry/data/data'].attrs['EX_doc'] = 'Detectors that provide more than one value per scan point should be summarised to a single value per scan point for this array in order to simplify plotting. Note that "Line scans" and focus type scans measure along one spatial dimension but are not restricted to being parallel to the X or Y axes. Such scans should therefore use a single dimension for the positions along the spatial line. The "sample_x" and "sample_y" fields should then contain lists of the x- and y-positions and should both have the "axis" attribute pointing to the same dimension. ' root['/entry/data/energy'].attrs['EX_doc'] = 'List of photon energies of the X-ray beam. If scanned through multiple values, then an "axis" attribute will be required to link the field to the appropriate data array dimension. ' root['/entry/data/sample_y'].attrs['EX_doc'] = 'List of Y positions on the sample. If scanned through multiple values, then an "axis" attribute will be required to link the field to the appropriate data array dimension. ' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtas.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtas.py index ba0d469..2e9c1d5 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtas.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtas.py @@ -53,7 +53,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='start_time', data='2021-03-29T15:51:43.263179', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:16.263999', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtofnpd.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtofnpd.py index 049863b..9efc7c9 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtofnpd.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtofnpd.py @@ -45,7 +45,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='start_time', data='2021-03-29T15:51:43.606595', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:16.420212', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtofraw.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtofraw.py index 55e6a55..6513a79 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtofraw.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtofraw.py @@ -45,7 +45,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='start_time', data='2021-03-29T15:51:43.959055', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:16.592046', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtofsingle.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtofsingle.py index f5ef2ff..b8cf52f 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtofsingle.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtofsingle.py @@ -45,7 +45,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='start_time', data='2021-03-29T15:51:44.287685', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:16.763880', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtomo.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtomo.py index 5505008..60a76d5 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtomo.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtomo.py @@ -45,11 +45,11 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'false' -root['/entry'].create_dataset(name='start_time', data='2021-03-29T15:51:44.650319', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:16.920239', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'false' -root['/entry'].create_dataset(name='end_time', data='2021-03-29T15:51:44.652319', maxshape=None) +root['/entry'].create_dataset(name='end_time', data='2022-03-03T14:34:16.920239', maxshape=None) root['/entry/end_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/end_time'].attrs['EX_required'] = 'false' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtomophase.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtomophase.py index 27ca6cc..798493a 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtomophase.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtomophase.py @@ -53,11 +53,11 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='start_time', data='2021-03-29T15:51:45.057350', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:17.154558', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='end_time', data='2021-03-29T15:51:45.060350', maxshape=None) +root['/entry'].create_dataset(name='end_time', data='2022-03-03T14:34:17.170180', maxshape=None) root['/entry/end_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/end_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtomoproc.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtomoproc.py index 8dd1170..d1d5d60 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtomoproc.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtomoproc.py @@ -81,7 +81,7 @@ root['/entry/reconstruction/version'].attrs['type'] = 'NX_CHAR' root['/entry/reconstruction/version'].attrs['EX_required'] = 'true' -root['/entry/reconstruction'].create_dataset(name='date', data='2021-03-29T15:51:45.375352', maxshape=None) +root['/entry/reconstruction'].create_dataset(name='date', data='2022-03-03T14:34:17.310772', maxshape=None) root['/entry/reconstruction/date'].attrs['type'] = 'NX_DATE_TIME' root['/entry/reconstruction/date'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxas.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxas.py index fbf7085..911b1d4 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxas.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxas.py @@ -53,7 +53,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='start_time', data='2021-03-29T15:51:45.626352', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:17.435742', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxasproc.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxasproc.py index 4ceee47..ab15005 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxasproc.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxasproc.py @@ -56,7 +56,7 @@ root['/entry/XAS_data_reduction/version'].attrs['type'] = 'NX_CHAR' root['/entry/XAS_data_reduction/version'].attrs['EX_required'] = 'true' -root['/entry/XAS_data_reduction'].create_dataset(name='date', data='2021-03-29T15:51:45.804350', maxshape=None) +root['/entry/XAS_data_reduction'].create_dataset(name='date', data='2022-03-03T14:34:17.529470', maxshape=None) root['/entry/XAS_data_reduction/date'].attrs['type'] = 'NX_DATE_TIME' root['/entry/XAS_data_reduction/date'].attrs['EX_required'] = 'true' @@ -80,7 +80,7 @@ root['/entry/XAS_data_reduction/version'].attrs['EX_doc'] = 'Version of the program used ' root['/entry/XAS_data_reduction/date'].attrs['EX_doc'] = 'Date and time of reconstruction processing. ' root['/entry/XAS_data_reduction/parameters/raw_file'].attrs['EX_doc'] = 'Original raw data file this data was derived from ' -root['/entry/data/data'].attrs['EX_doc'] = 'This is corrected and calibrated I(incoming)/I(absorbed). So it is the absorption. Expect attribute ``signal=1`` ' +root['/entry/data/data'].attrs['EX_doc'] = 'I(absorbed). So it is the absorption. Expect attribute ``signal=1`` ' # Create the ATTRIBUTES diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxbase.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxbase.py index 83c05f9..d21854b 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxbase.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxbase.py @@ -49,7 +49,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='start_time', data='2021-03-29T15:51:46.136351', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:17.685682', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxeuler.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxeuler.py index 7cda8f4..6fd3ad0 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxeuler.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxeuler.py @@ -53,7 +53,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='start_time', data='2021-03-29T15:51:46.670755', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:17.951244', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxkappa.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxkappa.py index 3515725..2dc1e13 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxkappa.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxkappa.py @@ -53,7 +53,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='start_time', data='2021-03-29T15:51:47.246390', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:18.227730', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxlaue.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxlaue.py index 2d97a5e..1408d01 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxlaue.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxlaue.py @@ -61,7 +61,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='start_time', data='2021-03-29T15:51:47.928648', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:18.540156', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxlaueplate.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxlaueplate.py index 98b6ee6..ac99b18 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxlaueplate.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxlaueplate.py @@ -61,7 +61,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='start_time', data='2021-03-29T15:51:48.694143', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:18.883824', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxnb.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxnb.py index da7d9ff..3da62e9 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxnb.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxnb.py @@ -53,7 +53,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='start_time', data='2021-03-29T15:51:49.239441', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:19.149386', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxpcs.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxpcs.py new file mode 100644 index 0000000..3e24f06 --- /dev/null +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxpcs.py @@ -0,0 +1,314 @@ + +import numpy as np +import datetime +import h5py +import os + +# Note this example script was generated by nxdl_to_hdf5.py using the current +# installed version of the NEXUS definitions ver[v2020.10] + +root = h5py.File('NXxpcs.h5', 'w') + +# Create the GROUPS + +root.create_group('entry') +root['/entry'].attrs['NX_class'] = 'NXentry' +root['/entry'].attrs['EX_required'] = 'true' + +root['/entry/'].create_group('data') +root['/entry/data'].attrs['NX_class'] = 'NXdata' +root['/entry/data'].attrs['EX_required'] = 'true' + +root['/entry/'].create_group('twotime') +root['/entry/twotime'].attrs['NX_class'] = 'NXdata' +root['/entry/twotime'].attrs['EX_required'] = 'false' + +root['/entry/'].create_group('instrument') +root['/entry/instrument'].attrs['NX_class'] = 'NXinstrument' +root['/entry/instrument'].attrs['EX_required'] = 'true' + +root['/entry/instrument/'].create_group('incident_beam') +root['/entry/instrument/incident_beam'].attrs['NX_class'] = 'NXbeam' +root['/entry/instrument/incident_beam'].attrs['EX_required'] = 'true' + +root['/entry/instrument/'].create_group('detector') +root['/entry/instrument/detector'].attrs['NX_class'] = 'NXdetector' +root['/entry/instrument/detector'].attrs['EX_required'] = 'true' + +root['/entry/instrument/'].create_group('masks') +root['/entry/instrument/masks'].attrs['NX_class'] = 'NXnote' +root['/entry/instrument/masks'].attrs['EX_required'] = 'false' + +root['/entry/'].create_group('sample') +root['/entry/sample'].attrs['NX_class'] = 'NXsample' +root['/entry/sample'].attrs['EX_required'] = 'false' + +root['/entry/sample/'].create_group('position_x') +root['/entry/sample/position_x'].attrs['NX_class'] = 'NXpositioner' +root['/entry/sample/position_x'].attrs['EX_required'] = 'false' + +root['/entry/sample/'].create_group('position_y') +root['/entry/sample/position_y'].attrs['NX_class'] = 'NXpositioner' +root['/entry/sample/position_y'].attrs['EX_required'] = 'false' + +root['/entry/sample/'].create_group('position_z') +root['/entry/sample/position_z'].attrs['NX_class'] = 'NXpositioner' +root['/entry/sample/position_z'].attrs['EX_required'] = 'false' + +root['/entry/'].create_group('ROI') +root['/entry/ROI'].attrs['NX_class'] = 'NXnote' +root['/entry/ROI'].attrs['EX_required'] = 'false' + +root['/entry/'].create_group('NOTE') +root['/entry/NOTE'].attrs['NX_class'] = 'NXnote' +root['/entry/NOTE'].attrs['EX_required'] = 'false' + +# Create the FIELDS + +# Valid enumeration values for root['/entry']['definition'] are: +# NXxpcs + +root['/entry'].create_dataset(name='definition', data='NXxpcs', maxshape=None) +root['/entry/definition'].attrs['type'] = 'NX_CHAR' +root['/entry/definition'].attrs['EX_required'] = 'true' + +root['/entry'].create_dataset(name='entry_identifier', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/entry_identifier'].attrs['type'] = 'NX_CHAR' +root['/entry/entry_identifier'].attrs['EX_required'] = 'true' + +root['/entry'].create_dataset(name='entry_identifier_uuid', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/entry_identifier_uuid'].attrs['type'] = 'NX_CHAR' +root['/entry/entry_identifier_uuid'].attrs['EX_required'] = 'false' + +root['/entry'].create_dataset(name='scan_number', data=1, maxshape=None) +root['/entry/scan_number'].attrs['type'] = 'NX_INT' +root['/entry/scan_number'].attrs['EX_required'] = 'true' + +root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:24.295042', maxshape=None) +root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' +root['/entry/start_time'].attrs['EX_required'] = 'true' + +root['/entry'].create_dataset(name='end_time', data='2022-03-03T14:34:24.295042', maxshape=None) +root['/entry/end_time'].attrs['type'] = 'NX_DATE_TIME' +root['/entry/end_time'].attrs['EX_required'] = 'false' + +root['/entry/data'].create_dataset(name='frame_sum', data=1.0, maxshape=None) +root['/entry/data/frame_sum'].attrs['type'] = 'NX_NUMBER' +root['/entry/data/frame_sum'].attrs['EX_required'] = 'false' +root['/entry/data/frame_sum'].attrs['units'] = 'NX_COUNT' + +root['/entry/data'].create_dataset(name='frame_average', data=1.0, maxshape=None) +root['/entry/data/frame_average'].attrs['type'] = 'NX_NUMBER' +root['/entry/data/frame_average'].attrs['EX_required'] = 'false' +root['/entry/data/frame_average'].attrs['units'] = 'NX_COUNT' + +root['/entry/data'].create_dataset(name='g2', data=1.0, maxshape=None) +root['/entry/data/g2'].attrs['type'] = 'NX_NUMBER' +root['/entry/data/g2'].attrs['EX_required'] = 'false' +root['/entry/data/g2'].attrs['units'] = 'NX_ARBITRARY_UNITS' + +root['/entry/data'].create_dataset(name='g2_derr', data=1.0, maxshape=None) +root['/entry/data/g2_derr'].attrs['type'] = 'NX_NUMBER' +root['/entry/data/g2_derr'].attrs['EX_required'] = 'false' +root['/entry/data/g2_derr'].attrs['units'] = 'NX_ARBITRARY_UNITS' + +root['/entry/data'].create_dataset(name='G2_unnormalized', data=1.0, maxshape=None) +root['/entry/data/G2_unnormalized'].attrs['type'] = 'NX_NUMBER' +root['/entry/data/G2_unnormalized'].attrs['EX_required'] = 'false' +root['/entry/data/G2_unnormalized'].attrs['units'] = 'NX_ARBITRARY_UNITS' + +root['/entry/data'].create_dataset(name='delay_difference', data=1, maxshape=None) +root['/entry/data/delay_difference'].attrs['type'] = 'NX_INT' +root['/entry/data/delay_difference'].attrs['EX_required'] = 'false' +root['/entry/data/delay_difference'].attrs['units'] = 'NX_INT' + +root['/entry/twotime'].create_dataset(name='two_time_corr_func', data=1.0, maxshape=None) +root['/entry/twotime/two_time_corr_func'].attrs['type'] = 'NX_NUMBER' +root['/entry/twotime/two_time_corr_func'].attrs['EX_required'] = 'false' +root['/entry/twotime/two_time_corr_func'].attrs['units'] = 'NX_ANY' + +root['/entry/twotime'].create_dataset(name='g2_from_two_time_corr_func', data=1.0, maxshape=None) +root['/entry/twotime/g2_from_two_time_corr_func'].attrs['type'] = 'NX_NUMBER' +root['/entry/twotime/g2_from_two_time_corr_func'].attrs['EX_required'] = 'false' +root['/entry/twotime/g2_from_two_time_corr_func'].attrs['units'] = 'NX_ARBITRARY_UNITS' + +root['/entry/twotime'].create_dataset(name='g2_err_from_two_time_corr_func', data=1.0, maxshape=None) +root['/entry/twotime/g2_err_from_two_time_corr_func'].attrs['type'] = 'NX_NUMBER' +root['/entry/twotime/g2_err_from_two_time_corr_func'].attrs['EX_required'] = 'false' +root['/entry/twotime/g2_err_from_two_time_corr_func'].attrs['units'] = 'NX_ARBITRARY_UNITS' + +root['/entry/twotime'].create_dataset(name='g2_from_two_time_corr_func_partials', data=1.0, maxshape=None) +root['/entry/twotime/g2_from_two_time_corr_func_partials'].attrs['type'] = 'NX_NUMBER' +root['/entry/twotime/g2_from_two_time_corr_func_partials'].attrs['EX_required'] = 'false' +root['/entry/twotime/g2_from_two_time_corr_func_partials'].attrs['units'] = 'NX_ARBITRARY_UNITS' + +root['/entry/twotime'].create_dataset(name='g2_err_from_two_time_corr_func_partials', data=1.0, maxshape=None) +root['/entry/twotime/g2_err_from_two_time_corr_func_partials'].attrs['type'] = 'NX_NUMBER' +root['/entry/twotime/g2_err_from_two_time_corr_func_partials'].attrs['EX_required'] = 'false' +root['/entry/twotime/g2_err_from_two_time_corr_func_partials'].attrs['units'] = 'NX_ARBITRARY_UNITS' + +root['/entry/instrument/incident_beam'].create_dataset(name='incident_energy', data=1.0, maxshape=None) +root['/entry/instrument/incident_beam/incident_energy'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/incident_beam/incident_energy'].attrs['EX_required'] = 'true' +root['/entry/instrument/incident_beam/incident_energy'].attrs['units'] = 'NX_ENERGY' + +root['/entry/instrument/incident_beam'].create_dataset(name='incident_energy_spread', data=1.0, maxshape=None) +root['/entry/instrument/incident_beam/incident_energy_spread'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/incident_beam/incident_energy_spread'].attrs['EX_required'] = 'false' +root['/entry/instrument/incident_beam/incident_energy_spread'].attrs['units'] = 'NX_ENERGY' + +root['/entry/instrument/incident_beam'].create_dataset(name='incident_polarization_type', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/instrument/incident_beam/incident_polarization_type'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/incident_beam/incident_polarization_type'].attrs['EX_required'] = 'false' + +root['/entry/instrument/incident_beam'].create_dataset(name='extent', data=1.0, maxshape=None) +root['/entry/instrument/incident_beam/extent'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/incident_beam/extent'].attrs['EX_required'] = 'false' +root['/entry/instrument/incident_beam/extent'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/detector'].create_dataset(name='description', data='SAMPLE-CHAR-DATA', maxshape=None) +root['/entry/instrument/detector/description'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/detector/description'].attrs['EX_required'] = 'false' + +root['/entry/instrument/detector'].create_dataset(name='distance', data=1.0, maxshape=None) +root['/entry/instrument/detector/distance'].attrs['type'] = 'NX_NUMBER' +root['/entry/instrument/detector/distance'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector/distance'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/detector'].create_dataset(name='count_time', data=1.0, maxshape=None) +root['/entry/instrument/detector/count_time'].attrs['type'] = 'NX_NUMBER' +root['/entry/instrument/detector/count_time'].attrs['EX_required'] = 'true' +root['/entry/instrument/detector/count_time'].attrs['units'] = 'NX_TIME' + +root['/entry/instrument/detector'].create_dataset(name='frame_time', data=1.0, maxshape=None) +root['/entry/instrument/detector/frame_time'].attrs['type'] = 'NX_NUMBER' +root['/entry/instrument/detector/frame_time'].attrs['EX_required'] = 'true' +root['/entry/instrument/detector/frame_time'].attrs['units'] = 'NX_TIME' + +root['/entry/instrument/detector'].create_dataset(name='beam_center_x', data=1.0, maxshape=None) +root['/entry/instrument/detector/beam_center_x'].attrs['type'] = 'NX_NUMBER' +root['/entry/instrument/detector/beam_center_x'].attrs['EX_required'] = 'true' +root['/entry/instrument/detector/beam_center_x'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/detector'].create_dataset(name='beam_center_y', data=1.0, maxshape=None) +root['/entry/instrument/detector/beam_center_y'].attrs['type'] = 'NX_NUMBER' +root['/entry/instrument/detector/beam_center_y'].attrs['EX_required'] = 'true' +root['/entry/instrument/detector/beam_center_y'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/detector'].create_dataset(name='x_pixel_size', data=1.0, maxshape=None) +root['/entry/instrument/detector/x_pixel_size'].attrs['type'] = 'NX_NUMBER' +root['/entry/instrument/detector/x_pixel_size'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector/x_pixel_size'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/detector'].create_dataset(name='y_pixel_size', data=1.0, maxshape=None) +root['/entry/instrument/detector/y_pixel_size'].attrs['type'] = 'NX_NUMBER' +root['/entry/instrument/detector/y_pixel_size'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector/y_pixel_size'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/masks'].create_dataset(name='dynamic_roi_map', data=1, maxshape=None) +root['/entry/instrument/masks/dynamic_roi_map'].attrs['type'] = 'NX_DIMENSIONLESS' +root['/entry/instrument/masks/dynamic_roi_map'].attrs['EX_required'] = 'true' + +root['/entry/instrument/masks'].create_dataset(name='dynamic_q_list', data=1.0, maxshape=None) +root['/entry/instrument/masks/dynamic_q_list'].attrs['type'] = 'NX_NUMBER' +root['/entry/instrument/masks/dynamic_q_list'].attrs['EX_required'] = 'false' +root['/entry/instrument/masks/dynamic_q_list'].attrs['units'] = 'NX_PER_LENGTH' + +root['/entry/instrument/masks'].create_dataset(name='dynamic_phi_list', data=1.0, maxshape=None) +root['/entry/instrument/masks/dynamic_phi_list'].attrs['type'] = 'NX_NUMBER' +root['/entry/instrument/masks/dynamic_phi_list'].attrs['EX_required'] = 'false' +root['/entry/instrument/masks/dynamic_phi_list'].attrs['units'] = 'NX_PER_LENGTH' + +root['/entry/instrument/masks'].create_dataset(name='static_roi_map', data=1, maxshape=None) +root['/entry/instrument/masks/static_roi_map'].attrs['type'] = 'NX_DIMENSIONLESS' +root['/entry/instrument/masks/static_roi_map'].attrs['EX_required'] = 'false' + +root['/entry/instrument/masks'].create_dataset(name='static_q_list', data=1.0, maxshape=None) +root['/entry/instrument/masks/static_q_list'].attrs['type'] = 'NX_NUMBER' +root['/entry/instrument/masks/static_q_list'].attrs['EX_required'] = 'false' +root['/entry/instrument/masks/static_q_list'].attrs['units'] = 'NX_PER_LENGTH' + +root['/entry/sample'].create_dataset(name='temperature_set', data=1.0, maxshape=None) +root['/entry/sample/temperature_set'].attrs['type'] = 'NX_NUMBER' +root['/entry/sample/temperature_set'].attrs['EX_required'] = 'false' +root['/entry/sample/temperature_set'].attrs['units'] = 'NX_TEMPERATURE' + +root['/entry/sample'].create_dataset(name='temperature', data=1.0, maxshape=None) +root['/entry/sample/temperature'].attrs['type'] = 'NX_NUMBER' +root['/entry/sample/temperature'].attrs['EX_required'] = 'false' +root['/entry/sample/temperature'].attrs['units'] = 'NX_TEMPERATURE' + +# Create the DOC strings +root['/entry/definition'].attrs['EX_doc'] = 'Official NeXus NXDL schema to which this file conforms ' +root['/entry/entry_identifier'].attrs['EX_doc'] = 'Unique identifier for the experiment. ' +root['/entry/entry_identifier_uuid'].attrs['EX_doc'] = '(optional) UUID identifier for this entry. ' +root['/entry/scan_number'].attrs['EX_doc'] = 'Scan number (must be an integer). NOTE: Link to collection_identifier. ' +root['/entry/start_time'].attrs['EX_doc'] = 'Starting time of experiment, such as "2021-02-11 11:22:33.445566Z". ' +root['/entry/end_time'].attrs['EX_doc'] = 'Ending time of experiment, such as "2021-02-11 11:23:45Z". ' +root['/entry/data'].attrs['EX_doc'] = 'The results data captured here are most commonly required for high throughput, equilibrium dynamics experiments. Data (results) describing on-equilibrium dynamics consume more memory resources so these data are separated. ' +root['/entry/data/frame_sum'].attrs['EX_doc'] = 'Two-dimensional summation along the frames stack. sum of intensity v. time (in the units of "frames") ' +root['/entry/data/frame_average'].attrs['EX_doc'] = 'Two-dimensional average along the frames stack. average intensity v. time (in the units of "frames") ' +root['/entry/data/g2'].attrs['EX_doc'] = 'NXdata.html#nxdata ' +root['/entry/data/g2_derr'].attrs['EX_doc'] = 'error values for the :math:`g_2` values. The derivation of the error is left up to the implemented code. Symmetric error will be expected (:math:`\pm` error). The data should be in the same format as ``g2``. ' +root['/entry/data/G2_unnormalized'].attrs['EX_doc'] = 'unnormalized intensity auto-correlation function. Specifically, ``g2`` without the denominator. The data should be in the same format as ``g2``. ' +root['/entry/data/delay_difference'].attrs['EX_doc'] = 'delay_difference (also known as delay or lag step) This is quantized difference so that the "step" between two consecutive frames is one frame (or step ``= dt = 1 frame``) It is the "quantized" delay time corresponding to the ``g2`` values. The unit of delay_differences is ``NX_INT`` for units of frames (i.e., integers) preferred, refer to :ref:`NXdetector` for conversion to time units. ' +root['/entry/twotime'].attrs['EX_doc'] = 'The data (results) in this section are based on the two-time intensity correlation function derived from a time series of scattering images. ' +root['/entry/twotime/two_time_corr_func'].attrs['EX_doc'] = 'two-time correlation of speckle intensity for a given q-bin or roi (represented by the nth roi_map value) See Fluerasu, Phys Rev E (2007), Eq 1 and Sutton, Optics Express (2003) for an early description applied to X-ray scattering: .. math:: C(\boldsymbol Q, t_1, t_2) = \frac{ \langle I(\boldsymbol Q, t_1)I(\boldsymbol Q, t_2)\rangle }{ \langle I(\boldsymbol Q,t_1)\rangle \langle I(\boldsymbol Q,t_2)\rangle } in which time is quantized by frames. In principle, any data format is acceptable if the data and its axes are self-describing as per NeXus recommendations. However, the data is preferred in one of the following two formats: * iterable list of linked files (or keys) for each q-bin called by the nth roi_map value. data for each bin is a 2D array * 3D array with shape (frames, frames, q) or (q, frames, frames), where :math:`q` is represented by the nth roi_map value, not the value `q` value The computation of this result can be customized. These customizations can affect subsequently derived results (below). The following attributes will be used to manage the customization. * Other normalization methods may be applied, but the method will not be specified in this definition. Some of these normalization methods result in a baseline value of ``0``, not ``1``. * The various software libraries use different programming languages. Therefore, we need to specify the ``time = 0`` origin location of the 2D array for each :math:`q`. * A method to reduce data storage needs is to only record half of the 2D array by populating array elements above or below the array diagonal. ' +root['/entry/twotime/g2_from_two_time_corr_func'].attrs['EX_doc'] = 'g2" * iterable list of linked files for each :math:`g_2` with 1 file per :math:`q` * 2D array with shape (:math:`g_2`, :math:`q`) Note that delay_difference is not included here because it is derived from the shape of extracted :math:`g_2` because all frames are considered, which is not necessarily the case for :math:`g_2`. The computation of this result can be customized. The customization can affect the fitting required to extract quantitative results. The following attributes will be used to manage the customization. ' +root['/entry/twotime/g2_err_from_two_time_corr_func'].attrs['EX_doc'] = 'error values for the :math:`g_2` values. The derivation of the error is left up to the implemented code. Symmetric error will be expected (:math:`\pm` error). ' +root['/entry/twotime/g2_from_two_time_corr_func_partials'].attrs['EX_doc'] = 'subset of frame weighted average along the diagonal direction in ``two_time_corr_func`` Time slicing along the diagonal can be very sophisticated. This entry currently assumes equal frame-binning. The data formats are highly dependent on the implantation of various analysis libraries. In principle, any data format is acceptable if the data and its axes are self describing as per NeXus recommendations. However, the data is preferred in one of the following two formats: * iterable list of linked files (or keys) for each partial :math:`g_2` of each q-bin represented by the roi_map value * 3D array with shape (:math:`g_2`, :math:`q`, nth_partial) Note that delay_difference is not included here because it is derived from the shape of extracted :math:`g_2`. ' +root['/entry/twotime/g2_err_from_two_time_corr_func_partials'].attrs['EX_doc'] = 'error values for the :math:`g_2` values. The derivation of the error is left up to the implemented code. Symmetric error will be expected (:math:`\pm` error). ' +root['/entry/instrument'].attrs['EX_doc'] = 'instrument``). ' +root['/entry/instrument/incident_beam/incident_energy'].attrs['EX_doc'] = 'Incident beam line energy (either keV or eV). ' +root['/entry/instrument/incident_beam/incident_energy_spread'].attrs['EX_doc'] = 'Spread of incident beam line energy (either keV or eV). This quantity is otherwise known as the energy resolution, which is related to the longitudinal coherence length. ' +root['/entry/instrument/incident_beam/incident_polarization_type'].attrs['EX_doc'] = 'Terse description of the incident beam polarization. The value can be plain text, such as ``vertical``, ``C+``, ``circular left``. ' +root['/entry/instrument/incident_beam/extent'].attrs['EX_doc'] = 'Size (2-D) of the beam at this position. ' +root['/entry/instrument/detector'].attrs['EX_doc'] = 'cxi.html ' +root['/entry/instrument/detector/description'].attrs['EX_doc'] = 'Detector name. ' +root['/entry/instrument/detector/distance'].attrs['EX_doc'] = 'Distance between sample and detector. ' +root['/entry/instrument/detector/count_time'].attrs['EX_doc'] = 'Exposure time of frames, s. ' +root['/entry/instrument/detector/frame_time'].attrs['EX_doc'] = 'Exposure period (time between frame starts) of frames, s ' +root['/entry/instrument/detector/beam_center_x'].attrs['EX_doc'] = 'Position of beam center, x axis, in detector"s coordinates. ' +root['/entry/instrument/detector/beam_center_y'].attrs['EX_doc'] = 'Position of beam center, y axis, in detector"s coordinates. ' +root['/entry/instrument/detector/x_pixel_size'].attrs['EX_doc'] = 'Length of pixel in x direction. ' +root['/entry/instrument/detector/y_pixel_size'].attrs['EX_doc'] = 'Length of pixel in y direction. ' +root['/entry/instrument/masks'].attrs['EX_doc'] = 'two_time. "Static" refers to finer binning used for computation not strictly used for the final XPCS results. Implementation of _static_ binning is left for individual libraries to document. We encourage usage of :ref:`NXcanSAS` to represent standard SAXS results or development of new NeXus definitions for GI-SAXS or other reciprocal space intensity mapping. ' +root['/entry/instrument/masks/dynamic_roi_map'].attrs['EX_doc'] = 'roi index array or labeled array The values of this mask index (or map to) the :math:`Q` value from the the ``dynamic_q_list`` field. Not that the value of ``0`` represents in-action. XPCS computations are performed on all pixels with a value > 0. The ``units`` attribute should be set to ``"au"`` indicating arbitrary units. ' +root['/entry/instrument/masks/dynamic_q_list'].attrs['EX_doc'] = 'O is required by end user. The lists can be accessed as lists, arrays or via keys ' +root['/entry/instrument/masks/dynamic_phi_list'].attrs['EX_doc'] = 'Array of :math:`\varphi` value for each pixel. List order is determined by the index value of the associated roi map starting at ``1``. ' +root['/entry/instrument/masks/static_roi_map'].attrs['EX_doc'] = 'roi index array. The values of this mask index the :math:`|Q|` value from the the ``static_q_list`` field. The ``units`` attribute should be set to ``"au"`` indicating arbitrary units. ' +root['/entry/instrument/masks/static_q_list'].attrs['EX_doc'] = '1-D list of :math:`|Q|` values, 1 for each roi. ' +root['/entry/sample/temperature_set'].attrs['EX_doc'] = 'Sample temperature setpoint, (C or K). ' +root['/entry/sample/temperature'].attrs['EX_doc'] = 'Sample temperature actual, (C or K). ' +root['/entry/ROI'].attrs['EX_doc'] = '**THIS FIELD IS SCHEDULED FOR DELETION on or about March 1, 2022.** Contact abarbour@bnl.gov or jemian@anl.gov to object. Region(s) of interest. NAME: The NeXus convention, to use all upper case to indicate the name (here ``roi``), is left to the file writer. In our case, follow the suggested name pattern and sequence: roi_1, roi_2, roi_3, ... Start with ``roi_1`` if the first one, otherwise pick the next number in this sequence. ' +root['/entry/NOTE'].attrs['EX_doc'] = 'Any other notes. NAME: The NeXus convention, to use all upper case to indicate the name (here ``NOTE``), is left to the file writer. In our case, follow the suggested name pattern and sequence: note_1, note_2, note_3, ... Start with ``note_1`` if the first one, otherwise pick the next number in this sequence. ' + + +# Create the ATTRIBUTES +root['/entry/data/g2'].attrs['storage_mode'] = 'SAMPLE-CHAR-DATA' +root['/entry/data/g2_derr'].attrs['storage_mode'] = 'SAMPLE-CHAR-DATA' +root['/entry/data/G2_unnormalized'].attrs['storage_mode'] = 'SAMPLE-CHAR-DATA' +root['/entry/data/delay_difference'].attrs['storage_mode'] = 'SAMPLE-CHAR-DATA' +root['/entry/twotime/two_time_corr_func'].attrs['storage_mode'] = 'SAMPLE-CHAR-DATA' +root['/entry/twotime/two_time_corr_func'].attrs['baseline_reference'] = '1' +root['/entry/twotime/two_time_corr_func'].attrs['time_origin_location'] = 'SAMPLE-CHAR-DATA' +root['/entry/twotime/two_time_corr_func'].attrs['populated_elements'] = 'SAMPLE-CHAR-DATA' +root['/entry/twotime/g2_from_two_time_corr_func'].attrs['storage_mode'] = 'SAMPLE-CHAR-DATA' +root['/entry/twotime/g2_from_two_time_corr_func'].attrs['baseline_reference'] = '1' +root['/entry/twotime/g2_from_two_time_corr_func'].attrs['first_point_for_fit'] = '1' +root['/entry/twotime/g2_err_from_two_time_corr_func'].attrs['storage_mode'] = 'SAMPLE-CHAR-DATA' +root['/entry/twotime/g2_from_two_time_corr_func_partials'].attrs['storage_mode'] = 'SAMPLE-CHAR-DATA' +root['/entry/twotime/g2_from_two_time_corr_func_partials'].attrs['baseline_reference'] = '1' +root['/'].attrs['default'] = 'entry' +root['/entry'].attrs['default'] = 'data' +root['/entry/data'].attrs['signal'] = 'G2_unnormalized' +root['/entry/data/G2_unnormalized'].attrs['signal'] = '1' +root.attrs['file_name'] = os.path.abspath('NXxpcs') +root.attrs['file_time'] = datetime.datetime.now().isoformat() +root.attrs['h5py_version'] = h5py.version.version +root.attrs['HDF5_Version'] = h5py.version.hdf5_version + +# Close the file +root.close() + + diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxrot.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxrot.py index fdc00f7..336132b 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxrot.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxrot.py @@ -57,7 +57,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='start_time', data='2021-03-29T15:51:49.861951', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:19.414948', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXarchive.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXarchive.py index b9fce1a..2ffaae5 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXarchive.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXarchive.py @@ -45,11 +45,11 @@ root['/entry/entry_identifier'].attrs['type'] = 'NX_CHAR' root['/entry/entry_identifier'].attrs['EX_required'] = 'true' -root['/entry/start_time'] = NXfield('2021-03-29T15:51:33.227367') +root['/entry/start_time'] = NXfield('2022-03-03T14:34:11.514397') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' -root['/entry/end_time'] = NXfield('2021-03-29T15:51:33.233370') +root['/entry/end_time'] = NXfield('2022-03-03T14:34:11.514397') root['/entry/end_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/end_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXarpes.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXarpes.py index 0fac76a..d74ecc8 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXarpes.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXarpes.py @@ -29,7 +29,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry/start_time'] = NXfield('2021-03-29T15:51:33.838489') +root['/entry/start_time'] = NXfield('2022-03-03T14:34:11.686229') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXcanSAS.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXcanSAS.py index 48bbeb8..8fefe47 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXcanSAS.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXcanSAS.py @@ -287,7 +287,7 @@ root['/entry/process/name'].attrs['type'] = 'NX_CHAR' root['/entry/process/name'].attrs['EX_required'] = 'false' -root['/entry/process/date'] = NXfield('2021-03-29T15:51:36.547895') +root['/entry/process/date'] = NXfield('2022-03-03T14:34:12.880239') root['/entry/process/date'].attrs['type'] = 'NX_DATE_TIME' root['/entry/process/date'].attrs['EX_required'] = 'false' @@ -394,7 +394,7 @@ root['/entry/data'].attrs['I_axes'] = 'SAMPLE-CHAR-DATA' root['/entry/data'].attrs['mask'] = 'SAMPLE-CHAR-DATA' root['/entry/data'].attrs['Mask_indices'] = 'SAMPLE-CHAR-DATA' -root['/entry/data'].attrs['timestamp'] = '2021-03-29T15:51:36.601894' +root['/entry/data'].attrs['timestamp'] = '2022-03-03T14:34:12.911481' root['/entry/data/Q'].attrs['units'] = 'SAMPLE-CHAR-DATA' root['/entry/data/Q'].attrs['uncertainties'] = 'SAMPLE-CHAR-DATA' root['/entry/data/Q'].attrs['resolutions'] = 'SAMPLE-CHAR-DATA' @@ -421,7 +421,7 @@ root['/entry/TRANSMISSION_SPECTRUM'].attrs['signal'] = 'SAMPLE-CHAR-DATA' root['/entry/TRANSMISSION_SPECTRUM'].attrs['T_axes'] = 'SAMPLE-CHAR-DATA' root['/entry/TRANSMISSION_SPECTRUM'].attrs['name'] = 'SAMPLE-CHAR-DATA' -root['/entry/TRANSMISSION_SPECTRUM'].attrs['timestamp'] = '2021-03-29T15:51:36.609872' +root['/entry/TRANSMISSION_SPECTRUM'].attrs['timestamp'] = '2022-03-03T14:34:12.927101' root['/entry/TRANSMISSION_SPECTRUM/T'].attrs['uncertainties'] = 'SAMPLE-CHAR-DATA' root.attrs['default'] = 'entry' root['/entry/TRANSMISSION_SPECTRUM'].set_default() diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXcxi_ptycho.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXcxi_ptycho.py new file mode 100644 index 0000000..5dd8250 --- /dev/null +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXcxi_ptycho.py @@ -0,0 +1,158 @@ + +import numpy as np +from nexusformat.nexus import * + +# Note this example script was generated by nxdl_to_hdf5.py using the current +# installed version of the NEXUS definitions ver[v2020.10] + +root = NXroot() + +# Create the GROUPS +root['/entry_1'] = NXentry() +root['/entry_1'].attrs['EX_required'] = 'false' +root['/entry_1/instrument_1'] = NXinstrument() +root['/entry_1/instrument_1'].attrs['EX_required'] = 'true' +root['/entry_1/instrument_1/source_1'] = NXsource() +root['/entry_1/instrument_1/source_1'].attrs['EX_required'] = 'true' +root['/entry_1/instrument_1/beam_1'] = NXbeam() +root['/entry_1/instrument_1/beam_1'].attrs['EX_required'] = 'true' +root['/entry_1/instrument_1/detector_1'] = NXdetector() +root['/entry_1/instrument_1/detector_1'].attrs['EX_required'] = 'true' +root['/entry_1/instrument_1/detector_1/transformations'] = NXtransformations() +root['/entry_1/instrument_1/detector_1/transformations'].attrs['EX_required'] = 'false' +root['/entry_1/instrument_1/monitor'] = NXmonitor() +root['/entry_1/instrument_1/monitor'].attrs['EX_required'] = 'false' + +# Create the FIELDS + +root['/entry_1/title'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry_1/title'].attrs['type'] = 'NX_CHAR' +root['/entry_1/title'].attrs['EX_required'] = 'false' + +root['/entry_1/start_time'] = NXfield('2022-03-03T14:34:21.896003') +root['/entry_1/start_time'].attrs['type'] = 'NX_DATE_TIME' +root['/entry_1/start_time'].attrs['EX_required'] = 'false' + +root['/entry_1/end_time'] = NXfield('2022-03-03T14:34:21.896003') +root['/entry_1/end_time'].attrs['type'] = 'NX_DATE_TIME' +root['/entry_1/end_time'].attrs['EX_required'] = 'false' + +# Valid enumeration values for root['/entry_1']['definition'] are: +# NXcxi_ptycho + +root['/entry_1/definition'] = NXfield('NXcxi_ptycho') +root['/entry_1/definition'].attrs['type'] = 'NX_CHAR' +root['/entry_1/definition'].attrs['EX_required'] = 'true' + +root['/entry_1/instrument_1/source_1/name'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry_1/instrument_1/source_1/name'].attrs['type'] = 'NX_CHAR' +root['/entry_1/instrument_1/source_1/name'].attrs['EX_required'] = 'true' + +root['/entry_1/instrument_1/source_1/energy'] = NXfield(1.0) +root['/entry_1/instrument_1/source_1/energy'].attrs['type'] = 'NX_FLOAT' +root['/entry_1/instrument_1/source_1/energy'].attrs['EX_required'] = 'true' + +root['/entry_1/instrument_1/source_1/probe'] = NXfield(1.0) +root['/entry_1/instrument_1/source_1/probe'].attrs['type'] = 'NX_FLOAT' +root['/entry_1/instrument_1/source_1/probe'].attrs['EX_required'] = 'true' + +root['/entry_1/instrument_1/source_1/type'] = NXfield(1.0) +root['/entry_1/instrument_1/source_1/type'].attrs['type'] = 'NX_FLOAT' +root['/entry_1/instrument_1/source_1/type'].attrs['EX_required'] = 'true' + +root['/entry_1/instrument_1/beam_1/energy'] = NXfield(1.0) +root['/entry_1/instrument_1/beam_1/energy'].attrs['type'] = 'NX_FLOAT' +root['/entry_1/instrument_1/beam_1/energy'].attrs['EX_required'] = 'true' + +root['/entry_1/instrument_1/beam_1/extent'] = NXfield(1.0) +root['/entry_1/instrument_1/beam_1/extent'].attrs['type'] = 'NX_FLOAT' +root['/entry_1/instrument_1/beam_1/extent'].attrs['EX_required'] = 'false' + +root['/entry_1/instrument_1/beam_1/incident_beam_divergence'] = NXfield(1.0) +root['/entry_1/instrument_1/beam_1/incident_beam_divergence'].attrs['type'] = 'NX_FLOAT' +root['/entry_1/instrument_1/beam_1/incident_beam_divergence'].attrs['EX_required'] = 'false' + +root['/entry_1/instrument_1/beam_1/incident_beam_energy'] = NXfield(1.0) +root['/entry_1/instrument_1/beam_1/incident_beam_energy'].attrs['type'] = 'NX_FLOAT' +root['/entry_1/instrument_1/beam_1/incident_beam_energy'].attrs['EX_required'] = 'true' + +root['/entry_1/instrument_1/beam_1/incident_energy_spread'] = NXfield(1.0) +root['/entry_1/instrument_1/beam_1/incident_energy_spread'].attrs['type'] = 'NX_FLOAT' +root['/entry_1/instrument_1/beam_1/incident_energy_spread'].attrs['EX_required'] = 'true' + +root['/entry_1/instrument_1/detector_1/transformations/vector'] = NXfield(1.0) +root['/entry_1/instrument_1/detector_1/transformations/vector'].attrs['type'] = 'NX_NUMBER' +root['/entry_1/instrument_1/detector_1/transformations/vector'].attrs['EX_required'] = 'true' + +root['/entry_1/instrument_1/detector_1/translation'] = NXfield(1.0) +root['/entry_1/instrument_1/detector_1/translation'].attrs['type'] = 'NX_FLOAT' +root['/entry_1/instrument_1/detector_1/translation'].attrs['EX_required'] = 'true' +root['/entry_1/instrument_1/detector_1/translation'].attrs['units'] = 'NX_LENGTH' + +root['/entry_1/instrument_1/detector_1/data'] = NXfield(1) +root['/entry_1/instrument_1/detector_1/data'].attrs['type'] = 'NX_INT' +root['/entry_1/instrument_1/detector_1/data'].attrs['EX_required'] = 'true' +root['/entry_1/instrument_1/detector_1/data'].attrs['signal'] = '1' + +root['/entry_1/instrument_1/detector_1/x_pixel_size'] = NXfield(1.0) +root['/entry_1/instrument_1/detector_1/x_pixel_size'].attrs['type'] = 'NX_FLOAT' +root['/entry_1/instrument_1/detector_1/x_pixel_size'].attrs['EX_required'] = 'true' +root['/entry_1/instrument_1/detector_1/x_pixel_size'].attrs['units'] = 'NX_LENGTH' + +root['/entry_1/instrument_1/detector_1/y_pixel_size'] = NXfield(1.0) +root['/entry_1/instrument_1/detector_1/y_pixel_size'].attrs['type'] = 'NX_FLOAT' +root['/entry_1/instrument_1/detector_1/y_pixel_size'].attrs['EX_required'] = 'true' +root['/entry_1/instrument_1/detector_1/y_pixel_size'].attrs['units'] = 'NX_LENGTH' + +root['/entry_1/instrument_1/detector_1/distance'] = NXfield(1.0) +root['/entry_1/instrument_1/detector_1/distance'].attrs['type'] = 'NX_FLOAT' +root['/entry_1/instrument_1/detector_1/distance'].attrs['EX_required'] = 'true' +root['/entry_1/instrument_1/detector_1/distance'].attrs['units'] = 'NX_LENGTH' + +root['/entry_1/instrument_1/detector_1/beam_center_x'] = NXfield(1.0) +root['/entry_1/instrument_1/detector_1/beam_center_x'].attrs['type'] = 'NX_FLOAT' +root['/entry_1/instrument_1/detector_1/beam_center_x'].attrs['EX_required'] = 'false' +root['/entry_1/instrument_1/detector_1/beam_center_x'].attrs['units'] = 'NX_LENGTH' + +root['/entry_1/instrument_1/detector_1/beam_center_y'] = NXfield(1.0) +root['/entry_1/instrument_1/detector_1/beam_center_y'].attrs['type'] = 'NX_FLOAT' +root['/entry_1/instrument_1/detector_1/beam_center_y'].attrs['EX_required'] = 'false' +root['/entry_1/instrument_1/detector_1/beam_center_y'].attrs['units'] = 'NX_LENGTH' + +root['/entry_1/instrument_1/monitor/data'] = NXfield(1.0) +root['/entry_1/instrument_1/monitor/data'].attrs['type'] = 'NX_FLOAT' +root['/entry_1/instrument_1/monitor/data'].attrs['EX_required'] = 'false' + +# Create the LINKS +root['/entry_1/instrument_1/detector_1/data_1'] = NXlink(target='/entry_1/title') + +# Create the DOC strings +root['/entry_1/definition'].attrs['EX_doc'] = 'Official NeXus NXDL schema to which this file conforms ' +root['/entry_1/instrument_1/source_1/energy'].attrs['EX_doc'] = 'This is the energy of the machine, not the beamline. ' +root['/entry_1/instrument_1/detector_1/translation'].attrs['EX_doc'] = 'This is an array of shape (npts_x*npts_y, 3) and can be a Virtual Dataset of x and y ' +root['/entry_1/instrument_1/detector_1/data_1'].attrs['EX_doc'] = 'This data must always have shape (npts_x*npts_y, frame_size_x, frame_size_y) regardless of the scan pattern. Use hdf5 virtual dataset to achieve this. ' +root['/entry_1/instrument_1/detector_1/distance'].attrs['EX_doc'] = 'The distance between the detector and the sample ' + + +# Create the ATTRIBUTES +root['/entry_1/instrument_1/beam_1/energy'].attrs['units'] = 'SAMPLE-CHAR-DATA' +root['/entry_1/instrument_1/beam_1/extent'].attrs['units'] = 'SAMPLE-CHAR-DATA' +root['/entry_1/instrument_1/beam_1/incident_beam_divergence'].attrs['units'] = 'SAMPLE-CHAR-DATA' +root['/entry_1/instrument_1/beam_1/incident_beam_energy'].attrs['units'] = 'SAMPLE-CHAR-DATA' +root['/entry_1/instrument_1/beam_1/incident_energy_spread'].attrs['units'] = 'SAMPLE-CHAR-DATA' +root['/entry_1/instrument_1/detector_1'].attrs['axes'] = 'SAMPLE-CHAR-DATA' +root['/entry_1/instrument_1/detector_1'].attrs['signal'] = 'SAMPLE-CHAR-DATA' +root['/entry_1/instrument_1/detector_1/translation'].attrs['units'] = 'SAMPLE-CHAR-DATA' +root['/entry_1/instrument_1/detector_1/translation'].attrs['axes'] = 'SAMPLE-CHAR-DATA' +root['/entry_1/instrument_1/detector_1/translation'].attrs['interpretation'] = 'SAMPLE-CHAR-DATA' +root['/entry_1/instrument_1/detector_1/x_pixel_size'].attrs['units'] = 'SAMPLE-CHAR-DATA' +root['/entry_1/instrument_1/detector_1/y_pixel_size'].attrs['units'] = 'SAMPLE-CHAR-DATA' +root['/entry_1/instrument_1/detector_1/distance'].attrs['units'] = 'SAMPLE-CHAR-DATA' +root['/entry_1/instrument_1/detector_1/beam_center_x'].attrs['units'] = 'SAMPLE-CHAR-DATA' +root['/entry_1/instrument_1/detector_1/beam_center_y'].attrs['units'] = 'SAMPLE-CHAR-DATA' +root.attrs['default'] = 'entry_1' + +# Save the file +root.save('NXcxi_ptycho.nxs', 'w') + + diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXdirecttof.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXdirecttof.py index 8c13b7f..abf8a40 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXdirecttof.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXdirecttof.py @@ -33,7 +33,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry/start_time'] = NXfield('2021-03-29T15:51:37.033456') +root['/entry/start_time'] = NXfield('2022-03-03T14:34:13.114561') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXfluo.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXfluo.py index 2756eef..fe09298 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXfluo.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXfluo.py @@ -31,7 +31,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry/start_time'] = NXfield('2021-03-29T15:51:37.263456') +root['/entry/start_time'] = NXfield('2022-03-03T14:34:13.239528') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXindirecttof.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXindirecttof.py index e248c3a..538e97e 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXindirecttof.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXindirecttof.py @@ -31,7 +31,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry/start_time'] = NXfield('2021-03-29T15:51:37.731456') +root['/entry/start_time'] = NXfield('2022-03-03T14:34:13.442607') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXmonopd.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXmonopd.py index 027f901..557d5c1 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXmonopd.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXmonopd.py @@ -31,7 +31,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry/start_time'] = NXfield('2021-03-29T15:51:38.596455') +root['/entry/start_time'] = NXfield('2022-03-03T14:34:13.864380') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXmx.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXmx.py index 94a77a0..e45b023 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXmx.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXmx.py @@ -43,15 +43,15 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'false' -root['/entry/start_time'] = NXfield('2021-03-29T15:51:40.027458') +root['/entry/start_time'] = NXfield('2022-03-03T14:34:14.520473') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' -root['/entry/end_time'] = NXfield('2021-03-29T15:51:40.030457') +root['/entry/end_time'] = NXfield('2022-03-03T14:34:14.536095') root['/entry/end_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/end_time'].attrs['EX_required'] = 'false' -root['/entry/end_time_estimated'] = NXfield('2021-03-29T15:51:40.039474') +root['/entry/end_time_estimated'] = NXfield('2022-03-03T14:34:14.536095') root['/entry/end_time_estimated'].attrs['type'] = 'NX_DATE_TIME' root['/entry/end_time_estimated'].attrs['EX_required'] = 'true' @@ -83,7 +83,7 @@ root['/entry/instrument/name'].attrs['type'] = 'NX_CHAR' root['/entry/instrument/name'].attrs['EX_required'] = 'true' -root['/entry/instrument/time_zone'] = NXfield('2021-03-29T15:51:40.065477') +root['/entry/instrument/time_zone'] = NXfield('2022-03-03T14:34:14.551718') root['/entry/instrument/time_zone'].attrs['type'] = 'NX_DATE_TIME' root['/entry/instrument/time_zone'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXpeem.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXpeem.py new file mode 100644 index 0000000..ba3d1c6 --- /dev/null +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXpeem.py @@ -0,0 +1,130 @@ + +import numpy as np +from nexusformat.nexus import * + +# Note this example script was generated by nxdl_to_hdf5.py using the current +# installed version of the NEXUS definitions ver[v2020.10] + +root = NXroot() + +# Create the GROUPS +root['/entry'] = NXentry() +root['/entry'].attrs['EX_required'] = 'true' +root['/entry/instrument'] = NXinstrument() +root['/entry/instrument'].attrs['EX_required'] = 'true' +root['/entry/instrument/source'] = NXsource() +root['/entry/instrument/source'].attrs['EX_required'] = 'true' +root['/entry/instrument/monochromator'] = NXmonochromator() +root['/entry/instrument/monochromator'].attrs['EX_required'] = 'true' +root['/entry/instrument/detector'] = NXdetector() +root['/entry/instrument/detector'].attrs['EX_required'] = 'true' +root['/entry/sample'] = NXsample() +root['/entry/sample'].attrs['EX_required'] = 'true' +root['/entry/data'] = NXdata() +root['/entry/data'].attrs['EX_required'] = 'true' + +# Create the FIELDS + +root['/entry/title'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/title'].attrs['type'] = 'NX_CHAR' +root['/entry/title'].attrs['EX_required'] = 'true' + +root['/entry/start_time'] = NXfield('2022-03-03T14:34:14.801656') +root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' +root['/entry/start_time'].attrs['EX_required'] = 'true' + +root['/entry/end_time'] = NXfield('2022-03-03T14:34:14.801656') +root['/entry/end_time'].attrs['type'] = 'NX_DATE_TIME' +root['/entry/end_time'].attrs['EX_required'] = 'true' + +# Valid enumeration values for root['/entry']['definition'] are: +# NXpeem + +root['/entry/definition'] = NXfield('NXpeem') +root['/entry/definition'].attrs['type'] = 'NX_CHAR' +root['/entry/definition'].attrs['EX_required'] = 'true' + +root['/entry/instrument/source/type'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/instrument/source/type'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/source/type'].attrs['EX_required'] = 'true' + +root['/entry/instrument/source/name'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/instrument/source/name'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/source/name'].attrs['EX_required'] = 'true' + +root['/entry/instrument/source/probe'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/instrument/source/probe'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/source/probe'].attrs['EX_required'] = 'true' + +root['/entry/instrument/monochromator/energy'] = NXfield(1.0) +root['/entry/instrument/monochromator/energy'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/monochromator/energy'].attrs['EX_required'] = 'true' + +root['/entry/instrument/detector/data'] = NXfield(1.0) +root['/entry/instrument/detector/data'].attrs['type'] = 'NX_NUMBER' +root['/entry/instrument/detector/data'].attrs['EX_required'] = 'true' + +root['/entry/sample/rotation_angle'] = NXfield(1.0) +root['/entry/sample/rotation_angle'].attrs['type'] = 'NX_FLOAT' +root['/entry/sample/rotation_angle'].attrs['EX_required'] = 'true' + +# Valid enumeration values for root['/entry/data']['peem_scan_type'] are: +# single image scan +# stack scan +# focus scan +# single variable scan +# two variable scan +# time scan + +root['/entry/data/peem_scan_type'] = NXfield('single image scan') +root['/entry/data/peem_scan_type'].attrs['type'] = 'NX_CHAR' +root['/entry/data/peem_scan_type'].attrs['EX_required'] = 'true' + +root['/entry/data/img_data'] = NXfield(1.0) +root['/entry/data/img_data'].attrs['type'] = 'NX_NUMBER' +root['/entry/data/img_data'].attrs['EX_required'] = 'true' + +root['/entry/data/spec_data'] = NXfield(1.0) +root['/entry/data/spec_data'].attrs['type'] = 'NX_NUMBER' +root['/entry/data/spec_data'].attrs['EX_required'] = 'true' +root['/entry/data/spec_data'].attrs['signal'] = '1' + +root['/entry/data/energy'] = NXfield(1.0) +root['/entry/data/energy'].attrs['type'] = 'NX_FLOAT' +root['/entry/data/energy'].attrs['EX_required'] = 'true' + +root['/entry/data/polarization'] = NXfield(1.0) +root['/entry/data/polarization'].attrs['type'] = 'NX_FLOAT' +root['/entry/data/polarization'].attrs['EX_required'] = 'false' + +root['/entry/data/averages'] = NXfield(1) +root['/entry/data/averages'].attrs['type'] = 'NX_INTEGER' +root['/entry/data/averages'].attrs['EX_required'] = 'true' + +root['/entry/data/count_time'] = NXfield(1.0) +root['/entry/data/count_time'].attrs['type'] = 'NX_FLOAT' +root['/entry/data/count_time'].attrs['EX_required'] = 'true' + +# Create the DOC strings +root['/entry/definition'].attrs['EX_doc'] = 'Official NeXus NXDL schema to which this file conforms ' +root['/entry/instrument/detector/data'].attrs['EX_doc'] = 'Detector data should be presented with the first dimension corresponding to the scan point and subsequent dimensions corresponding to the output of the detector. Detectors that provide more than one value per scan point should have a data array of rank 1+d, where d is the dimensions of the array provided per scan point. For example, an area detector should have an NXdetector data array of 3 dimensions, with the first being the set of scan points and the latter two being the x- and y- extent of the detector ' +root['/entry/data'].attrs['EX_doc'] = 'This will contain all the data for a particular ROI ' +root['/entry/data/peem_scan_type'].attrs['EX_doc'] = 'Label for typical scan types as a convenience for humans. Each label corresponds to a specific set of axes being scanned to produce a data array of shape: * single image scan: (photon_energy, 2D image data) * stack scan: (photon_energy, polarization, 2D image data + 1D spectra) * focus scan: (photon_energy, 2D image data) * single variable scan: (variable, 2D image data + 1D spectra) * two variable scan: (variable1, variable2, 2D image data + 1D spectra) * time scan: (time, 2D image data + 1D spectra) The "single image scan" string is to be used when none of the other choices are appropriate. ' +root['/entry/data/img_data'].attrs['EX_doc'] = 'This will contain a multi dimensonal array that with the columns determined by the scan type ' +root['/entry/data/spec_data'].attrs['EX_doc'] = 'This will contain a multi dimensonal array that with the columns determined by the scan type ' +root['/entry/data/energy'].attrs['EX_doc'] = 'List of photon energies of the X-ray beam. If scanned through multiple values, then an "axis" attribute will be required to link the field to the appropriate data array dimension. ' +root['/entry/data/polarization'].attrs['EX_doc'] = 'List of polarizations. If scanned through multiple values, then an "axis" attribute will be required to link the field to the appropriate data array dimension. ' +root['/entry/data/averages'].attrs['EX_doc'] = 'List of Y positions on the sample. If scanned through multiple values, then an "axis" attribute will be required to link the field to the appropriate data array dimension. ' +root['/entry/data/count_time'].attrs['EX_doc'] = 'List of dwell times for each point in the scan, they may vary point to point, then an "axis" attribute will be required to link the field to the appropriate data array dimension. ' + + +# Create the ATTRIBUTES +root.attrs['default'] = 'entry' +root['/entry/data'].set_default() +root['/entry/data'].attrs['signal'] = 'averages' +root['/entry/data/averages'].attrs['signal'] = '1' + +# Save the file +root.save('NXpeem.nxs', 'w') + + diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXrefscan.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXrefscan.py index 58f53c9..48d375f 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXrefscan.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXrefscan.py @@ -31,11 +31,11 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry/start_time'] = NXfield('2021-03-29T15:51:40.531791') +root['/entry/start_time'] = NXfield('2022-03-03T14:34:14.942247') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' -root['/entry/end_time'] = NXfield('2021-03-29T15:51:40.534797') +root['/entry/end_time'] = NXfield('2022-03-03T14:34:14.942247') root['/entry/end_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/end_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXreftof.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXreftof.py index f9b10b4..7c4e738 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXreftof.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXreftof.py @@ -29,11 +29,11 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry/start_time'] = NXfield('2021-03-29T15:51:40.907789') +root['/entry/start_time'] = NXfield('2022-03-03T14:34:15.067217') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' -root['/entry/end_time'] = NXfield('2021-03-29T15:51:40.911793') +root['/entry/end_time'] = NXfield('2022-03-03T14:34:15.067217') root['/entry/end_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/end_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXsas.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXsas.py index 2b52279..1e5298c 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXsas.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXsas.py @@ -37,11 +37,11 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry/start_time'] = NXfield('2021-03-29T15:51:41.340791') +root['/entry/start_time'] = NXfield('2022-03-03T14:34:15.261415') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' -root['/entry/end_time'] = NXfield('2021-03-29T15:51:41.343788') +root['/entry/end_time'] = NXfield('2022-03-03T14:34:15.263409') root['/entry/end_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/end_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXsastof.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXsastof.py index 45d96ca..6949b5c 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXsastof.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXsastof.py @@ -35,7 +35,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry/start_time'] = NXfield('2021-03-29T15:51:41.758791') +root['/entry/start_time'] = NXfield('2022-03-03T14:34:15.490730') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXscan.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXscan.py index 88bcf7b..1b4b60f 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXscan.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXscan.py @@ -27,11 +27,11 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry/start_time'] = NXfield('2021-03-29T15:51:41.971096') +root['/entry/start_time'] = NXfield('2022-03-03T14:34:15.600086') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' -root['/entry/end_time'] = NXfield('2021-03-29T15:51:41.974077') +root['/entry/end_time'] = NXfield('2022-03-03T14:34:15.600086') root['/entry/end_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/end_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXsnsevent.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXsnsevent.py new file mode 100644 index 0000000..8220540 --- /dev/null +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXsnsevent.py @@ -0,0 +1,545 @@ + +import numpy as np +from nexusformat.nexus import * + +# Note this example script was generated by nxdl_to_hdf5.py using the current +# installed version of the NEXUS definitions ver[v2020.10] + +root = NXroot() + +# Create the GROUPS +root['/entry'] = NXentry() +root['/entry'].attrs['EX_required'] = 'true' +root['/entry/DASlogs'] = NXcollection() +root['/entry/DASlogs'].attrs['EX_required'] = 'false' +root['/entry/DASlogs/log'] = NXlog() +root['/entry/DASlogs/log'].attrs['EX_required'] = 'true' +root['/entry/DASlogs/positioner'] = NXpositioner() +root['/entry/DASlogs/positioner'].attrs['EX_required'] = 'false' +root['/entry/SNSHistoTool'] = NXnote() +root['/entry/SNSHistoTool'].attrs['EX_required'] = 'false' +root['/entry/data'] = NXdata() +root['/entry/data'].attrs['EX_required'] = 'true' +root['/entry/NXevent_data'] = NXevent_data() +root['/entry/NXevent_data'].attrs['EX_required'] = 'true' +root['/entry/instrument'] = NXinstrument() +root['/entry/instrument'].attrs['EX_required'] = 'false' +root['/entry/instrument/SNS'] = NXsource() +root['/entry/instrument/SNS'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector'] = NXdetector() +root['/entry/instrument/detector'].attrs['EX_required'] = 'true' +root['/entry/instrument/detector/origin'] = NXgeometry() +root['/entry/instrument/detector/origin'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector/origin/orientation'] = NXorientation() +root['/entry/instrument/detector/origin/orientation'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector/origin/shape'] = NXshape() +root['/entry/instrument/detector/origin/shape'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector/origin/translation'] = NXtranslation() +root['/entry/instrument/detector/origin/translation'].attrs['EX_required'] = 'false' +root['/entry/instrument/NXdisk_chopper'] = NXdisk_chopper() +root['/entry/instrument/NXdisk_chopper'].attrs['EX_required'] = 'false' +root['/entry/instrument/moderator'] = NXmoderator() +root['/entry/instrument/moderator'].attrs['EX_required'] = 'false' +root['/entry/instrument/aperture'] = NXaperture() +root['/entry/instrument/aperture'].attrs['EX_required'] = 'false' +root['/entry/instrument/aperture/origin'] = NXgeometry() +root['/entry/instrument/aperture/origin'].attrs['EX_required'] = 'false' +root['/entry/instrument/aperture/origin/orientation'] = NXorientation() +root['/entry/instrument/aperture/origin/orientation'].attrs['EX_required'] = 'false' +root['/entry/instrument/aperture/origin/shape'] = NXshape() +root['/entry/instrument/aperture/origin/shape'].attrs['EX_required'] = 'false' +root['/entry/instrument/aperture/origin/translation'] = NXtranslation() +root['/entry/instrument/aperture/origin/translation'].attrs['EX_required'] = 'false' +root['/entry/instrument/attenuator'] = NXattenuator() +root['/entry/instrument/attenuator'].attrs['EX_required'] = 'false' +root['/entry/instrument/polarizer'] = NXpolarizer() +root['/entry/instrument/polarizer'].attrs['EX_required'] = 'false' +root['/entry/instrument/crystal'] = NXcrystal() +root['/entry/instrument/crystal'].attrs['EX_required'] = 'false' +root['/entry/instrument/crystal/origin'] = NXgeometry() +root['/entry/instrument/crystal/origin'].attrs['EX_required'] = 'false' +root['/entry/instrument/crystal/origin/orientation'] = NXorientation() +root['/entry/instrument/crystal/origin/orientation'].attrs['EX_required'] = 'false' +root['/entry/instrument/crystal/origin/shape'] = NXshape() +root['/entry/instrument/crystal/origin/shape'].attrs['EX_required'] = 'false' +root['/entry/instrument/crystal/origin/translation'] = NXtranslation() +root['/entry/instrument/crystal/origin/translation'].attrs['EX_required'] = 'false' +root['/entry/monitor'] = NXmonitor() +root['/entry/monitor'].attrs['EX_required'] = 'false' +root['/entry/sample'] = NXsample() +root['/entry/sample'].attrs['EX_required'] = 'false' +root['/entry/user'] = NXuser() +root['/entry/user'].attrs['EX_required'] = 'true' + +# Create the FIELDS + +root['/entry/DASlogs/log/average_value'] = NXfield(1.0) +root['/entry/DASlogs/log/average_value'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/log/average_value'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/log/average_value_error'] = NXfield(1.0) +root['/entry/DASlogs/log/average_value_error'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/log/average_value_error'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/log/average_value_errors'] = NXfield(1.0) +root['/entry/DASlogs/log/average_value_errors'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/log/average_value_errors'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/log/description'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/DASlogs/log/description'].attrs['type'] = 'NX_CHAR' +root['/entry/DASlogs/log/description'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/log/duration'] = NXfield(1.0) +root['/entry/DASlogs/log/duration'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/log/duration'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/log/maximum_value'] = NXfield(1.0) +root['/entry/DASlogs/log/maximum_value'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/log/maximum_value'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/log/minimum_value'] = NXfield(1.0) +root['/entry/DASlogs/log/minimum_value'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/log/minimum_value'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/log/time'] = NXfield(1.0) +root['/entry/DASlogs/log/time'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/log/time'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/log/value'] = NXfield(1.0) +root['/entry/DASlogs/log/value'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/log/value'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/positioner/average_value'] = NXfield(1.0) +root['/entry/DASlogs/positioner/average_value'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/positioner/average_value'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/positioner/average_value_error'] = NXfield(1.0) +root['/entry/DASlogs/positioner/average_value_error'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/positioner/average_value_error'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/positioner/average_value_errors'] = NXfield(1.0) +root['/entry/DASlogs/positioner/average_value_errors'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/positioner/average_value_errors'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/positioner/description'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/DASlogs/positioner/description'].attrs['type'] = 'NX_CHAR' +root['/entry/DASlogs/positioner/description'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/positioner/duration'] = NXfield(1.0) +root['/entry/DASlogs/positioner/duration'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/positioner/duration'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/positioner/maximum_value'] = NXfield(1.0) +root['/entry/DASlogs/positioner/maximum_value'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/positioner/maximum_value'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/positioner/minimum_value'] = NXfield(1.0) +root['/entry/DASlogs/positioner/minimum_value'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/positioner/minimum_value'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/positioner/time'] = NXfield(1.0) +root['/entry/DASlogs/positioner/time'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/positioner/time'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/positioner/value'] = NXfield(1.0) +root['/entry/DASlogs/positioner/value'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/positioner/value'].attrs['EX_required'] = 'false' + +root['/entry/SNSHistoTool/SNSbanking_file_name'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/SNSHistoTool/SNSbanking_file_name'].attrs['type'] = 'NX_CHAR' +root['/entry/SNSHistoTool/SNSbanking_file_name'].attrs['EX_required'] = 'false' + +root['/entry/SNSHistoTool/SNSmapping_file_name'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/SNSHistoTool/SNSmapping_file_name'].attrs['type'] = 'NX_CHAR' +root['/entry/SNSHistoTool/SNSmapping_file_name'].attrs['EX_required'] = 'false' + +root['/entry/SNSHistoTool/author'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/SNSHistoTool/author'].attrs['type'] = 'NX_CHAR' +root['/entry/SNSHistoTool/author'].attrs['EX_required'] = 'false' + +root['/entry/SNSHistoTool/command1'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/SNSHistoTool/command1'].attrs['type'] = 'NX_CHAR' +root['/entry/SNSHistoTool/command1'].attrs['EX_required'] = 'false' + +root['/entry/SNSHistoTool/date'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/SNSHistoTool/date'].attrs['type'] = 'NX_CHAR' +root['/entry/SNSHistoTool/date'].attrs['EX_required'] = 'false' + +root['/entry/SNSHistoTool/description'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/SNSHistoTool/description'].attrs['type'] = 'NX_CHAR' +root['/entry/SNSHistoTool/description'].attrs['EX_required'] = 'false' + +root['/entry/SNSHistoTool/version'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/SNSHistoTool/version'].attrs['type'] = 'NX_CHAR' +root['/entry/SNSHistoTool/version'].attrs['EX_required'] = 'false' + +root['/entry/collection_identifier'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/collection_identifier'].attrs['type'] = 'NX_CHAR' +root['/entry/collection_identifier'].attrs['EX_required'] = 'false' + +root['/entry/collection_title'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/collection_title'].attrs['type'] = 'NX_CHAR' +root['/entry/collection_title'].attrs['EX_required'] = 'false' + +# Valid enumeration values for root['/entry']['definition'] are: +# NXsnsevent + +root['/entry/definition'] = NXfield('NXsnsevent') +root['/entry/definition'].attrs['type'] = 'NX_CHAR' +root['/entry/definition'].attrs['EX_required'] = 'false' + +root['/entry/duration'] = NXfield(1.0) +root['/entry/duration'].attrs['type'] = 'NX_FLOAT' +root['/entry/duration'].attrs['EX_required'] = 'false' +root['/entry/duration'].attrs['units'] = 'NX_TIME' + +root['/entry/end_time'] = NXfield('2022-03-03T14:34:22.583376') +root['/entry/end_time'].attrs['type'] = 'NX_DATE_TIME' +root['/entry/end_time'].attrs['EX_required'] = 'false' + +root['/entry/entry_identifier'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/entry_identifier'].attrs['type'] = 'NX_CHAR' +root['/entry/entry_identifier'].attrs['EX_required'] = 'false' + +root['/entry/experiment_identifier'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/experiment_identifier'].attrs['type'] = 'NX_CHAR' +root['/entry/experiment_identifier'].attrs['EX_required'] = 'false' + +root['/entry/instrument/SNS/frequency'] = NXfield(1.0) +root['/entry/instrument/SNS/frequency'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/SNS/frequency'].attrs['EX_required'] = 'false' +root['/entry/instrument/SNS/frequency'].attrs['units'] = 'NX_FREQUENCY' + +root['/entry/instrument/SNS/name'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/instrument/SNS/name'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/SNS/name'].attrs['EX_required'] = 'false' + +root['/entry/instrument/SNS/probe'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/instrument/SNS/probe'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/SNS/probe'].attrs['EX_required'] = 'false' + +root['/entry/instrument/SNS/type'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/instrument/SNS/type'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/SNS/type'].attrs['EX_required'] = 'false' + +root['/entry/instrument/SNSdetector_calibration_id'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/instrument/SNSdetector_calibration_id'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/SNSdetector_calibration_id'].attrs['EX_required'] = 'false' + +root['/entry/instrument/SNSgeometry_file_name'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/instrument/SNSgeometry_file_name'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/SNSgeometry_file_name'].attrs['EX_required'] = 'false' + +root['/entry/instrument/SNStranslation_service'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/instrument/SNStranslation_service'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/SNStranslation_service'].attrs['EX_required'] = 'false' + +root['/entry/instrument/detector/azimuthal_angle'] = NXfield(1.0) +root['/entry/instrument/detector/azimuthal_angle'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/detector/azimuthal_angle'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector/azimuthal_angle'].attrs['units'] = 'NX_ANGLE' + +root['/entry/instrument/detector/data_x_y'] = NXfield(1) +root['/entry/instrument/detector/data_x_y'].attrs['type'] = 'NX_UINT' +root['/entry/instrument/detector/data_x_y'].attrs['EX_required'] = 'false' + +root['/entry/instrument/detector/distance'] = NXfield(1.0) +root['/entry/instrument/detector/distance'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/detector/distance'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector/distance'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/detector/event_index'] = NXfield(1) +root['/entry/instrument/detector/event_index'].attrs['type'] = 'NX_UINT' +root['/entry/instrument/detector/event_index'].attrs['EX_required'] = 'false' + +root['/entry/instrument/detector/event_pixel_id'] = NXfield(1) +root['/entry/instrument/detector/event_pixel_id'].attrs['type'] = 'NX_UINT' +root['/entry/instrument/detector/event_pixel_id'].attrs['EX_required'] = 'false' + +root['/entry/instrument/detector/event_time_of_flight'] = NXfield(1.0) +root['/entry/instrument/detector/event_time_of_flight'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/detector/event_time_of_flight'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector/event_time_of_flight'].attrs['units'] = 'NX_TIME_OF_FLIGHT' + +root['/entry/instrument/detector/origin/orientation/value'] = NXfield(1.0) +root['/entry/instrument/detector/origin/orientation/value'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/detector/origin/orientation/value'].attrs['EX_required'] = 'false' + +root['/entry/instrument/detector/origin/shape/description'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/instrument/detector/origin/shape/description'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/detector/origin/shape/description'].attrs['EX_required'] = 'false' + +root['/entry/instrument/detector/origin/shape/shape'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/instrument/detector/origin/shape/shape'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/detector/origin/shape/shape'].attrs['EX_required'] = 'false' + +root['/entry/instrument/detector/origin/shape/size'] = NXfield(1.0) +root['/entry/instrument/detector/origin/shape/size'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/detector/origin/shape/size'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector/origin/shape/size'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/detector/origin/translation/distance'] = NXfield(1.0) +root['/entry/instrument/detector/origin/translation/distance'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/detector/origin/translation/distance'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector/origin/translation/distance'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/detector/pixel_id'] = NXfield(1) +root['/entry/instrument/detector/pixel_id'].attrs['type'] = 'NX_UINT' +root['/entry/instrument/detector/pixel_id'].attrs['EX_required'] = 'false' + +root['/entry/instrument/detector/polar_angle'] = NXfield(1.0) +root['/entry/instrument/detector/polar_angle'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/detector/polar_angle'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector/polar_angle'].attrs['units'] = 'NX_ANGLE' + +root['/entry/instrument/detector/pulse_time'] = NXfield(1.0) +root['/entry/instrument/detector/pulse_time'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/detector/pulse_time'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector/pulse_time'].attrs['units'] = 'NX_TIME' + +root['/entry/instrument/detector/total_counts'] = NXfield(1) +root['/entry/instrument/detector/total_counts'].attrs['type'] = 'NX_UINT' +root['/entry/instrument/detector/total_counts'].attrs['EX_required'] = 'false' + +root['/entry/instrument/detector/x_pixel_offset'] = NXfield(1.0) +root['/entry/instrument/detector/x_pixel_offset'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/detector/x_pixel_offset'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector/x_pixel_offset'].attrs['axis'] = '1' +root['/entry/instrument/detector/x_pixel_offset'].attrs['primary'] = '1' +root['/entry/instrument/detector/x_pixel_offset'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/detector/y_pixel_offset'] = NXfield(1.0) +root['/entry/instrument/detector/y_pixel_offset'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/detector/y_pixel_offset'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector/y_pixel_offset'].attrs['axis'] = '2' +root['/entry/instrument/detector/y_pixel_offset'].attrs['primary'] = '1' +root['/entry/instrument/detector/y_pixel_offset'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/beamline'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/instrument/beamline'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/beamline'].attrs['EX_required'] = 'false' + +root['/entry/instrument/NXdisk_chopper/distance'] = NXfield(1.0) +root['/entry/instrument/NXdisk_chopper/distance'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/NXdisk_chopper/distance'].attrs['EX_required'] = 'false' +root['/entry/instrument/NXdisk_chopper/distance'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/moderator/coupling_material'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/instrument/moderator/coupling_material'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/moderator/coupling_material'].attrs['EX_required'] = 'false' + +root['/entry/instrument/moderator/distance'] = NXfield(1.0) +root['/entry/instrument/moderator/distance'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/moderator/distance'].attrs['EX_required'] = 'false' +root['/entry/instrument/moderator/distance'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/moderator/temperature'] = NXfield(1.0) +root['/entry/instrument/moderator/temperature'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/moderator/temperature'].attrs['EX_required'] = 'false' +root['/entry/instrument/moderator/temperature'].attrs['units'] = 'NX_TEMPERATURE' + +root['/entry/instrument/moderator/type'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/instrument/moderator/type'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/moderator/type'].attrs['EX_required'] = 'false' + +root['/entry/instrument/name'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/instrument/name'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/name'].attrs['EX_required'] = 'false' + +root['/entry/instrument/aperture/origin/orientation/value'] = NXfield(1.0) +root['/entry/instrument/aperture/origin/orientation/value'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/aperture/origin/orientation/value'].attrs['EX_required'] = 'false' + +root['/entry/instrument/aperture/origin/shape/description'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/instrument/aperture/origin/shape/description'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/aperture/origin/shape/description'].attrs['EX_required'] = 'false' + +root['/entry/instrument/aperture/origin/shape/shape'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/instrument/aperture/origin/shape/shape'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/aperture/origin/shape/shape'].attrs['EX_required'] = 'false' + +root['/entry/instrument/aperture/origin/shape/size'] = NXfield(1.0) +root['/entry/instrument/aperture/origin/shape/size'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/aperture/origin/shape/size'].attrs['EX_required'] = 'false' +root['/entry/instrument/aperture/origin/shape/size'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/aperture/origin/translation/distance'] = NXfield(1.0) +root['/entry/instrument/aperture/origin/translation/distance'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/aperture/origin/translation/distance'].attrs['EX_required'] = 'false' +root['/entry/instrument/aperture/origin/translation/distance'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/aperture/x_pixel_offset'] = NXfield(1.0) +root['/entry/instrument/aperture/x_pixel_offset'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/aperture/x_pixel_offset'].attrs['EX_required'] = 'false' +root['/entry/instrument/aperture/x_pixel_offset'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/attenuator/distance'] = NXfield(1.0) +root['/entry/instrument/attenuator/distance'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/attenuator/distance'].attrs['EX_required'] = 'false' +root['/entry/instrument/attenuator/distance'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/crystal/origin/description'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/instrument/crystal/origin/description'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/crystal/origin/description'].attrs['EX_required'] = 'false' + +root['/entry/instrument/crystal/origin/orientation/value'] = NXfield(1.0) +root['/entry/instrument/crystal/origin/orientation/value'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/crystal/origin/orientation/value'].attrs['EX_required'] = 'false' + +root['/entry/instrument/crystal/origin/shape/description'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/instrument/crystal/origin/shape/description'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/crystal/origin/shape/description'].attrs['EX_required'] = 'false' + +root['/entry/instrument/crystal/origin/shape/shape'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/instrument/crystal/origin/shape/shape'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/crystal/origin/shape/shape'].attrs['EX_required'] = 'false' + +root['/entry/instrument/crystal/origin/shape/size'] = NXfield(1.0) +root['/entry/instrument/crystal/origin/shape/size'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/crystal/origin/shape/size'].attrs['EX_required'] = 'false' +root['/entry/instrument/crystal/origin/shape/size'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/crystal/origin/translation/distance'] = NXfield(1.0) +root['/entry/instrument/crystal/origin/translation/distance'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/crystal/origin/translation/distance'].attrs['EX_required'] = 'false' +root['/entry/instrument/crystal/origin/translation/distance'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/crystal/type'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/instrument/crystal/type'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/crystal/type'].attrs['EX_required'] = 'false' + +root['/entry/instrument/crystal/wavelength'] = NXfield(1.0) +root['/entry/instrument/crystal/wavelength'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/crystal/wavelength'].attrs['EX_required'] = 'false' +root['/entry/instrument/crystal/wavelength'].attrs['units'] = 'NX_WAVELENGTH' + +root['/entry/monitor/data'] = NXfield(1) +root['/entry/monitor/data'].attrs['type'] = 'NX_UINT' +root['/entry/monitor/data'].attrs['EX_required'] = 'false' + +root['/entry/monitor/distance'] = NXfield(1.0) +root['/entry/monitor/distance'].attrs['type'] = 'NX_FLOAT' +root['/entry/monitor/distance'].attrs['EX_required'] = 'false' +root['/entry/monitor/distance'].attrs['units'] = 'NX_LENGTH' + +root['/entry/monitor/mode'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/monitor/mode'].attrs['type'] = 'NX_CHAR' +root['/entry/monitor/mode'].attrs['EX_required'] = 'false' + +root['/entry/monitor/time_of_flight'] = NXfield(1.0) +root['/entry/monitor/time_of_flight'].attrs['type'] = 'NX_FLOAT' +root['/entry/monitor/time_of_flight'].attrs['EX_required'] = 'false' +root['/entry/monitor/time_of_flight'].attrs['units'] = 'NX_TIME' + +root['/entry/notes'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/notes'].attrs['type'] = 'NX_CHAR' +root['/entry/notes'].attrs['EX_required'] = 'false' + +root['/entry/proton_charge'] = NXfield(1.0) +root['/entry/proton_charge'].attrs['type'] = 'NX_FLOAT' +root['/entry/proton_charge'].attrs['EX_required'] = 'false' +root['/entry/proton_charge'].attrs['units'] = 'NX_CHARGE' + +root['/entry/raw_frames'] = NXfield(1) +root['/entry/raw_frames'].attrs['type'] = 'NX_INT' +root['/entry/raw_frames'].attrs['EX_required'] = 'false' + +root['/entry/run_number'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/run_number'].attrs['type'] = 'NX_CHAR' +root['/entry/run_number'].attrs['EX_required'] = 'false' + +root['/entry/sample/changer_position'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/sample/changer_position'].attrs['type'] = 'NX_CHAR' +root['/entry/sample/changer_position'].attrs['EX_required'] = 'false' + +root['/entry/sample/holder'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/sample/holder'].attrs['type'] = 'NX_CHAR' +root['/entry/sample/holder'].attrs['EX_required'] = 'false' + +root['/entry/sample/identifier'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/sample/identifier'].attrs['type'] = 'NX_CHAR' +root['/entry/sample/identifier'].attrs['EX_required'] = 'false' + +root['/entry/sample/name'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/sample/name'].attrs['type'] = 'NX_CHAR' +root['/entry/sample/name'].attrs['EX_required'] = 'false' + +root['/entry/sample/nature'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/sample/nature'].attrs['type'] = 'NX_CHAR' +root['/entry/sample/nature'].attrs['EX_required'] = 'false' + +root['/entry/start_time'] = NXfield('2022-03-03T14:34:22.708346') +root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' +root['/entry/start_time'].attrs['EX_required'] = 'false' + +root['/entry/title'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/title'].attrs['type'] = 'NX_CHAR' +root['/entry/title'].attrs['EX_required'] = 'false' + +root['/entry/total_counts'] = NXfield(1) +root['/entry/total_counts'].attrs['type'] = 'NX_UINT' +root['/entry/total_counts'].attrs['EX_required'] = 'false' +root['/entry/total_counts'].attrs['units'] = 'NX_UNITLESS' + +root['/entry/total_uncounted_counts'] = NXfield(1) +root['/entry/total_uncounted_counts'].attrs['type'] = 'NX_UINT' +root['/entry/total_uncounted_counts'].attrs['EX_required'] = 'false' +root['/entry/total_uncounted_counts'].attrs['units'] = 'NX_UNITLESS' + +root['/entry/user/facility_user_id'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/user/facility_user_id'].attrs['type'] = 'NX_CHAR' +root['/entry/user/facility_user_id'].attrs['EX_required'] = 'false' + +root['/entry/user/name'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/user/name'].attrs['type'] = 'NX_CHAR' +root['/entry/user/name'].attrs['EX_required'] = 'false' + +root['/entry/user/role'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/user/role'].attrs['type'] = 'NX_CHAR' +root['/entry/user/role'].attrs['EX_required'] = 'false' + +# Create the LINKS +root['/entry/data/data_x_y'] = NXlink(target='/entry/instrument/detector/data_x_y') + +# Create the LINKS +root['/entry/data/x_pixel_offset'] = NXlink(target='/entry/instrument/detector/x_pixel_offset') + +# Create the LINKS +root['/entry/data/y_pixel_offset'] = NXlink(target='/entry/instrument/detector/y_pixel_offset') + +# Create the LINKS +root['/entry/NXevent_data/event_index'] = NXlink(target='/entry/instrument/detector/event_index') + +# Create the LINKS +root['/entry/NXevent_data/event_pixel_id'] = NXlink(target='/entry/instrument/detector/event_pixel_id') + +# Create the LINKS +root['/entry/NXevent_data/event_time_of_flight'] = NXlink(target='/entry/instrument/detector/event_time_of_flight') + +# Create the LINKS +root['/entry/NXevent_data/pulse_time'] = NXlink(target='/entry/instrument/detector/pulse_time') + +# Create the DOC strings +root['/entry/DASlogs'].attrs['EX_doc'] = 'Details of all logs, both from cvinfo file and from HistoTool (frequency and proton_charge). ' +root['/entry/DASlogs/positioner'].attrs['EX_doc'] = 'Motor logs from cvinfo file. ' +root['/entry/SNSHistoTool/command1'].attrs['EX_doc'] = 'Command string for event2nxl. ' +root['/entry/definition'].attrs['EX_doc'] = 'Official NXDL schema after this file goes to applications. ' +root['/entry/instrument/SNSdetector_calibration_id'].attrs['EX_doc'] = 'Detector calibration id from DAS. ' +root['/entry/instrument/detector/data_x_y'].attrs['EX_doc'] = 'expect ``signal=2 axes="x_pixel_offset,y_pixel_offset``" ' +root['/entry/instrument/detector/origin/orientation/value'].attrs['EX_doc'] = 'Six out of nine rotation parameters. ' +root['/entry/instrument/aperture/origin/orientation/value'].attrs['EX_doc'] = 'Six out of nine rotation parameters. ' +root['/entry/instrument/crystal/origin/orientation/value'].attrs['EX_doc'] = 'Six out of nine rotation parameters. ' +root['/entry/monitor/data'].attrs['EX_doc'] = 'expect ``signal=1 axes="time_of_flight"`` ' +root['/entry/sample/name'].attrs['EX_doc'] = 'Descriptive name of sample ' + + +# Create the ATTRIBUTES +root.attrs['default'] = 'entry' +root['/entry/data'].set_default() +root['/entry/data'].attrs['signal'] = 'data_x_y' +root['/entry/data/data_x_y'].attrs['signal'] = '1' + +# Save the file +root.save('NXsnsevent.nxs', 'w') + + diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXsnshisto.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXsnshisto.py new file mode 100644 index 0000000..7364036 --- /dev/null +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXsnshisto.py @@ -0,0 +1,567 @@ + +import numpy as np +from nexusformat.nexus import * + +# Note this example script was generated by nxdl_to_hdf5.py using the current +# installed version of the NEXUS definitions ver[v2020.10] + +root = NXroot() + +# Create the GROUPS +root['/entry'] = NXentry() +root['/entry'].attrs['EX_required'] = 'true' +root['/entry/DASlogs'] = NXcollection() +root['/entry/DASlogs'].attrs['EX_required'] = 'false' +root['/entry/DASlogs/log'] = NXlog() +root['/entry/DASlogs/log'].attrs['EX_required'] = 'true' +root['/entry/DASlogs/positioner'] = NXpositioner() +root['/entry/DASlogs/positioner'].attrs['EX_required'] = 'false' +root['/entry/SNSHistoTool'] = NXnote() +root['/entry/SNSHistoTool'].attrs['EX_required'] = 'false' +root['/entry/data'] = NXdata() +root['/entry/data'].attrs['EX_required'] = 'true' +root['/entry/instrument'] = NXinstrument() +root['/entry/instrument'].attrs['EX_required'] = 'false' +root['/entry/instrument/SNS'] = NXsource() +root['/entry/instrument/SNS'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector'] = NXdetector() +root['/entry/instrument/detector'].attrs['EX_required'] = 'true' +root['/entry/instrument/detector/origin'] = NXgeometry() +root['/entry/instrument/detector/origin'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector/origin/orientation'] = NXorientation() +root['/entry/instrument/detector/origin/orientation'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector/origin/shape'] = NXshape() +root['/entry/instrument/detector/origin/shape'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector/origin/translation'] = NXtranslation() +root['/entry/instrument/detector/origin/translation'].attrs['EX_required'] = 'false' +root['/entry/instrument/NXdisk_chopper'] = NXdisk_chopper() +root['/entry/instrument/NXdisk_chopper'].attrs['EX_required'] = 'false' +root['/entry/instrument/NXfermi_chopper'] = NXfermi_chopper() +root['/entry/instrument/NXfermi_chopper'].attrs['EX_required'] = 'false' +root['/entry/instrument/moderator'] = NXmoderator() +root['/entry/instrument/moderator'].attrs['EX_required'] = 'false' +root['/entry/instrument/aperture'] = NXaperture() +root['/entry/instrument/aperture'].attrs['EX_required'] = 'false' +root['/entry/instrument/aperture/origin'] = NXgeometry() +root['/entry/instrument/aperture/origin'].attrs['EX_required'] = 'false' +root['/entry/instrument/aperture/origin/orientation'] = NXorientation() +root['/entry/instrument/aperture/origin/orientation'].attrs['EX_required'] = 'false' +root['/entry/instrument/aperture/origin/shape'] = NXshape() +root['/entry/instrument/aperture/origin/shape'].attrs['EX_required'] = 'false' +root['/entry/instrument/aperture/origin/translation'] = NXtranslation() +root['/entry/instrument/aperture/origin/translation'].attrs['EX_required'] = 'false' +root['/entry/instrument/attenuator'] = NXattenuator() +root['/entry/instrument/attenuator'].attrs['EX_required'] = 'false' +root['/entry/instrument/polarizer'] = NXpolarizer() +root['/entry/instrument/polarizer'].attrs['EX_required'] = 'false' +root['/entry/instrument/crystal'] = NXcrystal() +root['/entry/instrument/crystal'].attrs['EX_required'] = 'false' +root['/entry/instrument/crystal/origin'] = NXgeometry() +root['/entry/instrument/crystal/origin'].attrs['EX_required'] = 'false' +root['/entry/instrument/crystal/origin/orientation'] = NXorientation() +root['/entry/instrument/crystal/origin/orientation'].attrs['EX_required'] = 'false' +root['/entry/instrument/crystal/origin/shape'] = NXshape() +root['/entry/instrument/crystal/origin/shape'].attrs['EX_required'] = 'false' +root['/entry/instrument/crystal/origin/translation'] = NXtranslation() +root['/entry/instrument/crystal/origin/translation'].attrs['EX_required'] = 'false' +root['/entry/monitor'] = NXmonitor() +root['/entry/monitor'].attrs['EX_required'] = 'false' +root['/entry/sample'] = NXsample() +root['/entry/sample'].attrs['EX_required'] = 'false' +root['/entry/user'] = NXuser() +root['/entry/user'].attrs['EX_required'] = 'true' + +# Create the FIELDS + +root['/entry/DASlogs/log/average_value'] = NXfield(1.0) +root['/entry/DASlogs/log/average_value'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/log/average_value'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/log/average_value_error'] = NXfield(1.0) +root['/entry/DASlogs/log/average_value_error'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/log/average_value_error'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/log/average_value_errors'] = NXfield(1.0) +root['/entry/DASlogs/log/average_value_errors'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/log/average_value_errors'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/log/description'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/DASlogs/log/description'].attrs['type'] = 'NX_CHAR' +root['/entry/DASlogs/log/description'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/log/duration'] = NXfield(1.0) +root['/entry/DASlogs/log/duration'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/log/duration'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/log/maximum_value'] = NXfield(1.0) +root['/entry/DASlogs/log/maximum_value'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/log/maximum_value'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/log/minimum_value'] = NXfield(1.0) +root['/entry/DASlogs/log/minimum_value'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/log/minimum_value'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/log/time'] = NXfield(1.0) +root['/entry/DASlogs/log/time'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/log/time'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/log/value'] = NXfield(1.0) +root['/entry/DASlogs/log/value'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/log/value'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/positioner/average_value'] = NXfield(1.0) +root['/entry/DASlogs/positioner/average_value'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/positioner/average_value'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/positioner/average_value_error'] = NXfield(1.0) +root['/entry/DASlogs/positioner/average_value_error'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/positioner/average_value_error'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/positioner/average_value_errors'] = NXfield(1.0) +root['/entry/DASlogs/positioner/average_value_errors'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/positioner/average_value_errors'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/positioner/description'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/DASlogs/positioner/description'].attrs['type'] = 'NX_CHAR' +root['/entry/DASlogs/positioner/description'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/positioner/duration'] = NXfield(1.0) +root['/entry/DASlogs/positioner/duration'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/positioner/duration'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/positioner/maximum_value'] = NXfield(1.0) +root['/entry/DASlogs/positioner/maximum_value'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/positioner/maximum_value'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/positioner/minimum_value'] = NXfield(1.0) +root['/entry/DASlogs/positioner/minimum_value'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/positioner/minimum_value'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/positioner/time'] = NXfield(1.0) +root['/entry/DASlogs/positioner/time'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/positioner/time'].attrs['EX_required'] = 'false' + +root['/entry/DASlogs/positioner/value'] = NXfield(1.0) +root['/entry/DASlogs/positioner/value'].attrs['type'] = 'NX_FLOAT' +root['/entry/DASlogs/positioner/value'].attrs['EX_required'] = 'false' + +root['/entry/SNSHistoTool/SNSbanking_file_name'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/SNSHistoTool/SNSbanking_file_name'].attrs['type'] = 'NX_CHAR' +root['/entry/SNSHistoTool/SNSbanking_file_name'].attrs['EX_required'] = 'false' + +root['/entry/SNSHistoTool/SNSmapping_file_name'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/SNSHistoTool/SNSmapping_file_name'].attrs['type'] = 'NX_CHAR' +root['/entry/SNSHistoTool/SNSmapping_file_name'].attrs['EX_required'] = 'false' + +root['/entry/SNSHistoTool/author'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/SNSHistoTool/author'].attrs['type'] = 'NX_CHAR' +root['/entry/SNSHistoTool/author'].attrs['EX_required'] = 'false' + +root['/entry/SNSHistoTool/command1'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/SNSHistoTool/command1'].attrs['type'] = 'NX_CHAR' +root['/entry/SNSHistoTool/command1'].attrs['EX_required'] = 'false' + +root['/entry/SNSHistoTool/date'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/SNSHistoTool/date'].attrs['type'] = 'NX_CHAR' +root['/entry/SNSHistoTool/date'].attrs['EX_required'] = 'false' + +root['/entry/SNSHistoTool/description'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/SNSHistoTool/description'].attrs['type'] = 'NX_CHAR' +root['/entry/SNSHistoTool/description'].attrs['EX_required'] = 'false' + +root['/entry/SNSHistoTool/version'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/SNSHistoTool/version'].attrs['type'] = 'NX_CHAR' +root['/entry/SNSHistoTool/version'].attrs['EX_required'] = 'false' + +root['/entry/collection_identifier'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/collection_identifier'].attrs['type'] = 'NX_CHAR' +root['/entry/collection_identifier'].attrs['EX_required'] = 'false' + +root['/entry/collection_title'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/collection_title'].attrs['type'] = 'NX_CHAR' +root['/entry/collection_title'].attrs['EX_required'] = 'false' + +# Valid enumeration values for root['/entry']['definition'] are: +# NXsnshisto + +root['/entry/definition'] = NXfield('NXsnshisto') +root['/entry/definition'].attrs['type'] = 'NX_CHAR' +root['/entry/definition'].attrs['EX_required'] = 'false' + +root['/entry/duration'] = NXfield(1.0) +root['/entry/duration'].attrs['type'] = 'NX_FLOAT' +root['/entry/duration'].attrs['EX_required'] = 'false' +root['/entry/duration'].attrs['units'] = 'NX_TIME' + +root['/entry/end_time'] = NXfield('2022-03-03T14:34:23.341632') +root['/entry/end_time'].attrs['type'] = 'NX_DATE_TIME' +root['/entry/end_time'].attrs['EX_required'] = 'false' + +root['/entry/entry_identifier'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/entry_identifier'].attrs['type'] = 'NX_CHAR' +root['/entry/entry_identifier'].attrs['EX_required'] = 'false' + +root['/entry/experiment_identifier'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/experiment_identifier'].attrs['type'] = 'NX_CHAR' +root['/entry/experiment_identifier'].attrs['EX_required'] = 'false' + +root['/entry/instrument/SNS/frequency'] = NXfield(1.0) +root['/entry/instrument/SNS/frequency'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/SNS/frequency'].attrs['EX_required'] = 'false' +root['/entry/instrument/SNS/frequency'].attrs['units'] = 'NX_FREQUENCY' + +root['/entry/instrument/SNS/name'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/instrument/SNS/name'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/SNS/name'].attrs['EX_required'] = 'false' + +root['/entry/instrument/SNS/probe'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/instrument/SNS/probe'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/SNS/probe'].attrs['EX_required'] = 'false' + +root['/entry/instrument/SNS/type'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/instrument/SNS/type'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/SNS/type'].attrs['EX_required'] = 'false' + +root['/entry/instrument/SNSdetector_calibration_id'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/instrument/SNSdetector_calibration_id'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/SNSdetector_calibration_id'].attrs['EX_required'] = 'false' + +root['/entry/instrument/SNSgeometry_file_name'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/instrument/SNSgeometry_file_name'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/SNSgeometry_file_name'].attrs['EX_required'] = 'false' + +root['/entry/instrument/SNStranslation_service'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/instrument/SNStranslation_service'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/SNStranslation_service'].attrs['EX_required'] = 'false' + +root['/entry/instrument/detector/azimuthal_angle'] = NXfield(1.0) +root['/entry/instrument/detector/azimuthal_angle'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/detector/azimuthal_angle'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector/azimuthal_angle'].attrs['units'] = 'NX_ANGLE' + +root['/entry/instrument/detector/data'] = NXfield(1) +root['/entry/instrument/detector/data'].attrs['type'] = 'NX_UINT' +root['/entry/instrument/detector/data'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector/data'].attrs['axes'] = 'x_pixel_offset,y_pixel_offset,time_of_flight' +root['/entry/instrument/detector/data'].attrs['signal'] = '1' + +root['/entry/instrument/detector/data_x_time_of_flight'] = NXfield(1) +root['/entry/instrument/detector/data_x_time_of_flight'].attrs['type'] = 'NX_UINT' +root['/entry/instrument/detector/data_x_time_of_flight'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector/data_x_time_of_flight'].attrs['axes'] = 'x_pixel_offset,time_of_flight' +root['/entry/instrument/detector/data_x_time_of_flight'].attrs['signal'] = '3' + +root['/entry/instrument/detector/data_x_y'] = NXfield(1) +root['/entry/instrument/detector/data_x_y'].attrs['type'] = 'NX_UINT' +root['/entry/instrument/detector/data_x_y'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector/data_x_y'].attrs['axes'] = 'x_pixel_offset,y_pixel_offset' +root['/entry/instrument/detector/data_x_y'].attrs['signal'] = '2' + +root['/entry/instrument/detector/data_y_time_of_flight'] = NXfield(1) +root['/entry/instrument/detector/data_y_time_of_flight'].attrs['type'] = 'NX_UINT' +root['/entry/instrument/detector/data_y_time_of_flight'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector/data_y_time_of_flight'].attrs['axes'] = 'y_pixel_offset,time_of_flight' +root['/entry/instrument/detector/data_y_time_of_flight'].attrs['signal'] = '4' + +root['/entry/instrument/detector/distance'] = NXfield(1.0) +root['/entry/instrument/detector/distance'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/detector/distance'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector/distance'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/detector/origin/orientation/value'] = NXfield(1.0) +root['/entry/instrument/detector/origin/orientation/value'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/detector/origin/orientation/value'].attrs['EX_required'] = 'false' + +root['/entry/instrument/detector/origin/shape/description'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/instrument/detector/origin/shape/description'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/detector/origin/shape/description'].attrs['EX_required'] = 'false' + +root['/entry/instrument/detector/origin/shape/shape'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/instrument/detector/origin/shape/shape'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/detector/origin/shape/shape'].attrs['EX_required'] = 'false' + +root['/entry/instrument/detector/origin/shape/size'] = NXfield(1.0) +root['/entry/instrument/detector/origin/shape/size'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/detector/origin/shape/size'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector/origin/shape/size'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/detector/origin/translation/distance'] = NXfield(1.0) +root['/entry/instrument/detector/origin/translation/distance'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/detector/origin/translation/distance'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector/origin/translation/distance'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/detector/pixel_id'] = NXfield(1) +root['/entry/instrument/detector/pixel_id'].attrs['type'] = 'NX_UINT' +root['/entry/instrument/detector/pixel_id'].attrs['EX_required'] = 'false' + +root['/entry/instrument/detector/polar_angle'] = NXfield(1.0) +root['/entry/instrument/detector/polar_angle'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/detector/polar_angle'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector/polar_angle'].attrs['units'] = 'NX_ANGLE' + +root['/entry/instrument/detector/time_of_flight'] = NXfield(1.0) +root['/entry/instrument/detector/time_of_flight'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/detector/time_of_flight'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector/time_of_flight'].attrs['axis'] = '3' +root['/entry/instrument/detector/time_of_flight'].attrs['primary'] = '1' +root['/entry/instrument/detector/time_of_flight'].attrs['units'] = 'NX_TIME_OF_FLIGHT' + +root['/entry/instrument/detector/total_counts'] = NXfield(1) +root['/entry/instrument/detector/total_counts'].attrs['type'] = 'NX_UINT' +root['/entry/instrument/detector/total_counts'].attrs['EX_required'] = 'false' + +root['/entry/instrument/detector/x_pixel_offset'] = NXfield(1.0) +root['/entry/instrument/detector/x_pixel_offset'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/detector/x_pixel_offset'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector/x_pixel_offset'].attrs['axis'] = '1' +root['/entry/instrument/detector/x_pixel_offset'].attrs['primary'] = '1' +root['/entry/instrument/detector/x_pixel_offset'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/detector/y_pixel_offset'] = NXfield(1.0) +root['/entry/instrument/detector/y_pixel_offset'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/detector/y_pixel_offset'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector/y_pixel_offset'].attrs['axis'] = '2' +root['/entry/instrument/detector/y_pixel_offset'].attrs['primary'] = '1' +root['/entry/instrument/detector/y_pixel_offset'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/beamline'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/instrument/beamline'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/beamline'].attrs['EX_required'] = 'false' + +root['/entry/instrument/NXdisk_chopper/distance'] = NXfield(1.0) +root['/entry/instrument/NXdisk_chopper/distance'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/NXdisk_chopper/distance'].attrs['EX_required'] = 'false' +root['/entry/instrument/NXdisk_chopper/distance'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/NXfermi_chopper/distance'] = NXfield(1.0) +root['/entry/instrument/NXfermi_chopper/distance'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/NXfermi_chopper/distance'].attrs['EX_required'] = 'false' +root['/entry/instrument/NXfermi_chopper/distance'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/moderator/coupling_material'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/instrument/moderator/coupling_material'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/moderator/coupling_material'].attrs['EX_required'] = 'false' + +root['/entry/instrument/moderator/distance'] = NXfield(1.0) +root['/entry/instrument/moderator/distance'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/moderator/distance'].attrs['EX_required'] = 'false' +root['/entry/instrument/moderator/distance'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/moderator/temperature'] = NXfield(1.0) +root['/entry/instrument/moderator/temperature'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/moderator/temperature'].attrs['EX_required'] = 'false' +root['/entry/instrument/moderator/temperature'].attrs['units'] = 'NX_TEMPERATURE' + +root['/entry/instrument/moderator/type'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/instrument/moderator/type'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/moderator/type'].attrs['EX_required'] = 'false' + +root['/entry/instrument/name'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/instrument/name'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/name'].attrs['EX_required'] = 'false' + +root['/entry/instrument/aperture/origin/orientation/value'] = NXfield(1.0) +root['/entry/instrument/aperture/origin/orientation/value'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/aperture/origin/orientation/value'].attrs['EX_required'] = 'false' + +root['/entry/instrument/aperture/origin/shape/description'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/instrument/aperture/origin/shape/description'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/aperture/origin/shape/description'].attrs['EX_required'] = 'false' + +root['/entry/instrument/aperture/origin/shape/shape'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/instrument/aperture/origin/shape/shape'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/aperture/origin/shape/shape'].attrs['EX_required'] = 'false' + +root['/entry/instrument/aperture/origin/shape/size'] = NXfield(1.0) +root['/entry/instrument/aperture/origin/shape/size'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/aperture/origin/shape/size'].attrs['EX_required'] = 'false' +root['/entry/instrument/aperture/origin/shape/size'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/aperture/origin/translation/distance'] = NXfield(1.0) +root['/entry/instrument/aperture/origin/translation/distance'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/aperture/origin/translation/distance'].attrs['EX_required'] = 'false' +root['/entry/instrument/aperture/origin/translation/distance'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/aperture/x_pixel_offset'] = NXfield(1.0) +root['/entry/instrument/aperture/x_pixel_offset'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/aperture/x_pixel_offset'].attrs['EX_required'] = 'false' +root['/entry/instrument/aperture/x_pixel_offset'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/attenuator/distance'] = NXfield(1.0) +root['/entry/instrument/attenuator/distance'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/attenuator/distance'].attrs['EX_required'] = 'false' +root['/entry/instrument/attenuator/distance'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/crystal/origin/description'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/instrument/crystal/origin/description'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/crystal/origin/description'].attrs['EX_required'] = 'false' + +root['/entry/instrument/crystal/origin/orientation/value'] = NXfield(1.0) +root['/entry/instrument/crystal/origin/orientation/value'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/crystal/origin/orientation/value'].attrs['EX_required'] = 'false' + +root['/entry/instrument/crystal/origin/shape/description'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/instrument/crystal/origin/shape/description'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/crystal/origin/shape/description'].attrs['EX_required'] = 'false' + +root['/entry/instrument/crystal/origin/shape/shape'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/instrument/crystal/origin/shape/shape'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/crystal/origin/shape/shape'].attrs['EX_required'] = 'false' + +root['/entry/instrument/crystal/origin/shape/size'] = NXfield(1.0) +root['/entry/instrument/crystal/origin/shape/size'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/crystal/origin/shape/size'].attrs['EX_required'] = 'false' +root['/entry/instrument/crystal/origin/shape/size'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/crystal/origin/translation/distance'] = NXfield(1.0) +root['/entry/instrument/crystal/origin/translation/distance'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/crystal/origin/translation/distance'].attrs['EX_required'] = 'false' +root['/entry/instrument/crystal/origin/translation/distance'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/crystal/type'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/instrument/crystal/type'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/crystal/type'].attrs['EX_required'] = 'false' + +root['/entry/instrument/crystal/wavelength'] = NXfield(1.0) +root['/entry/instrument/crystal/wavelength'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/crystal/wavelength'].attrs['EX_required'] = 'false' +root['/entry/instrument/crystal/wavelength'].attrs['units'] = 'NX_WAVELENGTH' + +root['/entry/monitor/data'] = NXfield(1) +root['/entry/monitor/data'].attrs['type'] = 'NX_UINT' +root['/entry/monitor/data'].attrs['EX_required'] = 'false' +root['/entry/monitor/data'].attrs['axes'] = 'time_of_flight' +root['/entry/monitor/data'].attrs['signal'] = '1' + +root['/entry/monitor/distance'] = NXfield(1.0) +root['/entry/monitor/distance'].attrs['type'] = 'NX_FLOAT' +root['/entry/monitor/distance'].attrs['EX_required'] = 'false' +root['/entry/monitor/distance'].attrs['units'] = 'NX_LENGTH' + +root['/entry/monitor/mode'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/monitor/mode'].attrs['type'] = 'NX_CHAR' +root['/entry/monitor/mode'].attrs['EX_required'] = 'false' + +root['/entry/monitor/time_of_flight'] = NXfield(1.0) +root['/entry/monitor/time_of_flight'].attrs['type'] = 'NX_FLOAT' +root['/entry/monitor/time_of_flight'].attrs['EX_required'] = 'false' +root['/entry/monitor/time_of_flight'].attrs['units'] = 'NX_TIME' + +root['/entry/notes'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/notes'].attrs['type'] = 'NX_CHAR' +root['/entry/notes'].attrs['EX_required'] = 'false' + +root['/entry/proton_charge'] = NXfield(1.0) +root['/entry/proton_charge'].attrs['type'] = 'NX_FLOAT' +root['/entry/proton_charge'].attrs['EX_required'] = 'false' +root['/entry/proton_charge'].attrs['units'] = 'NX_CHARGE' + +root['/entry/raw_frames'] = NXfield(1) +root['/entry/raw_frames'].attrs['type'] = 'NX_INT' +root['/entry/raw_frames'].attrs['EX_required'] = 'false' + +root['/entry/run_number'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/run_number'].attrs['type'] = 'NX_CHAR' +root['/entry/run_number'].attrs['EX_required'] = 'false' + +root['/entry/sample/changer_position'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/sample/changer_position'].attrs['type'] = 'NX_CHAR' +root['/entry/sample/changer_position'].attrs['EX_required'] = 'false' + +root['/entry/sample/holder'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/sample/holder'].attrs['type'] = 'NX_CHAR' +root['/entry/sample/holder'].attrs['EX_required'] = 'false' + +root['/entry/sample/identifier'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/sample/identifier'].attrs['type'] = 'NX_CHAR' +root['/entry/sample/identifier'].attrs['EX_required'] = 'false' + +root['/entry/sample/name'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/sample/name'].attrs['type'] = 'NX_CHAR' +root['/entry/sample/name'].attrs['EX_required'] = 'false' + +root['/entry/sample/nature'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/sample/nature'].attrs['type'] = 'NX_CHAR' +root['/entry/sample/nature'].attrs['EX_required'] = 'false' + +root['/entry/start_time'] = NXfield('2022-03-03T14:34:23.435329') +root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' +root['/entry/start_time'].attrs['EX_required'] = 'false' + +root['/entry/title'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/title'].attrs['type'] = 'NX_CHAR' +root['/entry/title'].attrs['EX_required'] = 'false' + +root['/entry/total_counts'] = NXfield(1) +root['/entry/total_counts'].attrs['type'] = 'NX_UINT' +root['/entry/total_counts'].attrs['EX_required'] = 'false' +root['/entry/total_counts'].attrs['units'] = 'NX_UNITLESS' + +root['/entry/total_uncounted_counts'] = NXfield(1) +root['/entry/total_uncounted_counts'].attrs['type'] = 'NX_UINT' +root['/entry/total_uncounted_counts'].attrs['EX_required'] = 'false' +root['/entry/total_uncounted_counts'].attrs['units'] = 'NX_UNITLESS' + +root['/entry/user/facility_user_id'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/user/facility_user_id'].attrs['type'] = 'NX_CHAR' +root['/entry/user/facility_user_id'].attrs['EX_required'] = 'false' + +root['/entry/user/name'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/user/name'].attrs['type'] = 'NX_CHAR' +root['/entry/user/name'].attrs['EX_required'] = 'false' + +root['/entry/user/role'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/user/role'].attrs['type'] = 'NX_CHAR' +root['/entry/user/role'].attrs['EX_required'] = 'false' + +# Create the LINKS +root['/entry/data/data'] = NXlink(target='/entry/instrument/detector/data') + +# Create the LINKS +root['/entry/data/data_x_time_of_flight'] = NXlink(target='/entry/instrument/detector/data_x_time_of_flight') + +# Create the LINKS +root['/entry/data/data_x_y'] = NXlink(target='/entry/instrument/detector/data_x_y') + +# Create the LINKS +root['/entry/data/data_y_time_of_flight'] = NXlink(target='/entry/instrument/detector/data_y_time_of_flight') + +# Create the LINKS +root['/entry/data/pixel_id'] = NXlink(target='/entry/instrument/detector/pixel_id') + +# Create the LINKS +root['/entry/data/time_of_flight'] = NXlink(target='/entry/instrument/detector/time_of_flight') + +# Create the LINKS +root['/entry/data/total_counts'] = NXlink(target='/entry/instrument/detector/total_counts') + +# Create the LINKS +root['/entry/data/x_pixel_offset'] = NXlink(target='/entry/instrument/detector/x_pixel_offset') + +# Create the LINKS +root['/entry/data/y_pixel_offset'] = NXlink(target='/entry/instrument/detector/y_pixel_offset') + +# Create the DOC strings +root['/entry/DASlogs'].attrs['EX_doc'] = 'Details of all logs, both from cvinfo file and from HistoTool (frequency and proton_charge). ' +root['/entry/DASlogs/positioner'].attrs['EX_doc'] = 'Motor logs from cvinfo file. ' +root['/entry/SNSHistoTool/command1'].attrs['EX_doc'] = 'Command string for event2histo_nxl. ' +root['/entry/definition'].attrs['EX_doc'] = 'Official NXDL schema after this file goes to applications. ' +root['/entry/instrument/SNSdetector_calibration_id'].attrs['EX_doc'] = 'Detector calibration id from DAS. ' +root['/entry/instrument/detector/origin/orientation/value'].attrs['EX_doc'] = 'Six out of nine rotation parameters. ' +root['/entry/instrument/NXdisk_chopper'].attrs['EX_doc'] = 'Original specification called for NXchopper, which is not a valid NeXus base class. Select either NXdisk_chopper or NXfermi_chopper, as appropriate. ' +root['/entry/instrument/NXfermi_chopper'].attrs['EX_doc'] = 'Original specification called for NXchopper, which is not a valid NeXus base class. Select either NXdisk_chopper or NXfermi_chopper, as appropriate. ' +root['/entry/instrument/aperture/origin/orientation/value'].attrs['EX_doc'] = 'Six out of nine rotation parameters. ' +root['/entry/instrument/crystal/origin/orientation/value'].attrs['EX_doc'] = 'Six out of nine rotation parameters. ' +root['/entry/sample/name'].attrs['EX_doc'] = 'Descriptive name of sample ' + + +# Create the ATTRIBUTES +root.attrs['default'] = 'entry' +root['/entry/data'].set_default() +root['/entry/data'].attrs['signal'] = 'data' +root['/entry/data/data'].attrs['signal'] = '1' + +# Save the file +root.save('NXsnshisto.nxs', 'w') + + diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXspecdata.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXspecdata.py new file mode 100644 index 0000000..2915d65 --- /dev/null +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXspecdata.py @@ -0,0 +1,268 @@ + +import numpy as np +from nexusformat.nexus import * + +# Note this example script was generated by nxdl_to_hdf5.py using the current +# installed version of the NEXUS definitions ver[v2020.10] + +root = NXroot() + +# Create the GROUPS +root['/entry'] = NXentry() +root['/entry'].attrs['EX_required'] = 'false' +root['/entry/monitor'] = NXmonitor() +root['/entry/monitor'].attrs['EX_required'] = 'false' +root['/entry/data'] = NXdata() +root['/entry/data'].attrs['EX_required'] = 'false' +root['/entry/counter_cross_reference'] = NXnote() +root['/entry/counter_cross_reference'].attrs['EX_required'] = 'false' +root['/entry/positioner_cross_reference'] = NXnote() +root['/entry/positioner_cross_reference'].attrs['EX_required'] = 'false' +root['/entry/spec'] = NXinstrument() +root['/entry/spec'].attrs['EX_required'] = 'false' +root['/entry/spec/UB'] = NXcrystal() +root['/entry/spec/UB'].attrs['EX_required'] = 'false' +root['/entry/G'] = NXnote() +root['/entry/G'].attrs['EX_required'] = 'false' +root['/entry/positioners'] = NXnote() +root['/entry/positioners'].attrs['EX_required'] = 'false' +root['/entry/MCA'] = NXnote() +root['/entry/MCA'].attrs['EX_required'] = 'false' +root['/entry/MCA/ROI'] = NXnote() +root['/entry/MCA/ROI'].attrs['EX_required'] = 'false' +root['/entry/metadata'] = NXnote() +root['/entry/metadata'].attrs['EX_required'] = 'false' +root['/entry/SPEC_user'] = NXuser() +root['/entry/SPEC_user'].attrs['EX_required'] = 'false' +root['/entry/_unrecognized'] = NXnote() +root['/entry/_unrecognized'].attrs['EX_required'] = 'false' + +# Create the FIELDS + +# Valid enumeration values for root['/entry']['definition'] are: +# NXspecdata + +root['/entry/definition'] = NXfield('NXspecdata') +root['/entry/definition'].attrs['type'] = 'NX_CHAR' +root['/entry/definition'].attrs['EX_required'] = 'false' + +root['/entry/scan_number'] = NXfield(1.0) +root['/entry/scan_number'].attrs['type'] = 'NX_NUMBER' +root['/entry/scan_number'].attrs['EX_required'] = 'false' + +root['/entry/title'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/title'].attrs['type'] = 'NX_CHAR' +root['/entry/title'].attrs['EX_required'] = 'false' + +root['/entry/command'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/command'].attrs['type'] = 'NX_CHAR' +root['/entry/command'].attrs['EX_required'] = 'false' + +root['/entry/date'] = NXfield('2022-03-03T14:34:23.779539') +root['/entry/date'].attrs['type'] = 'NX_DATE_TIME' +root['/entry/date'].attrs['EX_required'] = 'false' + +# Valid enumeration values for root['/entry/monitor']['mode'] are: +# monitor +# timer + +root['/entry/monitor/mode'] = NXfield('monitor') +root['/entry/monitor/mode'].attrs['type'] = 'NX_CHAR' +root['/entry/monitor/mode'].attrs['EX_required'] = 'false' + +root['/entry/monitor/preset'] = NXfield(1.0) +root['/entry/monitor/preset'].attrs['type'] = 'NX_NUMBER' +root['/entry/monitor/preset'].attrs['EX_required'] = 'false' + +root['/entry/monitor/data'] = NXfield(1.0) +root['/entry/monitor/data'].attrs['type'] = 'NX_NUMBER' +root['/entry/monitor/data'].attrs['EX_required'] = 'false' +root['/entry/monitor/data'].attrs['nameType'] = 'any' + +root['/entry/monitor/count_time'] = NXfield(1.0) +root['/entry/monitor/count_time'].attrs['type'] = 'NX_NUMBER' +root['/entry/monitor/count_time'].attrs['EX_required'] = 'false' +root['/entry/monitor/count_time'].attrs['nameType'] = 'any' + +root['/entry/comments'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/comments'].attrs['type'] = 'NX_CHAR' +root['/entry/comments'].attrs['EX_required'] = 'false' + +root['/entry/Q'] = NXfield(1.0) +root['/entry/Q'].attrs['type'] = 'NX_NUMBER' +root['/entry/Q'].attrs['EX_required'] = 'false' + +root['/entry/TEMP_SP'] = NXfield(1.0) +root['/entry/TEMP_SP'].attrs['type'] = 'NX_NUMBER' +root['/entry/TEMP_SP'].attrs['EX_required'] = 'false' + +root['/entry/DEGC_SP'] = NXfield(1.0) +root['/entry/DEGC_SP'].attrs['type'] = 'NX_NUMBER' +root['/entry/DEGC_SP'].attrs['EX_required'] = 'false' + +root['/entry/data/data'] = NXfield(1.0) +root['/entry/data/data'].attrs['type'] = 'NX_NUMBER' +root['/entry/data/data'].attrs['EX_required'] = 'false' +root['/entry/data/data'].attrs['nameType'] = 'any' + +root['/entry/data/intensity_factor'] = NXfield(1.0) +root['/entry/data/intensity_factor'].attrs['type'] = 'NX_NUMBER' +root['/entry/data/intensity_factor'].attrs['EX_required'] = 'false' + +root['/entry/data/_mca_'] = NXfield(1.0) +root['/entry/data/_mca_'].attrs['type'] = 'NX_NUMBER' +root['/entry/data/_mca_'].attrs['EX_required'] = 'false' + +root['/entry/data/_mca_channel_'] = NXfield(1.0) +root['/entry/data/_mca_channel_'].attrs['type'] = 'NX_NUMBER' +root['/entry/data/_mca_channel_'].attrs['EX_required'] = 'false' + +root['/entry/data/_mca1_'] = NXfield(1.0) +root['/entry/data/_mca1_'].attrs['type'] = 'NX_NUMBER' +root['/entry/data/_mca1_'].attrs['EX_required'] = 'false' + +root['/entry/data/_mca1_channel_'] = NXfield(1.0) +root['/entry/data/_mca1_channel_'].attrs['type'] = 'NX_NUMBER' +root['/entry/data/_mca1_channel_'].attrs['EX_required'] = 'false' + +root['/entry/spec/UB/orientation_matrix'] = NXfield(1.0) +root['/entry/spec/UB/orientation_matrix'].attrs['type'] = 'NX_FLOAT' +root['/entry/spec/UB/orientation_matrix'].attrs['EX_required'] = 'false' + +root['/entry/G/G0'] = NXfield(1.0) +root['/entry/G/G0'].attrs['type'] = 'NX_NUMBER' +root['/entry/G/G0'].attrs['EX_required'] = 'false' + +root['/entry/G/G1'] = NXfield(1.0) +root['/entry/G/G1'].attrs['type'] = 'NX_NUMBER' +root['/entry/G/G1'].attrs['EX_required'] = 'false' + +root['/entry/G/G2'] = NXfield(1.0) +root['/entry/G/G2'].attrs['type'] = 'NX_NUMBER' +root['/entry/G/G2'].attrs['EX_required'] = 'false' + +root['/entry/G/G4'] = NXfield(1.0) +root['/entry/G/G4'].attrs['type'] = 'NX_NUMBER' +root['/entry/G/G4'].attrs['EX_required'] = 'false' + +root['/entry/positioners/positioner'] = NXfield(1.0) +root['/entry/positioners/positioner'].attrs['type'] = 'NX_NUMBER' +root['/entry/positioners/positioner'].attrs['EX_required'] = 'false' +root['/entry/positioners/positioner'].attrs['nameType'] = 'any' + +root['/entry/MCA/preset_time'] = NXfield(1.0) +root['/entry/MCA/preset_time'].attrs['type'] = 'NX_NUMBER' +root['/entry/MCA/preset_time'].attrs['EX_required'] = 'false' + +root['/entry/MCA/elapsed_live_time'] = NXfield(1.0) +root['/entry/MCA/elapsed_live_time'].attrs['type'] = 'NX_NUMBER' +root['/entry/MCA/elapsed_live_time'].attrs['EX_required'] = 'false' + +root['/entry/MCA/elapsed_real_time'] = NXfield(1.0) +root['/entry/MCA/elapsed_real_time'].attrs['type'] = 'NX_NUMBER' +root['/entry/MCA/elapsed_real_time'].attrs['EX_required'] = 'false' + +root['/entry/MCA/number_saved'] = NXfield(1.0) +root['/entry/MCA/number_saved'].attrs['type'] = 'NX_NUMBER' +root['/entry/MCA/number_saved'].attrs['EX_required'] = 'false' + +root['/entry/MCA/first_saved'] = NXfield(1) +root['/entry/MCA/first_saved'].attrs['type'] = 'NX_INT' +root['/entry/MCA/first_saved'].attrs['EX_required'] = 'false' + +root['/entry/MCA/last_saved'] = NXfield(1) +root['/entry/MCA/last_saved'].attrs['type'] = 'NX_INT' +root['/entry/MCA/last_saved'].attrs['EX_required'] = 'false' + +root['/entry/MCA/reduction_coef'] = NXfield(1.0) +root['/entry/MCA/reduction_coef'].attrs['type'] = 'NX_NUMBER' +root['/entry/MCA/reduction_coef'].attrs['EX_required'] = 'false' + +root['/entry/MCA/calib_a'] = NXfield(1.0) +root['/entry/MCA/calib_a'].attrs['type'] = 'NX_NUMBER' +root['/entry/MCA/calib_a'].attrs['EX_required'] = 'false' + +root['/entry/MCA/calib_b'] = NXfield(1.0) +root['/entry/MCA/calib_b'].attrs['type'] = 'NX_NUMBER' +root['/entry/MCA/calib_b'].attrs['EX_required'] = 'false' + +root['/entry/MCA/calib_c'] = NXfield(1.0) +root['/entry/MCA/calib_c'].attrs['type'] = 'NX_NUMBER' +root['/entry/MCA/calib_c'].attrs['EX_required'] = 'false' + +root['/entry/MCA/ROI/roiN'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/MCA/ROI/roiN'].attrs['type'] = 'NX_CHAR' +root['/entry/MCA/ROI/roiN'].attrs['EX_required'] = 'false' + +root['/entry/SPEC_user/SPEC_user'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/SPEC_user/SPEC_user'].attrs['type'] = 'NX_CHAR' +root['/entry/SPEC_user/SPEC_user'].attrs['EX_required'] = 'false' + +# Create the DOC strings +root['/entry'].attrs['EX_doc'] = 'one scan from a SPEC data file, starts with a **#S** line ' +root['/entry/definition'].attrs['EX_doc'] = 'Official NeXus NXDL schema to which this subentry conforms. ' +root['/entry/scan_number'].attrs['EX_doc'] = 'SPEC scan number ' +root['/entry/title'].attrs['EX_doc'] = 'SPEC scan number and command, from **#S** line SPEC data file line:: #S 1 cscan en 690 750 60 0 *title*:: 1 cscan en 690 750 60 0 ' +root['/entry/command'].attrs['EX_doc'] = 'SPEC scan command, from **#S** line, after the scan number. :SPEC data file line: ``#S 1 cscan en 690 750 60 0`` :command*: ``cscan en 690 750 60 0`` ' +root['/entry/date'].attrs['EX_doc'] = 'date from **#D** line in scan header, in ISO8601 format ' +root['/entry/monitor/mode'].attrs['EX_doc'] = 'Count to a preset value based on either clock time (timer) or received monitor counts (monitor). ' +root['/entry/monitor/preset'].attrs['EX_doc'] = 'preset value for time or monitor * **#M** -- counting against this constant monitor count (see #T) * **#T** -- counting against this constant number of seconds (see #M) ' +root['/entry/monitor/data'].attrs['EX_doc'] = 'array(s) of monitor data ' +root['/entry/monitor/count_time'].attrs['EX_doc'] = 'array(s) of monitor data ' +root['/entry/comments'].attrs['EX_doc'] = 'Any **#C** lines in this scan, stored as one string with newlines between comments ' +root['/entry/Q'].attrs['EX_doc'] = '**#Q** -- :math:`Q` (:math:`hkl`) at start of scan array of [:math:`h` :math:`k` :math:`l`] ' +root['/entry/TEMP_SP'].attrs['EX_doc'] = '**#X** -- temperature set point ' +root['/entry/DEGC_SP'].attrs['EX_doc'] = '**#X** -- temperature set point (C) ' +root['/entry/data'].attrs['EX_doc'] = 'detector (and MCA) data from this scan ' +root['/entry/data/data'].attrs['EX_doc'] = 'one column of data from the scan HDF5 requires that each member of a group must have a unique name. Pick the name of column from **#L** but make it unique which means if the same name is used in more than one column, append a number to the extra instances to make them unique yet preserve their content, just in case they might be different. Example: ``seconds seconds`` becomes ``seconds`` and ``seconda_1``. ' +root['/entry/data/intensity_factor'].attrs['EX_doc'] = '**#I** -- intensity normalizing factor ' +root['/entry/counter_cross_reference'].attrs['EX_doc'] = 'associates values declared in **#J** and **#j** scan header lines ' +root['/entry/positioner_cross_reference'].attrs['EX_doc'] = 'associates values declared in **#O** and **#o** scan header lines ' +root['/entry/spec'].attrs['EX_doc'] = 'various metadata from the SPEC scan header that have well-known NeXus base clases ' +root['/entry/spec/UB'].attrs['EX_doc'] = 'Orientation matrix of single crystal sample using Busing-Levy convention ' +root['/entry/spec/UB/orientation_matrix'].attrs['EX_doc'] = '**#G3** line in scan header ' +root['/entry/G'].attrs['EX_doc'] = 'SPEC geometry variables for this diffractometer geometry (instrument specific) TODO: give interpreted name for each array value (need to figure out how to get the names) ' +root['/entry/G/G0'].attrs['EX_doc'] = 'geometry parameters from G[] array (geo mode, sector, etc) ' +root['/entry/G/G1'].attrs['EX_doc'] = 'geometry parameters from U[] array (lattice constants, orientation reflections) ' +root['/entry/G/G2'].attrs['EX_doc'] = 'not used, although some files has a single zero value ' +root['/entry/G/G4'].attrs['EX_doc'] = 'geometry parameters from Q[] array (lambda, frozen angles, cut points, etc) ' +root['/entry/positioners'].attrs['EX_doc'] = 'names and values of all positioners (**#O** and **#P** lines) in scan header ' +root['/entry/positioners/positioner'].attrs['EX_doc'] = 'one positioner from the scan header HDF5 requires that each member of a group must have a unique name. SPEC assigns a unique name to each positioner, no extra work is neccesary to comply with the HDF5 rule for unique names in a group. ' +root['/entry/MCA'].attrs['EX_doc'] = '**#@CALIB** -- coefficients to compute a scale based on the MCA channel number ' +root['/entry/MCA/ROI/roiN'].attrs['EX_doc'] = 'numbered regions of interest, use an index number as part of the name ' +root['/entry/metadata'].attrs['EX_doc'] = 'SPEC metadata (UNICAT-style #H and #V lines) This is a block that may be unique to SPEC files acquired at certain APS beam lines. Other facilities or instruments may use this block for storing key:value pairs of data where the values have suitable attributes (such as units). ' +root['/entry/SPEC_user/SPEC_user'].attrs['EX_doc'] = 'user name from first **#C** line in file header ' +root['/entry/_unrecognized'].attrs['EX_doc'] = 'Fallback for any SPEC data file control lines not otherwise placed into groups or fields elsewhere in this specification. ' + + +# Create the ATTRIBUTES +root['/entry/SAMPLE-CHAR-DATA'] = NXdata() +root['/entry/SAMPLE-CHAR-DATA'].set_default() +root['/entry/monitor'].attrs['description'] = 'SAMPLE-CHAR-DATA' +root['/entry/monitor/preset'].attrs['units'] = 'SAMPLE-CHAR-DATA' +root['/entry/data'].attrs['description'] = 'SAMPLE-CHAR-DATA' +root['/entry/data'].attrs['signal'] = 'SAMPLE-CHAR-DATA' +root['/entry/data'].attrs['axes'] = 'SAMPLE-CHAR-DATA' +root['/entry/data/data'].attrs['spec_name'] = 'SAMPLE-CHAR-DATA' +root['/entry/data/data'].attrs['units'] = 'SAMPLE-CHAR-DATA' +root['/entry/counter_cross_reference'].attrs['comment'] = 'SAMPLE-CHAR-DATA' +root['/entry/counter_cross_reference'].attrs['description'] = 'SAMPLE-CHAR-DATA' +root['/entry/positioner_cross_reference'].attrs['comment'] = 'SAMPLE-CHAR-DATA' +root['/entry/positioner_cross_reference'].attrs['description'] = 'SAMPLE-CHAR-DATA' +root['/entry/G'].attrs['comment'] = 'SAMPLE-CHAR-DATA' +root['/entry/G'].attrs['description'] = 'SAMPLE-CHAR-DATA' +root['/entry/positioners'].attrs['description'] = 'SAMPLE-CHAR-DATA' +root['/entry/MCA'].attrs['description'] = 'SAMPLE-CHAR-DATA' +root['/entry/MCA/ROI/roiN'].attrs['description'] = 'SAMPLE-CHAR-DATA' +root['/entry/metadata'].attrs['description'] = 'SAMPLE-CHAR-DATA' +root['/entry/_unrecognized'].attrs['comment'] = 'SAMPLE-CHAR-DATA' +root['/entry/_unrecognized'].attrs['description'] = 'SAMPLE-CHAR-DATA' +root.attrs['default'] = 'entry' +root['/entry/data'].set_default() +root['/entry/data'].attrs['signal'] = 'data' +root['/entry/data/data'].attrs['signal'] = '1' + +# Save the file +root.save('NXspecdata.nxs', 'w') + + diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXstxm.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXstxm.py index 6a23090..050a2fb 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXstxm.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXstxm.py @@ -37,11 +37,11 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry/start_time'] = NXfield('2021-03-29T15:51:42.787454') +root['/entry/start_time'] = NXfield('2022-03-03T14:34:16.030189') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' -root['/entry/end_time'] = NXfield('2021-03-29T15:51:42.790449') +root['/entry/end_time'] = NXfield('2022-03-03T14:34:16.030189') root['/entry/end_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/end_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtas.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtas.py index 2e24fa9..c45eb2c 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtas.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtas.py @@ -33,7 +33,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry/start_time'] = NXfield('2021-03-29T15:51:43.263179') +root['/entry/start_time'] = NXfield('2022-03-03T14:34:16.263999') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtofnpd.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtofnpd.py index e3735c2..4638425 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtofnpd.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtofnpd.py @@ -29,7 +29,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry/start_time'] = NXfield('2021-03-29T15:51:43.606595') +root['/entry/start_time'] = NXfield('2022-03-03T14:34:16.420212') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtofraw.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtofraw.py index 36a1b33..945201b 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtofraw.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtofraw.py @@ -29,7 +29,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry/start_time'] = NXfield('2021-03-29T15:51:43.959055') +root['/entry/start_time'] = NXfield('2022-03-03T14:34:16.592046') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtofsingle.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtofsingle.py index 97cc406..365667a 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtofsingle.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtofsingle.py @@ -29,7 +29,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry/start_time'] = NXfield('2021-03-29T15:51:44.287685') +root['/entry/start_time'] = NXfield('2022-03-03T14:34:16.763880') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtomo.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtomo.py index 33c412d..cbac88e 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtomo.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtomo.py @@ -29,11 +29,11 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'false' -root['/entry/start_time'] = NXfield('2021-03-29T15:51:44.650319') +root['/entry/start_time'] = NXfield('2022-03-03T14:34:16.920239') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'false' -root['/entry/end_time'] = NXfield('2021-03-29T15:51:44.652319') +root['/entry/end_time'] = NXfield('2022-03-03T14:34:16.920239') root['/entry/end_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/end_time'].attrs['EX_required'] = 'false' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtomophase.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtomophase.py index c746c61..f1242d8 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtomophase.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtomophase.py @@ -33,11 +33,11 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry/start_time'] = NXfield('2021-03-29T15:51:45.057350') +root['/entry/start_time'] = NXfield('2022-03-03T14:34:17.154558') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' -root['/entry/end_time'] = NXfield('2021-03-29T15:51:45.060350') +root['/entry/end_time'] = NXfield('2022-03-03T14:34:17.170180') root['/entry/end_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/end_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtomoproc.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtomoproc.py index d9295d7..640eab8 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtomoproc.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtomoproc.py @@ -65,7 +65,7 @@ root['/entry/reconstruction/version'].attrs['type'] = 'NX_CHAR' root['/entry/reconstruction/version'].attrs['EX_required'] = 'true' -root['/entry/reconstruction/date'] = NXfield('2021-03-29T15:51:45.375352') +root['/entry/reconstruction/date'] = NXfield('2022-03-03T14:34:17.310772') root['/entry/reconstruction/date'].attrs['type'] = 'NX_DATE_TIME' root['/entry/reconstruction/date'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxas.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxas.py index 3ebd444..7f38669 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxas.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxas.py @@ -33,7 +33,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry/start_time'] = NXfield('2021-03-29T15:51:45.626352') +root['/entry/start_time'] = NXfield('2022-03-03T14:34:17.435742') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxasproc.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxasproc.py index 8824288..ec1c919 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxasproc.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxasproc.py @@ -44,7 +44,7 @@ root['/entry/XAS_data_reduction/version'].attrs['type'] = 'NX_CHAR' root['/entry/XAS_data_reduction/version'].attrs['EX_required'] = 'true' -root['/entry/XAS_data_reduction/date'] = NXfield('2021-03-29T15:51:45.804350') +root['/entry/XAS_data_reduction/date'] = NXfield('2022-03-03T14:34:17.529470') root['/entry/XAS_data_reduction/date'].attrs['type'] = 'NX_DATE_TIME' root['/entry/XAS_data_reduction/date'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxbase.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxbase.py index 94843a0..2f4922f 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxbase.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxbase.py @@ -31,7 +31,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry/start_time'] = NXfield('2021-03-29T15:51:46.136351') +root['/entry/start_time'] = NXfield('2022-03-03T14:34:17.685682') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxeuler.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxeuler.py index 938b4d7..80821b5 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxeuler.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxeuler.py @@ -33,7 +33,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry/start_time'] = NXfield('2021-03-29T15:51:46.670755') +root['/entry/start_time'] = NXfield('2022-03-03T14:34:17.951244') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxkappa.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxkappa.py index ce34c32..d87a695 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxkappa.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxkappa.py @@ -33,7 +33,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry/start_time'] = NXfield('2021-03-29T15:51:47.246390') +root['/entry/start_time'] = NXfield('2022-03-03T14:34:18.227730') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxlaue.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxlaue.py index 06b35d4..e3573c7 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxlaue.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxlaue.py @@ -37,7 +37,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry/start_time'] = NXfield('2021-03-29T15:51:47.928648') +root['/entry/start_time'] = NXfield('2022-03-03T14:34:18.540156') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxlaueplate.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxlaueplate.py index 44fe13e..1445d85 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxlaueplate.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxlaueplate.py @@ -37,7 +37,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry/start_time'] = NXfield('2021-03-29T15:51:48.694143') +root['/entry/start_time'] = NXfield('2022-03-03T14:34:18.883824') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxnb.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxnb.py index f4a69b0..3839c69 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxnb.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxnb.py @@ -33,7 +33,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry/start_time'] = NXfield('2021-03-29T15:51:49.239441') +root['/entry/start_time'] = NXfield('2022-03-03T14:34:19.149386') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxpcs.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxpcs.py new file mode 100644 index 0000000..9510554 --- /dev/null +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxpcs.py @@ -0,0 +1,278 @@ + +import numpy as np +from nexusformat.nexus import * + +# Note this example script was generated by nxdl_to_hdf5.py using the current +# installed version of the NEXUS definitions ver[v2020.10] + +root = NXroot() + +# Create the GROUPS +root['/entry'] = NXentry() +root['/entry'].attrs['EX_required'] = 'true' +root['/entry/data'] = NXdata() +root['/entry/data'].attrs['EX_required'] = 'true' +root['/entry/twotime'] = NXdata() +root['/entry/twotime'].attrs['EX_required'] = 'false' +root['/entry/instrument'] = NXinstrument() +root['/entry/instrument'].attrs['EX_required'] = 'true' +root['/entry/instrument/incident_beam'] = NXbeam() +root['/entry/instrument/incident_beam'].attrs['EX_required'] = 'true' +root['/entry/instrument/detector'] = NXdetector() +root['/entry/instrument/detector'].attrs['EX_required'] = 'true' +root['/entry/instrument/masks'] = NXnote() +root['/entry/instrument/masks'].attrs['EX_required'] = 'false' +root['/entry/sample'] = NXsample() +root['/entry/sample'].attrs['EX_required'] = 'false' +root['/entry/sample/position_x'] = NXpositioner() +root['/entry/sample/position_x'].attrs['EX_required'] = 'false' +root['/entry/sample/position_y'] = NXpositioner() +root['/entry/sample/position_y'].attrs['EX_required'] = 'false' +root['/entry/sample/position_z'] = NXpositioner() +root['/entry/sample/position_z'].attrs['EX_required'] = 'false' +root['/entry/ROI'] = NXnote() +root['/entry/ROI'].attrs['EX_required'] = 'false' +root['/entry/NOTE'] = NXnote() +root['/entry/NOTE'].attrs['EX_required'] = 'false' + +# Create the FIELDS + +# Valid enumeration values for root['/entry']['definition'] are: +# NXxpcs + +root['/entry/definition'] = NXfield('NXxpcs') +root['/entry/definition'].attrs['type'] = 'NX_CHAR' +root['/entry/definition'].attrs['EX_required'] = 'true' + +root['/entry/entry_identifier'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/entry_identifier'].attrs['type'] = 'NX_CHAR' +root['/entry/entry_identifier'].attrs['EX_required'] = 'true' + +root['/entry/entry_identifier_uuid'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/entry_identifier_uuid'].attrs['type'] = 'NX_CHAR' +root['/entry/entry_identifier_uuid'].attrs['EX_required'] = 'false' + +root['/entry/scan_number'] = NXfield(1) +root['/entry/scan_number'].attrs['type'] = 'NX_INT' +root['/entry/scan_number'].attrs['EX_required'] = 'true' + +root['/entry/start_time'] = NXfield('2022-03-03T14:34:24.295042') +root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' +root['/entry/start_time'].attrs['EX_required'] = 'true' + +root['/entry/end_time'] = NXfield('2022-03-03T14:34:24.295042') +root['/entry/end_time'].attrs['type'] = 'NX_DATE_TIME' +root['/entry/end_time'].attrs['EX_required'] = 'false' + +root['/entry/data/frame_sum'] = NXfield(1.0) +root['/entry/data/frame_sum'].attrs['type'] = 'NX_NUMBER' +root['/entry/data/frame_sum'].attrs['EX_required'] = 'false' +root['/entry/data/frame_sum'].attrs['units'] = 'NX_COUNT' + +root['/entry/data/frame_average'] = NXfield(1.0) +root['/entry/data/frame_average'].attrs['type'] = 'NX_NUMBER' +root['/entry/data/frame_average'].attrs['EX_required'] = 'false' +root['/entry/data/frame_average'].attrs['units'] = 'NX_COUNT' + +root['/entry/data/g2'] = NXfield(1.0) +root['/entry/data/g2'].attrs['type'] = 'NX_NUMBER' +root['/entry/data/g2'].attrs['EX_required'] = 'false' +root['/entry/data/g2'].attrs['units'] = 'NX_ARBITRARY_UNITS' + +root['/entry/data/g2_derr'] = NXfield(1.0) +root['/entry/data/g2_derr'].attrs['type'] = 'NX_NUMBER' +root['/entry/data/g2_derr'].attrs['EX_required'] = 'false' +root['/entry/data/g2_derr'].attrs['units'] = 'NX_ARBITRARY_UNITS' + +root['/entry/data/G2_unnormalized'] = NXfield(1.0) +root['/entry/data/G2_unnormalized'].attrs['type'] = 'NX_NUMBER' +root['/entry/data/G2_unnormalized'].attrs['EX_required'] = 'false' +root['/entry/data/G2_unnormalized'].attrs['units'] = 'NX_ARBITRARY_UNITS' + +root['/entry/data/delay_difference'] = NXfield(1) +root['/entry/data/delay_difference'].attrs['type'] = 'NX_INT' +root['/entry/data/delay_difference'].attrs['EX_required'] = 'false' +root['/entry/data/delay_difference'].attrs['units'] = 'NX_INT' + +root['/entry/twotime/two_time_corr_func'] = NXfield(1.0) +root['/entry/twotime/two_time_corr_func'].attrs['type'] = 'NX_NUMBER' +root['/entry/twotime/two_time_corr_func'].attrs['EX_required'] = 'false' +root['/entry/twotime/two_time_corr_func'].attrs['units'] = 'NX_ANY' + +root['/entry/twotime/g2_from_two_time_corr_func'] = NXfield(1.0) +root['/entry/twotime/g2_from_two_time_corr_func'].attrs['type'] = 'NX_NUMBER' +root['/entry/twotime/g2_from_two_time_corr_func'].attrs['EX_required'] = 'false' +root['/entry/twotime/g2_from_two_time_corr_func'].attrs['units'] = 'NX_ARBITRARY_UNITS' + +root['/entry/twotime/g2_err_from_two_time_corr_func'] = NXfield(1.0) +root['/entry/twotime/g2_err_from_two_time_corr_func'].attrs['type'] = 'NX_NUMBER' +root['/entry/twotime/g2_err_from_two_time_corr_func'].attrs['EX_required'] = 'false' +root['/entry/twotime/g2_err_from_two_time_corr_func'].attrs['units'] = 'NX_ARBITRARY_UNITS' + +root['/entry/twotime/g2_from_two_time_corr_func_partials'] = NXfield(1.0) +root['/entry/twotime/g2_from_two_time_corr_func_partials'].attrs['type'] = 'NX_NUMBER' +root['/entry/twotime/g2_from_two_time_corr_func_partials'].attrs['EX_required'] = 'false' +root['/entry/twotime/g2_from_two_time_corr_func_partials'].attrs['units'] = 'NX_ARBITRARY_UNITS' + +root['/entry/twotime/g2_err_from_two_time_corr_func_partials'] = NXfield(1.0) +root['/entry/twotime/g2_err_from_two_time_corr_func_partials'].attrs['type'] = 'NX_NUMBER' +root['/entry/twotime/g2_err_from_two_time_corr_func_partials'].attrs['EX_required'] = 'false' +root['/entry/twotime/g2_err_from_two_time_corr_func_partials'].attrs['units'] = 'NX_ARBITRARY_UNITS' + +root['/entry/instrument/incident_beam/incident_energy'] = NXfield(1.0) +root['/entry/instrument/incident_beam/incident_energy'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/incident_beam/incident_energy'].attrs['EX_required'] = 'true' +root['/entry/instrument/incident_beam/incident_energy'].attrs['units'] = 'NX_ENERGY' + +root['/entry/instrument/incident_beam/incident_energy_spread'] = NXfield(1.0) +root['/entry/instrument/incident_beam/incident_energy_spread'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/incident_beam/incident_energy_spread'].attrs['EX_required'] = 'false' +root['/entry/instrument/incident_beam/incident_energy_spread'].attrs['units'] = 'NX_ENERGY' + +root['/entry/instrument/incident_beam/incident_polarization_type'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/instrument/incident_beam/incident_polarization_type'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/incident_beam/incident_polarization_type'].attrs['EX_required'] = 'false' + +root['/entry/instrument/incident_beam/extent'] = NXfield(1.0) +root['/entry/instrument/incident_beam/extent'].attrs['type'] = 'NX_FLOAT' +root['/entry/instrument/incident_beam/extent'].attrs['EX_required'] = 'false' +root['/entry/instrument/incident_beam/extent'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/detector/description'] = NXfield('SAMPLE-CHAR-DATA') +root['/entry/instrument/detector/description'].attrs['type'] = 'NX_CHAR' +root['/entry/instrument/detector/description'].attrs['EX_required'] = 'false' + +root['/entry/instrument/detector/distance'] = NXfield(1.0) +root['/entry/instrument/detector/distance'].attrs['type'] = 'NX_NUMBER' +root['/entry/instrument/detector/distance'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector/distance'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/detector/count_time'] = NXfield(1.0) +root['/entry/instrument/detector/count_time'].attrs['type'] = 'NX_NUMBER' +root['/entry/instrument/detector/count_time'].attrs['EX_required'] = 'true' +root['/entry/instrument/detector/count_time'].attrs['units'] = 'NX_TIME' + +root['/entry/instrument/detector/frame_time'] = NXfield(1.0) +root['/entry/instrument/detector/frame_time'].attrs['type'] = 'NX_NUMBER' +root['/entry/instrument/detector/frame_time'].attrs['EX_required'] = 'true' +root['/entry/instrument/detector/frame_time'].attrs['units'] = 'NX_TIME' + +root['/entry/instrument/detector/beam_center_x'] = NXfield(1.0) +root['/entry/instrument/detector/beam_center_x'].attrs['type'] = 'NX_NUMBER' +root['/entry/instrument/detector/beam_center_x'].attrs['EX_required'] = 'true' +root['/entry/instrument/detector/beam_center_x'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/detector/beam_center_y'] = NXfield(1.0) +root['/entry/instrument/detector/beam_center_y'].attrs['type'] = 'NX_NUMBER' +root['/entry/instrument/detector/beam_center_y'].attrs['EX_required'] = 'true' +root['/entry/instrument/detector/beam_center_y'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/detector/x_pixel_size'] = NXfield(1.0) +root['/entry/instrument/detector/x_pixel_size'].attrs['type'] = 'NX_NUMBER' +root['/entry/instrument/detector/x_pixel_size'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector/x_pixel_size'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/detector/y_pixel_size'] = NXfield(1.0) +root['/entry/instrument/detector/y_pixel_size'].attrs['type'] = 'NX_NUMBER' +root['/entry/instrument/detector/y_pixel_size'].attrs['EX_required'] = 'false' +root['/entry/instrument/detector/y_pixel_size'].attrs['units'] = 'NX_LENGTH' + +root['/entry/instrument/masks/dynamic_roi_map'] = NXfield(1) +root['/entry/instrument/masks/dynamic_roi_map'].attrs['type'] = 'NX_DIMENSIONLESS' +root['/entry/instrument/masks/dynamic_roi_map'].attrs['EX_required'] = 'true' + +root['/entry/instrument/masks/dynamic_q_list'] = NXfield(1.0) +root['/entry/instrument/masks/dynamic_q_list'].attrs['type'] = 'NX_NUMBER' +root['/entry/instrument/masks/dynamic_q_list'].attrs['EX_required'] = 'false' +root['/entry/instrument/masks/dynamic_q_list'].attrs['units'] = 'NX_PER_LENGTH' + +root['/entry/instrument/masks/dynamic_phi_list'] = NXfield(1.0) +root['/entry/instrument/masks/dynamic_phi_list'].attrs['type'] = 'NX_NUMBER' +root['/entry/instrument/masks/dynamic_phi_list'].attrs['EX_required'] = 'false' +root['/entry/instrument/masks/dynamic_phi_list'].attrs['units'] = 'NX_PER_LENGTH' + +root['/entry/instrument/masks/static_roi_map'] = NXfield(1) +root['/entry/instrument/masks/static_roi_map'].attrs['type'] = 'NX_DIMENSIONLESS' +root['/entry/instrument/masks/static_roi_map'].attrs['EX_required'] = 'false' + +root['/entry/instrument/masks/static_q_list'] = NXfield(1.0) +root['/entry/instrument/masks/static_q_list'].attrs['type'] = 'NX_NUMBER' +root['/entry/instrument/masks/static_q_list'].attrs['EX_required'] = 'false' +root['/entry/instrument/masks/static_q_list'].attrs['units'] = 'NX_PER_LENGTH' + +root['/entry/sample/temperature_set'] = NXfield(1.0) +root['/entry/sample/temperature_set'].attrs['type'] = 'NX_NUMBER' +root['/entry/sample/temperature_set'].attrs['EX_required'] = 'false' +root['/entry/sample/temperature_set'].attrs['units'] = 'NX_TEMPERATURE' + +root['/entry/sample/temperature'] = NXfield(1.0) +root['/entry/sample/temperature'].attrs['type'] = 'NX_NUMBER' +root['/entry/sample/temperature'].attrs['EX_required'] = 'false' +root['/entry/sample/temperature'].attrs['units'] = 'NX_TEMPERATURE' + +# Create the DOC strings +root['/entry/definition'].attrs['EX_doc'] = 'Official NeXus NXDL schema to which this file conforms ' +root['/entry/entry_identifier'].attrs['EX_doc'] = 'Unique identifier for the experiment. ' +root['/entry/entry_identifier_uuid'].attrs['EX_doc'] = '(optional) UUID identifier for this entry. ' +root['/entry/scan_number'].attrs['EX_doc'] = 'Scan number (must be an integer). NOTE: Link to collection_identifier. ' +root['/entry/start_time'].attrs['EX_doc'] = 'Starting time of experiment, such as "2021-02-11 11:22:33.445566Z". ' +root['/entry/end_time'].attrs['EX_doc'] = 'Ending time of experiment, such as "2021-02-11 11:23:45Z". ' +root['/entry/data'].attrs['EX_doc'] = 'The results data captured here are most commonly required for high throughput, equilibrium dynamics experiments. Data (results) describing on-equilibrium dynamics consume more memory resources so these data are separated. ' +root['/entry/data/frame_sum'].attrs['EX_doc'] = 'Two-dimensional summation along the frames stack. sum of intensity v. time (in the units of "frames") ' +root['/entry/data/frame_average'].attrs['EX_doc'] = 'Two-dimensional average along the frames stack. average intensity v. time (in the units of "frames") ' +root['/entry/data/g2'].attrs['EX_doc'] = 'normalized intensity auto-correlation function, see Lumma, Rev. Sci. Instr. (2000), Eq 1 .. math:: g_2(\boldsymbol Q,t) = \frac{ \langle I(\boldsymbol Q,t\prime) I(\boldsymbol Q,t\prime + t) \rangle }{ \langle I(\boldsymbol Q,t\prime)\rangle^2 }; t > 0 Typically, :math:`g_2` is a quantity calculated for a group of pixels representing a specific region of reciprocal space. These groupings, or bins, are generically described as :math:`q`. Some open-source XPCS libraries refer to these bins as "rois", which are not to be confused with EPICS AreaDetector ROI. See usage guidelines for q_lists and roi_maps within a mask. [#]_ In short, :math:`g_2` should be ordered according to the roi_map value. In principle, any format is acceptable if the data and its axes are self-describing as per NeXus recommendations. However, the data is preferred in one of the following two formats: * iterable list of linked files (or keys) for each :math:`g_2` with 1 file (key) per :math:`q`, where `q` is called by the nth roi_map value * 2D array [#]_ with shape (:math:`g_2`, :math:`q`), where `q` is represented by the nth roi_map value, not the value `q` value Note it is expected that "g2" and all quantities following it will be of the same length. Other formats are acceptable with sufficient axes description. See references below for related implementation information: .. [#] mask: ``NXxpcs:/entry/instrument/masks-group`` .. [#] NeXus 2-D data and axes: https://manual.nexusformat.org/classes/base_classes/NXdata.html#nxdata ' +root['/entry/data/g2_derr'].attrs['EX_doc'] = 'error values for the :math:`g_2` values. The derivation of the error is left up to the implemented code. Symmetric error will be expected (:math:`\pm` error). The data should be in the same format as ``g2``. ' +root['/entry/data/G2_unnormalized'].attrs['EX_doc'] = 'unnormalized intensity auto-correlation function. Specifically, ``g2`` without the denominator. The data should be in the same format as ``g2``. ' +root['/entry/data/delay_difference'].attrs['EX_doc'] = 'delay_difference (also known as delay or lag step) This is quantized difference so that the "step" between two consecutive frames is one frame (or step ``= dt = 1 frame``) It is the "quantized" delay time corresponding to the ``g2`` values. The unit of delay_differences is ``NX_INT`` for units of frames (i.e., integers) preferred, refer to :ref:`NXdetector` for conversion to time units. ' +root['/entry/twotime'].attrs['EX_doc'] = 'The data (results) in this section are based on the two-time intensity correlation function derived from a time series of scattering images. ' +root['/entry/twotime/two_time_corr_func'].attrs['EX_doc'] = 'two-time correlation of speckle intensity for a given q-bin or roi (represented by the nth roi_map value) See Fluerasu, Phys Rev E (2007), Eq 1 and Sutton, Optics Express (2003) for an early description applied to X-ray scattering: .. math:: C(\boldsymbol Q, t_1, t_2) = \frac{ \langle I(\boldsymbol Q, t_1)I(\boldsymbol Q, t_2)\rangle }{ \langle I(\boldsymbol Q,t_1)\rangle \langle I(\boldsymbol Q,t_2)\rangle } in which time is quantized by frames. In principle, any data format is acceptable if the data and its axes are self-describing as per NeXus recommendations. However, the data is preferred in one of the following two formats: * iterable list of linked files (or keys) for each q-bin called by the nth roi_map value. data for each bin is a 2D array * 3D array with shape (frames, frames, q) or (q, frames, frames), where :math:`q` is represented by the nth roi_map value, not the value `q` value The computation of this result can be customized. These customizations can affect subsequently derived results (below). The following attributes will be used to manage the customization. * Other normalization methods may be applied, but the method will not be specified in this definition. Some of these normalization methods result in a baseline value of ``0``, not ``1``. * The various software libraries use different programming languages. Therefore, we need to specify the ``time = 0`` origin location of the 2D array for each :math:`q`. * A method to reduce data storage needs is to only record half of the 2D array by populating array elements above or below the array diagonal. ' +root['/entry/twotime/g2_from_two_time_corr_func'].attrs['EX_doc'] = 'frame weighted average along the diagonal direction in ``two_time_corr_func`` The data format and description should be consistent with that found in "/NXxpcs/entry/data/g2" * iterable list of linked files for each :math:`g_2` with 1 file per :math:`q` * 2D array with shape (:math:`g_2`, :math:`q`) Note that delay_difference is not included here because it is derived from the shape of extracted :math:`g_2` because all frames are considered, which is not necessarily the case for :math:`g_2`. The computation of this result can be customized. The customization can affect the fitting required to extract quantitative results. The following attributes will be used to manage the customization. ' +root['/entry/twotime/g2_err_from_two_time_corr_func'].attrs['EX_doc'] = 'error values for the :math:`g_2` values. The derivation of the error is left up to the implemented code. Symmetric error will be expected (:math:`\pm` error). ' +root['/entry/twotime/g2_from_two_time_corr_func_partials'].attrs['EX_doc'] = 'subset of frame weighted average along the diagonal direction in ``two_time_corr_func`` Time slicing along the diagonal can be very sophisticated. This entry currently assumes equal frame-binning. The data formats are highly dependent on the implantation of various analysis libraries. In principle, any data format is acceptable if the data and its axes are self describing as per NeXus recommendations. However, the data is preferred in one of the following two formats: * iterable list of linked files (or keys) for each partial :math:`g_2` of each q-bin represented by the roi_map value * 3D array with shape (:math:`g_2`, :math:`q`, nth_partial) Note that delay_difference is not included here because it is derived from the shape of extracted :math:`g_2`. ' +root['/entry/twotime/g2_err_from_two_time_corr_func_partials'].attrs['EX_doc'] = 'error values for the :math:`g_2` values. The derivation of the error is left up to the implemented code. Symmetric error will be expected (:math:`\pm` error). ' +root['/entry/instrument'].attrs['EX_doc'] = 'XPCS instrument Metadata. Objects can be entered here directly or linked from other objects in the NeXus file (such as within ``/entry/instrument``). ' +root['/entry/instrument/incident_beam/incident_energy'].attrs['EX_doc'] = 'Incident beam line energy (either keV or eV). ' +root['/entry/instrument/incident_beam/incident_energy_spread'].attrs['EX_doc'] = 'Spread of incident beam line energy (either keV or eV). This quantity is otherwise known as the energy resolution, which is related to the longitudinal coherence length. ' +root['/entry/instrument/incident_beam/incident_polarization_type'].attrs['EX_doc'] = 'Terse description of the incident beam polarization. The value can be plain text, such as ``vertical``, ``C+``, ``circular left``. ' +root['/entry/instrument/incident_beam/extent'].attrs['EX_doc'] = 'Size (2-D) of the beam at this position. ' +root['/entry/instrument/detector'].attrs['EX_doc'] = 'XPCS data is typically produced by area detector (likely EPICS AreaDetector) as a stack of 2D images. Sometimes this data is represented in different ways (sparse arrays or photon event list), but this detail is left to the analysis software. Therefore, we only include requirements based on full array data. We note that the image origin (pixel coordinates (0,0)) are found at the top left of a single 2D image array. This is the standard expected by Coherent X-ray Imaging Data Bank. [#]_ See CXI version 1.6 and Maia, Nature Methods (2012). This seems to be consistent with matplotlib and the practiced implementation of EPICS AreaDetector. However, some exceptions may exists in the CXI documentation (See Fig 11 vs Fig 12). Additionally, not all NXdetector dependencies are inherited from AreaDetector or other control systems. ``frame_time`` is used to convert ``delay_difference`` to seconds. ``frame_time`` field could be missing from AreaDetector or may either be `acquire_period` or `acquire_time`, depending on the detector model and the local implementation. .. [#] Coherent X-ray Imaging Data Bank: https://cxidb.org/cxi.html ' +root['/entry/instrument/detector/description'].attrs['EX_doc'] = 'Detector name. ' +root['/entry/instrument/detector/distance'].attrs['EX_doc'] = 'Distance between sample and detector. ' +root['/entry/instrument/detector/count_time'].attrs['EX_doc'] = 'Exposure time of frames, s. ' +root['/entry/instrument/detector/frame_time'].attrs['EX_doc'] = 'Exposure period (time between frame starts) of frames, s ' +root['/entry/instrument/detector/beam_center_x'].attrs['EX_doc'] = 'Position of beam center, x axis, in detector"s coordinates. ' +root['/entry/instrument/detector/beam_center_y'].attrs['EX_doc'] = 'Position of beam center, y axis, in detector"s coordinates. ' +root['/entry/instrument/detector/x_pixel_size'].attrs['EX_doc'] = 'Length of pixel in x direction. ' +root['/entry/instrument/detector/y_pixel_size'].attrs['EX_doc'] = 'Length of pixel in y direction. ' +root['/entry/instrument/masks'].attrs['EX_doc'] = 'Data masks or mappings to regions of interest (roi) for specific :math:`Q` values Fields in this ``masks`` group describe regions of interest in the data by either a mask to select pixels or to associate a *map* of rois with a (one-dimensional) *list* of values. "roi_maps" provide for representation of pixel binning that are arbitrary and irregular, which is geometry scattering agnostic and most flexible. The maps work as a labeled array for N rois. "Dynamic" represents quantities directly related to XPCS and NXxcps/entry/data and NXxpcs/entry/two_time. "Static" refers to finer binning used for computation not strictly used for the final XPCS results. Implementation of _static_ binning is left for individual libraries to document. We encourage usage of :ref:`NXcanSAS` to represent standard SAXS results or development of new NeXus definitions for GI-SAXS or other reciprocal space intensity mapping. ' +root['/entry/instrument/masks/dynamic_roi_map'].attrs['EX_doc'] = 'roi index array or labeled array The values of this mask index (or map to) the :math:`Q` value from the the ``dynamic_q_list`` field. Not that the value of ``0`` represents in-action. XPCS computations are performed on all pixels with a value > 0. The ``units`` attribute should be set to ``"au"`` indicating arbitrary units. ' +root['/entry/instrument/masks/dynamic_q_list'].attrs['EX_doc'] = '1-D list of :math:`Q` values, one for each roi index value. List order is determined by the index value of the associated roi map starting at ``1``. The only requirement for the list is that it may be iterable. Some expected formats are: * iterable list of floats (i.e., :math:`Q(r)`) * iterable list of tuples (i.e., :math:`Q(r)`, :math:`\varphi`), but preferable use the seperate :math:`\varphi` field below * iterable list of tuples (e.g., (H, K, L); (qx, qy, qz); (horizontal_pixel, vertical_pixel)) * iterable list of integers (for Nth roi_map value) or strings This format is chosen because results plotting packages are not common and simple I/O is required by end user. The lists can be accessed as lists, arrays or via keys ' +root['/entry/instrument/masks/dynamic_phi_list'].attrs['EX_doc'] = 'Array of :math:`\varphi` value for each pixel. List order is determined by the index value of the associated roi map starting at ``1``. ' +root['/entry/instrument/masks/static_roi_map'].attrs['EX_doc'] = 'roi index array. The values of this mask index the :math:`|Q|` value from the the ``static_q_list`` field. The ``units`` attribute should be set to ``"au"`` indicating arbitrary units. ' +root['/entry/instrument/masks/static_q_list'].attrs['EX_doc'] = '1-D list of :math:`|Q|` values, 1 for each roi. ' +root['/entry/sample/temperature_set'].attrs['EX_doc'] = 'Sample temperature setpoint, (C or K). ' +root['/entry/sample/temperature'].attrs['EX_doc'] = 'Sample temperature actual, (C or K). ' +root['/entry/ROI'].attrs['EX_doc'] = '**THIS FIELD IS SCHEDULED FOR DELETION on or about March 1, 2022.** Contact abarbour@bnl.gov or jemian@anl.gov to object. Region(s) of interest. NAME: The NeXus convention, to use all upper case to indicate the name (here ``roi``), is left to the file writer. In our case, follow the suggested name pattern and sequence: roi_1, roi_2, roi_3, ... Start with ``roi_1`` if the first one, otherwise pick the next number in this sequence. ' +root['/entry/NOTE'].attrs['EX_doc'] = 'Any other notes. NAME: The NeXus convention, to use all upper case to indicate the name (here ``NOTE``), is left to the file writer. In our case, follow the suggested name pattern and sequence: note_1, note_2, note_3, ... Start with ``note_1`` if the first one, otherwise pick the next number in this sequence. ' + + +# Create the ATTRIBUTES +root['/entry/data/g2'].attrs['storage_mode'] = 'SAMPLE-CHAR-DATA' +root['/entry/data/g2_derr'].attrs['storage_mode'] = 'SAMPLE-CHAR-DATA' +root['/entry/data/G2_unnormalized'].attrs['storage_mode'] = 'SAMPLE-CHAR-DATA' +root['/entry/data/delay_difference'].attrs['storage_mode'] = 'SAMPLE-CHAR-DATA' +root['/entry/twotime/two_time_corr_func'].attrs['storage_mode'] = 'SAMPLE-CHAR-DATA' +root['/entry/twotime/two_time_corr_func'].attrs['time_origin_location'] = 'SAMPLE-CHAR-DATA' +root['/entry/twotime/two_time_corr_func'].attrs['populated_elements'] = 'SAMPLE-CHAR-DATA' +root['/entry/twotime/g2_from_two_time_corr_func'].attrs['storage_mode'] = 'SAMPLE-CHAR-DATA' +root['/entry/twotime/g2_err_from_two_time_corr_func'].attrs['storage_mode'] = 'SAMPLE-CHAR-DATA' +root['/entry/twotime/g2_from_two_time_corr_func_partials'].attrs['storage_mode'] = 'SAMPLE-CHAR-DATA' +root.attrs['default'] = 'entry' +root['/entry/data'].set_default() +root['/entry/data'].attrs['signal'] = 'G2_unnormalized' +root['/entry/data/G2_unnormalized'].attrs['signal'] = '1' + +# Save the file +root.save('NXxpcs.nxs', 'w') + + diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxrot.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxrot.py index 05d6274..8ef121c 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxrot.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxrot.py @@ -35,7 +35,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry/start_time'] = NXfield('2021-03-29T15:51:49.861951') +root['/entry/start_time'] = NXfield('2022-03-03T14:34:19.414948') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/nxdl/db.json b/nxdl/db.json new file mode 100644 index 0000000..e69de29 diff --git a/nxdl/nxdl_to_hdf5.py b/nxdl/nxdl_to_hdf5.py index 7d9f1f5..b0a6013 100755 --- a/nxdl/nxdl_to_hdf5.py +++ b/nxdl/nxdl_to_hdf5.py @@ -67,8 +67,8 @@ def init_database(): 'attribute': db.table('attribute_table'), 'link': db.table('link_table'), 'symbols': db.table('symbols_table'), - 'docs': db.table('docs_table') - } + 'docs': db.table('docs_table'), + } def _string_attr(nxgrp, name, sdata, do_print=True, skip_nxsfrmt=False): ''' @@ -1296,15 +1296,15 @@ def add_docs(nf, docs): _string_attr(pgrp, 'EX_doc', doc_str[1:]) -def print_script_start(fname): +def print_script_start(fname, rel_ver): ''' make calls to the currently supported example script modules (h5py, nexusformat) so that the proper lines can be appended to their respective string lists from which the final scripto file will be written from ''' - print_h5py_ex_start(fname) - print_nxsfrmt_ex_start(fname) + print_h5py_ex_start(fname, rel_ver) + print_nxsfrmt_ex_start(fname, rel_ver) -def print_nxsfrmt_ex_start(fname): +def print_nxsfrmt_ex_start(fname, rel_ver): ''' append the proper lines to open each example script for nexusformat ''' @@ -1319,12 +1319,13 @@ def print_nxsfrmt_ex_start(fname): nxsfrmt_script_lst.append('root = NXroot()') -def print_h5py_ex_start(fname): +def print_h5py_ex_start(fname, rel_ver): ''' append the proper lines to open each example script for h5py ''' global h5py_script_lst + h5py_script_lst = [] #fpath = __file__.replace('nxdl_to_hdf5.py','') h5py_script_lst.append(' ') @@ -1363,7 +1364,7 @@ def print_nxsfrmt_close(class_nm): nxsfrmt_script_lst.append(f"root.save(\'{class_nm}.nxs\', \'w\')\n\n") -def make_class_as_nf_file(class_nm, dest_dir, symbol_dct={}): +def make_class_as_nf_file(class_nm, dest_dir, symbol_dct={}, rel_ver='UNKNOWN'): ''' create an hdf5 file of the application definition (class_nm) in the specified destination directory ''' @@ -1417,7 +1418,7 @@ def make_class_as_nf_file(class_nm, dest_dir, symbol_dct={}): sym_dct[val] = 1 l['attrib']['value'] = 1 - print_script_start(class_nm) + print_script_start(class_nm, rel_ver) # create GROUPs create_groups(nf) @@ -1559,18 +1560,20 @@ def symbol_args_to_dict(arg_lst): return(dct) -def process_nxdl(class_nm, def_subdir): +def process_nxdl(class_path, def_dir, def_subdir, sym_args_dct, rel_ver, report_symbols_only=False): ''' given the class name and the destination directory, parse the nxdl file and produce an hdf5 file as well as example scripts using h5py and nexusformat ''' - if class_nm.name.find('.nxdl.xml') > -1: - class_nm = class_nm.name.replace('.nxdl.xml', '') - build_class_db(def_subdir, desired_class=class_nm, - defdir=def_dir, sym_args_dct=sym_args_dct, - report_symbols_only=report_symbols_only) - dest_dir = pathlib.PurePath(pathlib.os.getcwd(), '..', 'autogenerated_examples', 'nxdl', def_subdir) - make_class_as_nf_file(class_nm, dest_dir, symbol_dct=sym_args_dct) + def_dir = class_path.parent.parent + if class_path.is_file(): + if class_path.name.find('.nxdl.xml') > -1: + class_nm = class_path.name.replace('.nxdl.xml', '') + build_class_db(def_subdir, desired_class=class_nm, + defdir=def_dir, sym_args_dct=sym_args_dct, + report_symbols_only=report_symbols_only) + dest_dir = pathlib.PurePath(pathlib.os.getcwd(), '..', 'autogenerated_examples', 'nxdl', def_subdir) + make_class_as_nf_file(class_nm, dest_dir, symbol_dct=sym_args_dct, rel_ver=rel_ver) def main(): @@ -1631,6 +1634,9 @@ def main(): if (def_dir / 'NXDL_VERSION').exists(): with open(pathlib.PurePath(def_dir, 'NXDL_VERSION'), 'r') as f: rel_ver = f.readline().replace('\n','') + #tables_dct['config']['rel_ver'] = rel_ver + + if args.report: #just repolrt on the symbols that are defined in @@ -1654,14 +1660,14 @@ def main(): ) exit() else: - process_nxdl(class_path, def_subdir) + process_nxdl(class_path, def_dir, def_subdir, sym_args_dct, rel_ver, report_symbols_only=report_symbols_only) exit() files = None for def_subdir in def_subdirs: files = sorted((def_dir / def_subdir).iterdir()) for class_path in files: - process_nxdl(class_path, def_subdir) + process_nxdl(class_path, def_dir, def_subdir, sym_args_dct, rel_ver, report_symbols_only=report_symbols_only) init_database() From 16f605b329737d0f66792afc15b6d495bcb50303 Mon Sep 17 00:00:00 2001 From: rb Date: Fri, 4 Mar 2022 14:57:59 -0600 Subject: [PATCH 11/11] fixed bug that missed enuerations for attributes --- .../nxdl/applications/NXarchive.h5 | Bin 34848 -> 34848 bytes .../nxdl/applications/NXarpes.h5 | Bin 30744 -> 30744 bytes .../nxdl/applications/NXcanSAS.h5 | Bin 76032 -> 76048 bytes .../nxdl/applications/NXdirecttof.h5 | Bin 36016 -> 36016 bytes .../nxdl/applications/NXfluo.h5 | Bin 23520 -> 23520 bytes .../nxdl/applications/NXindirecttof.h5 | Bin 34080 -> 34080 bytes .../nxdl/applications/NXiqproc.h5 | Bin 28592 -> 28592 bytes .../nxdl/applications/NXlauetof.h5 | Bin 27080 -> 27080 bytes .../nxdl/applications/NXmonopd.h5 | Bin 28736 -> 28736 bytes .../nxdl/applications/NXmx.h5 | Bin 85296 -> 83552 bytes .../nxdl/applications/NXpeem.h5 | Bin 28720 -> 0 bytes .../nxdl/applications/NXrefscan.h5 | Bin 24912 -> 24912 bytes .../nxdl/applications/NXreftof.h5 | Bin 30136 -> 30136 bytes .../nxdl/applications/NXsas.h5 | Bin 39312 -> 39312 bytes .../nxdl/applications/NXsastof.h5 | Bin 37464 -> 37464 bytes .../nxdl/applications/NXscan.h5 | Bin 19184 -> 19184 bytes .../nxdl/applications/NXspe.h5 | Bin 23256 -> 23256 bytes .../nxdl/applications/NXsqom.h5 | Bin 29208 -> 29208 bytes .../nxdl/applications/NXstxm.h5 | Bin 34448 -> 34448 bytes .../nxdl/applications/NXtas.h5 | Bin 35952 -> 35952 bytes .../nxdl/applications/NXtofnpd.h5 | Bin 29768 -> 29768 bytes .../nxdl/applications/NXtofraw.h5 | Bin 31304 -> 31304 bytes .../nxdl/applications/NXtofsingle.h5 | Bin 30184 -> 30184 bytes .../nxdl/applications/NXtomo.h5 | Bin 30256 -> 30256 bytes .../nxdl/applications/NXtomophase.h5 | Bin 33464 -> 33464 bytes .../nxdl/applications/NXtomoproc.h5 | Bin 28048 -> 28048 bytes .../nxdl/applications/NXxas.h5 | Bin 24968 -> 24968 bytes .../nxdl/applications/NXxasproc.h5 | Bin 18584 -> 18584 bytes .../nxdl/applications/NXxbase.h5 | Bin 32288 -> 32392 bytes .../nxdl/applications/NXxeuler.h5 | Bin 37080 -> 37184 bytes .../nxdl/applications/NXxkappa.h5 | Bin 37496 -> 37600 bytes .../nxdl/applications/NXxlaue.h5 | Bin 41120 -> 41224 bytes .../nxdl/applications/NXxlaueplate.h5 | Bin 42008 -> 42112 bytes .../nxdl/applications/NXxnb.h5 | Bin 36088 -> 36192 bytes .../nxdl/applications/NXxrot.h5 | Bin 38808 -> 38912 bytes .../contributed_definitions/NXcontainer.h5 | Bin 6144 -> 6144 bytes .../nxdl/contributed_definitions/NXcsg.h5 | Bin 6144 -> 6144 bytes .../contributed_definitions/NXcxi_ptycho.h5 | Bin 31416 -> 31416 bytes .../NXelectrostatic_kicker.h5 | Bin 6144 -> 6144 bytes .../NXmagnetic_kicker.h5 | Bin 6144 -> 6144 bytes .../nxdl/contributed_definitions/NXquadric.h5 | Bin 6144 -> 6144 bytes .../NXquadrupole_magnet.h5 | Bin 6144 -> 6144 bytes .../contributed_definitions/NXseparator.h5 | Bin 6144 -> 6144 bytes .../contributed_definitions/NXsnsevent.h5 | Bin 96104 -> 96104 bytes .../contributed_definitions/NXsnshisto.h5 | Bin 101912 -> 101912 bytes .../NXsolenoid_magnet.h5 | Bin 6144 -> 6144 bytes .../NXsolid_geometry.h5 | Bin 6144 -> 6144 bytes .../contributed_definitions/NXspecdata.h5 | Bin 52344 -> 52384 bytes .../contributed_definitions/NXspin_rotator.h5 | Bin 6144 -> 6144 bytes .../nxdl/contributed_definitions/NXxpcs.h5 | Bin 60464 -> 0 bytes .../python_scripts/h5py/ex_h5py_NXarchive.py | 4 +- .../python_scripts/h5py/ex_h5py_NXarpes.py | 2 +- .../python_scripts/h5py/ex_h5py_NXcanSAS.py | 141 ++++++-- .../h5py/ex_h5py_NXcxi_ptycho.py | 4 +- .../h5py/ex_h5py_NXdirecttof.py | 2 +- .../python_scripts/h5py/ex_h5py_NXfluo.py | 2 +- .../h5py/ex_h5py_NXindirecttof.py | 2 +- .../python_scripts/h5py/ex_h5py_NXlauetof.py | 3 + .../python_scripts/h5py/ex_h5py_NXmonopd.py | 2 +- .../nxdl/python_scripts/h5py/ex_h5py_NXmx.py | 40 ++- .../python_scripts/h5py/ex_h5py_NXpeem.py | 150 --------- .../python_scripts/h5py/ex_h5py_NXrefscan.py | 4 +- .../python_scripts/h5py/ex_h5py_NXreftof.py | 4 +- .../nxdl/python_scripts/h5py/ex_h5py_NXsas.py | 4 +- .../python_scripts/h5py/ex_h5py_NXsastof.py | 2 +- .../python_scripts/h5py/ex_h5py_NXscan.py | 4 +- .../python_scripts/h5py/ex_h5py_NXsnsevent.py | 4 +- .../python_scripts/h5py/ex_h5py_NXsnshisto.py | 4 +- .../python_scripts/h5py/ex_h5py_NXspecdata.py | 8 +- .../python_scripts/h5py/ex_h5py_NXstxm.py | 4 +- .../nxdl/python_scripts/h5py/ex_h5py_NXtas.py | 2 +- .../python_scripts/h5py/ex_h5py_NXtofnpd.py | 2 +- .../python_scripts/h5py/ex_h5py_NXtofraw.py | 2 +- .../h5py/ex_h5py_NXtofsingle.py | 2 +- .../python_scripts/h5py/ex_h5py_NXtomo.py | 4 +- .../h5py/ex_h5py_NXtomophase.py | 4 +- .../python_scripts/h5py/ex_h5py_NXtomoproc.py | 2 +- .../nxdl/python_scripts/h5py/ex_h5py_NXxas.py | 2 +- .../python_scripts/h5py/ex_h5py_NXxasproc.py | 2 +- .../python_scripts/h5py/ex_h5py_NXxbase.py | 5 +- .../python_scripts/h5py/ex_h5py_NXxeuler.py | 5 +- .../python_scripts/h5py/ex_h5py_NXxkappa.py | 5 +- .../python_scripts/h5py/ex_h5py_NXxlaue.py | 5 +- .../h5py/ex_h5py_NXxlaueplate.py | 5 +- .../nxdl/python_scripts/h5py/ex_h5py_NXxnb.py | 5 +- .../python_scripts/h5py/ex_h5py_NXxpcs.py | 314 ------------------ .../python_scripts/h5py/ex_h5py_NXxrot.py | 5 +- .../nexusformat/ex_nexusformat_NXarchive.py | 4 +- .../nexusformat/ex_nexusformat_NXarpes.py | 2 +- .../nexusformat/ex_nexusformat_NXcanSAS.py | 140 ++++++-- .../ex_nexusformat_NXcxi_ptycho.py | 4 +- .../nexusformat/ex_nexusformat_NXdirecttof.py | 2 +- .../nexusformat/ex_nexusformat_NXfluo.py | 2 +- .../ex_nexusformat_NXindirecttof.py | 2 +- .../nexusformat/ex_nexusformat_NXlauetof.py | 4 + .../nexusformat/ex_nexusformat_NXmonopd.py | 2 +- .../nexusformat/ex_nexusformat_NXmx.py | 34 +- .../nexusformat/ex_nexusformat_NXpeem.py | 130 -------- .../nexusformat/ex_nexusformat_NXrefscan.py | 4 +- .../nexusformat/ex_nexusformat_NXreftof.py | 4 +- .../nexusformat/ex_nexusformat_NXsas.py | 4 +- .../nexusformat/ex_nexusformat_NXsastof.py | 2 +- .../nexusformat/ex_nexusformat_NXscan.py | 4 +- .../nexusformat/ex_nexusformat_NXsnsevent.py | 4 +- .../nexusformat/ex_nexusformat_NXsnshisto.py | 4 +- .../nexusformat/ex_nexusformat_NXspecdata.py | 5 +- .../nexusformat/ex_nexusformat_NXstxm.py | 4 +- .../nexusformat/ex_nexusformat_NXtas.py | 2 +- .../nexusformat/ex_nexusformat_NXtofnpd.py | 2 +- .../nexusformat/ex_nexusformat_NXtofraw.py | 2 +- .../nexusformat/ex_nexusformat_NXtofsingle.py | 2 +- .../nexusformat/ex_nexusformat_NXtomo.py | 4 +- .../nexusformat/ex_nexusformat_NXtomophase.py | 4 +- .../nexusformat/ex_nexusformat_NXtomoproc.py | 2 +- .../nexusformat/ex_nexusformat_NXxas.py | 2 +- .../nexusformat/ex_nexusformat_NXxasproc.py | 2 +- .../nexusformat/ex_nexusformat_NXxbase.py | 6 +- .../nexusformat/ex_nexusformat_NXxeuler.py | 6 +- .../nexusformat/ex_nexusformat_NXxkappa.py | 6 +- .../nexusformat/ex_nexusformat_NXxlaue.py | 6 +- .../ex_nexusformat_NXxlaueplate.py | 6 +- .../nexusformat/ex_nexusformat_NXxnb.py | 6 +- .../nexusformat/ex_nexusformat_NXxpcs.py | 278 ---------------- .../nexusformat/ex_nexusformat_NXxrot.py | 6 +- nxdl/nxdl_to_hdf5.py | 31 +- 125 files changed, 452 insertions(+), 1043 deletions(-) delete mode 100644 autogenerated_examples/nxdl/applications/NXpeem.h5 delete mode 100644 autogenerated_examples/nxdl/contributed_definitions/NXxpcs.h5 delete mode 100644 autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXpeem.py delete mode 100644 autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxpcs.py delete mode 100644 autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXpeem.py delete mode 100644 autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxpcs.py diff --git a/autogenerated_examples/nxdl/applications/NXarchive.h5 b/autogenerated_examples/nxdl/applications/NXarchive.h5 index 6698ffbf99685d71e89dd3935438385e43624828..3e6eb45ceeb816c813d3a7a40c842188a948a09b 100644 GIT binary patch delta 488 zcmZ25foZ`6rVWhT0wy7bCRV0qR>nqpMh2#aMw11(BLtBJjSS2!j5b$sUy@~Js8!nR zuUX0oVodhebe+s&`~t?_Y-93(5v)SqOc%oNH-|FnEw(a4)mct1u=xUKFR+EM_b0h- zzGG(r);1Z$iE)5(K(^d*gxfNi#~IGvY~xbF1hanfA2)=Aj>ieO#AX|BWL3U!Rg-o6 z;q1*Z0Z58ug5eUAeL@iInotCLO&FZL`A#^J<~dPtiOFZ85$r!PaQ0@MIA~DuC)7fM zsy`7LRQr>lBK9e~;4s_lpMDkM8Bn<7WFZC8n`}`|l&CT_GB7gREL0jL1P+$`_Kg5i Cx|k*a delta 488 zcmZ25foZ`6rVWhT0>&YRCRWBKR)&UpriLcQmXig!BLvX}%{NzZUy@~ZR#V*UuUX0o zVodhebe+s&`~t?_Y-93(5v)SqOc%oNH-|FnEw(a4)mct1u=xUKFR+EM_b0h-zGG(r z);1Z$iE)5(K(^d*gxfNi#~IGvY~xbF1hanfA2)=Aj>ieO#AX|BWL3U!Rg-o6;q1*Z z0Z58ug5eUAeL@iInotCLO&FZL`A#^J<~dPtiOFZ85$r!PaQ0@MIA~DuC)7fMsy`7L yRQr>lBK9e~;4s_lpMDkM8Bn<7WFZC8n`}`|l&CT>H8U~TEL0jL1P+$`_Kg6$=an@8 diff --git a/autogenerated_examples/nxdl/applications/NXarpes.h5 b/autogenerated_examples/nxdl/applications/NXarpes.h5 index 1cc5f835605721dda0cb87ae5b30290344ae09f0..1ba4164cc48252e8c6ae8c1be7131d7211d413ad 100644 GIT binary patch delta 292 zcmbR7fpNwM#tjcS1x-Q>O{`4Ktc;EHjLpp~%?&nx;@r-KENo(IX<}lrd6&p0X=a96 zrOo*UrJNwf1pa8Kh4wKp_r}R`fTiTqe+mEqV3AhZ delta 292 zcmbR7fpNwM#tjcS1&u=tO{|PftPBnH%q+}|j4U^Q;@r-KENpIQZenh{d6&p0X=Z0N z#m)H!rJNwf1pa8Kh4wKp_r}R`fTiTqe+mEqZZK5k diff --git a/autogenerated_examples/nxdl/applications/NXcanSAS.h5 b/autogenerated_examples/nxdl/applications/NXcanSAS.h5 index e7261a2e10a837f291ba2b64750f4e5110624c78..c12ab9c8cf0550a12e759ff50c1b77fb61ff34d7 100644 GIT binary patch delta 2052 zcmZ{le@t6d6vyA8MM`cFUEzCFvOEfWNWQ7r@QIjoMA~RWF34izp2Jd_CK4@krB=?-p z_ndR@IrsH-a78&x{)<36Qrrrmx!!Y$FwQ?oJk+3o{(LlRZ{+PwDu8Olwbb$x&8v_+ ztp`T47^N@*;o1{Qr1b0+0!yP zBNO}gQhKmU%0ic4zW`qTpyQ&%XPt7u8#HCzLye%1Q%E~@Q?l)+!3!Zu>cZ4mh{&Wz zCU5qLTcA2yBj49sEuK|$w%(#naFi&0KS^PNb7>$>VK2lvm)@a{Fh=&>^HL6R(Czou z=)4;Ft@mk^xaWsP+T%rfq_U5wG5fJhhGjA$&ta63^)YG$@#l)P%8v5N8k4!EqQYRZ zm?}+GeEz3DbK-c`r{%yaa_X0~_2898{;RL$Hi%R5jodA9tUOiLryJ3Yt8yC_bpP6> z*pk5a&r6)x{K@NarEY&4SL%-&afdv;4z*Y#Q2#dC}q{mUlh6s(_Fn@!rRs3iy@3wb7*MREeixnD&NtcOV+> zl}^Pl3d+k3<)W2F{iNM^mm}(6(y1>UpJ7_4j|R8BNYClVv{0noDOTne<*_#K{vXDm zdEn{DJX-E)esB+-zXw0G2QQ$Uwv876at1gG$xM8KNHpBzC!-TObnb2|K0o40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l8tKqw C?_*E^ diff --git a/autogenerated_examples/nxdl/applications/NXfluo.h5 b/autogenerated_examples/nxdl/applications/NXfluo.h5 index 9b91948dcade8aab3be2aa4967392983dabdcf1c..a815e0d6deb150b969ee3249fa237ca15de23700 100644 GIT binary patch delta 204 zcmaE`o$sD9mKLU#<|dnixXf7*!X|nK28L#a2AgN`KT=_4 ztX0}vZ&Jz$Voa_#v7BsR_l21W%yyleWB&pw?z(x7Lj@CzGdac?E-|^s1;Xz4cHO+k ywSWnvd$YbrEHjwV@2$%SX6*Ob3z4e#hcfJgRKZe{^*vlSuL*8o2ivP3y%7Mump;+} delta 204 zcmaE`o$ZUWin^Ka^n~qzaartncBvc};KwJJ@*r=#2nqT|KJ+ diff --git a/autogenerated_examples/nxdl/applications/NXindirecttof.h5 b/autogenerated_examples/nxdl/applications/NXindirecttof.h5 index 0aa8234289644ad802b82c4d27b8b2ccbf7758af..c4c0f63a622620e1b65d6046b07979cf555d1903 100644 GIT binary patch delta 323 zcmZ3`#k8P{X+tKLph<|KiIu6Dm9dGQk&%Isxyj}#uIbz;!ls6%rbe5U#8$~MGu0|> zK5tUW31Un>Z(_N*!R`$sSTx^37s8nDxRnVkz2DPy@*I~JVD@}R*Ue{KEx;;(`dl~r zxEFv`ZQk$6%M3Q)yiYB}0DnIyHg5Y5E1_fsMYn6P!anW zs7QWnDZ~h%V>au=LmdDzZ%sl4LMA840^(+n%$t-G2+p5$Bt12m0^DG?_Loc)006Vu BWVQeR delta 323 zcmZ3`#k8P{X+tKLpmB(yiIuU5m7%eoiHVV!f%)btuIbz;!sf;nCYGC(#8$~MyQ(Q} zK5tUW31Un>4-{>%d&3A8&3Dj+Fy=dMWdcj@_jH{+$K?f>J>SuF^BGqQunM3)*Udie z1z=U1_j~d(gAF+EQwuS`-w(<-?|&4c0i^p*paDb!e+X2%KXfld#6JRRb$ujM#6AWp zk{??NF#_nA%{uW=2Y}35lTd+>$w{(+xEUn#CglWz^CuliPfex(H`uNHB@+bzp6p_- diff --git a/autogenerated_examples/nxdl/applications/NXiqproc.h5 b/autogenerated_examples/nxdl/applications/NXiqproc.h5 index cf354aafcfc369abee0eef2a2273faa1b91100b7..19d2f56ac08da7170c613f4170497efc97b38077 100644 GIT binary patch delta 209 zcmdmRpK${aO%xI|2{AOWGBvX@HqkRSH#0Rd+Pp~UkTNqF<_IGgX= zt1`hweVi)boXI?{FJKarZQKy-9CtW-^BfN(4KdzuiOD@aaQ5asz6D@YH|qz8GDD5D c+}sfC!U*GR3PrFtH-ydM07-0?kDn+20C_P-_W%F@ delta 209 zcmdmRpK${aO%xI|4ly*bGB&X?G}beF<_IGgX= zt1`hweVi)boXI?{FJKarZQKy-9CtW-^BfN(4KdzuiOD@aaQ5asz6D@YH|qz8GDD5D c+}sfC!U*GR3PrFtH-ydM07-0?kDn+201q@qzyJUM diff --git a/autogenerated_examples/nxdl/applications/NXlauetof.h5 b/autogenerated_examples/nxdl/applications/NXlauetof.h5 index 15521b6b9b83455903c1eadb906d05d220d31369..914934729b031cf6b28ee9c7b4a636c2f545a8ff 100644 GIT binary patch delta 422 zcmX?cneoJB#tj@olRbn57~Li_3YB}hGeCe8lr}OjGSW3L)-^B*F*LC)!t6iVbt3~8UO7{5$g6hT7ab|gG{h-hI0Pv0*!O2fGe9^^yD=j z5H?8B9Zw`hb9^3vt*rOeg;=@Xua}9@Z?kRSa~5Ezs)qSbJ`yG}xg*Sm(PQ$_Fn>nR w$+h9ulLNweCLamco7@#{HCZP@WpYBGz~mp{CX;OfRVD{S)PRjVAMsNF00yda?f?J) delta 380 zcmX?cneoJB#tj@olNE#t7~LjM6q1lI4ly*bGB&X?G}bdWH8n6cWB>#A$p?kRB|RV< z239C-tY@SLQs6oHqmVqK*JMFqaY=8e91E1rOUz9LF?}XG3X3!PPG%GmpIji!!L)*9 zv!VVxmQ50WM44UH6es`Joy+LCd9L1d4luXg)^+n9^Ak*P&KWBMMi6K7f9qNZquv(E z_-|K=P`Ag?0xUflWP*(|l=EK~Xq-z0T-oFr_ZKjuC$I5mfJW~Sz5W|o_qxc0N72%8%lSsHB)5~@;SW~x=% zeBPv#6U3N&-o$cpgWVS>+ja6D`xh|w<~I%%Ofb&mHO_E}$#+~JZ217!%{*==Ac{a7 v8P5Y?&gT2xwTvLGo8x`=LPX>Ppd#}Fp(61ix)3$}p<7{&vEAGfzefN7M59N7 delta 218 zcmX@`fbqZs#tnsBg2o|+CRWBKR))rU7G@^K76zM}xc0N72wNB!7#MF35~@;Sc2!f{ zeBPv#6U3N&-o$cpgWVS>+ja6D`xh|w<~I%%Ofb&mHO_E}$#+~JZ217!%{*==Ac{a7 v8P5Y?&gT2xwTvLGo8x`=LPX>Ppd#}Fp(61ix)3$}p<7{&vEAGfzefN7$xB8f diff --git a/autogenerated_examples/nxdl/applications/NXmx.h5 b/autogenerated_examples/nxdl/applications/NXmx.h5 index 06f4de2ac11bb271fd38096ac8c71ce4a30399d7..f765220cc2db3d51aacefd496cb94d245b3c9b9b 100644 GIT binary patch delta 1761 zcmaJ>ZA@EL7`|`IrI$fz*{CgA>{wi24BFm)5C&z%kQz)_#teyUx==Ei9VvxD=P*JF z5e+ICD`(*tgG2vK!(8!XL6kYrnBYfb{4gvTxvke#b$U8EgiBVv#nq64ncCZcp@f|lx-** z!bEm7xb^zM11Q)PLJP-}k{?ty5e+t5NwoP-&?0;0PBg&#BD&nygj!nPrA_2PYbB_L z;}kcJzi?2e;gN;Y{mgN7hR{Gb0Lx@PT$|3Lz?n_07DZoTwo*!_I;vGzDvH=&-e4S$ zBAmn3Y1FH%!LFMO%yB-10zDf{%6UynFPB2u7vkGgTNlzcv0v*snY-qdRh zFEPOJZVV2xQdeR)XUNIs)J*0R7;^5om}^5PhZ|HG)5CAD>bB7kiN5Y;XP6$j#iX~5 zGBC3K)&*8KJ)&^F!<5mUAIA6)sMB<5Q9UU!CApg5#KG;p8I&F#TDy|AN#5k>K6S#b z&N>wMTq0{9No-=%BX#Jh8MTs_uBV~uQ2Y}XY`ejU##3CW=~HfulVe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vx}mQ^VvgGE8bTM*KOlWPP{w$?vy6v*9vi5%!%SesR$EB8AWM42huae$s(?M zyZYb2;XSbo=C8)~h5+-VC zzI@|41aFdE1!1vJSf)@#5bY>NNr!ZTh*M!TaQp~kPeD8z*qfjO9IZJJ84hFMKqxAR zYX(7FbsRS=#8d?eokvllpsTQBC~_6jf2JY+9Ai@n?y1T^*gFcp2jS|RNQYMPAvUfm zK$toQ`V^z*Q6Q?SyTM5i+6tspz5ZhbRd z8L9`8L5RRrXG5KWA@$Ul4lcy-IS3zdR0ZIz!$(2Eaj}pcnn_{iEC@suA@*^56-0}x zLjzNxWi$drUw|N07zGcbQ9(@GF$IMI$iUt8qND`DJ)x$EjYah-6^->zghv%PupCAl zQ!qb}SY?PY1ihp1R|1l*ONxl91>qnmsF~wd>rL#Q0tLC_m}g1bkRx?xhH27f;9OJ% z_;Ue^g{V{9ITR`w>zznGOwE-Ih@z1cIm!VQ<+cO=jgWnO(5S-GTE~xiugh?7%V5#%AW_7U z?I`lY>2V%_idCTv~H|x8>~aeIhnRaM3P~{*;4$6)8viT6Qj{fBTph`Mp8w nd!1grXTf!bv=gyS`NwsM@X>3Po$>lF5!d09 diff --git a/autogenerated_examples/nxdl/applications/NXrefscan.h5 b/autogenerated_examples/nxdl/applications/NXrefscan.h5 index a7144ba64cc164b3d960c8da0826d4d30528fc0a..9638d6c253a671c64ac38fb07633da8fcd8aa165 100644 GIT binary patch delta 249 zcmca`i1ET9#tn{K{3aoWCRV0qR>r1!rj{m_lLNRS(Zx3J;L>ChL{eyGXkcbwvH6og zmohVRt7{+h-#<3Okjq+t1d(&-wn!`@6O5$ z)4chC*Bywu{k})R>VU?(Za(8*0T!J+-`#a{Pml#dh9?9eGxChL{?~OZeeM;`IA7G zGP9eS;^umjQce(Ka=nS=WCOb|aCU+{jP1I4j>7{+h-#<3Okjq+t1d(&-wn!`@6O5$ z)4chC*Bywu{k})R>VU?(Za(8*0T!J+-`#a{Pml#dh9?9eGxr1!=EkO`#+D3VAU63Sm;B@zT!w-e3O3*3(&s=C zHZ?S~G}$aATqMWLT&uLX->{Su#F*S~XgS%z`U{+0U;|^jZeC;ifDxkFUKhgH@4(6o zQ@Y9J4ii}RzS~i-?Bx9puAAR@SRgn#UPzob-Ubl$@_w}t)8_l{g^0ulK}GHdLq+C? il|qaGxi26B;wF&!J&_e~iOmktPhh^V-JFsdA^-r_B3@Gf delta 308 zcmdn-nsLW##tn&F62>8hCRWBKR)(f}24?0)hUN@lAU63Sm;B@zT!w-e3O3*3(&s=C zwzM!YGu$jCTqMWruBN!T->{Su#F*S~XgS%z`U{+0U;|^jZeC;ifDxkFUKhgH@4(6o zQ@Y9J4ii}RzS~i-?Bx9puAAR@SRgn#UPzob-Ubl$@_w}t)8_l{g^0ulK}GHdLq+C? il|qaGxi26B;wF&!J&_e~iOmktPhh^V-JFsdA^-pZJ6xRr diff --git a/autogenerated_examples/nxdl/applications/NXsas.h5 b/autogenerated_examples/nxdl/applications/NXsas.h5 index 0527428c415b9c2cc420b4963ea391de68022cb0..daf4c226fefdd1b99a6fbc79914b444290d1764c 100644 GIT binary patch delta 369 zcmbQRnQ6jirVX6jf+it`CRV0qR>r1!mPSUFmd2B%xWgroMU5@YjEoq-Kw+{XxBTW6 z+$mYKoirok}@DjLG~?mXi;7e}S_<_`uk%n|1siFhW!Z>}3Ko&Ijp2ME(au8Tz5T z%wQ?|2&hPYBvi3}Of5w5`dFx%{RvPJ`y?o1e=40Q;98Pt;ga;S)Z6;w@qbru&&Kw26YTbOPB)%r*X K93=N=YyP_3p IPbQWC0BB2j`2YX_ delta 371 zcmcbygz3f-rVT&21dT%sO{|PftPD-{Oe_t|jSV()aUU{fc2`r}eBQ2<6U3N&-p+Dz zgU1&r+ja6D&lfQE<~LpyOfb&mHNJ3($#?wV?9Ds@P(}Q4uA9#USunzk-Rux@1)?1! z6B7=V0dej`AaP=%kT`du4ZwOf^T*YKP1@Wa4`uKt!bFmInL(Cpo}YRZVZojZxYe$c zZL$y!%*jS_piUk_)#f$%2${(_MGwG+`WGLCcmeF{(zTq(!Dwo1Zfa?=S*pHE2o#}MrJ@@IN6FTTmnOs0Sv?^J95cyKEdV4gsE?{ z6z?MiW|mr|&Hr^vIYErc|8*@VZ!rG?XFsrjv0XRISlwWRNo+Q-xx)n3%5Trg3>OV> MdczLp*n4dR0MThQRR910 delta 177 zcmew`mGQ$=#toWWg2o|+CRWBKR)(f}W(EcZ7G{&JxWXkcL>a(9e6k~#{N@u}j!Y=} z3{A}qj5bU0K2l(IS5w^lU$>MK#F+eF*K+a(^Dl7r0}B}2b+e4s4Mv#6W&@i$Okl12 S_N>fs(Ez76>|l<)*G2%Ho-=^} diff --git a/autogenerated_examples/nxdl/applications/NXspe.h5 b/autogenerated_examples/nxdl/applications/NXspe.h5 index d8f6b016d7bb2c84a5fb388e4e00a93146ea8365..ccf1689d0d87b4efbe07cc4b93edd59c46f173b1 100644 GIT binary patch delta 241 zcmcbymGQ<_#toVRf+it`CRV0qR>o#}#%2a4M#h`11Qy9Kv(zeWzOPft31UpXuj4v- zj@b(^d%v~o<}>C8n7}Ift#lc|jQ!TN5Qe=iFEd!g-vKIe-Vw_1cZP|$l!CPb&9$7| z;Qj?{E{MIs1HuN`@y62vY$Dk59B+u_Kt-D;_*{YO-n_sc&T*Z*CkUbHL9h!O)Lhre HIZ-(P5q?sw delta 241 zcmcbymGQ<_#toVRg2o|+CRWBKR)(f}<_1QF#%7zX1Qy9KyQ?W~zOPft31UpXuj4v- zj@b(^d%v~o<}>C8n7}Ift#lc|jQ!TN5Qe=iFEd!g-vKIe-Vw_1cZP|$l!CPb&9$7| z;Qj?{E{MIs1HuN`@y62vY$Dk59B+u_Kt-D;_*{YO-n_sc&T*Z*CkUbHL9h!O)Lhre HIZ-(PUsX{T diff --git a/autogenerated_examples/nxdl/applications/NXsqom.h5 b/autogenerated_examples/nxdl/applications/NXsqom.h5 index 86620224e80914e7c0eefbda147d039f79d75eb8..f13531bf1f6e9518692e004743d5db109e41d73f 100644 GIT binary patch delta 218 zcmbR7gmK0b#tnf&0wy7bCRV0qR>o#}riNx_#+ws`l9icRYLzD2+q-V&F*D!oA zt1`hw*Em+dIg@i-Uce+K&v8Yt&$z+aoBy~YY1rchmzey<8_wP=<68hWb#uSJC^Oi| o{1Dg8Z-N>a!7j)TISOV>28q^$K}G+Ew}KrAbgk{?BZ(mb00Z|%F#rGn delta 218 zcmbR7gmK0b#tnf&0>&YRCRWBKR)(f}7A8jKW}6d*l9id=)f6Y&+q-V&F*D!oA zt1`hw*Em+dIg@i-Uce+K&v8Yt&$z+aoBy~YY1rchmzey<8_wP=<68hWb#uSJC^Oi| o{1Dg8Z-N>a!7j)TISOV>28q^$K}G+Ew}KrAbgk{?BZ(mb0Eibv-v9sr diff --git a/autogenerated_examples/nxdl/applications/NXstxm.h5 b/autogenerated_examples/nxdl/applications/NXstxm.h5 index 4bd3371f7a42298923257c129f39d6f0125c2dac..6252beb0f3231db30dc84826f9df4dd9a8e0c1a8 100644 GIT binary patch delta 277 zcmbQx%QT^vX~Rcu36l^*6Dw0QD`PV~GYbn7V{-;DP?%iEBR^S#$50SM!R9QUAQNVm zTBXhV9ZEStjLG{QEGHLueSxzVc*EGPoA3BMV1%gl+sg!I)CcN9MAipE8TW&sQuD*0 zjQB_>Lp}z|xE}{olL%9j0#lP-3o&qh2GqdwnNY_6EGR=i$A}x*FXjd&1{Ri^i^{Y3 Kz|Owkx)A_@pHtre delta 277 zcmbQx%QT^vX~Rcu3F8n$6DwmAD?>9q17ib23rhwtP?%iEBR^S#$50SM!R9QUAQNT} zHO0;Q9ZEStjLG{QEGHLueSxzVc*EGPoA3BMV1%gl+sg!I)CcN9MAipE8TW&sQuD*0 zjQB_>Lp}z|xE}{olL%9j0#lP-3o&qh2GqdwnNY_6EGR=i$A}xnFJ^`&#zvcq%Cq>u J&c5He5df%o#}mPSVArly;_xcIqIgiTEhj4U^=5=~NKW~o)$ z%x_W331UpBoTvtfdij{62vc<8 zprY&Jkwo_-B3WdUYyfu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index a795a102f506b2c1720e10fde382a2d1867d0f9f..73548d32798b93910bc8a4440b64e4078ee18019 100644 GIT binary patch delta 271 zcmaFyn(@VJ#tn^Jye1)rCRV0qR>tOfCZ?PFxRN;qk%cTw4ULR8Gl_hXWoE5anw)QK zx!J(Th7-iuoNukl1QVTn!S)N7E$`#Hna92YA_3x@akOBBsoLz|TmzQbyx&!n8LnQ& z6RHHHevVfISp8;spIQiGzHceqp3MOPEpX0cfnbQGAZIy*KqY{NOy&uH0XN+y!T@4U Tek9bu_fe@_a3@VjjSv6;5Pwhx delta 271 zcmaFyn(@VJ#tn^Jyv8AhCRWBKR)%JJ=4PAwxRN;qk%cTxjm#`IGl_hXW%f{0oSbiM zx!J(Th7-iuoNukl1QVTn!S)N7E$`#Hna92YA_3x@akOBBsoLz|TmzQbyx&!n8LnQ& z6RHHHevVfISp8;spIQiGzHceqp3MOPEpX0cfnbQGAZIy*KqY{NOy&uH0XN+y!T@4U Tek9bu_fe@_a3@VjjSv6;XTMH* diff --git a/autogenerated_examples/nxdl/applications/NXtomo.h5 b/autogenerated_examples/nxdl/applications/NXtomo.h5 index 7f10d6402d9a9fccb14c10d7d904ab1bc3e07851..d9f3b433f499e95c999147e91756e8becbfd04ed 100644 GIT binary patch delta 318 zcmdn+hH(QBRdNZMgczDwnVMM{o9mewnVK6KPwwIhm%tEZ00YU%6S?F!OK=BrqUbX* zG&VQfTqPnT%gkD6K>9a7aJd4O1{?Ol9b!PdpX+8FPYZ}D5NC}S5=Y0!0AgaiAJoKte<)*r0MxSj f;G+oLJ)uatdBTx6JrPi&_D9|20=sg4>O=tm_sLzG delta 318 zcmdn+hH(QBRdNX$hZvez8Jk!cn(0{@85kK`PVV9gm%tEZ00YU%6S?F!OK=BrqUbX< zG_f$+TqPnT%j}`1xVhi3loQ05+;3<(*}?h?oLyi8W4mr%WBY&+qS}5h6PV%eqze(L zcUA>6K>9a7aJd4O1{?Ol9b!PdpX+8FPYZ}D5NC}S5=Y0!0AgaiAJoKte<)*r0MxSj f;G+oLJ)uatdBTx6JrPi&_D9|20=sg4>O=tmAs<`Q diff --git a/autogenerated_examples/nxdl/applications/NXtomophase.h5 b/autogenerated_examples/nxdl/applications/NXtomophase.h5 index c49e6aeabd9d91a132a769fc821b90bcc0554108..56b00e461ac9c698a20847255d846f06f59f1848 100644 GIT binary patch delta 341 zcmdnd%Cw`EX+tBogh_~@iIu6Dm9e>=g_(hYu`vS}$WCVDk)OPS+fWcg!RBAw$JtSY z%}vcLEH_^gzNE^`TB|g<-qm&U8%qOD5NETzvo0f;;qL-v)VuD5h}gUDWdck6_k>F6 zd#i$_Cie%pZl2?F0xS*UOkU&v0Iak>fR`D}m>-O!lqVEPsZ7KRkc!FniLRS{A}t^W yf;eZQkT^au1`x~ZywP6_Dl*A$0rS@F=Hv%i$MR{ZcZr*5dZ+6CS$?? delta 341 zcmdnd%Cw`EX+tBogmH+WiIuU5m7%$wp{a?fsRaWV$WCVDk)OPS+fWc$fw_U9g~8@u z+{f8bge^=h3=B74627F$?5U3ge!r6%_WxNe@~a{??4;!IxS{{XDCKY*7R%$OgHq?9KVNvTZ43y_M*_KB{W zeIhL&27)+eqL4T~F$NIJ>*JuVuunXSQ0tS7r1ne-62~VErZHnF*o#2_+HOuM3K0MR DjM!n) diff --git a/autogenerated_examples/nxdl/applications/NXtomoproc.h5 b/autogenerated_examples/nxdl/applications/NXtomoproc.h5 index c8ac4a8086a99cdac1413a06a22265111becc407..4dcf608f1aed314d9225e24caf66b163da01813c 100644 GIT binary patch delta 233 zcmbPmn{mQz#tjpB1WiH=O{`4Ktc)%63=9m+j7&B!;+f8dB5Vj0HQVeZ+$GPMwJOJy2q{p&Y4`}_yQ&|d5sgCz4?walA<|oaEZxh++l3X$satv zz%*~x@hSkDx_Q2jC^J~JKG1dZAO8kM5NC6J;88GRGDx&1m;>xCpd)QJUy0cx001pb BN#g(j delta 233 zcmbPmn{mQz#tjpB1dT%sO{|PftPIWdj13LU&5brM;+f8dB5Y)4Y-zmNOSns(*;7q% zvcHY%W*K7xP7r6azl|yrTy&3J1)MXv#_QC|uj-JAnu@HqQxxb1WwZguek9zS%xvDhJ#anZz6bY~MgY delta 214 zcmeA;%-C_5aYH4SpmB(yiIuU5m7%$wiLt4QC|uj-JAnu@HqQxxb1WwZguek9zS%xvDhJ#anZz6b2!cNl diff --git a/autogenerated_examples/nxdl/applications/NXxasproc.h5 b/autogenerated_examples/nxdl/applications/NXxasproc.h5 index 1ee11d1f3824fb9f1f46e8930d1c40ed59288839..d9596882cfa512f818c92992bf0a0a2fa609be1e 100644 GIT binary patch delta 176 zcmbO+k#WXE#tjF#1WiH=O{`4Ktc)%6jEqezO^i2R;yTZaB5Z14YH7K76Q7hcGh40F z=JT4RoFK;J^O~-cdyHSe*qis5R4~CflWWZ35|h_hz}S|PFIawosoBh9jnJ_9jO_`S SZp+OV97Nb*$|mc0w>sv-e<04aGo2><{9 diff --git a/autogenerated_examples/nxdl/applications/NXxbase.h5 b/autogenerated_examples/nxdl/applications/NXxbase.h5 index 45ea9e801cba1678392516494c2d9fc211b8706e..7babf5c7ee403107b2a92badab830021bee8ad5a 100644 GIT binary patch delta 543 zcmZ4Rhq2=?;{*-Hj*XiA?2|pR1U8>wKglF$5@Kj#Wol++Y@ugjU}kP%ym=8<9xqcw z?Zl08n++u1$S||jDs7fG?PX--+?-g%%szR8?GupLWO-A|$rtRtK-sR7c^qEA*qdz} zE0|!M$$y;T5|edYA?*1fuA5`r4nP%oHZp$LywGzpgbR|Z@v&e88vx?`@kQd)_#1#_ zHm?uRg)r_1?geYyJU;{~ay}Hw_#Xyk=ttB-bw!pUY{`j%8Z2+>y7^5k)XhLEC$C9B zxbse;0y8f&0|SEq5Q4yo&77(BtdkdbN=#13`Z3ufM}U!ea$t73Ckt4bfk6sN8yOfG z=^7a88X$+Vv4w%D8AJgqR2>_XHq;*8vr4U5#7ey{`M<3Ibv1L2bss(dE@sS=rdpvs1kb@JaTe@3>=zSZK4lh4$s mOjf9|n0%my2WZgQn)%=`&98L@nq=!?J^4c|574yU6lDNl@}V*S delta 531 zcmeD9%edeV;{**xg^im1>`XhVH}7J<&Ln6YVrXJzY+_|-u4iUpYGz@yc@bA0FVlyb zi5ulM8%Vs7VfIv0+$?X}%gD&Fxv_|ueewp|Cm^xO@}`!PFW7y7vRx{vq+su02Bdi9FsSsh)%v+We&7SwAz2NNVUl1ifS81*2%Ip){{R}-(h5%e6}Wi f@|hZy$q}_R&{(kLOvr-R$~jrK&K+oCZ;CPiTt=No diff --git a/autogenerated_examples/nxdl/applications/NXxeuler.h5 b/autogenerated_examples/nxdl/applications/NXxeuler.h5 index 8dbdc9a92f3f116be7df2948b61bd05f5ad5bd7f..23c7db1bd1ea1b4f87a20401b6c2850a1e234dbf 100644 GIT binary patch delta 609 zcmcbykm?+|trw^Cd1jUM7JF z6F16jHjt=MU}mdT+PvOkEhD4o=0vOeY!eT#Om=X50ur9Q-okQog3}vDuo{0CT?nJz zbuSZG#NGoclJ5y+%=cnthUuLAz}JIu#b!;v$q?2118O1q?Sr6<{lTSR5s*ET3qrp@ zb-Hd|6IKD%GkLz3>*Sos7hnkxdrlOBeI^>t-ux%V0%8(S(dL>s1Bi|56QCC9CqZ5O zJ_YJf`8251{B)>PeAZEf5ji;mV1I0`&!5W1%g?~TAOM6Q(6CvtY&-kp6#@c`{F5)% zmU}{k85pF%(hLkn21Z7@2FAJuNFi@-XlZ0@3Q-^kRmTRU4fPBS^voC-geFg{6PFZ* zin2iIl*E!m5L0CGLIH7L4Bf2T&&nt^S&&`_&m3o~fZ|N18T+wU8C^&g*uRo*E#I6>Reu#U25dPOR6racHaT~KJJ2d#Uu6Ju2(Qop delta 556 zcmX@Gi0Q^crU@EMHzsV<>SJdt*u0aSgIUlx#L&db*u=`vT+hV0Rnm7Z9jq4Mj7U?HJ z-TXcU>QwnOsMP#)s8oE`QG^jWIRapxY_89r%Ersbz`!5?gdiZXS+Q(8`{WO`1&sWY z6YC@-kb~I5$kfOPtc*cm^29oENkIsQffY&{>lx`80@*^757vn@3Qt}rAPx-pk9GT5 z8AT@xa*H#HO+MM8&Uj(-$CmZX6AwsiUeIxXY4Q$sfyo?24x2Z0XE07~==A~Ge74tr z@|j+d$p(EkjDnkU`@|U;g(l1PM^Apx&ojBDUuCkugc@+D^-pjG8tofvJy~EP572mC GUu6K;5vyJR diff --git a/autogenerated_examples/nxdl/applications/NXxkappa.h5 b/autogenerated_examples/nxdl/applications/NXxkappa.h5 index d8a01f15c14ac109da30ba85a0c197d878e39e05..81bf6afa3b13637074e4c62ee382795e7e496643 100644 GIT binary patch delta 649 zcmeydgz3RjrU@F14>oG{vrnGUBe3}d`%fl8lMq7_D^oKoV+%b?3lnoQv(1;d?06YB zY!;N5t-#DytF(E&#a712LcVgF8?5%RO?Gg60ur6P-okQog3}vDW_F+we-~Xwu-bap zy-Z++y$4hz-xJE1@5RatQVh~L`GKzolgGr(T7Hut%J&D`;hDz~<#cMgJH0vhfKpFfa%JAqXh+Z;mQo z$39u3L4Z+UGGl$Yryy9Ifk6sN8yOfG=^7a88o=YgQqRE9%)r0`qCg0$jtxp1>KPj7 znK3X3Pd->LE-3;PWrfnIc_l@aK(^@QkM-h{6&g4u|EL#W6rZfvAkHYU*|K3jE2HFO zL2hwIsmX$E>P!=uHy2v9F;8~ra@j1?Rl_t{!%t%Kh8_;4i3c(!m5WY3+h;yGq+evR zM86HA(B#m5e@5ZSyc4V^Kj`O~95O*~veX2t$$KWmOx`eoXR^vfmB|k#xBxBV^;Mnh dHL(gDC+jV2Id6bm1O$?kc_+C8ZRYh=1^}`izY72W delta 602 zcmaE`ln*l2GKz05v^vi=@c_?c2gfHM;mPYQEH@`Oy0boFIHxl&dCpaJtoiSk=X3uR|8SMKcE(3f_)H_u|K#JECRA=azW@9s9x92 zYr-nPdM3~Ja-EzL`2s8fV$X>}u+K!p*_;2wSU^kyD%xBVX8^HreFD@X{UoTH-={#G zDxU_Gnx9?@w`y}tRs+O|_p?JGJ^`DT4;B4i;LFCx&%nSS0E8g0qi=Im`8xK=3iSny z0+T1!OGqFGwyC9op#fMOgW%+Y_2QC35Do(?ls48g(lZ3Ig(rWk7iScitk@vVC<-Dc zD>QIS=BO6{MoM7AepW__$%5SCjFOWz+te9XYz}N|XP$UKVzNV*%VwFb8m7rR*abGP z=n-I=tkCZRbVqK#|Kyy0k;xbOZ5V|n^GV0RJ*fr|8{elxEy~Z_3lY)JfjTrk z7buM}?8<~fB(#>f;SapshqKqy;N-T?85eq|`kyRMth)Ic3w@94U@r(S}UPlSPi zK>!Frz+>*_O)c{{Cuax=Fp5m}>?>y!oqVuQLIOF8OiT6EI3u2NrG|XMn1;P3DYJpPtFLHnEavH zVza}n1xynUWK4cA$7gcQT#?BRb8Q&KCfCmOXB6Ljc5Xc*qr_z2`SZa+{C>VG(74_d P>&XQRcz{OwhA0C7IA^=d delta 634 zcmeA;#I)cb(*zBs1q(K6sdEb&hZvez8Jk!cTIiXY7#NzGZBF7|$HQ2#Sx};%kjrk17R=fNYw)A?6EI zuj}SFu@zuFlkW$*PF|Dn0xSVy-$_KUd6MDm%{D0(5R-t4Ht$I_fY|sx9cod2=3a=1 zeh$>B@wrf``+22st2WOmL^4LE7>P5dNSAh(gt| zL1{xhLjyfC1_rUoiv8k@;*%4F#2F~3bw-2Dfm8VzCmxX4 zoG@(yGt+{3lW#TqZFZQofC(7IT$6+5Ix&h&o;ufm@|3wElYh*$VHBG@cb@g;f_W~C hKtp{)R43n>Uj>a5Th4?wi0zV-=Pqyu+Ta_a3;^M3#E$>~ diff --git a/autogenerated_examples/nxdl/applications/NXxlaueplate.h5 b/autogenerated_examples/nxdl/applications/NXxlaueplate.h5 index 4a12a65acb73313f29555d1b5f9afa99d609dfdd..fbca075af5a8da15018843b4c0bb41987fadd451 100644 GIT binary patch delta 679 zcmbPnf~nyo(*zC1hK-sU+=3<{h9*{~W>&_QdS)gD7N(Y)lepLMFa<20xKVDifkXi# zr^F%#FvytPD5t*pg5(-?X7*a8&Gn8?85w0a7dp>pn|Od{vVhkUknrSsN6XCy-ftMe zYUF)&Aq;;%D5KsV%2*!&W!w*BWrpdTtPtwK_+m2ST=C5fp*2ikGyaFyLd>X-gfjj| zm4Zb;c1_+8^98Egb@Q9p3b3BZ_XAxguSs|TmH@HuBqG>6$#C{&n-mL(NkB!L_oNy? zY}~J`jw$DFS~9& zQv-E$y`$^qo_eSf{>G(jykfv`7XU&KII#I(`+UyH8A1Y#Vv{2$)_aPBg&7#6ptO;J zk&&)}v91Afj9QqRn;Ae9NI=!GL1{xhLjyfC1_sH=ij%}A2TW3!95G3NQD$jrk17R= zfGnE4A?6EItLx@Bu@zuFlkW$*PF|Dn0xSVy-$_KUd6MDm%{D0(5R-t4Ht$I_fY|sx z9cod2=3a=1eh$>7@wrf``+22st2WOmL^4LE7>P5dq;*4^WD`%)P zc1(6$(72gv<~L?WiOr02!62p? n#Y|RM%rp7OB9+Mji)+9ketxkl(9GTx>&XF2c!1{mhA0C7^)SSJ diff --git a/autogenerated_examples/nxdl/applications/NXxnb.h5 b/autogenerated_examples/nxdl/applications/NXxnb.h5 index 1175f1a1decf79e8f87cd7d39ced5f40e0db98ef..b3081f5d622ff550faf0adc5775516f682f94edd 100644 GIT binary patch delta 530 zcmew{lj*@MrU@EM3B4P&`q(GGXcyRgg8e6xph<|KiIu6Dm9eFsrLno0nepaJTz0%n z20aru%564~s8L{MuT|Q--eM^uqu}O5tNUyd5AaNOaC`z1p1j_|a&v;y8%D4ie-~W{ zquzBd6IjIF11gg531!UpVr7QuoczGogYm>>O~1(y)%yc#A^Poupp5;&rCV0Rnm7Z9jq4Mj7U?HJ zUHm=;>QMPKsMP#)s8oE`QG^jWIRNBGJjdo#vCTbc#%#(P_iTKly5>Kcm3p e-Y)CS30+TMfoID(p%h|=(B$48cc7WPzRCdX#H3jO delta 529 zcmaDbi|NNqrU@EMKYBK5^|3Qf*u0aSgIUlx#L&db*u=`vQqR!D(%8am^Cd1jUZxY> z6F16jHjt=MVD?s1+`QgmDdXf#adMjrtj@7bc5r+G5}m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definitions/NXelectrostatic_kicker.h5 index 871e08bec34ec76927245c87e98a6aa8b9e3d4f6..659080155baf34d6954dc419d30e1935467ba1cc 100644 GIT binary patch delta 30 lcmZoLXfW8YlS9xX#L&db)Xd7rSkJ=5$imcU^C=E9egKGv2uT0{ delta 30 lcmZoLXfW8YlS9xr#L&db*u=`nP|woD$imEG^C=E9egKF|2uc6| diff --git a/autogenerated_examples/nxdl/contributed_definitions/NXmagnetic_kicker.h5 b/autogenerated_examples/nxdl/contributed_definitions/NXmagnetic_kicker.h5 index 2d62cee7484a0a87e6d3d825ffc6ab6304a28b5d..0ada9317effd7cc5c1240f67154ecd0b41340562 100644 GIT binary patch delta 30 lcmZoLXfW8YlS9xX#L&db)Xd7rSkJ=L!o=KY^C=E9egKHI2u=V1 delta 30 lcmZoLXfW8YlS9xr#L&db*u=`nP|woT!oE`}~nWf5hkC?GJ~-AukzmcU|gS%4}2RLYyq-hPp(c7Dwt9p1*-OHxXBzV^*F- zZ+--mMC8IQ2Fy0<^>M}^*;|+-`t5QDqowb1pxoo7d8qP z4?nOlDLouQf#Hs1rtCnCK0=mhJN4MYWb_HQoh=E6Wez?(h6Z zT7PvO=aOf5De;=Cq*+%dZsv_By+xp!ZeF}&ZiqftUWc3c#A*4@yr;Bq0avQe#ntK; zbT2K$NpsPQk5?LeQzm2do6V?x524hgANj#IVz7wwmmR3pC0o+`-6qNWoyNIh|G2Ak z3&)|^4wz*%ns5LXX?6v;Fqc~eV{B}yI7Kz-0Z>j76t^$h|k8!g2qfpR@U zk=QJdw1rnyV>)_O1~g79Tg7u~+eOcWN92+_te!hXr$nznk|L@xuh3Tdgtq1v)m8xP zqtH?iuHf9Uh^5*qxL>0pm)<9G`Iyklg|K#XKm0V0uNs%ph6ezzVFa{v0PH(ynS*vo zD;{bK<_}|_wN61?a}L6tp0>YuAnXfz!^_xjxjOEaX?+l2W&2m4-y7QF3(`NwU|_Xr yg~m>Zofs`W>@8x=X(|c$+R^-Jc+ZZEh0+=5#x2y&iaA^7U}}xo4~;c1Lh3)nPf48mi53J$k%&Td(oCA4!C)mSMT~+wmADYyM6yzfMB>7YP{`s5 z1GP1&qM!{-^--QmVv1TpNr_tA6?CPcmZ&J=Cm3hmeQzdNoqO*&ch0?cGWCX|-f&D_ zb+1;B_4y;JKjQQ4>JO=EFhEA!T^BnKZ`*?9LYyq-hPp(6iz9Ul&tC_en}}oQn3X5d z8y}EKB649T17;h1ZJaSk_9i5WeyiNUXz4o~D0g`&d5?qK1P7I(hml#UUfp^aJ~3(I z;rkXQr3XVGFx-*MlpWycLtvS7uu^?4j;o)+ zy|fS~%|$OfUTN@6nT*k|HlzA21X7cJ=sVwt!6MF|c7UtDY)SKXn`q8y%&@8Lbgabj5W|tus&}7#o`^PEk#|5Z9)=5p0JlYZ0uF>gxnj)?11V0_A#y zBC$~*X%nwvV>)_8Mqr#)HjC%fwu+t!kH{srTRnG(PKjQDBt=wXUZJh@32n_Us;z!x zABC2J=rYV5i&(1Ng8L;Za_K!HmyZd(TnKAN_M#u=@v(6kZFm5|HH?6k_96RDT4ujp z(uxP#g873GXswedt~m$M?Vh&3c+eYC{edOyw-k@NWm+FZXnFfrAm~%WfiV4Z6b-C2 ztV_@U&WJf%XVKIuvmY31UO=h;FBNc! diff --git a/autogenerated_examples/nxdl/contributed_definitions/NXsnshisto.h5 b/autogenerated_examples/nxdl/contributed_definitions/NXsnshisto.h5 index 452c9ff11a997bbd68555dd7d83f41b3e00b506a..e70f7823788e3358f1fe50d3dfaecf593ea3c2fd 100644 GIT binary patch delta 1187 zcmYk5TWAwO6oxsi)~cx+l}gdph_+HCHchf=O0>jV6r@lnK2%6eMf5=;eG&v)@+<_F zG7l-5ws-@5By7o0nFCh+rkM?#|5F-M4S%-+#`3&diRd>&DY{ z(^nfe$|t>YD9{!11v-3Pvh0)TwZ@xQYF9>f((qVr9Ruz9K49RP5D=RbpiH&Z7!nDO zMM(9=SCiehERNnbnI`XCHVw4*uC*YJd*)ZqDnNNAr2KOMl@}tmQ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definitions/NXsolenoid_magnet.h5 b/autogenerated_examples/nxdl/contributed_definitions/NXsolenoid_magnet.h5 index 7814e68747ce1796e8c1bd92702bd793b206d5ec..ea6c3a9011dfe4090ed50b370db4076671e16ac2 100644 GIT binary patch delta 30 lcmZoLXfW8YlS9xX#L&db)Xd7rRL{h~#M0by^C=E9egKG{2u}b2 delta 30 lcmZoLXfW8YlS9xr#L&db*u=`nSkJ`5$jH!W^C=E9egKEx2s!`& diff --git a/autogenerated_examples/nxdl/contributed_definitions/NXsolid_geometry.h5 b/autogenerated_examples/nxdl/contributed_definitions/NXsolid_geometry.h5 index 26da658148f6dea2d2b4d1b817a120da3786e88f..21f57398a86ca02c5a5766c7a4ebd7efcfecc894 100644 GIT binary patch delta 30 lcmZoLXfW8YlS9xX#L&db)Xd7rRL{h~#M0by^C=E9egKG{2u}b2 delta 30 lcmZoLXfW8YlS9xr#L&db*u=`nSkJ`5$jH!W^C=E9egKEx2s!`& diff --git a/autogenerated_examples/nxdl/contributed_definitions/NXspecdata.h5 b/autogenerated_examples/nxdl/contributed_definitions/NXspecdata.h5 index 2d45f0d6e7c849f0f42497c61aca8f0916c4cc29..fe0b8ccf42c8f1b55667a21acc67efd2ff7921d1 100644 GIT binary patch delta 879 zcmYk5Ur5tY6vuyOYqp$IDAsAXtL0k&nGuZ!3cJ+x^{K_Xp>EINx)B_ndRN$$90%ePyT| z7G_VnAP^ZIR6#lUsYElwwvHO;4UNW94a6n5PVbeA?2H1e&PMe;l>lJK%fs%2E(<-fup z)y5=KI|FYAgJ7o&8263AM^fLF0(gh@-Ba|GL^n%I^)N8?GVt~>2=+6GUt^W{2N={1 zGO2HfL3o%!;-*$9H!{j1d42|U0X^*z<4q2HF}_37f)je$6b2_8_~-WbbdV;TzO%>V z^5jrvXVKk^;G8O#1!?NIF;kP>@>(9c8i?YaWltj`p_&4;YYM@LyhaBmYRwpVGzmOz zX$sB%U#v~AnyvDGEVARWnCFeW*=XZ9D~>H51py&PE=SA4?&C1~T@< z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pFz`-ZOjBa%h8@I}$Me{)aV3L90Ux`^^{>L>3`P<|{@MCB;IDkG%1e@G8Z<%0!ROa#Q zm&SwQMiJ))=0@DtN8F|1FCp+_3o#%#mU-g^dc$GC@C6F?ugO>YMo5=tm#w@*#oq-w zu^}A^aRoy4LiX$%N0^ZCqIHpVeL*eFeWlvKflhQ>wr)*KkiyMdq&UQRodOVO7I?!L z9D(D{EMOzn-Q4_{D+DRtOr>QHLK!I2(?T@w@$LeJ3gPq?)&SZ+Lk1lLMJyGYUpGUa zPXs#9x1GNrKMGybB0V7WILxXXqh83AM$W{}3^_m&7aQL5$nQc|!dyHKVSMfrYaUs7 zMpUFD_~COuRGlL$#dNXA3NhlYeu@S-7%1JJ(6^qAM%84TL&DZ% zR1-|p2B36^A;m2&64|+%5U?};cPhR z0^Vme-Rx|nUt5@8zBIeEq&aeH+QQP6dh~LHfg=nYVc-Y@M;Pc229obrevrQdsb@t> zwAn{3^!gqo*@G4*BQ~&Eh~53`XFFm`5566;$?e?l%YP^1sp_!$IUcd?2R|P25hQU} zkK*}+M?nk}r3(`R-cky1l>wf_Mxca%I8IRaQ2f2+hw#N^%0K3Pl<9`HK}!gA`CNQGgQr*W#qL`In6s~6oiQO@KZ z`K}WDrr;4%>=7P~)!>mYDuE~SH8*qdsnR#(D^LWoSO3U-FnHvv%EGHY)!Z(rVYnA~ z_ov{Ik1Ls%6O2DN349zI?b)w197hfJh;!R-J1o1D<$rch?a23#qi_Qo!@cp${&#KX z=L2kq<*&B$Cwpk;7-T!uaVog!oi3B($ANcx&ZDE`_hh8X37x0o#|mF#K(QxV-um@B m5M(bK-I5KR%>M&SXS|_`^t^uC_{hFCIAU{~2OAl?T>l?-o}Lo` diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXarchive.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXarchive.py index 9076bc7..b33bcb4 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXarchive.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXarchive.py @@ -57,11 +57,11 @@ root['/entry/entry_identifier'].attrs['type'] = 'NX_CHAR' root['/entry/entry_identifier'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:11.514397', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-04T14:56:32.205127', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='end_time', data='2022-03-03T14:34:11.514397', maxshape=None) +root['/entry'].create_dataset(name='end_time', data='2022-03-04T14:56:32.220782', maxshape=None) root['/entry/end_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/end_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXarpes.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXarpes.py index 5c5d981..106f433 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXarpes.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXarpes.py @@ -45,7 +45,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:11.686229', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-04T14:56:32.376970', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXcanSAS.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXcanSAS.py index 9131669..72f104c 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXcanSAS.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXcanSAS.py @@ -315,7 +315,7 @@ root['/entry/process/name'].attrs['type'] = 'NX_CHAR' root['/entry/process/name'].attrs['EX_required'] = 'false' -root['/entry/process'].create_dataset(name='date', data='2022-03-03T14:34:12.880239', maxshape=None) +root['/entry/process'].create_dataset(name='date', data='2022-03-04T14:56:33.595457', maxshape=None) root['/entry/process/date'].attrs['type'] = 'NX_DATE_TIME' root['/entry/process/date'].attrs['EX_required'] = 'false' @@ -414,42 +414,129 @@ # Create the ATTRIBUTES root['/entry'].attrs['default'] = 'SAMPLE-CHAR-DATA' -root['/entry'].attrs['canSAS_class'] = 'SAMPLE-CHAR-DATA' -root['/entry'].attrs['version'] = 'SAMPLE-CHAR-DATA' -root['/entry/data'].attrs['canSAS_class'] = 'SAMPLE-CHAR-DATA' -root['/entry/data'].attrs['signal'] = 'SAMPLE-CHAR-DATA' + +# Valid enumeration values for root['/entry']['canSAS_class'] are: +# SASentry +root['/entry'].attrs['canSAS_class'] = 'SASentry' + +# Valid enumeration values for root['/entry']['version'] are: +# 1.1 +root['/entry'].attrs['version'] = '1.1' + +# Valid enumeration values for root['/entry/data']['canSAS_class'] are: +# SASdata +root['/entry/data'].attrs['canSAS_class'] = 'SASdata' + +# Valid enumeration values for root['/entry/data']['signal'] are: +# I +root['/entry/data'].attrs['signal'] = 'I' root['/entry/data'].attrs['I_axes'] = 'SAMPLE-CHAR-DATA' -root['/entry/data'].attrs['Q_indices'] = '1' +root['/entry/data'].attrs['Q_indices'] = 'SAMPLE-CHAR-DATA' root['/entry/data'].attrs['mask'] = 'SAMPLE-CHAR-DATA' root['/entry/data'].attrs['Mask_indices'] = 'SAMPLE-CHAR-DATA' -root['/entry/data'].attrs['timestamp'] = '2022-03-03T14:34:12.911481' -root['/entry/data/Q'].attrs['units'] = 'SAMPLE-CHAR-DATA' +root['/entry/data'].attrs['timestamp'] = 'SAMPLE-CHAR-DATA' + +# Valid enumeration values for root['/entry/data/Q']['units'] are: +# 1/m +# 1/nm +# 1/angstrom +root['/entry/data/Q'].attrs['units'] = 'm' root['/entry/data/Q'].attrs['uncertainties'] = 'SAMPLE-CHAR-DATA' root['/entry/data/Q'].attrs['resolutions'] = 'SAMPLE-CHAR-DATA' root['/entry/data/Q'].attrs['resolutions_description'] = 'SAMPLE-CHAR-DATA' -root['/entry/data/I'].attrs['units'] = 'SAMPLE-CHAR-DATA' + +# Valid enumeration values for root['/entry/data/I']['units'] are: +# 1/m +# 1/cm +# m2/g +# cm2/g +# arbitrary +root['/entry/data/I'].attrs['units'] = 'm' root['/entry/data/I'].attrs['uncertainties'] = 'SAMPLE-CHAR-DATA' root['/entry/data/I'].attrs['scaling_factor'] = 'SAMPLE-CHAR-DATA' -root['/entry/data/Idev'].attrs['units'] = 'SAMPLE-CHAR-DATA' -root['/entry/data/Qdev'].attrs['units'] = 'SAMPLE-CHAR-DATA' -root['/entry/data/dQw'].attrs['units'] = 'SAMPLE-CHAR-DATA' -root['/entry/data/dQl'].attrs['units'] = 'SAMPLE-CHAR-DATA' -root['/entry/data/Qmean'].attrs['units'] = 'SAMPLE-CHAR-DATA' + +# Valid enumeration values for root['/entry/data/Idev']['units'] are: +# 1/m +# 1/cm +# m2/g +# cm2/g +# arbitrary +root['/entry/data/Idev'].attrs['units'] = 'm' + +# Valid enumeration values for root['/entry/data/Qdev']['units'] are: +# 1/m +# 1/nm +# 1/angstrom +root['/entry/data/Qdev'].attrs['units'] = 'm' + +# Valid enumeration values for root['/entry/data/dQw']['units'] are: +# 1/m +# 1/nm +# 1/angstrom +root['/entry/data/dQw'].attrs['units'] = 'm' + +# Valid enumeration values for root['/entry/data/dQl']['units'] are: +# 1/m +# 1/nm +# 1/angstrom +root['/entry/data/dQl'].attrs['units'] = 'm' + +# Valid enumeration values for root['/entry/data/Qmean']['units'] are: +# 1/m +# 1/nm +# 1/angstrom +root['/entry/data/Qmean'].attrs['units'] = 'm' root['/entry/run'].attrs['name'] = 'SAMPLE-CHAR-DATA' -root['/entry/instrument'].attrs['canSAS_class'] = 'SAMPLE-CHAR-DATA' -root['/entry/instrument/aperture'].attrs['canSAS_class'] = 'SAMPLE-CHAR-DATA' -root['/entry/instrument/collimator'].attrs['canSAS_class'] = 'SAMPLE-CHAR-DATA' -root['/entry/instrument/detector'].attrs['canSAS_class'] = 'SAMPLE-CHAR-DATA' -root['/entry/instrument/source'].attrs['canSAS_class'] = 'SAMPLE-CHAR-DATA' -root['/entry/sample'].attrs['canSAS_class'] = 'SAMPLE-CHAR-DATA' -root['/entry/process'].attrs['canSAS_class'] = 'SAMPLE-CHAR-DATA' -root['/entry/process/collection'].attrs['canSAS_class'] = 'SAMPLE-CHAR-DATA' -root['/entry/collection'].attrs['canSAS_class'] = 'SAMPLE-CHAR-DATA' -root['/entry/TRANSMISSION_SPECTRUM'].attrs['canSAS_class'] = 'SAMPLE-CHAR-DATA' -root['/entry/TRANSMISSION_SPECTRUM'].attrs['signal'] = 'SAMPLE-CHAR-DATA' -root['/entry/TRANSMISSION_SPECTRUM'].attrs['T_axes'] = 'SAMPLE-CHAR-DATA' + +# Valid enumeration values for root['/entry/instrument']['canSAS_class'] are: +# SASinstrument +root['/entry/instrument'].attrs['canSAS_class'] = 'SASinstrument' + +# Valid enumeration values for root['/entry/instrument/aperture']['canSAS_class'] are: +# SASaperture +root['/entry/instrument/aperture'].attrs['canSAS_class'] = 'SASaperture' + +# Valid enumeration values for root['/entry/instrument/collimator']['canSAS_class'] are: +# SAScollimation +root['/entry/instrument/collimator'].attrs['canSAS_class'] = 'SAScollimation' + +# Valid enumeration values for root['/entry/instrument/detector']['canSAS_class'] are: +# SASdetector +root['/entry/instrument/detector'].attrs['canSAS_class'] = 'SASdetector' + +# Valid enumeration values for root['/entry/instrument/source']['canSAS_class'] are: +# SASsource +root['/entry/instrument/source'].attrs['canSAS_class'] = 'SASsource' + +# Valid enumeration values for root['/entry/sample']['canSAS_class'] are: +# SASsample +root['/entry/sample'].attrs['canSAS_class'] = 'SASsample' + +# Valid enumeration values for root['/entry/process']['canSAS_class'] are: +# SASprocess +root['/entry/process'].attrs['canSAS_class'] = 'SASprocess' + +# Valid enumeration values for root['/entry/process/collection']['canSAS_class'] are: +# SASprocessnote +root['/entry/process/collection'].attrs['canSAS_class'] = 'SASprocessnote' + +# Valid enumeration values for root['/entry/collection']['canSAS_class'] are: +# SASnote +root['/entry/collection'].attrs['canSAS_class'] = 'SASnote' + +# Valid enumeration values for root['/entry/TRANSMISSION_SPECTRUM']['canSAS_class'] are: +# SAStransmission_spectrum +root['/entry/TRANSMISSION_SPECTRUM'].attrs['canSAS_class'] = 'SAStransmission_spectrum' + +# Valid enumeration values for root['/entry/TRANSMISSION_SPECTRUM']['signal'] are: +# T +root['/entry/TRANSMISSION_SPECTRUM'].attrs['signal'] = 'T' + +# Valid enumeration values for root['/entry/TRANSMISSION_SPECTRUM']['T_axes'] are: +# T +root['/entry/TRANSMISSION_SPECTRUM'].attrs['T_axes'] = 'T' root['/entry/TRANSMISSION_SPECTRUM'].attrs['name'] = 'SAMPLE-CHAR-DATA' -root['/entry/TRANSMISSION_SPECTRUM'].attrs['timestamp'] = '2022-03-03T14:34:12.927101' +root['/entry/TRANSMISSION_SPECTRUM'].attrs['timestamp'] = 'SAMPLE-CHAR-DATA' root['/entry/TRANSMISSION_SPECTRUM/T'].attrs['uncertainties'] = 'SAMPLE-CHAR-DATA' root['/'].attrs['default'] = 'entry' root['/entry'].attrs['default'] = 'TRANSMISSION_SPECTRUM' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXcxi_ptycho.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXcxi_ptycho.py index 19a0476..8f21ed4 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXcxi_ptycho.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXcxi_ptycho.py @@ -45,11 +45,11 @@ root['/entry_1/title'].attrs['type'] = 'NX_CHAR' root['/entry_1/title'].attrs['EX_required'] = 'false' -root['/entry_1'].create_dataset(name='start_time', data='2022-03-03T14:34:21.896003', maxshape=None) +root['/entry_1'].create_dataset(name='start_time', data='2022-03-04T14:56:23.795988', maxshape=None) root['/entry_1/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry_1/start_time'].attrs['EX_required'] = 'false' -root['/entry_1'].create_dataset(name='end_time', data='2022-03-03T14:34:21.896003', maxshape=None) +root['/entry_1'].create_dataset(name='end_time', data='2022-03-04T14:56:23.795988', maxshape=None) root['/entry_1/end_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry_1/end_time'].attrs['EX_required'] = 'false' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXdirecttof.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXdirecttof.py index 28d6c72..de4fc35 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXdirecttof.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXdirecttof.py @@ -53,7 +53,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:13.114561', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-04T14:56:33.860983', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXfluo.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXfluo.py index 964a46a..7e600f6 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXfluo.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXfluo.py @@ -49,7 +49,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:13.239528', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-04T14:56:33.985974', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXindirecttof.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXindirecttof.py index 0e9852b..743ab15 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXindirecttof.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXindirecttof.py @@ -49,7 +49,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:13.442607', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-04T14:56:34.220274', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXlauetof.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXlauetof.py index 03d1e47..98cc39c 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXlauetof.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXlauetof.py @@ -134,6 +134,9 @@ # Create the ATTRIBUTES + +# Valid enumeration values for root['/entry/instrument/detector/data']['signal'] are: +# 1 root['/entry/instrument/detector/data'].attrs['signal'] = '1' root['/'].attrs['default'] = 'entry' root['/entry'].attrs['default'] = 'name' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXmonopd.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXmonopd.py index 50b27c8..9c339e4 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXmonopd.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXmonopd.py @@ -49,7 +49,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:13.864380', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-04T14:56:34.657669', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXmx.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXmx.py index ca14d55..fd0fa4b 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXmx.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXmx.py @@ -73,15 +73,15 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'false' -root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:14.520473', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-04T14:56:35.329416', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='end_time', data='2022-03-03T14:34:14.536095', maxshape=None) +root['/entry'].create_dataset(name='end_time', data='2022-03-04T14:56:35.329416', maxshape=None) root['/entry/end_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/end_time'].attrs['EX_required'] = 'false' -root['/entry'].create_dataset(name='end_time_estimated', data='2022-03-03T14:34:14.536095', maxshape=None) +root['/entry'].create_dataset(name='end_time_estimated', data='2022-03-04T14:56:35.345038', maxshape=None) root['/entry/end_time_estimated'].attrs['type'] = 'NX_DATE_TIME' root['/entry/end_time_estimated'].attrs['EX_required'] = 'true' @@ -113,7 +113,7 @@ root['/entry/instrument/name'].attrs['type'] = 'NX_CHAR' root['/entry/instrument/name'].attrs['EX_required'] = 'true' -root['/entry/instrument'].create_dataset(name='time_zone', data='2022-03-03T14:34:14.551718', maxshape=None) +root['/entry/instrument'].create_dataset(name='time_zone', data='2022-03-04T14:56:35.345038', maxshape=None) root['/entry/instrument/time_zone'].attrs['type'] = 'NX_DATE_TIME' root['/entry/instrument/time_zone'].attrs['EX_required'] = 'true' @@ -411,19 +411,31 @@ # Create the ATTRIBUTES -root['/entry'].attrs['version'] = 'SAMPLE-CHAR-DATA' + +# Valid enumeration values for root['/entry']['version'] are: +# 1.0 +root['/entry'].attrs['version'] = '1.0' root['/entry/instrument/name'].attrs['short_name'] = 'SAMPLE-CHAR-DATA' -root['/entry/instrument/detector/NXdetector_module/module_offset'].attrs['transformation_type'] = 'SAMPLE-CHAR-DATA' -root['/entry/instrument/detector/NXdetector_module/module_offset'].attrs['vector'] = '1.0' -root['/entry/instrument/detector/NXdetector_module/module_offset'].attrs['offset'] = '1.0' + +# Valid enumeration values for root['/entry/instrument/detector/NXdetector_module/module_offset']['transformation_type'] are: +# translation +root['/entry/instrument/detector/NXdetector_module/module_offset'].attrs['transformation_type'] = 'translation' +root['/entry/instrument/detector/NXdetector_module/module_offset'].attrs['vector'] = 'SAMPLE-CHAR-DATA' +root['/entry/instrument/detector/NXdetector_module/module_offset'].attrs['offset'] = 'SAMPLE-CHAR-DATA' root['/entry/instrument/detector/NXdetector_module/module_offset'].attrs['depends_on'] = 'SAMPLE-CHAR-DATA' -root['/entry/instrument/detector/NXdetector_module/fast_pixel_direction'].attrs['transformation_type'] = 'SAMPLE-CHAR-DATA' -root['/entry/instrument/detector/NXdetector_module/fast_pixel_direction'].attrs['vector'] = '1.0' -root['/entry/instrument/detector/NXdetector_module/fast_pixel_direction'].attrs['offset'] = '1.0' + +# Valid enumeration values for root['/entry/instrument/detector/NXdetector_module/fast_pixel_direction']['transformation_type'] are: +# translation +root['/entry/instrument/detector/NXdetector_module/fast_pixel_direction'].attrs['transformation_type'] = 'translation' +root['/entry/instrument/detector/NXdetector_module/fast_pixel_direction'].attrs['vector'] = 'SAMPLE-CHAR-DATA' +root['/entry/instrument/detector/NXdetector_module/fast_pixel_direction'].attrs['offset'] = 'SAMPLE-CHAR-DATA' root['/entry/instrument/detector/NXdetector_module/fast_pixel_direction'].attrs['depends_on'] = 'SAMPLE-CHAR-DATA' -root['/entry/instrument/detector/NXdetector_module/slow_pixel_direction'].attrs['transformation_type'] = 'SAMPLE-CHAR-DATA' -root['/entry/instrument/detector/NXdetector_module/slow_pixel_direction'].attrs['vector'] = '1.0' -root['/entry/instrument/detector/NXdetector_module/slow_pixel_direction'].attrs['offset'] = '1.0' + +# Valid enumeration values for root['/entry/instrument/detector/NXdetector_module/slow_pixel_direction']['transformation_type'] are: +# translation +root['/entry/instrument/detector/NXdetector_module/slow_pixel_direction'].attrs['transformation_type'] = 'translation' +root['/entry/instrument/detector/NXdetector_module/slow_pixel_direction'].attrs['vector'] = 'SAMPLE-CHAR-DATA' +root['/entry/instrument/detector/NXdetector_module/slow_pixel_direction'].attrs['offset'] = 'SAMPLE-CHAR-DATA' root['/entry/instrument/detector/NXdetector_module/slow_pixel_direction'].attrs['depends_on'] = 'SAMPLE-CHAR-DATA' root['/entry/source/name'].attrs['short_name'] = 'SAMPLE-CHAR-DATA' root['/'].attrs['default'] = 'entry' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXpeem.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXpeem.py deleted file mode 100644 index 5147d07..0000000 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXpeem.py +++ /dev/null @@ -1,150 +0,0 @@ - -import numpy as np -import datetime -import h5py -import os - -# Note this example script was generated by nxdl_to_hdf5.py using the current -# installed version of the NEXUS definitions ver[v2020.10] - -root = h5py.File('NXpeem.h5', 'w') - -# Create the GROUPS - -root.create_group('entry') -root['/entry'].attrs['NX_class'] = 'NXentry' -root['/entry'].attrs['EX_required'] = 'true' - -root['/entry/'].create_group('instrument') -root['/entry/instrument'].attrs['NX_class'] = 'NXinstrument' -root['/entry/instrument'].attrs['EX_required'] = 'true' - -root['/entry/instrument/'].create_group('source') -root['/entry/instrument/source'].attrs['NX_class'] = 'NXsource' -root['/entry/instrument/source'].attrs['EX_required'] = 'true' - -root['/entry/instrument/'].create_group('monochromator') -root['/entry/instrument/monochromator'].attrs['NX_class'] = 'NXmonochromator' -root['/entry/instrument/monochromator'].attrs['EX_required'] = 'true' - -root['/entry/instrument/'].create_group('detector') -root['/entry/instrument/detector'].attrs['NX_class'] = 'NXdetector' -root['/entry/instrument/detector'].attrs['EX_required'] = 'true' - -root['/entry/'].create_group('sample') -root['/entry/sample'].attrs['NX_class'] = 'NXsample' -root['/entry/sample'].attrs['EX_required'] = 'true' - -root['/entry/'].create_group('data') -root['/entry/data'].attrs['NX_class'] = 'NXdata' -root['/entry/data'].attrs['EX_required'] = 'true' - -# Create the FIELDS - -root['/entry'].create_dataset(name='title', data='SAMPLE-CHAR-DATA', maxshape=None) -root['/entry/title'].attrs['type'] = 'NX_CHAR' -root['/entry/title'].attrs['EX_required'] = 'true' - -root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:14.801656', maxshape=None) -root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' -root['/entry/start_time'].attrs['EX_required'] = 'true' - -root['/entry'].create_dataset(name='end_time', data='2022-03-03T14:34:14.801656', maxshape=None) -root['/entry/end_time'].attrs['type'] = 'NX_DATE_TIME' -root['/entry/end_time'].attrs['EX_required'] = 'true' - -# Valid enumeration values for root['/entry']['definition'] are: -# NXpeem - -root['/entry'].create_dataset(name='definition', data='NXpeem', maxshape=None) -root['/entry/definition'].attrs['type'] = 'NX_CHAR' -root['/entry/definition'].attrs['EX_required'] = 'true' - -root['/entry/instrument/source'].create_dataset(name='type', data='SAMPLE-CHAR-DATA', maxshape=None) -root['/entry/instrument/source/type'].attrs['type'] = 'NX_CHAR' -root['/entry/instrument/source/type'].attrs['EX_required'] = 'true' - -root['/entry/instrument/source'].create_dataset(name='name', data='SAMPLE-CHAR-DATA', maxshape=None) -root['/entry/instrument/source/name'].attrs['type'] = 'NX_CHAR' -root['/entry/instrument/source/name'].attrs['EX_required'] = 'true' - -root['/entry/instrument/source'].create_dataset(name='probe', data='SAMPLE-CHAR-DATA', maxshape=None) -root['/entry/instrument/source/probe'].attrs['type'] = 'NX_CHAR' -root['/entry/instrument/source/probe'].attrs['EX_required'] = 'true' - -root['/entry/instrument/monochromator'].create_dataset(name='energy', data=1.0, maxshape=None) -root['/entry/instrument/monochromator/energy'].attrs['type'] = 'NX_FLOAT' -root['/entry/instrument/monochromator/energy'].attrs['EX_required'] = 'true' - -root['/entry/instrument/detector'].create_dataset(name='data', data=1.0, maxshape=None) -root['/entry/instrument/detector/data'].attrs['type'] = 'NX_NUMBER' -root['/entry/instrument/detector/data'].attrs['EX_required'] = 'true' - -root['/entry/sample'].create_dataset(name='rotation_angle', data=1.0, maxshape=None) -root['/entry/sample/rotation_angle'].attrs['type'] = 'NX_FLOAT' -root['/entry/sample/rotation_angle'].attrs['EX_required'] = 'true' - -# Valid enumeration values for root['/entry/data']['peem_scan_type'] are: -# single image scan -# stack scan -# focus scan -# single variable scan -# two variable scan -# time scan - -root['/entry/data'].create_dataset(name='peem_scan_type', data='single image scan', maxshape=None) -root['/entry/data/peem_scan_type'].attrs['type'] = 'NX_CHAR' -root['/entry/data/peem_scan_type'].attrs['EX_required'] = 'true' - -root['/entry/data'].create_dataset(name='img_data', data=1.0, maxshape=None) -root['/entry/data/img_data'].attrs['type'] = 'NX_NUMBER' -root['/entry/data/img_data'].attrs['EX_required'] = 'true' - -root['/entry/data'].create_dataset(name='spec_data', data=1.0, maxshape=None) -root['/entry/data/spec_data'].attrs['type'] = 'NX_NUMBER' -root['/entry/data/spec_data'].attrs['EX_required'] = 'true' -root['/entry/data/spec_data'].attrs['signal'] = '1' - -root['/entry/data'].create_dataset(name='energy', data=1.0, maxshape=None) -root['/entry/data/energy'].attrs['type'] = 'NX_FLOAT' -root['/entry/data/energy'].attrs['EX_required'] = 'true' - -root['/entry/data'].create_dataset(name='polarization', data=1.0, maxshape=None) -root['/entry/data/polarization'].attrs['type'] = 'NX_FLOAT' -root['/entry/data/polarization'].attrs['EX_required'] = 'false' - -root['/entry/data'].create_dataset(name='averages', data=1, maxshape=None) -root['/entry/data/averages'].attrs['type'] = 'NX_INTEGER' -root['/entry/data/averages'].attrs['EX_required'] = 'true' - -root['/entry/data'].create_dataset(name='count_time', data=1.0, maxshape=None) -root['/entry/data/count_time'].attrs['type'] = 'NX_FLOAT' -root['/entry/data/count_time'].attrs['EX_required'] = 'true' - -# Create the DOC strings -root['/entry/definition'].attrs['EX_doc'] = 'Official NeXus NXDL schema to which this file conforms ' -root['/entry/instrument/detector/data'].attrs['EX_doc'] = 'Detector data should be presented with the first dimension corresponding to the scan point and subsequent dimensions corresponding to the output of the detector. Detectors that provide more than one value per scan point should have a data array of rank 1+d, where d is the dimensions of the array provided per scan point. For example, an area detector should have an NXdetector data array of 3 dimensions, with the first being the set of scan points and the latter two being the x- and y- extent of the detector ' -root['/entry/data'].attrs['EX_doc'] = 'This will contain all the data for a particular ROI ' -root['/entry/data/peem_scan_type'].attrs['EX_doc'] = 'Label for typical scan types as a convenience for humans. Each label corresponds to a specific set of axes being scanned to produce a data array of shape: * single image scan: (photon_energy, 2D image data) * stack scan: (photon_energy, polarization, 2D image data + 1D spectra) * focus scan: (photon_energy, 2D image data) * single variable scan: (variable, 2D image data + 1D spectra) * two variable scan: (variable1, variable2, 2D image data + 1D spectra) * time scan: (time, 2D image data + 1D spectra) The "single image scan" string is to be used when none of the other choices are appropriate. ' -root['/entry/data/img_data'].attrs['EX_doc'] = 'This will contain a multi dimensonal array that with the columns determined by the scan type ' -root['/entry/data/spec_data'].attrs['EX_doc'] = 'This will contain a multi dimensonal array that with the columns determined by the scan type ' -root['/entry/data/energy'].attrs['EX_doc'] = 'List of photon energies of the X-ray beam. If scanned through multiple values, then an "axis" attribute will be required to link the field to the appropriate data array dimension. ' -root['/entry/data/polarization'].attrs['EX_doc'] = 'List of polarizations. If scanned through multiple values, then an "axis" attribute will be required to link the field to the appropriate data array dimension. ' -root['/entry/data/averages'].attrs['EX_doc'] = 'List of Y positions on the sample. If scanned through multiple values, then an "axis" attribute will be required to link the field to the appropriate data array dimension. ' -root['/entry/data/count_time'].attrs['EX_doc'] = 'List of dwell times for each point in the scan, they may vary point to point, then an "axis" attribute will be required to link the field to the appropriate data array dimension. ' - - -# Create the ATTRIBUTES -root['/'].attrs['default'] = 'entry' -root['/entry'].attrs['default'] = 'data' -root['/entry/data'].attrs['signal'] = 'averages' -root['/entry/data/averages'].attrs['signal'] = '1' -root.attrs['file_name'] = os.path.abspath('NXpeem') -root.attrs['file_time'] = datetime.datetime.now().isoformat() -root.attrs['h5py_version'] = h5py.version.version -root.attrs['HDF5_Version'] = h5py.version.hdf5_version - -# Close the file -root.close() - - diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXrefscan.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXrefscan.py index 7a5e34a..b699bfe 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXrefscan.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXrefscan.py @@ -49,11 +49,11 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:14.942247', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-04T14:56:35.594947', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='end_time', data='2022-03-03T14:34:14.942247', maxshape=None) +root['/entry'].create_dataset(name='end_time', data='2022-03-04T14:56:35.594947', maxshape=None) root['/entry/end_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/end_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXreftof.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXreftof.py index b8009bc..db4f37c 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXreftof.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXreftof.py @@ -45,11 +45,11 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:15.067217', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-04T14:56:35.735539', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='end_time', data='2022-03-03T14:34:15.067217', maxshape=None) +root['/entry'].create_dataset(name='end_time', data='2022-03-04T14:56:35.735539', maxshape=None) root['/entry/end_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/end_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXsas.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXsas.py index 636e586..1bbb79b 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXsas.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXsas.py @@ -61,11 +61,11 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:15.261415', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-04T14:56:35.922993', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='end_time', data='2022-03-03T14:34:15.263409', maxshape=None) +root['/entry'].create_dataset(name='end_time', data='2022-03-04T14:56:35.938622', maxshape=None) root['/entry/end_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/end_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXsastof.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXsastof.py index 44d203e..44ca01d 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXsastof.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXsastof.py @@ -57,7 +57,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:15.490730', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-04T14:56:36.157313', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXscan.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXscan.py index 2f0fb49..1a109e7 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXscan.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXscan.py @@ -41,11 +41,11 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:15.600086', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-04T14:56:36.266661', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='end_time', data='2022-03-03T14:34:15.600086', maxshape=None) +root['/entry'].create_dataset(name='end_time', data='2022-03-04T14:56:36.266661', maxshape=None) root['/entry/end_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/end_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXsnsevent.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXsnsevent.py index 1539ef6..28d60cb 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXsnsevent.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXsnsevent.py @@ -257,7 +257,7 @@ root['/entry/duration'].attrs['EX_required'] = 'false' root['/entry/duration'].attrs['units'] = 'NX_TIME' -root['/entry'].create_dataset(name='end_time', data='2022-03-03T14:34:22.583376', maxshape=None) +root['/entry'].create_dataset(name='end_time', data='2022-03-04T14:56:24.498980', maxshape=None) root['/entry/end_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/end_time'].attrs['EX_required'] = 'false' @@ -532,7 +532,7 @@ root['/entry/sample/nature'].attrs['type'] = 'NX_CHAR' root['/entry/sample/nature'].attrs['EX_required'] = 'false' -root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:22.708346', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-04T14:56:24.592709', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'false' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXsnshisto.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXsnshisto.py index 71c5cfe..c7b5af2 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXsnshisto.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXsnshisto.py @@ -257,7 +257,7 @@ root['/entry/duration'].attrs['EX_required'] = 'false' root['/entry/duration'].attrs['units'] = 'NX_TIME' -root['/entry'].create_dataset(name='end_time', data='2022-03-03T14:34:23.341632', maxshape=None) +root['/entry'].create_dataset(name='end_time', data='2022-03-04T14:56:25.264424', maxshape=None) root['/entry/end_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/end_time'].attrs['EX_required'] = 'false' @@ -548,7 +548,7 @@ root['/entry/sample/nature'].attrs['type'] = 'NX_CHAR' root['/entry/sample/nature'].attrs['EX_required'] = 'false' -root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:23.435329', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-04T14:56:25.358149', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'false' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXspecdata.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXspecdata.py index e78d0b2..9fdbea7 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXspecdata.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXspecdata.py @@ -88,7 +88,7 @@ root['/entry/command'].attrs['type'] = 'NX_CHAR' root['/entry/command'].attrs['EX_required'] = 'false' -root['/entry'].create_dataset(name='date', data='2022-03-03T14:34:23.779539', maxshape=None) +root['/entry'].create_dataset(name='date', data='2022-03-04T14:56:25.717441', maxshape=None) root['/entry/date'].attrs['type'] = 'NX_DATE_TIME' root['/entry/date'].attrs['EX_required'] = 'false' @@ -272,7 +272,7 @@ root['/entry/data'].attrs['description'] = 'SAMPLE-CHAR-DATA' root['/entry/data'].attrs['signal'] = 'SAMPLE-CHAR-DATA' root['/entry/data'].attrs['axes'] = 'SAMPLE-CHAR-DATA' -root['/entry/data'].attrs['AXISNAME_indices'] = '1.0' +root['/entry/data'].attrs['AXISNAME_indices'] = 'SAMPLE-CHAR-DATA' root['/entry/data/data'].attrs['spec_name'] = 'SAMPLE-CHAR-DATA' root['/entry/data/data'].attrs['units'] = 'SAMPLE-CHAR-DATA' root['/entry/counter_cross_reference'].attrs['comment'] = 'SAMPLE-CHAR-DATA' @@ -284,8 +284,8 @@ root['/entry/positioners'].attrs['description'] = 'SAMPLE-CHAR-DATA' root['/entry/MCA'].attrs['description'] = 'SAMPLE-CHAR-DATA' root['/entry/MCA/ROI/roiN'].attrs['description'] = 'SAMPLE-CHAR-DATA' -root['/entry/MCA/ROI/roiN'].attrs['first_channel'] = '1' -root['/entry/MCA/ROI/roiN'].attrs['last_channel'] = '1' +root['/entry/MCA/ROI/roiN'].attrs['first_channel'] = 'SAMPLE-CHAR-DATA' +root['/entry/MCA/ROI/roiN'].attrs['last_channel'] = 'SAMPLE-CHAR-DATA' root['/entry/metadata'].attrs['description'] = 'SAMPLE-CHAR-DATA' root['/entry/_unrecognized'].attrs['comment'] = 'SAMPLE-CHAR-DATA' root['/entry/_unrecognized'].attrs['description'] = 'SAMPLE-CHAR-DATA' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXstxm.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXstxm.py index dc5fa2a..7ed0283 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXstxm.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXstxm.py @@ -61,11 +61,11 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:16.030189', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-04T14:56:36.688437', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='end_time', data='2022-03-03T14:34:16.030189', maxshape=None) +root['/entry'].create_dataset(name='end_time', data='2022-03-04T14:56:36.688437', maxshape=None) root['/entry/end_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/end_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtas.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtas.py index 2e9c1d5..221d485 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtas.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtas.py @@ -53,7 +53,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:16.263999', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-04T14:56:36.922755', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtofnpd.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtofnpd.py index 9efc7c9..8b72781 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtofnpd.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtofnpd.py @@ -45,7 +45,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:16.420212', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-04T14:56:37.078968', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtofraw.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtofraw.py index 6513a79..dd9bd59 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtofraw.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtofraw.py @@ -45,7 +45,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:16.592046', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-04T14:56:37.266424', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtofsingle.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtofsingle.py index b8cf52f..cf37ed3 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtofsingle.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtofsingle.py @@ -45,7 +45,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:16.763880', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-04T14:56:37.453880', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtomo.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtomo.py index 60a76d5..d8f577e 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtomo.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtomo.py @@ -45,11 +45,11 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'false' -root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:16.920239', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-04T14:56:37.625713', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'false' -root['/entry'].create_dataset(name='end_time', data='2022-03-03T14:34:16.920239', maxshape=None) +root['/entry'].create_dataset(name='end_time', data='2022-03-04T14:56:37.625713', maxshape=None) root['/entry/end_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/end_time'].attrs['EX_required'] = 'false' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtomophase.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtomophase.py index 798493a..e40451a 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtomophase.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtomophase.py @@ -53,11 +53,11 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:17.154558', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-04T14:56:37.860033', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='end_time', data='2022-03-03T14:34:17.170180', maxshape=None) +root['/entry'].create_dataset(name='end_time', data='2022-03-04T14:56:37.860033', maxshape=None) root['/entry/end_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/end_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtomoproc.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtomoproc.py index d1d5d60..60a3398 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtomoproc.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXtomoproc.py @@ -81,7 +81,7 @@ root['/entry/reconstruction/version'].attrs['type'] = 'NX_CHAR' root['/entry/reconstruction/version'].attrs['EX_required'] = 'true' -root['/entry/reconstruction'].create_dataset(name='date', data='2022-03-03T14:34:17.310772', maxshape=None) +root['/entry/reconstruction'].create_dataset(name='date', data='2022-03-04T14:56:38.000624', maxshape=None) root['/entry/reconstruction/date'].attrs['type'] = 'NX_DATE_TIME' root['/entry/reconstruction/date'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxas.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxas.py index 911b1d4..07a199a 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxas.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxas.py @@ -53,7 +53,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:17.435742', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-04T14:56:38.109973', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxasproc.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxasproc.py index ab15005..5381056 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxasproc.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxasproc.py @@ -56,7 +56,7 @@ root['/entry/XAS_data_reduction/version'].attrs['type'] = 'NX_CHAR' root['/entry/XAS_data_reduction/version'].attrs['EX_required'] = 'true' -root['/entry/XAS_data_reduction'].create_dataset(name='date', data='2022-03-03T14:34:17.529470', maxshape=None) +root['/entry/XAS_data_reduction'].create_dataset(name='date', data='2022-03-04T14:56:38.234943', maxshape=None) root['/entry/XAS_data_reduction/date'].attrs['type'] = 'NX_DATE_TIME' root['/entry/XAS_data_reduction/date'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxbase.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxbase.py index d21854b..6579f2d 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxbase.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxbase.py @@ -49,7 +49,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:17.685682', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-04T14:56:38.406783', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' @@ -177,6 +177,9 @@ # Create the ATTRIBUTES + +# Valid enumeration values for root['/entry/instrument/detector/data']['signal'] are: +# 1 root['/entry/instrument/detector/data'].attrs['signal'] = '1' root['/'].attrs['default'] = 'entry' root['/entry'].attrs['default'] = 'data' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxeuler.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxeuler.py index 6fd3ad0..bf340af 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxeuler.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxeuler.py @@ -53,7 +53,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:17.951244', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-04T14:56:38.687998', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' @@ -231,6 +231,9 @@ # Create the ATTRIBUTES + +# Valid enumeration values for root['/entry/instrument/detector/data']['signal'] are: +# 1 root['/entry/instrument/detector/data'].attrs['signal'] = '1' root['/'].attrs['default'] = 'entry' root['/entry'].attrs['default'] = 'data' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxkappa.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxkappa.py index 2dc1e13..52ae493 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxkappa.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxkappa.py @@ -53,7 +53,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:18.227730', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-04T14:56:38.984766', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' @@ -236,6 +236,9 @@ # Create the ATTRIBUTES + +# Valid enumeration values for root['/entry/instrument/detector/data']['signal'] are: +# 1 root['/entry/instrument/detector/data'].attrs['signal'] = '1' root['/'].attrs['default'] = 'entry' root['/entry'].attrs['default'] = 'data' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxlaue.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxlaue.py index 1408d01..2e914a5 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxlaue.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxlaue.py @@ -61,7 +61,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:18.540156', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-04T14:56:39.312812', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' @@ -247,6 +247,9 @@ # Create the ATTRIBUTES + +# Valid enumeration values for root['/entry/instrument/detector/data']['signal'] are: +# 1 root['/entry/instrument/detector/data'].attrs['signal'] = '1' root['/'].attrs['default'] = 'entry' root['/entry'].attrs['default'] = 'data' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxlaueplate.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxlaueplate.py index ac99b18..8803eeb 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxlaueplate.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxlaueplate.py @@ -61,7 +61,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:18.883824', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-04T14:56:39.640859', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' @@ -253,6 +253,9 @@ # Create the ATTRIBUTES + +# Valid enumeration values for root['/entry/instrument/detector/data']['signal'] are: +# 1 root['/entry/instrument/detector/data'].attrs['signal'] = '1' root['/'].attrs['default'] = 'entry' root['/entry'].attrs['default'] = 'data' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxnb.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxnb.py index 3da62e9..bc37c78 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxnb.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxnb.py @@ -53,7 +53,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:19.149386', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-04T14:56:39.937663', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' @@ -221,6 +221,9 @@ # Create the ATTRIBUTES + +# Valid enumeration values for root['/entry/instrument/detector/data']['signal'] are: +# 1 root['/entry/instrument/detector/data'].attrs['signal'] = '1' root['/'].attrs['default'] = 'entry' root['/entry'].attrs['default'] = 'data' diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxpcs.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxpcs.py deleted file mode 100644 index 3e24f06..0000000 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxpcs.py +++ /dev/null @@ -1,314 +0,0 @@ - -import numpy as np -import datetime -import h5py -import os - -# Note this example script was generated by nxdl_to_hdf5.py using the current -# installed version of the NEXUS definitions ver[v2020.10] - -root = h5py.File('NXxpcs.h5', 'w') - -# Create the GROUPS - -root.create_group('entry') -root['/entry'].attrs['NX_class'] = 'NXentry' -root['/entry'].attrs['EX_required'] = 'true' - -root['/entry/'].create_group('data') -root['/entry/data'].attrs['NX_class'] = 'NXdata' -root['/entry/data'].attrs['EX_required'] = 'true' - -root['/entry/'].create_group('twotime') -root['/entry/twotime'].attrs['NX_class'] = 'NXdata' -root['/entry/twotime'].attrs['EX_required'] = 'false' - -root['/entry/'].create_group('instrument') -root['/entry/instrument'].attrs['NX_class'] = 'NXinstrument' -root['/entry/instrument'].attrs['EX_required'] = 'true' - -root['/entry/instrument/'].create_group('incident_beam') -root['/entry/instrument/incident_beam'].attrs['NX_class'] = 'NXbeam' -root['/entry/instrument/incident_beam'].attrs['EX_required'] = 'true' - -root['/entry/instrument/'].create_group('detector') -root['/entry/instrument/detector'].attrs['NX_class'] = 'NXdetector' -root['/entry/instrument/detector'].attrs['EX_required'] = 'true' - -root['/entry/instrument/'].create_group('masks') -root['/entry/instrument/masks'].attrs['NX_class'] = 'NXnote' -root['/entry/instrument/masks'].attrs['EX_required'] = 'false' - -root['/entry/'].create_group('sample') -root['/entry/sample'].attrs['NX_class'] = 'NXsample' -root['/entry/sample'].attrs['EX_required'] = 'false' - -root['/entry/sample/'].create_group('position_x') -root['/entry/sample/position_x'].attrs['NX_class'] = 'NXpositioner' -root['/entry/sample/position_x'].attrs['EX_required'] = 'false' - -root['/entry/sample/'].create_group('position_y') -root['/entry/sample/position_y'].attrs['NX_class'] = 'NXpositioner' -root['/entry/sample/position_y'].attrs['EX_required'] = 'false' - -root['/entry/sample/'].create_group('position_z') -root['/entry/sample/position_z'].attrs['NX_class'] = 'NXpositioner' -root['/entry/sample/position_z'].attrs['EX_required'] = 'false' - -root['/entry/'].create_group('ROI') -root['/entry/ROI'].attrs['NX_class'] = 'NXnote' -root['/entry/ROI'].attrs['EX_required'] = 'false' - -root['/entry/'].create_group('NOTE') -root['/entry/NOTE'].attrs['NX_class'] = 'NXnote' -root['/entry/NOTE'].attrs['EX_required'] = 'false' - -# Create the FIELDS - -# Valid enumeration values for root['/entry']['definition'] are: -# NXxpcs - -root['/entry'].create_dataset(name='definition', data='NXxpcs', maxshape=None) -root['/entry/definition'].attrs['type'] = 'NX_CHAR' -root['/entry/definition'].attrs['EX_required'] = 'true' - -root['/entry'].create_dataset(name='entry_identifier', data='SAMPLE-CHAR-DATA', maxshape=None) -root['/entry/entry_identifier'].attrs['type'] = 'NX_CHAR' -root['/entry/entry_identifier'].attrs['EX_required'] = 'true' - -root['/entry'].create_dataset(name='entry_identifier_uuid', data='SAMPLE-CHAR-DATA', maxshape=None) -root['/entry/entry_identifier_uuid'].attrs['type'] = 'NX_CHAR' -root['/entry/entry_identifier_uuid'].attrs['EX_required'] = 'false' - -root['/entry'].create_dataset(name='scan_number', data=1, maxshape=None) -root['/entry/scan_number'].attrs['type'] = 'NX_INT' -root['/entry/scan_number'].attrs['EX_required'] = 'true' - -root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:24.295042', maxshape=None) -root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' -root['/entry/start_time'].attrs['EX_required'] = 'true' - -root['/entry'].create_dataset(name='end_time', data='2022-03-03T14:34:24.295042', maxshape=None) -root['/entry/end_time'].attrs['type'] = 'NX_DATE_TIME' -root['/entry/end_time'].attrs['EX_required'] = 'false' - -root['/entry/data'].create_dataset(name='frame_sum', data=1.0, maxshape=None) -root['/entry/data/frame_sum'].attrs['type'] = 'NX_NUMBER' -root['/entry/data/frame_sum'].attrs['EX_required'] = 'false' -root['/entry/data/frame_sum'].attrs['units'] = 'NX_COUNT' - -root['/entry/data'].create_dataset(name='frame_average', data=1.0, maxshape=None) -root['/entry/data/frame_average'].attrs['type'] = 'NX_NUMBER' -root['/entry/data/frame_average'].attrs['EX_required'] = 'false' -root['/entry/data/frame_average'].attrs['units'] = 'NX_COUNT' - -root['/entry/data'].create_dataset(name='g2', data=1.0, maxshape=None) -root['/entry/data/g2'].attrs['type'] = 'NX_NUMBER' -root['/entry/data/g2'].attrs['EX_required'] = 'false' -root['/entry/data/g2'].attrs['units'] = 'NX_ARBITRARY_UNITS' - -root['/entry/data'].create_dataset(name='g2_derr', data=1.0, maxshape=None) -root['/entry/data/g2_derr'].attrs['type'] = 'NX_NUMBER' -root['/entry/data/g2_derr'].attrs['EX_required'] = 'false' -root['/entry/data/g2_derr'].attrs['units'] = 'NX_ARBITRARY_UNITS' - -root['/entry/data'].create_dataset(name='G2_unnormalized', data=1.0, maxshape=None) -root['/entry/data/G2_unnormalized'].attrs['type'] = 'NX_NUMBER' -root['/entry/data/G2_unnormalized'].attrs['EX_required'] = 'false' -root['/entry/data/G2_unnormalized'].attrs['units'] = 'NX_ARBITRARY_UNITS' - -root['/entry/data'].create_dataset(name='delay_difference', data=1, maxshape=None) -root['/entry/data/delay_difference'].attrs['type'] = 'NX_INT' -root['/entry/data/delay_difference'].attrs['EX_required'] = 'false' -root['/entry/data/delay_difference'].attrs['units'] = 'NX_INT' - -root['/entry/twotime'].create_dataset(name='two_time_corr_func', data=1.0, maxshape=None) -root['/entry/twotime/two_time_corr_func'].attrs['type'] = 'NX_NUMBER' -root['/entry/twotime/two_time_corr_func'].attrs['EX_required'] = 'false' -root['/entry/twotime/two_time_corr_func'].attrs['units'] = 'NX_ANY' - -root['/entry/twotime'].create_dataset(name='g2_from_two_time_corr_func', data=1.0, maxshape=None) -root['/entry/twotime/g2_from_two_time_corr_func'].attrs['type'] = 'NX_NUMBER' -root['/entry/twotime/g2_from_two_time_corr_func'].attrs['EX_required'] = 'false' -root['/entry/twotime/g2_from_two_time_corr_func'].attrs['units'] = 'NX_ARBITRARY_UNITS' - -root['/entry/twotime'].create_dataset(name='g2_err_from_two_time_corr_func', data=1.0, maxshape=None) -root['/entry/twotime/g2_err_from_two_time_corr_func'].attrs['type'] = 'NX_NUMBER' -root['/entry/twotime/g2_err_from_two_time_corr_func'].attrs['EX_required'] = 'false' -root['/entry/twotime/g2_err_from_two_time_corr_func'].attrs['units'] = 'NX_ARBITRARY_UNITS' - -root['/entry/twotime'].create_dataset(name='g2_from_two_time_corr_func_partials', data=1.0, maxshape=None) -root['/entry/twotime/g2_from_two_time_corr_func_partials'].attrs['type'] = 'NX_NUMBER' -root['/entry/twotime/g2_from_two_time_corr_func_partials'].attrs['EX_required'] = 'false' -root['/entry/twotime/g2_from_two_time_corr_func_partials'].attrs['units'] = 'NX_ARBITRARY_UNITS' - -root['/entry/twotime'].create_dataset(name='g2_err_from_two_time_corr_func_partials', data=1.0, maxshape=None) -root['/entry/twotime/g2_err_from_two_time_corr_func_partials'].attrs['type'] = 'NX_NUMBER' -root['/entry/twotime/g2_err_from_two_time_corr_func_partials'].attrs['EX_required'] = 'false' -root['/entry/twotime/g2_err_from_two_time_corr_func_partials'].attrs['units'] = 'NX_ARBITRARY_UNITS' - -root['/entry/instrument/incident_beam'].create_dataset(name='incident_energy', data=1.0, maxshape=None) -root['/entry/instrument/incident_beam/incident_energy'].attrs['type'] = 'NX_FLOAT' -root['/entry/instrument/incident_beam/incident_energy'].attrs['EX_required'] = 'true' -root['/entry/instrument/incident_beam/incident_energy'].attrs['units'] = 'NX_ENERGY' - -root['/entry/instrument/incident_beam'].create_dataset(name='incident_energy_spread', data=1.0, maxshape=None) -root['/entry/instrument/incident_beam/incident_energy_spread'].attrs['type'] = 'NX_FLOAT' -root['/entry/instrument/incident_beam/incident_energy_spread'].attrs['EX_required'] = 'false' -root['/entry/instrument/incident_beam/incident_energy_spread'].attrs['units'] = 'NX_ENERGY' - -root['/entry/instrument/incident_beam'].create_dataset(name='incident_polarization_type', data='SAMPLE-CHAR-DATA', maxshape=None) -root['/entry/instrument/incident_beam/incident_polarization_type'].attrs['type'] = 'NX_CHAR' -root['/entry/instrument/incident_beam/incident_polarization_type'].attrs['EX_required'] = 'false' - -root['/entry/instrument/incident_beam'].create_dataset(name='extent', data=1.0, maxshape=None) -root['/entry/instrument/incident_beam/extent'].attrs['type'] = 'NX_FLOAT' -root['/entry/instrument/incident_beam/extent'].attrs['EX_required'] = 'false' -root['/entry/instrument/incident_beam/extent'].attrs['units'] = 'NX_LENGTH' - -root['/entry/instrument/detector'].create_dataset(name='description', data='SAMPLE-CHAR-DATA', maxshape=None) -root['/entry/instrument/detector/description'].attrs['type'] = 'NX_CHAR' -root['/entry/instrument/detector/description'].attrs['EX_required'] = 'false' - -root['/entry/instrument/detector'].create_dataset(name='distance', data=1.0, maxshape=None) -root['/entry/instrument/detector/distance'].attrs['type'] = 'NX_NUMBER' -root['/entry/instrument/detector/distance'].attrs['EX_required'] = 'false' -root['/entry/instrument/detector/distance'].attrs['units'] = 'NX_LENGTH' - -root['/entry/instrument/detector'].create_dataset(name='count_time', data=1.0, maxshape=None) -root['/entry/instrument/detector/count_time'].attrs['type'] = 'NX_NUMBER' -root['/entry/instrument/detector/count_time'].attrs['EX_required'] = 'true' -root['/entry/instrument/detector/count_time'].attrs['units'] = 'NX_TIME' - -root['/entry/instrument/detector'].create_dataset(name='frame_time', data=1.0, maxshape=None) -root['/entry/instrument/detector/frame_time'].attrs['type'] = 'NX_NUMBER' -root['/entry/instrument/detector/frame_time'].attrs['EX_required'] = 'true' -root['/entry/instrument/detector/frame_time'].attrs['units'] = 'NX_TIME' - -root['/entry/instrument/detector'].create_dataset(name='beam_center_x', data=1.0, maxshape=None) -root['/entry/instrument/detector/beam_center_x'].attrs['type'] = 'NX_NUMBER' -root['/entry/instrument/detector/beam_center_x'].attrs['EX_required'] = 'true' -root['/entry/instrument/detector/beam_center_x'].attrs['units'] = 'NX_LENGTH' - -root['/entry/instrument/detector'].create_dataset(name='beam_center_y', data=1.0, maxshape=None) -root['/entry/instrument/detector/beam_center_y'].attrs['type'] = 'NX_NUMBER' -root['/entry/instrument/detector/beam_center_y'].attrs['EX_required'] = 'true' -root['/entry/instrument/detector/beam_center_y'].attrs['units'] = 'NX_LENGTH' - -root['/entry/instrument/detector'].create_dataset(name='x_pixel_size', data=1.0, maxshape=None) -root['/entry/instrument/detector/x_pixel_size'].attrs['type'] = 'NX_NUMBER' -root['/entry/instrument/detector/x_pixel_size'].attrs['EX_required'] = 'false' -root['/entry/instrument/detector/x_pixel_size'].attrs['units'] = 'NX_LENGTH' - -root['/entry/instrument/detector'].create_dataset(name='y_pixel_size', data=1.0, maxshape=None) -root['/entry/instrument/detector/y_pixel_size'].attrs['type'] = 'NX_NUMBER' -root['/entry/instrument/detector/y_pixel_size'].attrs['EX_required'] = 'false' -root['/entry/instrument/detector/y_pixel_size'].attrs['units'] = 'NX_LENGTH' - -root['/entry/instrument/masks'].create_dataset(name='dynamic_roi_map', data=1, maxshape=None) -root['/entry/instrument/masks/dynamic_roi_map'].attrs['type'] = 'NX_DIMENSIONLESS' -root['/entry/instrument/masks/dynamic_roi_map'].attrs['EX_required'] = 'true' - -root['/entry/instrument/masks'].create_dataset(name='dynamic_q_list', data=1.0, maxshape=None) -root['/entry/instrument/masks/dynamic_q_list'].attrs['type'] = 'NX_NUMBER' -root['/entry/instrument/masks/dynamic_q_list'].attrs['EX_required'] = 'false' -root['/entry/instrument/masks/dynamic_q_list'].attrs['units'] = 'NX_PER_LENGTH' - -root['/entry/instrument/masks'].create_dataset(name='dynamic_phi_list', data=1.0, maxshape=None) -root['/entry/instrument/masks/dynamic_phi_list'].attrs['type'] = 'NX_NUMBER' -root['/entry/instrument/masks/dynamic_phi_list'].attrs['EX_required'] = 'false' -root['/entry/instrument/masks/dynamic_phi_list'].attrs['units'] = 'NX_PER_LENGTH' - -root['/entry/instrument/masks'].create_dataset(name='static_roi_map', data=1, maxshape=None) -root['/entry/instrument/masks/static_roi_map'].attrs['type'] = 'NX_DIMENSIONLESS' -root['/entry/instrument/masks/static_roi_map'].attrs['EX_required'] = 'false' - -root['/entry/instrument/masks'].create_dataset(name='static_q_list', data=1.0, maxshape=None) -root['/entry/instrument/masks/static_q_list'].attrs['type'] = 'NX_NUMBER' -root['/entry/instrument/masks/static_q_list'].attrs['EX_required'] = 'false' -root['/entry/instrument/masks/static_q_list'].attrs['units'] = 'NX_PER_LENGTH' - -root['/entry/sample'].create_dataset(name='temperature_set', data=1.0, maxshape=None) -root['/entry/sample/temperature_set'].attrs['type'] = 'NX_NUMBER' -root['/entry/sample/temperature_set'].attrs['EX_required'] = 'false' -root['/entry/sample/temperature_set'].attrs['units'] = 'NX_TEMPERATURE' - -root['/entry/sample'].create_dataset(name='temperature', data=1.0, maxshape=None) -root['/entry/sample/temperature'].attrs['type'] = 'NX_NUMBER' -root['/entry/sample/temperature'].attrs['EX_required'] = 'false' -root['/entry/sample/temperature'].attrs['units'] = 'NX_TEMPERATURE' - -# Create the DOC strings -root['/entry/definition'].attrs['EX_doc'] = 'Official NeXus NXDL schema to which this file conforms ' -root['/entry/entry_identifier'].attrs['EX_doc'] = 'Unique identifier for the experiment. ' -root['/entry/entry_identifier_uuid'].attrs['EX_doc'] = '(optional) UUID identifier for this entry. ' -root['/entry/scan_number'].attrs['EX_doc'] = 'Scan number (must be an integer). NOTE: Link to collection_identifier. ' -root['/entry/start_time'].attrs['EX_doc'] = 'Starting time of experiment, such as "2021-02-11 11:22:33.445566Z". ' -root['/entry/end_time'].attrs['EX_doc'] = 'Ending time of experiment, such as "2021-02-11 11:23:45Z". ' -root['/entry/data'].attrs['EX_doc'] = 'The results data captured here are most commonly required for high throughput, equilibrium dynamics experiments. Data (results) describing on-equilibrium dynamics consume more memory resources so these data are separated. ' -root['/entry/data/frame_sum'].attrs['EX_doc'] = 'Two-dimensional summation along the frames stack. sum of intensity v. time (in the units of "frames") ' -root['/entry/data/frame_average'].attrs['EX_doc'] = 'Two-dimensional average along the frames stack. average intensity v. time (in the units of "frames") ' -root['/entry/data/g2'].attrs['EX_doc'] = 'NXdata.html#nxdata ' -root['/entry/data/g2_derr'].attrs['EX_doc'] = 'error values for the :math:`g_2` values. The derivation of the error is left up to the implemented code. Symmetric error will be expected (:math:`\pm` error). The data should be in the same format as ``g2``. ' -root['/entry/data/G2_unnormalized'].attrs['EX_doc'] = 'unnormalized intensity auto-correlation function. Specifically, ``g2`` without the denominator. The data should be in the same format as ``g2``. ' -root['/entry/data/delay_difference'].attrs['EX_doc'] = 'delay_difference (also known as delay or lag step) This is quantized difference so that the "step" between two consecutive frames is one frame (or step ``= dt = 1 frame``) It is the "quantized" delay time corresponding to the ``g2`` values. The unit of delay_differences is ``NX_INT`` for units of frames (i.e., integers) preferred, refer to :ref:`NXdetector` for conversion to time units. ' -root['/entry/twotime'].attrs['EX_doc'] = 'The data (results) in this section are based on the two-time intensity correlation function derived from a time series of scattering images. ' -root['/entry/twotime/two_time_corr_func'].attrs['EX_doc'] = 'two-time correlation of speckle intensity for a given q-bin or roi (represented by the nth roi_map value) See Fluerasu, Phys Rev E (2007), Eq 1 and Sutton, Optics Express (2003) for an early description applied to X-ray scattering: .. math:: C(\boldsymbol Q, t_1, t_2) = \frac{ \langle I(\boldsymbol Q, t_1)I(\boldsymbol Q, t_2)\rangle }{ \langle I(\boldsymbol Q,t_1)\rangle \langle I(\boldsymbol Q,t_2)\rangle } in which time is quantized by frames. In principle, any data format is acceptable if the data and its axes are self-describing as per NeXus recommendations. However, the data is preferred in one of the following two formats: * iterable list of linked files (or keys) for each q-bin called by the nth roi_map value. data for each bin is a 2D array * 3D array with shape (frames, frames, q) or (q, frames, frames), where :math:`q` is represented by the nth roi_map value, not the value `q` value The computation of this result can be customized. These customizations can affect subsequently derived results (below). The following attributes will be used to manage the customization. * Other normalization methods may be applied, but the method will not be specified in this definition. Some of these normalization methods result in a baseline value of ``0``, not ``1``. * The various software libraries use different programming languages. Therefore, we need to specify the ``time = 0`` origin location of the 2D array for each :math:`q`. * A method to reduce data storage needs is to only record half of the 2D array by populating array elements above or below the array diagonal. ' -root['/entry/twotime/g2_from_two_time_corr_func'].attrs['EX_doc'] = 'g2" * iterable list of linked files for each :math:`g_2` with 1 file per :math:`q` * 2D array with shape (:math:`g_2`, :math:`q`) Note that delay_difference is not included here because it is derived from the shape of extracted :math:`g_2` because all frames are considered, which is not necessarily the case for :math:`g_2`. The computation of this result can be customized. The customization can affect the fitting required to extract quantitative results. The following attributes will be used to manage the customization. ' -root['/entry/twotime/g2_err_from_two_time_corr_func'].attrs['EX_doc'] = 'error values for the :math:`g_2` values. The derivation of the error is left up to the implemented code. Symmetric error will be expected (:math:`\pm` error). ' -root['/entry/twotime/g2_from_two_time_corr_func_partials'].attrs['EX_doc'] = 'subset of frame weighted average along the diagonal direction in ``two_time_corr_func`` Time slicing along the diagonal can be very sophisticated. This entry currently assumes equal frame-binning. The data formats are highly dependent on the implantation of various analysis libraries. In principle, any data format is acceptable if the data and its axes are self describing as per NeXus recommendations. However, the data is preferred in one of the following two formats: * iterable list of linked files (or keys) for each partial :math:`g_2` of each q-bin represented by the roi_map value * 3D array with shape (:math:`g_2`, :math:`q`, nth_partial) Note that delay_difference is not included here because it is derived from the shape of extracted :math:`g_2`. ' -root['/entry/twotime/g2_err_from_two_time_corr_func_partials'].attrs['EX_doc'] = 'error values for the :math:`g_2` values. The derivation of the error is left up to the implemented code. Symmetric error will be expected (:math:`\pm` error). ' -root['/entry/instrument'].attrs['EX_doc'] = 'instrument``). ' -root['/entry/instrument/incident_beam/incident_energy'].attrs['EX_doc'] = 'Incident beam line energy (either keV or eV). ' -root['/entry/instrument/incident_beam/incident_energy_spread'].attrs['EX_doc'] = 'Spread of incident beam line energy (either keV or eV). This quantity is otherwise known as the energy resolution, which is related to the longitudinal coherence length. ' -root['/entry/instrument/incident_beam/incident_polarization_type'].attrs['EX_doc'] = 'Terse description of the incident beam polarization. The value can be plain text, such as ``vertical``, ``C+``, ``circular left``. ' -root['/entry/instrument/incident_beam/extent'].attrs['EX_doc'] = 'Size (2-D) of the beam at this position. ' -root['/entry/instrument/detector'].attrs['EX_doc'] = 'cxi.html ' -root['/entry/instrument/detector/description'].attrs['EX_doc'] = 'Detector name. ' -root['/entry/instrument/detector/distance'].attrs['EX_doc'] = 'Distance between sample and detector. ' -root['/entry/instrument/detector/count_time'].attrs['EX_doc'] = 'Exposure time of frames, s. ' -root['/entry/instrument/detector/frame_time'].attrs['EX_doc'] = 'Exposure period (time between frame starts) of frames, s ' -root['/entry/instrument/detector/beam_center_x'].attrs['EX_doc'] = 'Position of beam center, x axis, in detector"s coordinates. ' -root['/entry/instrument/detector/beam_center_y'].attrs['EX_doc'] = 'Position of beam center, y axis, in detector"s coordinates. ' -root['/entry/instrument/detector/x_pixel_size'].attrs['EX_doc'] = 'Length of pixel in x direction. ' -root['/entry/instrument/detector/y_pixel_size'].attrs['EX_doc'] = 'Length of pixel in y direction. ' -root['/entry/instrument/masks'].attrs['EX_doc'] = 'two_time. "Static" refers to finer binning used for computation not strictly used for the final XPCS results. Implementation of _static_ binning is left for individual libraries to document. We encourage usage of :ref:`NXcanSAS` to represent standard SAXS results or development of new NeXus definitions for GI-SAXS or other reciprocal space intensity mapping. ' -root['/entry/instrument/masks/dynamic_roi_map'].attrs['EX_doc'] = 'roi index array or labeled array The values of this mask index (or map to) the :math:`Q` value from the the ``dynamic_q_list`` field. Not that the value of ``0`` represents in-action. XPCS computations are performed on all pixels with a value > 0. The ``units`` attribute should be set to ``"au"`` indicating arbitrary units. ' -root['/entry/instrument/masks/dynamic_q_list'].attrs['EX_doc'] = 'O is required by end user. The lists can be accessed as lists, arrays or via keys ' -root['/entry/instrument/masks/dynamic_phi_list'].attrs['EX_doc'] = 'Array of :math:`\varphi` value for each pixel. List order is determined by the index value of the associated roi map starting at ``1``. ' -root['/entry/instrument/masks/static_roi_map'].attrs['EX_doc'] = 'roi index array. The values of this mask index the :math:`|Q|` value from the the ``static_q_list`` field. The ``units`` attribute should be set to ``"au"`` indicating arbitrary units. ' -root['/entry/instrument/masks/static_q_list'].attrs['EX_doc'] = '1-D list of :math:`|Q|` values, 1 for each roi. ' -root['/entry/sample/temperature_set'].attrs['EX_doc'] = 'Sample temperature setpoint, (C or K). ' -root['/entry/sample/temperature'].attrs['EX_doc'] = 'Sample temperature actual, (C or K). ' -root['/entry/ROI'].attrs['EX_doc'] = '**THIS FIELD IS SCHEDULED FOR DELETION on or about March 1, 2022.** Contact abarbour@bnl.gov or jemian@anl.gov to object. Region(s) of interest. NAME: The NeXus convention, to use all upper case to indicate the name (here ``roi``), is left to the file writer. In our case, follow the suggested name pattern and sequence: roi_1, roi_2, roi_3, ... Start with ``roi_1`` if the first one, otherwise pick the next number in this sequence. ' -root['/entry/NOTE'].attrs['EX_doc'] = 'Any other notes. NAME: The NeXus convention, to use all upper case to indicate the name (here ``NOTE``), is left to the file writer. In our case, follow the suggested name pattern and sequence: note_1, note_2, note_3, ... Start with ``note_1`` if the first one, otherwise pick the next number in this sequence. ' - - -# Create the ATTRIBUTES -root['/entry/data/g2'].attrs['storage_mode'] = 'SAMPLE-CHAR-DATA' -root['/entry/data/g2_derr'].attrs['storage_mode'] = 'SAMPLE-CHAR-DATA' -root['/entry/data/G2_unnormalized'].attrs['storage_mode'] = 'SAMPLE-CHAR-DATA' -root['/entry/data/delay_difference'].attrs['storage_mode'] = 'SAMPLE-CHAR-DATA' -root['/entry/twotime/two_time_corr_func'].attrs['storage_mode'] = 'SAMPLE-CHAR-DATA' -root['/entry/twotime/two_time_corr_func'].attrs['baseline_reference'] = '1' -root['/entry/twotime/two_time_corr_func'].attrs['time_origin_location'] = 'SAMPLE-CHAR-DATA' -root['/entry/twotime/two_time_corr_func'].attrs['populated_elements'] = 'SAMPLE-CHAR-DATA' -root['/entry/twotime/g2_from_two_time_corr_func'].attrs['storage_mode'] = 'SAMPLE-CHAR-DATA' -root['/entry/twotime/g2_from_two_time_corr_func'].attrs['baseline_reference'] = '1' -root['/entry/twotime/g2_from_two_time_corr_func'].attrs['first_point_for_fit'] = '1' -root['/entry/twotime/g2_err_from_two_time_corr_func'].attrs['storage_mode'] = 'SAMPLE-CHAR-DATA' -root['/entry/twotime/g2_from_two_time_corr_func_partials'].attrs['storage_mode'] = 'SAMPLE-CHAR-DATA' -root['/entry/twotime/g2_from_two_time_corr_func_partials'].attrs['baseline_reference'] = '1' -root['/'].attrs['default'] = 'entry' -root['/entry'].attrs['default'] = 'data' -root['/entry/data'].attrs['signal'] = 'G2_unnormalized' -root['/entry/data/G2_unnormalized'].attrs['signal'] = '1' -root.attrs['file_name'] = os.path.abspath('NXxpcs') -root.attrs['file_time'] = datetime.datetime.now().isoformat() -root.attrs['h5py_version'] = h5py.version.version -root.attrs['HDF5_Version'] = h5py.version.hdf5_version - -# Close the file -root.close() - - diff --git a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxrot.py b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxrot.py index 336132b..7ecc88c 100644 --- a/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxrot.py +++ b/autogenerated_examples/nxdl/python_scripts/h5py/ex_h5py_NXxrot.py @@ -57,7 +57,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry'].create_dataset(name='start_time', data='2022-03-03T14:34:19.414948', maxshape=None) +root['/entry'].create_dataset(name='start_time', data='2022-03-04T14:56:40.218872', maxshape=None) root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' @@ -232,6 +232,9 @@ # Create the ATTRIBUTES + +# Valid enumeration values for root['/entry/instrument/detector/data']['signal'] are: +# 1 root['/entry/instrument/detector/data'].attrs['signal'] = '1' root['/'].attrs['default'] = 'entry' root['/entry'].attrs['default'] = 'data' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXarchive.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXarchive.py index 2ffaae5..28bf205 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXarchive.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXarchive.py @@ -45,11 +45,11 @@ root['/entry/entry_identifier'].attrs['type'] = 'NX_CHAR' root['/entry/entry_identifier'].attrs['EX_required'] = 'true' -root['/entry/start_time'] = NXfield('2022-03-03T14:34:11.514397') +root['/entry/start_time'] = NXfield('2022-03-04T14:56:32.205127') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' -root['/entry/end_time'] = NXfield('2022-03-03T14:34:11.514397') +root['/entry/end_time'] = NXfield('2022-03-04T14:56:32.220782') root['/entry/end_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/end_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXarpes.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXarpes.py index d74ecc8..92cc450 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXarpes.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXarpes.py @@ -29,7 +29,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry/start_time'] = NXfield('2022-03-03T14:34:11.686229') +root['/entry/start_time'] = NXfield('2022-03-04T14:56:32.376970') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXcanSAS.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXcanSAS.py index 8fefe47..a29aa90 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXcanSAS.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXcanSAS.py @@ -287,7 +287,7 @@ root['/entry/process/name'].attrs['type'] = 'NX_CHAR' root['/entry/process/name'].attrs['EX_required'] = 'false' -root['/entry/process/date'] = NXfield('2022-03-03T14:34:12.880239') +root['/entry/process/date'] = NXfield('2022-03-04T14:56:33.595457') root['/entry/process/date'].attrs['type'] = 'NX_DATE_TIME' root['/entry/process/date'].attrs['EX_required'] = 'false' @@ -387,41 +387,129 @@ # Create the ATTRIBUTES root['/entry/SAMPLE-CHAR-DATA'] = NXdata() root['/entry/SAMPLE-CHAR-DATA'].set_default() -root['/entry'].attrs['canSAS_class'] = 'SAMPLE-CHAR-DATA' -root['/entry'].attrs['version'] = 'SAMPLE-CHAR-DATA' -root['/entry/data'].attrs['canSAS_class'] = 'SAMPLE-CHAR-DATA' -root['/entry/data'].attrs['signal'] = 'SAMPLE-CHAR-DATA' + +# Valid enumeration values for root['/entry']['canSAS_class'] are: +# SASentry +root['/entry'].attrs['canSAS_class'] = 'SASentry' + +# Valid enumeration values for root['/entry']['version'] are: +# 1.1 +root['/entry'].attrs['version'] = '1.1' + +# Valid enumeration values for root['/entry/data']['canSAS_class'] are: +# SASdata +root['/entry/data'].attrs['canSAS_class'] = 'SASdata' + +# Valid enumeration values for root['/entry/data']['signal'] are: +# I +root['/entry/data'].attrs['signal'] = 'I' root['/entry/data'].attrs['I_axes'] = 'SAMPLE-CHAR-DATA' +root['/entry/data'].attrs['Q_indices'] = 'SAMPLE-CHAR-DATA' root['/entry/data'].attrs['mask'] = 'SAMPLE-CHAR-DATA' root['/entry/data'].attrs['Mask_indices'] = 'SAMPLE-CHAR-DATA' -root['/entry/data'].attrs['timestamp'] = '2022-03-03T14:34:12.911481' -root['/entry/data/Q'].attrs['units'] = 'SAMPLE-CHAR-DATA' +root['/entry/data'].attrs['timestamp'] = 'SAMPLE-CHAR-DATA' + +# Valid enumeration values for root['/entry/data/Q']['units'] are: +# 1/m +# 1/nm +# 1/angstrom +root['/entry/data/Q'].attrs['units'] = '1/m' root['/entry/data/Q'].attrs['uncertainties'] = 'SAMPLE-CHAR-DATA' root['/entry/data/Q'].attrs['resolutions'] = 'SAMPLE-CHAR-DATA' root['/entry/data/Q'].attrs['resolutions_description'] = 'SAMPLE-CHAR-DATA' -root['/entry/data/I'].attrs['units'] = 'SAMPLE-CHAR-DATA' + +# Valid enumeration values for root['/entry/data/I']['units'] are: +# 1/m +# 1/cm +# m2/g +# cm2/g +# arbitrary +root['/entry/data/I'].attrs['units'] = '1/m' root['/entry/data/I'].attrs['uncertainties'] = 'SAMPLE-CHAR-DATA' root['/entry/data/I'].attrs['scaling_factor'] = 'SAMPLE-CHAR-DATA' -root['/entry/data/Idev'].attrs['units'] = 'SAMPLE-CHAR-DATA' -root['/entry/data/Qdev'].attrs['units'] = 'SAMPLE-CHAR-DATA' -root['/entry/data/dQw'].attrs['units'] = 'SAMPLE-CHAR-DATA' -root['/entry/data/dQl'].attrs['units'] = 'SAMPLE-CHAR-DATA' -root['/entry/data/Qmean'].attrs['units'] = 'SAMPLE-CHAR-DATA' + +# Valid enumeration values for root['/entry/data/Idev']['units'] are: +# 1/m +# 1/cm +# m2/g +# cm2/g +# arbitrary +root['/entry/data/Idev'].attrs['units'] = '1/m' + +# Valid enumeration values for root['/entry/data/Qdev']['units'] are: +# 1/m +# 1/nm +# 1/angstrom +root['/entry/data/Qdev'].attrs['units'] = '1/m' + +# Valid enumeration values for root['/entry/data/dQw']['units'] are: +# 1/m +# 1/nm +# 1/angstrom +root['/entry/data/dQw'].attrs['units'] = '1/m' + +# Valid enumeration values for root['/entry/data/dQl']['units'] are: +# 1/m +# 1/nm +# 1/angstrom +root['/entry/data/dQl'].attrs['units'] = '1/m' + +# Valid enumeration values for root['/entry/data/Qmean']['units'] are: +# 1/m +# 1/nm +# 1/angstrom +root['/entry/data/Qmean'].attrs['units'] = '1/m' root['/entry/run'].attrs['name'] = 'SAMPLE-CHAR-DATA' -root['/entry/instrument'].attrs['canSAS_class'] = 'SAMPLE-CHAR-DATA' -root['/entry/instrument/aperture'].attrs['canSAS_class'] = 'SAMPLE-CHAR-DATA' -root['/entry/instrument/collimator'].attrs['canSAS_class'] = 'SAMPLE-CHAR-DATA' -root['/entry/instrument/detector'].attrs['canSAS_class'] = 'SAMPLE-CHAR-DATA' -root['/entry/instrument/source'].attrs['canSAS_class'] = 'SAMPLE-CHAR-DATA' -root['/entry/sample'].attrs['canSAS_class'] = 'SAMPLE-CHAR-DATA' -root['/entry/process'].attrs['canSAS_class'] = 'SAMPLE-CHAR-DATA' -root['/entry/process/collection'].attrs['canSAS_class'] = 'SAMPLE-CHAR-DATA' -root['/entry/collection'].attrs['canSAS_class'] = 'SAMPLE-CHAR-DATA' -root['/entry/TRANSMISSION_SPECTRUM'].attrs['canSAS_class'] = 'SAMPLE-CHAR-DATA' -root['/entry/TRANSMISSION_SPECTRUM'].attrs['signal'] = 'SAMPLE-CHAR-DATA' -root['/entry/TRANSMISSION_SPECTRUM'].attrs['T_axes'] = 'SAMPLE-CHAR-DATA' + +# Valid enumeration values for root['/entry/instrument']['canSAS_class'] are: +# SASinstrument +root['/entry/instrument'].attrs['canSAS_class'] = 'SASinstrument' + +# Valid enumeration values for root['/entry/instrument/aperture']['canSAS_class'] are: +# SASaperture +root['/entry/instrument/aperture'].attrs['canSAS_class'] = 'SASaperture' + +# Valid enumeration values for root['/entry/instrument/collimator']['canSAS_class'] are: +# SAScollimation +root['/entry/instrument/collimator'].attrs['canSAS_class'] = 'SAScollimation' + +# Valid enumeration values for root['/entry/instrument/detector']['canSAS_class'] are: +# SASdetector +root['/entry/instrument/detector'].attrs['canSAS_class'] = 'SASdetector' + +# Valid enumeration values for root['/entry/instrument/source']['canSAS_class'] are: +# SASsource +root['/entry/instrument/source'].attrs['canSAS_class'] = 'SASsource' + +# Valid enumeration values for root['/entry/sample']['canSAS_class'] are: +# SASsample +root['/entry/sample'].attrs['canSAS_class'] = 'SASsample' + +# Valid enumeration values for root['/entry/process']['canSAS_class'] are: +# SASprocess +root['/entry/process'].attrs['canSAS_class'] = 'SASprocess' + +# Valid enumeration values for root['/entry/process/collection']['canSAS_class'] are: +# SASprocessnote +root['/entry/process/collection'].attrs['canSAS_class'] = 'SASprocessnote' + +# Valid enumeration values for root['/entry/collection']['canSAS_class'] are: +# SASnote +root['/entry/collection'].attrs['canSAS_class'] = 'SASnote' + +# Valid enumeration values for root['/entry/TRANSMISSION_SPECTRUM']['canSAS_class'] are: +# SAStransmission_spectrum +root['/entry/TRANSMISSION_SPECTRUM'].attrs['canSAS_class'] = 'SAStransmission_spectrum' + +# Valid enumeration values for root['/entry/TRANSMISSION_SPECTRUM']['signal'] are: +# T +root['/entry/TRANSMISSION_SPECTRUM'].attrs['signal'] = 'T' + +# Valid enumeration values for root['/entry/TRANSMISSION_SPECTRUM']['T_axes'] are: +# T +root['/entry/TRANSMISSION_SPECTRUM'].attrs['T_axes'] = 'T' root['/entry/TRANSMISSION_SPECTRUM'].attrs['name'] = 'SAMPLE-CHAR-DATA' -root['/entry/TRANSMISSION_SPECTRUM'].attrs['timestamp'] = '2022-03-03T14:34:12.927101' +root['/entry/TRANSMISSION_SPECTRUM'].attrs['timestamp'] = 'SAMPLE-CHAR-DATA' root['/entry/TRANSMISSION_SPECTRUM/T'].attrs['uncertainties'] = 'SAMPLE-CHAR-DATA' root.attrs['default'] = 'entry' root['/entry/TRANSMISSION_SPECTRUM'].set_default() diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXcxi_ptycho.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXcxi_ptycho.py index 5dd8250..b333a2c 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXcxi_ptycho.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXcxi_ptycho.py @@ -29,11 +29,11 @@ root['/entry_1/title'].attrs['type'] = 'NX_CHAR' root['/entry_1/title'].attrs['EX_required'] = 'false' -root['/entry_1/start_time'] = NXfield('2022-03-03T14:34:21.896003') +root['/entry_1/start_time'] = NXfield('2022-03-04T14:56:23.795988') root['/entry_1/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry_1/start_time'].attrs['EX_required'] = 'false' -root['/entry_1/end_time'] = NXfield('2022-03-03T14:34:21.896003') +root['/entry_1/end_time'] = NXfield('2022-03-04T14:56:23.795988') root['/entry_1/end_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry_1/end_time'].attrs['EX_required'] = 'false' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXdirecttof.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXdirecttof.py index abf8a40..4326ba8 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXdirecttof.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXdirecttof.py @@ -33,7 +33,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry/start_time'] = NXfield('2022-03-03T14:34:13.114561') +root['/entry/start_time'] = NXfield('2022-03-04T14:56:33.860983') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXfluo.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXfluo.py index fe09298..971b428 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXfluo.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXfluo.py @@ -31,7 +31,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry/start_time'] = NXfield('2022-03-03T14:34:13.239528') +root['/entry/start_time'] = NXfield('2022-03-04T14:56:33.985974') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXindirecttof.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXindirecttof.py index 538e97e..d2309ce 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXindirecttof.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXindirecttof.py @@ -31,7 +31,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry/start_time'] = NXfield('2022-03-03T14:34:13.442607') +root['/entry/start_time'] = NXfield('2022-03-04T14:56:34.220274') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXlauetof.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXlauetof.py index f6cee4c..f4520f6 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXlauetof.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXlauetof.py @@ -118,6 +118,10 @@ # Create the ATTRIBUTES + +# Valid enumeration values for root['/entry/instrument/detector/data']['signal'] are: +# 1 +root['/entry/instrument/detector/data'].attrs['signal'] = '1' root.attrs['default'] = 'entry' root['/entry/name'].set_default() root['/entry/name'].attrs['signal'] = 'data' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXmonopd.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXmonopd.py index 557d5c1..be35713 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXmonopd.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXmonopd.py @@ -31,7 +31,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry/start_time'] = NXfield('2022-03-03T14:34:13.864380') +root['/entry/start_time'] = NXfield('2022-03-04T14:56:34.657669') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXmx.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXmx.py index e45b023..34b5149 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXmx.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXmx.py @@ -43,15 +43,15 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'false' -root['/entry/start_time'] = NXfield('2022-03-03T14:34:14.520473') +root['/entry/start_time'] = NXfield('2022-03-04T14:56:35.329416') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' -root['/entry/end_time'] = NXfield('2022-03-03T14:34:14.536095') +root['/entry/end_time'] = NXfield('2022-03-04T14:56:35.329416') root['/entry/end_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/end_time'].attrs['EX_required'] = 'false' -root['/entry/end_time_estimated'] = NXfield('2022-03-03T14:34:14.536095') +root['/entry/end_time_estimated'] = NXfield('2022-03-04T14:56:35.345038') root['/entry/end_time_estimated'].attrs['type'] = 'NX_DATE_TIME' root['/entry/end_time_estimated'].attrs['EX_required'] = 'true' @@ -83,7 +83,7 @@ root['/entry/instrument/name'].attrs['type'] = 'NX_CHAR' root['/entry/instrument/name'].attrs['EX_required'] = 'true' -root['/entry/instrument/time_zone'] = NXfield('2022-03-03T14:34:14.551718') +root['/entry/instrument/time_zone'] = NXfield('2022-03-04T14:56:35.345038') root['/entry/instrument/time_zone'].attrs['type'] = 'NX_DATE_TIME' root['/entry/instrument/time_zone'].attrs['EX_required'] = 'true' @@ -381,13 +381,31 @@ # Create the ATTRIBUTES -root['/entry'].attrs['version'] = 'SAMPLE-CHAR-DATA' + +# Valid enumeration values for root['/entry']['version'] are: +# 1.0 +root['/entry'].attrs['version'] = '1.0' root['/entry/instrument/name'].attrs['short_name'] = 'SAMPLE-CHAR-DATA' -root['/entry/instrument/detector/NXdetector_module/module_offset'].attrs['transformation_type'] = 'SAMPLE-CHAR-DATA' + +# Valid enumeration values for root['/entry/instrument/detector/NXdetector_module/module_offset']['transformation_type'] are: +# translation +root['/entry/instrument/detector/NXdetector_module/module_offset'].attrs['transformation_type'] = 'translation' +root['/entry/instrument/detector/NXdetector_module/module_offset'].attrs['vector'] = 'SAMPLE-CHAR-DATA' +root['/entry/instrument/detector/NXdetector_module/module_offset'].attrs['offset'] = 'SAMPLE-CHAR-DATA' root['/entry/instrument/detector/NXdetector_module/module_offset'].attrs['depends_on'] = 'SAMPLE-CHAR-DATA' -root['/entry/instrument/detector/NXdetector_module/fast_pixel_direction'].attrs['transformation_type'] = 'SAMPLE-CHAR-DATA' + +# Valid enumeration values for root['/entry/instrument/detector/NXdetector_module/fast_pixel_direction']['transformation_type'] are: +# translation +root['/entry/instrument/detector/NXdetector_module/fast_pixel_direction'].attrs['transformation_type'] = 'translation' +root['/entry/instrument/detector/NXdetector_module/fast_pixel_direction'].attrs['vector'] = 'SAMPLE-CHAR-DATA' +root['/entry/instrument/detector/NXdetector_module/fast_pixel_direction'].attrs['offset'] = 'SAMPLE-CHAR-DATA' root['/entry/instrument/detector/NXdetector_module/fast_pixel_direction'].attrs['depends_on'] = 'SAMPLE-CHAR-DATA' -root['/entry/instrument/detector/NXdetector_module/slow_pixel_direction'].attrs['transformation_type'] = 'SAMPLE-CHAR-DATA' + +# Valid enumeration values for root['/entry/instrument/detector/NXdetector_module/slow_pixel_direction']['transformation_type'] are: +# translation +root['/entry/instrument/detector/NXdetector_module/slow_pixel_direction'].attrs['transformation_type'] = 'translation' +root['/entry/instrument/detector/NXdetector_module/slow_pixel_direction'].attrs['vector'] = 'SAMPLE-CHAR-DATA' +root['/entry/instrument/detector/NXdetector_module/slow_pixel_direction'].attrs['offset'] = 'SAMPLE-CHAR-DATA' root['/entry/instrument/detector/NXdetector_module/slow_pixel_direction'].attrs['depends_on'] = 'SAMPLE-CHAR-DATA' root['/entry/source/name'].attrs['short_name'] = 'SAMPLE-CHAR-DATA' root.attrs['default'] = 'entry' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXpeem.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXpeem.py deleted file mode 100644 index ba3d1c6..0000000 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXpeem.py +++ /dev/null @@ -1,130 +0,0 @@ - -import numpy as np -from nexusformat.nexus import * - -# Note this example script was generated by nxdl_to_hdf5.py using the current -# installed version of the NEXUS definitions ver[v2020.10] - -root = NXroot() - -# Create the GROUPS -root['/entry'] = NXentry() -root['/entry'].attrs['EX_required'] = 'true' -root['/entry/instrument'] = NXinstrument() -root['/entry/instrument'].attrs['EX_required'] = 'true' -root['/entry/instrument/source'] = NXsource() -root['/entry/instrument/source'].attrs['EX_required'] = 'true' -root['/entry/instrument/monochromator'] = NXmonochromator() -root['/entry/instrument/monochromator'].attrs['EX_required'] = 'true' -root['/entry/instrument/detector'] = NXdetector() -root['/entry/instrument/detector'].attrs['EX_required'] = 'true' -root['/entry/sample'] = NXsample() -root['/entry/sample'].attrs['EX_required'] = 'true' -root['/entry/data'] = NXdata() -root['/entry/data'].attrs['EX_required'] = 'true' - -# Create the FIELDS - -root['/entry/title'] = NXfield('SAMPLE-CHAR-DATA') -root['/entry/title'].attrs['type'] = 'NX_CHAR' -root['/entry/title'].attrs['EX_required'] = 'true' - -root['/entry/start_time'] = NXfield('2022-03-03T14:34:14.801656') -root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' -root['/entry/start_time'].attrs['EX_required'] = 'true' - -root['/entry/end_time'] = NXfield('2022-03-03T14:34:14.801656') -root['/entry/end_time'].attrs['type'] = 'NX_DATE_TIME' -root['/entry/end_time'].attrs['EX_required'] = 'true' - -# Valid enumeration values for root['/entry']['definition'] are: -# NXpeem - -root['/entry/definition'] = NXfield('NXpeem') -root['/entry/definition'].attrs['type'] = 'NX_CHAR' -root['/entry/definition'].attrs['EX_required'] = 'true' - -root['/entry/instrument/source/type'] = NXfield('SAMPLE-CHAR-DATA') -root['/entry/instrument/source/type'].attrs['type'] = 'NX_CHAR' -root['/entry/instrument/source/type'].attrs['EX_required'] = 'true' - -root['/entry/instrument/source/name'] = NXfield('SAMPLE-CHAR-DATA') -root['/entry/instrument/source/name'].attrs['type'] = 'NX_CHAR' -root['/entry/instrument/source/name'].attrs['EX_required'] = 'true' - -root['/entry/instrument/source/probe'] = NXfield('SAMPLE-CHAR-DATA') -root['/entry/instrument/source/probe'].attrs['type'] = 'NX_CHAR' -root['/entry/instrument/source/probe'].attrs['EX_required'] = 'true' - -root['/entry/instrument/monochromator/energy'] = NXfield(1.0) -root['/entry/instrument/monochromator/energy'].attrs['type'] = 'NX_FLOAT' -root['/entry/instrument/monochromator/energy'].attrs['EX_required'] = 'true' - -root['/entry/instrument/detector/data'] = NXfield(1.0) -root['/entry/instrument/detector/data'].attrs['type'] = 'NX_NUMBER' -root['/entry/instrument/detector/data'].attrs['EX_required'] = 'true' - -root['/entry/sample/rotation_angle'] = NXfield(1.0) -root['/entry/sample/rotation_angle'].attrs['type'] = 'NX_FLOAT' -root['/entry/sample/rotation_angle'].attrs['EX_required'] = 'true' - -# Valid enumeration values for root['/entry/data']['peem_scan_type'] are: -# single image scan -# stack scan -# focus scan -# single variable scan -# two variable scan -# time scan - -root['/entry/data/peem_scan_type'] = NXfield('single image scan') -root['/entry/data/peem_scan_type'].attrs['type'] = 'NX_CHAR' -root['/entry/data/peem_scan_type'].attrs['EX_required'] = 'true' - -root['/entry/data/img_data'] = NXfield(1.0) -root['/entry/data/img_data'].attrs['type'] = 'NX_NUMBER' -root['/entry/data/img_data'].attrs['EX_required'] = 'true' - -root['/entry/data/spec_data'] = NXfield(1.0) -root['/entry/data/spec_data'].attrs['type'] = 'NX_NUMBER' -root['/entry/data/spec_data'].attrs['EX_required'] = 'true' -root['/entry/data/spec_data'].attrs['signal'] = '1' - -root['/entry/data/energy'] = NXfield(1.0) -root['/entry/data/energy'].attrs['type'] = 'NX_FLOAT' -root['/entry/data/energy'].attrs['EX_required'] = 'true' - -root['/entry/data/polarization'] = NXfield(1.0) -root['/entry/data/polarization'].attrs['type'] = 'NX_FLOAT' -root['/entry/data/polarization'].attrs['EX_required'] = 'false' - -root['/entry/data/averages'] = NXfield(1) -root['/entry/data/averages'].attrs['type'] = 'NX_INTEGER' -root['/entry/data/averages'].attrs['EX_required'] = 'true' - -root['/entry/data/count_time'] = NXfield(1.0) -root['/entry/data/count_time'].attrs['type'] = 'NX_FLOAT' -root['/entry/data/count_time'].attrs['EX_required'] = 'true' - -# Create the DOC strings -root['/entry/definition'].attrs['EX_doc'] = 'Official NeXus NXDL schema to which this file conforms ' -root['/entry/instrument/detector/data'].attrs['EX_doc'] = 'Detector data should be presented with the first dimension corresponding to the scan point and subsequent dimensions corresponding to the output of the detector. Detectors that provide more than one value per scan point should have a data array of rank 1+d, where d is the dimensions of the array provided per scan point. For example, an area detector should have an NXdetector data array of 3 dimensions, with the first being the set of scan points and the latter two being the x- and y- extent of the detector ' -root['/entry/data'].attrs['EX_doc'] = 'This will contain all the data for a particular ROI ' -root['/entry/data/peem_scan_type'].attrs['EX_doc'] = 'Label for typical scan types as a convenience for humans. Each label corresponds to a specific set of axes being scanned to produce a data array of shape: * single image scan: (photon_energy, 2D image data) * stack scan: (photon_energy, polarization, 2D image data + 1D spectra) * focus scan: (photon_energy, 2D image data) * single variable scan: (variable, 2D image data + 1D spectra) * two variable scan: (variable1, variable2, 2D image data + 1D spectra) * time scan: (time, 2D image data + 1D spectra) The "single image scan" string is to be used when none of the other choices are appropriate. ' -root['/entry/data/img_data'].attrs['EX_doc'] = 'This will contain a multi dimensonal array that with the columns determined by the scan type ' -root['/entry/data/spec_data'].attrs['EX_doc'] = 'This will contain a multi dimensonal array that with the columns determined by the scan type ' -root['/entry/data/energy'].attrs['EX_doc'] = 'List of photon energies of the X-ray beam. If scanned through multiple values, then an "axis" attribute will be required to link the field to the appropriate data array dimension. ' -root['/entry/data/polarization'].attrs['EX_doc'] = 'List of polarizations. If scanned through multiple values, then an "axis" attribute will be required to link the field to the appropriate data array dimension. ' -root['/entry/data/averages'].attrs['EX_doc'] = 'List of Y positions on the sample. If scanned through multiple values, then an "axis" attribute will be required to link the field to the appropriate data array dimension. ' -root['/entry/data/count_time'].attrs['EX_doc'] = 'List of dwell times for each point in the scan, they may vary point to point, then an "axis" attribute will be required to link the field to the appropriate data array dimension. ' - - -# Create the ATTRIBUTES -root.attrs['default'] = 'entry' -root['/entry/data'].set_default() -root['/entry/data'].attrs['signal'] = 'averages' -root['/entry/data/averages'].attrs['signal'] = '1' - -# Save the file -root.save('NXpeem.nxs', 'w') - - diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXrefscan.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXrefscan.py index 48d375f..3110ff6 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXrefscan.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXrefscan.py @@ -31,11 +31,11 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry/start_time'] = NXfield('2022-03-03T14:34:14.942247') +root['/entry/start_time'] = NXfield('2022-03-04T14:56:35.594947') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' -root['/entry/end_time'] = NXfield('2022-03-03T14:34:14.942247') +root['/entry/end_time'] = NXfield('2022-03-04T14:56:35.594947') root['/entry/end_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/end_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXreftof.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXreftof.py index 7c4e738..ee3cc07 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXreftof.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXreftof.py @@ -29,11 +29,11 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry/start_time'] = NXfield('2022-03-03T14:34:15.067217') +root['/entry/start_time'] = NXfield('2022-03-04T14:56:35.735539') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' -root['/entry/end_time'] = NXfield('2022-03-03T14:34:15.067217') +root['/entry/end_time'] = NXfield('2022-03-04T14:56:35.735539') root['/entry/end_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/end_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXsas.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXsas.py index 1e5298c..4301d9c 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXsas.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXsas.py @@ -37,11 +37,11 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry/start_time'] = NXfield('2022-03-03T14:34:15.261415') +root['/entry/start_time'] = NXfield('2022-03-04T14:56:35.922993') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' -root['/entry/end_time'] = NXfield('2022-03-03T14:34:15.263409') +root['/entry/end_time'] = NXfield('2022-03-04T14:56:35.938622') root['/entry/end_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/end_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXsastof.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXsastof.py index 6949b5c..2aaa589 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXsastof.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXsastof.py @@ -35,7 +35,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry/start_time'] = NXfield('2022-03-03T14:34:15.490730') +root['/entry/start_time'] = NXfield('2022-03-04T14:56:36.157313') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXscan.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXscan.py index 1b4b60f..c7fed12 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXscan.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXscan.py @@ -27,11 +27,11 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry/start_time'] = NXfield('2022-03-03T14:34:15.600086') +root['/entry/start_time'] = NXfield('2022-03-04T14:56:36.266661') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' -root['/entry/end_time'] = NXfield('2022-03-03T14:34:15.600086') +root['/entry/end_time'] = NXfield('2022-03-04T14:56:36.266661') root['/entry/end_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/end_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXsnsevent.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXsnsevent.py index 8220540..174598b 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXsnsevent.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXsnsevent.py @@ -193,7 +193,7 @@ root['/entry/duration'].attrs['EX_required'] = 'false' root['/entry/duration'].attrs['units'] = 'NX_TIME' -root['/entry/end_time'] = NXfield('2022-03-03T14:34:22.583376') +root['/entry/end_time'] = NXfield('2022-03-04T14:56:24.498980') root['/entry/end_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/end_time'].attrs['EX_required'] = 'false' @@ -468,7 +468,7 @@ root['/entry/sample/nature'].attrs['type'] = 'NX_CHAR' root['/entry/sample/nature'].attrs['EX_required'] = 'false' -root['/entry/start_time'] = NXfield('2022-03-03T14:34:22.708346') +root['/entry/start_time'] = NXfield('2022-03-04T14:56:24.592709') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'false' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXsnshisto.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXsnshisto.py index 7364036..b46c705 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXsnshisto.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXsnshisto.py @@ -193,7 +193,7 @@ root['/entry/duration'].attrs['EX_required'] = 'false' root['/entry/duration'].attrs['units'] = 'NX_TIME' -root['/entry/end_time'] = NXfield('2022-03-03T14:34:23.341632') +root['/entry/end_time'] = NXfield('2022-03-04T14:56:25.264424') root['/entry/end_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/end_time'].attrs['EX_required'] = 'false' @@ -484,7 +484,7 @@ root['/entry/sample/nature'].attrs['type'] = 'NX_CHAR' root['/entry/sample/nature'].attrs['EX_required'] = 'false' -root['/entry/start_time'] = NXfield('2022-03-03T14:34:23.435329') +root['/entry/start_time'] = NXfield('2022-03-04T14:56:25.358149') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'false' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXspecdata.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXspecdata.py index 2915d65..ee2ac20 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXspecdata.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXspecdata.py @@ -58,7 +58,7 @@ root['/entry/command'].attrs['type'] = 'NX_CHAR' root['/entry/command'].attrs['EX_required'] = 'false' -root['/entry/date'] = NXfield('2022-03-03T14:34:23.779539') +root['/entry/date'] = NXfield('2022-03-04T14:56:25.717441') root['/entry/date'].attrs['type'] = 'NX_DATE_TIME' root['/entry/date'].attrs['EX_required'] = 'false' @@ -243,6 +243,7 @@ root['/entry/data'].attrs['description'] = 'SAMPLE-CHAR-DATA' root['/entry/data'].attrs['signal'] = 'SAMPLE-CHAR-DATA' root['/entry/data'].attrs['axes'] = 'SAMPLE-CHAR-DATA' +root['/entry/data'].attrs['AXISNAME_indices'] = 'SAMPLE-CHAR-DATA' root['/entry/data/data'].attrs['spec_name'] = 'SAMPLE-CHAR-DATA' root['/entry/data/data'].attrs['units'] = 'SAMPLE-CHAR-DATA' root['/entry/counter_cross_reference'].attrs['comment'] = 'SAMPLE-CHAR-DATA' @@ -254,6 +255,8 @@ root['/entry/positioners'].attrs['description'] = 'SAMPLE-CHAR-DATA' root['/entry/MCA'].attrs['description'] = 'SAMPLE-CHAR-DATA' root['/entry/MCA/ROI/roiN'].attrs['description'] = 'SAMPLE-CHAR-DATA' +root['/entry/MCA/ROI/roiN'].attrs['first_channel'] = 'SAMPLE-CHAR-DATA' +root['/entry/MCA/ROI/roiN'].attrs['last_channel'] = 'SAMPLE-CHAR-DATA' root['/entry/metadata'].attrs['description'] = 'SAMPLE-CHAR-DATA' root['/entry/_unrecognized'].attrs['comment'] = 'SAMPLE-CHAR-DATA' root['/entry/_unrecognized'].attrs['description'] = 'SAMPLE-CHAR-DATA' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXstxm.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXstxm.py index 050a2fb..a93aa61 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXstxm.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXstxm.py @@ -37,11 +37,11 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry/start_time'] = NXfield('2022-03-03T14:34:16.030189') +root['/entry/start_time'] = NXfield('2022-03-04T14:56:36.688437') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' -root['/entry/end_time'] = NXfield('2022-03-03T14:34:16.030189') +root['/entry/end_time'] = NXfield('2022-03-04T14:56:36.688437') root['/entry/end_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/end_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtas.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtas.py index c45eb2c..67d91db 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtas.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtas.py @@ -33,7 +33,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry/start_time'] = NXfield('2022-03-03T14:34:16.263999') +root['/entry/start_time'] = NXfield('2022-03-04T14:56:36.922755') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtofnpd.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtofnpd.py index 4638425..349645b 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtofnpd.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtofnpd.py @@ -29,7 +29,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry/start_time'] = NXfield('2022-03-03T14:34:16.420212') +root['/entry/start_time'] = NXfield('2022-03-04T14:56:37.078968') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtofraw.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtofraw.py index 945201b..df25a0f 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtofraw.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtofraw.py @@ -29,7 +29,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry/start_time'] = NXfield('2022-03-03T14:34:16.592046') +root['/entry/start_time'] = NXfield('2022-03-04T14:56:37.266424') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtofsingle.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtofsingle.py index 365667a..6bc9e8f 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtofsingle.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtofsingle.py @@ -29,7 +29,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry/start_time'] = NXfield('2022-03-03T14:34:16.763880') +root['/entry/start_time'] = NXfield('2022-03-04T14:56:37.453880') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtomo.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtomo.py index cbac88e..ed2f3dc 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtomo.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtomo.py @@ -29,11 +29,11 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'false' -root['/entry/start_time'] = NXfield('2022-03-03T14:34:16.920239') +root['/entry/start_time'] = NXfield('2022-03-04T14:56:37.625713') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'false' -root['/entry/end_time'] = NXfield('2022-03-03T14:34:16.920239') +root['/entry/end_time'] = NXfield('2022-03-04T14:56:37.625713') root['/entry/end_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/end_time'].attrs['EX_required'] = 'false' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtomophase.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtomophase.py index f1242d8..e6aa89e 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtomophase.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtomophase.py @@ -33,11 +33,11 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry/start_time'] = NXfield('2022-03-03T14:34:17.154558') +root['/entry/start_time'] = NXfield('2022-03-04T14:56:37.860033') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' -root['/entry/end_time'] = NXfield('2022-03-03T14:34:17.170180') +root['/entry/end_time'] = NXfield('2022-03-04T14:56:37.860033') root['/entry/end_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/end_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtomoproc.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtomoproc.py index 640eab8..3342a10 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtomoproc.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXtomoproc.py @@ -65,7 +65,7 @@ root['/entry/reconstruction/version'].attrs['type'] = 'NX_CHAR' root['/entry/reconstruction/version'].attrs['EX_required'] = 'true' -root['/entry/reconstruction/date'] = NXfield('2022-03-03T14:34:17.310772') +root['/entry/reconstruction/date'] = NXfield('2022-03-04T14:56:38.000624') root['/entry/reconstruction/date'].attrs['type'] = 'NX_DATE_TIME' root['/entry/reconstruction/date'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxas.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxas.py index 7f38669..ec51856 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxas.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxas.py @@ -33,7 +33,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry/start_time'] = NXfield('2022-03-03T14:34:17.435742') +root['/entry/start_time'] = NXfield('2022-03-04T14:56:38.109973') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxasproc.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxasproc.py index ec1c919..0233812 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxasproc.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxasproc.py @@ -44,7 +44,7 @@ root['/entry/XAS_data_reduction/version'].attrs['type'] = 'NX_CHAR' root['/entry/XAS_data_reduction/version'].attrs['EX_required'] = 'true' -root['/entry/XAS_data_reduction/date'] = NXfield('2022-03-03T14:34:17.529470') +root['/entry/XAS_data_reduction/date'] = NXfield('2022-03-04T14:56:38.234943') root['/entry/XAS_data_reduction/date'].attrs['type'] = 'NX_DATE_TIME' root['/entry/XAS_data_reduction/date'].attrs['EX_required'] = 'true' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxbase.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxbase.py index 2f4922f..908dd8f 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxbase.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxbase.py @@ -31,7 +31,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry/start_time'] = NXfield('2022-03-03T14:34:17.685682') +root['/entry/start_time'] = NXfield('2022-03-04T14:56:38.406783') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' @@ -158,6 +158,10 @@ # Create the ATTRIBUTES + +# Valid enumeration values for root['/entry/instrument/detector/data']['signal'] are: +# 1 +root['/entry/instrument/detector/data'].attrs['signal'] = '1' root.attrs['default'] = 'entry' root['/entry/data'].set_default() root['/entry/data'].attrs['signal'] = 'data' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxeuler.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxeuler.py index 80821b5..ab3940d 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxeuler.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxeuler.py @@ -33,7 +33,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry/start_time'] = NXfield('2022-03-03T14:34:17.951244') +root['/entry/start_time'] = NXfield('2022-03-04T14:56:38.687998') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' @@ -206,6 +206,10 @@ # Create the ATTRIBUTES + +# Valid enumeration values for root['/entry/instrument/detector/data']['signal'] are: +# 1 +root['/entry/instrument/detector/data'].attrs['signal'] = '1' root.attrs['default'] = 'entry' root['/entry/data'].set_default() root['/entry/data'].attrs['signal'] = 'data' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxkappa.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxkappa.py index d87a695..6f8f35e 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxkappa.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxkappa.py @@ -33,7 +33,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry/start_time'] = NXfield('2022-03-03T14:34:18.227730') +root['/entry/start_time'] = NXfield('2022-03-04T14:56:38.984766') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' @@ -211,6 +211,10 @@ # Create the ATTRIBUTES + +# Valid enumeration values for root['/entry/instrument/detector/data']['signal'] are: +# 1 +root['/entry/instrument/detector/data'].attrs['signal'] = '1' root.attrs['default'] = 'entry' root['/entry/data'].set_default() root['/entry/data'].attrs['signal'] = 'data' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxlaue.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxlaue.py index e3573c7..2f966d1 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxlaue.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxlaue.py @@ -37,7 +37,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry/start_time'] = NXfield('2022-03-03T14:34:18.540156') +root['/entry/start_time'] = NXfield('2022-03-04T14:56:39.312812') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' @@ -221,6 +221,10 @@ # Create the ATTRIBUTES + +# Valid enumeration values for root['/entry/instrument/detector/data']['signal'] are: +# 1 +root['/entry/instrument/detector/data'].attrs['signal'] = '1' root.attrs['default'] = 'entry' root['/entry/data'].set_default() root['/entry/data'].attrs['signal'] = 'data' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxlaueplate.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxlaueplate.py index 1445d85..b53c5dd 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxlaueplate.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxlaueplate.py @@ -37,7 +37,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry/start_time'] = NXfield('2022-03-03T14:34:18.883824') +root['/entry/start_time'] = NXfield('2022-03-04T14:56:39.640859') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' @@ -227,6 +227,10 @@ # Create the ATTRIBUTES + +# Valid enumeration values for root['/entry/instrument/detector/data']['signal'] are: +# 1 +root['/entry/instrument/detector/data'].attrs['signal'] = '1' root.attrs['default'] = 'entry' root['/entry/data'].set_default() root['/entry/data'].attrs['signal'] = 'data' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxnb.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxnb.py index 3839c69..a18069c 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxnb.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxnb.py @@ -33,7 +33,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry/start_time'] = NXfield('2022-03-03T14:34:19.149386') +root['/entry/start_time'] = NXfield('2022-03-04T14:56:39.937663') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' @@ -197,6 +197,10 @@ # Create the ATTRIBUTES + +# Valid enumeration values for root['/entry/instrument/detector/data']['signal'] are: +# 1 +root['/entry/instrument/detector/data'].attrs['signal'] = '1' root.attrs['default'] = 'entry' root['/entry/data'].set_default() root['/entry/data'].attrs['signal'] = 'data' diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxpcs.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxpcs.py deleted file mode 100644 index 9510554..0000000 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxpcs.py +++ /dev/null @@ -1,278 +0,0 @@ - -import numpy as np -from nexusformat.nexus import * - -# Note this example script was generated by nxdl_to_hdf5.py using the current -# installed version of the NEXUS definitions ver[v2020.10] - -root = NXroot() - -# Create the GROUPS -root['/entry'] = NXentry() -root['/entry'].attrs['EX_required'] = 'true' -root['/entry/data'] = NXdata() -root['/entry/data'].attrs['EX_required'] = 'true' -root['/entry/twotime'] = NXdata() -root['/entry/twotime'].attrs['EX_required'] = 'false' -root['/entry/instrument'] = NXinstrument() -root['/entry/instrument'].attrs['EX_required'] = 'true' -root['/entry/instrument/incident_beam'] = NXbeam() -root['/entry/instrument/incident_beam'].attrs['EX_required'] = 'true' -root['/entry/instrument/detector'] = NXdetector() -root['/entry/instrument/detector'].attrs['EX_required'] = 'true' -root['/entry/instrument/masks'] = NXnote() -root['/entry/instrument/masks'].attrs['EX_required'] = 'false' -root['/entry/sample'] = NXsample() -root['/entry/sample'].attrs['EX_required'] = 'false' -root['/entry/sample/position_x'] = NXpositioner() -root['/entry/sample/position_x'].attrs['EX_required'] = 'false' -root['/entry/sample/position_y'] = NXpositioner() -root['/entry/sample/position_y'].attrs['EX_required'] = 'false' -root['/entry/sample/position_z'] = NXpositioner() -root['/entry/sample/position_z'].attrs['EX_required'] = 'false' -root['/entry/ROI'] = NXnote() -root['/entry/ROI'].attrs['EX_required'] = 'false' -root['/entry/NOTE'] = NXnote() -root['/entry/NOTE'].attrs['EX_required'] = 'false' - -# Create the FIELDS - -# Valid enumeration values for root['/entry']['definition'] are: -# NXxpcs - -root['/entry/definition'] = NXfield('NXxpcs') -root['/entry/definition'].attrs['type'] = 'NX_CHAR' -root['/entry/definition'].attrs['EX_required'] = 'true' - -root['/entry/entry_identifier'] = NXfield('SAMPLE-CHAR-DATA') -root['/entry/entry_identifier'].attrs['type'] = 'NX_CHAR' -root['/entry/entry_identifier'].attrs['EX_required'] = 'true' - -root['/entry/entry_identifier_uuid'] = NXfield('SAMPLE-CHAR-DATA') -root['/entry/entry_identifier_uuid'].attrs['type'] = 'NX_CHAR' -root['/entry/entry_identifier_uuid'].attrs['EX_required'] = 'false' - -root['/entry/scan_number'] = NXfield(1) -root['/entry/scan_number'].attrs['type'] = 'NX_INT' -root['/entry/scan_number'].attrs['EX_required'] = 'true' - -root['/entry/start_time'] = NXfield('2022-03-03T14:34:24.295042') -root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' -root['/entry/start_time'].attrs['EX_required'] = 'true' - -root['/entry/end_time'] = NXfield('2022-03-03T14:34:24.295042') -root['/entry/end_time'].attrs['type'] = 'NX_DATE_TIME' -root['/entry/end_time'].attrs['EX_required'] = 'false' - -root['/entry/data/frame_sum'] = NXfield(1.0) -root['/entry/data/frame_sum'].attrs['type'] = 'NX_NUMBER' -root['/entry/data/frame_sum'].attrs['EX_required'] = 'false' -root['/entry/data/frame_sum'].attrs['units'] = 'NX_COUNT' - -root['/entry/data/frame_average'] = NXfield(1.0) -root['/entry/data/frame_average'].attrs['type'] = 'NX_NUMBER' -root['/entry/data/frame_average'].attrs['EX_required'] = 'false' -root['/entry/data/frame_average'].attrs['units'] = 'NX_COUNT' - -root['/entry/data/g2'] = NXfield(1.0) -root['/entry/data/g2'].attrs['type'] = 'NX_NUMBER' -root['/entry/data/g2'].attrs['EX_required'] = 'false' -root['/entry/data/g2'].attrs['units'] = 'NX_ARBITRARY_UNITS' - -root['/entry/data/g2_derr'] = NXfield(1.0) -root['/entry/data/g2_derr'].attrs['type'] = 'NX_NUMBER' -root['/entry/data/g2_derr'].attrs['EX_required'] = 'false' -root['/entry/data/g2_derr'].attrs['units'] = 'NX_ARBITRARY_UNITS' - -root['/entry/data/G2_unnormalized'] = NXfield(1.0) -root['/entry/data/G2_unnormalized'].attrs['type'] = 'NX_NUMBER' -root['/entry/data/G2_unnormalized'].attrs['EX_required'] = 'false' -root['/entry/data/G2_unnormalized'].attrs['units'] = 'NX_ARBITRARY_UNITS' - -root['/entry/data/delay_difference'] = NXfield(1) -root['/entry/data/delay_difference'].attrs['type'] = 'NX_INT' -root['/entry/data/delay_difference'].attrs['EX_required'] = 'false' -root['/entry/data/delay_difference'].attrs['units'] = 'NX_INT' - -root['/entry/twotime/two_time_corr_func'] = NXfield(1.0) -root['/entry/twotime/two_time_corr_func'].attrs['type'] = 'NX_NUMBER' -root['/entry/twotime/two_time_corr_func'].attrs['EX_required'] = 'false' -root['/entry/twotime/two_time_corr_func'].attrs['units'] = 'NX_ANY' - -root['/entry/twotime/g2_from_two_time_corr_func'] = NXfield(1.0) -root['/entry/twotime/g2_from_two_time_corr_func'].attrs['type'] = 'NX_NUMBER' -root['/entry/twotime/g2_from_two_time_corr_func'].attrs['EX_required'] = 'false' -root['/entry/twotime/g2_from_two_time_corr_func'].attrs['units'] = 'NX_ARBITRARY_UNITS' - -root['/entry/twotime/g2_err_from_two_time_corr_func'] = NXfield(1.0) -root['/entry/twotime/g2_err_from_two_time_corr_func'].attrs['type'] = 'NX_NUMBER' -root['/entry/twotime/g2_err_from_two_time_corr_func'].attrs['EX_required'] = 'false' -root['/entry/twotime/g2_err_from_two_time_corr_func'].attrs['units'] = 'NX_ARBITRARY_UNITS' - -root['/entry/twotime/g2_from_two_time_corr_func_partials'] = NXfield(1.0) -root['/entry/twotime/g2_from_two_time_corr_func_partials'].attrs['type'] = 'NX_NUMBER' -root['/entry/twotime/g2_from_two_time_corr_func_partials'].attrs['EX_required'] = 'false' -root['/entry/twotime/g2_from_two_time_corr_func_partials'].attrs['units'] = 'NX_ARBITRARY_UNITS' - -root['/entry/twotime/g2_err_from_two_time_corr_func_partials'] = NXfield(1.0) -root['/entry/twotime/g2_err_from_two_time_corr_func_partials'].attrs['type'] = 'NX_NUMBER' -root['/entry/twotime/g2_err_from_two_time_corr_func_partials'].attrs['EX_required'] = 'false' -root['/entry/twotime/g2_err_from_two_time_corr_func_partials'].attrs['units'] = 'NX_ARBITRARY_UNITS' - -root['/entry/instrument/incident_beam/incident_energy'] = NXfield(1.0) -root['/entry/instrument/incident_beam/incident_energy'].attrs['type'] = 'NX_FLOAT' -root['/entry/instrument/incident_beam/incident_energy'].attrs['EX_required'] = 'true' -root['/entry/instrument/incident_beam/incident_energy'].attrs['units'] = 'NX_ENERGY' - -root['/entry/instrument/incident_beam/incident_energy_spread'] = NXfield(1.0) -root['/entry/instrument/incident_beam/incident_energy_spread'].attrs['type'] = 'NX_FLOAT' -root['/entry/instrument/incident_beam/incident_energy_spread'].attrs['EX_required'] = 'false' -root['/entry/instrument/incident_beam/incident_energy_spread'].attrs['units'] = 'NX_ENERGY' - -root['/entry/instrument/incident_beam/incident_polarization_type'] = NXfield('SAMPLE-CHAR-DATA') -root['/entry/instrument/incident_beam/incident_polarization_type'].attrs['type'] = 'NX_CHAR' -root['/entry/instrument/incident_beam/incident_polarization_type'].attrs['EX_required'] = 'false' - -root['/entry/instrument/incident_beam/extent'] = NXfield(1.0) -root['/entry/instrument/incident_beam/extent'].attrs['type'] = 'NX_FLOAT' -root['/entry/instrument/incident_beam/extent'].attrs['EX_required'] = 'false' -root['/entry/instrument/incident_beam/extent'].attrs['units'] = 'NX_LENGTH' - -root['/entry/instrument/detector/description'] = NXfield('SAMPLE-CHAR-DATA') -root['/entry/instrument/detector/description'].attrs['type'] = 'NX_CHAR' -root['/entry/instrument/detector/description'].attrs['EX_required'] = 'false' - -root['/entry/instrument/detector/distance'] = NXfield(1.0) -root['/entry/instrument/detector/distance'].attrs['type'] = 'NX_NUMBER' -root['/entry/instrument/detector/distance'].attrs['EX_required'] = 'false' -root['/entry/instrument/detector/distance'].attrs['units'] = 'NX_LENGTH' - -root['/entry/instrument/detector/count_time'] = NXfield(1.0) -root['/entry/instrument/detector/count_time'].attrs['type'] = 'NX_NUMBER' -root['/entry/instrument/detector/count_time'].attrs['EX_required'] = 'true' -root['/entry/instrument/detector/count_time'].attrs['units'] = 'NX_TIME' - -root['/entry/instrument/detector/frame_time'] = NXfield(1.0) -root['/entry/instrument/detector/frame_time'].attrs['type'] = 'NX_NUMBER' -root['/entry/instrument/detector/frame_time'].attrs['EX_required'] = 'true' -root['/entry/instrument/detector/frame_time'].attrs['units'] = 'NX_TIME' - -root['/entry/instrument/detector/beam_center_x'] = NXfield(1.0) -root['/entry/instrument/detector/beam_center_x'].attrs['type'] = 'NX_NUMBER' -root['/entry/instrument/detector/beam_center_x'].attrs['EX_required'] = 'true' -root['/entry/instrument/detector/beam_center_x'].attrs['units'] = 'NX_LENGTH' - -root['/entry/instrument/detector/beam_center_y'] = NXfield(1.0) -root['/entry/instrument/detector/beam_center_y'].attrs['type'] = 'NX_NUMBER' -root['/entry/instrument/detector/beam_center_y'].attrs['EX_required'] = 'true' -root['/entry/instrument/detector/beam_center_y'].attrs['units'] = 'NX_LENGTH' - -root['/entry/instrument/detector/x_pixel_size'] = NXfield(1.0) -root['/entry/instrument/detector/x_pixel_size'].attrs['type'] = 'NX_NUMBER' -root['/entry/instrument/detector/x_pixel_size'].attrs['EX_required'] = 'false' -root['/entry/instrument/detector/x_pixel_size'].attrs['units'] = 'NX_LENGTH' - -root['/entry/instrument/detector/y_pixel_size'] = NXfield(1.0) -root['/entry/instrument/detector/y_pixel_size'].attrs['type'] = 'NX_NUMBER' -root['/entry/instrument/detector/y_pixel_size'].attrs['EX_required'] = 'false' -root['/entry/instrument/detector/y_pixel_size'].attrs['units'] = 'NX_LENGTH' - -root['/entry/instrument/masks/dynamic_roi_map'] = NXfield(1) -root['/entry/instrument/masks/dynamic_roi_map'].attrs['type'] = 'NX_DIMENSIONLESS' -root['/entry/instrument/masks/dynamic_roi_map'].attrs['EX_required'] = 'true' - -root['/entry/instrument/masks/dynamic_q_list'] = NXfield(1.0) -root['/entry/instrument/masks/dynamic_q_list'].attrs['type'] = 'NX_NUMBER' -root['/entry/instrument/masks/dynamic_q_list'].attrs['EX_required'] = 'false' -root['/entry/instrument/masks/dynamic_q_list'].attrs['units'] = 'NX_PER_LENGTH' - -root['/entry/instrument/masks/dynamic_phi_list'] = NXfield(1.0) -root['/entry/instrument/masks/dynamic_phi_list'].attrs['type'] = 'NX_NUMBER' -root['/entry/instrument/masks/dynamic_phi_list'].attrs['EX_required'] = 'false' -root['/entry/instrument/masks/dynamic_phi_list'].attrs['units'] = 'NX_PER_LENGTH' - -root['/entry/instrument/masks/static_roi_map'] = NXfield(1) -root['/entry/instrument/masks/static_roi_map'].attrs['type'] = 'NX_DIMENSIONLESS' -root['/entry/instrument/masks/static_roi_map'].attrs['EX_required'] = 'false' - -root['/entry/instrument/masks/static_q_list'] = NXfield(1.0) -root['/entry/instrument/masks/static_q_list'].attrs['type'] = 'NX_NUMBER' -root['/entry/instrument/masks/static_q_list'].attrs['EX_required'] = 'false' -root['/entry/instrument/masks/static_q_list'].attrs['units'] = 'NX_PER_LENGTH' - -root['/entry/sample/temperature_set'] = NXfield(1.0) -root['/entry/sample/temperature_set'].attrs['type'] = 'NX_NUMBER' -root['/entry/sample/temperature_set'].attrs['EX_required'] = 'false' -root['/entry/sample/temperature_set'].attrs['units'] = 'NX_TEMPERATURE' - -root['/entry/sample/temperature'] = NXfield(1.0) -root['/entry/sample/temperature'].attrs['type'] = 'NX_NUMBER' -root['/entry/sample/temperature'].attrs['EX_required'] = 'false' -root['/entry/sample/temperature'].attrs['units'] = 'NX_TEMPERATURE' - -# Create the DOC strings -root['/entry/definition'].attrs['EX_doc'] = 'Official NeXus NXDL schema to which this file conforms ' -root['/entry/entry_identifier'].attrs['EX_doc'] = 'Unique identifier for the experiment. ' -root['/entry/entry_identifier_uuid'].attrs['EX_doc'] = '(optional) UUID identifier for this entry. ' -root['/entry/scan_number'].attrs['EX_doc'] = 'Scan number (must be an integer). NOTE: Link to collection_identifier. ' -root['/entry/start_time'].attrs['EX_doc'] = 'Starting time of experiment, such as "2021-02-11 11:22:33.445566Z". ' -root['/entry/end_time'].attrs['EX_doc'] = 'Ending time of experiment, such as "2021-02-11 11:23:45Z". ' -root['/entry/data'].attrs['EX_doc'] = 'The results data captured here are most commonly required for high throughput, equilibrium dynamics experiments. Data (results) describing on-equilibrium dynamics consume more memory resources so these data are separated. ' -root['/entry/data/frame_sum'].attrs['EX_doc'] = 'Two-dimensional summation along the frames stack. sum of intensity v. time (in the units of "frames") ' -root['/entry/data/frame_average'].attrs['EX_doc'] = 'Two-dimensional average along the frames stack. average intensity v. time (in the units of "frames") ' -root['/entry/data/g2'].attrs['EX_doc'] = 'normalized intensity auto-correlation function, see Lumma, Rev. Sci. Instr. (2000), Eq 1 .. math:: g_2(\boldsymbol Q,t) = \frac{ \langle I(\boldsymbol Q,t\prime) I(\boldsymbol Q,t\prime + t) \rangle }{ \langle I(\boldsymbol Q,t\prime)\rangle^2 }; t > 0 Typically, :math:`g_2` is a quantity calculated for a group of pixels representing a specific region of reciprocal space. These groupings, or bins, are generically described as :math:`q`. Some open-source XPCS libraries refer to these bins as "rois", which are not to be confused with EPICS AreaDetector ROI. See usage guidelines for q_lists and roi_maps within a mask. [#]_ In short, :math:`g_2` should be ordered according to the roi_map value. In principle, any format is acceptable if the data and its axes are self-describing as per NeXus recommendations. However, the data is preferred in one of the following two formats: * iterable list of linked files (or keys) for each :math:`g_2` with 1 file (key) per :math:`q`, where `q` is called by the nth roi_map value * 2D array [#]_ with shape (:math:`g_2`, :math:`q`), where `q` is represented by the nth roi_map value, not the value `q` value Note it is expected that "g2" and all quantities following it will be of the same length. Other formats are acceptable with sufficient axes description. See references below for related implementation information: .. [#] mask: ``NXxpcs:/entry/instrument/masks-group`` .. [#] NeXus 2-D data and axes: https://manual.nexusformat.org/classes/base_classes/NXdata.html#nxdata ' -root['/entry/data/g2_derr'].attrs['EX_doc'] = 'error values for the :math:`g_2` values. The derivation of the error is left up to the implemented code. Symmetric error will be expected (:math:`\pm` error). The data should be in the same format as ``g2``. ' -root['/entry/data/G2_unnormalized'].attrs['EX_doc'] = 'unnormalized intensity auto-correlation function. Specifically, ``g2`` without the denominator. The data should be in the same format as ``g2``. ' -root['/entry/data/delay_difference'].attrs['EX_doc'] = 'delay_difference (also known as delay or lag step) This is quantized difference so that the "step" between two consecutive frames is one frame (or step ``= dt = 1 frame``) It is the "quantized" delay time corresponding to the ``g2`` values. The unit of delay_differences is ``NX_INT`` for units of frames (i.e., integers) preferred, refer to :ref:`NXdetector` for conversion to time units. ' -root['/entry/twotime'].attrs['EX_doc'] = 'The data (results) in this section are based on the two-time intensity correlation function derived from a time series of scattering images. ' -root['/entry/twotime/two_time_corr_func'].attrs['EX_doc'] = 'two-time correlation of speckle intensity for a given q-bin or roi (represented by the nth roi_map value) See Fluerasu, Phys Rev E (2007), Eq 1 and Sutton, Optics Express (2003) for an early description applied to X-ray scattering: .. math:: C(\boldsymbol Q, t_1, t_2) = \frac{ \langle I(\boldsymbol Q, t_1)I(\boldsymbol Q, t_2)\rangle }{ \langle I(\boldsymbol Q,t_1)\rangle \langle I(\boldsymbol Q,t_2)\rangle } in which time is quantized by frames. In principle, any data format is acceptable if the data and its axes are self-describing as per NeXus recommendations. However, the data is preferred in one of the following two formats: * iterable list of linked files (or keys) for each q-bin called by the nth roi_map value. data for each bin is a 2D array * 3D array with shape (frames, frames, q) or (q, frames, frames), where :math:`q` is represented by the nth roi_map value, not the value `q` value The computation of this result can be customized. These customizations can affect subsequently derived results (below). The following attributes will be used to manage the customization. * Other normalization methods may be applied, but the method will not be specified in this definition. Some of these normalization methods result in a baseline value of ``0``, not ``1``. * The various software libraries use different programming languages. Therefore, we need to specify the ``time = 0`` origin location of the 2D array for each :math:`q`. * A method to reduce data storage needs is to only record half of the 2D array by populating array elements above or below the array diagonal. ' -root['/entry/twotime/g2_from_two_time_corr_func'].attrs['EX_doc'] = 'frame weighted average along the diagonal direction in ``two_time_corr_func`` The data format and description should be consistent with that found in "/NXxpcs/entry/data/g2" * iterable list of linked files for each :math:`g_2` with 1 file per :math:`q` * 2D array with shape (:math:`g_2`, :math:`q`) Note that delay_difference is not included here because it is derived from the shape of extracted :math:`g_2` because all frames are considered, which is not necessarily the case for :math:`g_2`. The computation of this result can be customized. The customization can affect the fitting required to extract quantitative results. The following attributes will be used to manage the customization. ' -root['/entry/twotime/g2_err_from_two_time_corr_func'].attrs['EX_doc'] = 'error values for the :math:`g_2` values. The derivation of the error is left up to the implemented code. Symmetric error will be expected (:math:`\pm` error). ' -root['/entry/twotime/g2_from_two_time_corr_func_partials'].attrs['EX_doc'] = 'subset of frame weighted average along the diagonal direction in ``two_time_corr_func`` Time slicing along the diagonal can be very sophisticated. This entry currently assumes equal frame-binning. The data formats are highly dependent on the implantation of various analysis libraries. In principle, any data format is acceptable if the data and its axes are self describing as per NeXus recommendations. However, the data is preferred in one of the following two formats: * iterable list of linked files (or keys) for each partial :math:`g_2` of each q-bin represented by the roi_map value * 3D array with shape (:math:`g_2`, :math:`q`, nth_partial) Note that delay_difference is not included here because it is derived from the shape of extracted :math:`g_2`. ' -root['/entry/twotime/g2_err_from_two_time_corr_func_partials'].attrs['EX_doc'] = 'error values for the :math:`g_2` values. The derivation of the error is left up to the implemented code. Symmetric error will be expected (:math:`\pm` error). ' -root['/entry/instrument'].attrs['EX_doc'] = 'XPCS instrument Metadata. Objects can be entered here directly or linked from other objects in the NeXus file (such as within ``/entry/instrument``). ' -root['/entry/instrument/incident_beam/incident_energy'].attrs['EX_doc'] = 'Incident beam line energy (either keV or eV). ' -root['/entry/instrument/incident_beam/incident_energy_spread'].attrs['EX_doc'] = 'Spread of incident beam line energy (either keV or eV). This quantity is otherwise known as the energy resolution, which is related to the longitudinal coherence length. ' -root['/entry/instrument/incident_beam/incident_polarization_type'].attrs['EX_doc'] = 'Terse description of the incident beam polarization. The value can be plain text, such as ``vertical``, ``C+``, ``circular left``. ' -root['/entry/instrument/incident_beam/extent'].attrs['EX_doc'] = 'Size (2-D) of the beam at this position. ' -root['/entry/instrument/detector'].attrs['EX_doc'] = 'XPCS data is typically produced by area detector (likely EPICS AreaDetector) as a stack of 2D images. Sometimes this data is represented in different ways (sparse arrays or photon event list), but this detail is left to the analysis software. Therefore, we only include requirements based on full array data. We note that the image origin (pixel coordinates (0,0)) are found at the top left of a single 2D image array. This is the standard expected by Coherent X-ray Imaging Data Bank. [#]_ See CXI version 1.6 and Maia, Nature Methods (2012). This seems to be consistent with matplotlib and the practiced implementation of EPICS AreaDetector. However, some exceptions may exists in the CXI documentation (See Fig 11 vs Fig 12). Additionally, not all NXdetector dependencies are inherited from AreaDetector or other control systems. ``frame_time`` is used to convert ``delay_difference`` to seconds. ``frame_time`` field could be missing from AreaDetector or may either be `acquire_period` or `acquire_time`, depending on the detector model and the local implementation. .. [#] Coherent X-ray Imaging Data Bank: https://cxidb.org/cxi.html ' -root['/entry/instrument/detector/description'].attrs['EX_doc'] = 'Detector name. ' -root['/entry/instrument/detector/distance'].attrs['EX_doc'] = 'Distance between sample and detector. ' -root['/entry/instrument/detector/count_time'].attrs['EX_doc'] = 'Exposure time of frames, s. ' -root['/entry/instrument/detector/frame_time'].attrs['EX_doc'] = 'Exposure period (time between frame starts) of frames, s ' -root['/entry/instrument/detector/beam_center_x'].attrs['EX_doc'] = 'Position of beam center, x axis, in detector"s coordinates. ' -root['/entry/instrument/detector/beam_center_y'].attrs['EX_doc'] = 'Position of beam center, y axis, in detector"s coordinates. ' -root['/entry/instrument/detector/x_pixel_size'].attrs['EX_doc'] = 'Length of pixel in x direction. ' -root['/entry/instrument/detector/y_pixel_size'].attrs['EX_doc'] = 'Length of pixel in y direction. ' -root['/entry/instrument/masks'].attrs['EX_doc'] = 'Data masks or mappings to regions of interest (roi) for specific :math:`Q` values Fields in this ``masks`` group describe regions of interest in the data by either a mask to select pixels or to associate a *map* of rois with a (one-dimensional) *list* of values. "roi_maps" provide for representation of pixel binning that are arbitrary and irregular, which is geometry scattering agnostic and most flexible. The maps work as a labeled array for N rois. "Dynamic" represents quantities directly related to XPCS and NXxcps/entry/data and NXxpcs/entry/two_time. "Static" refers to finer binning used for computation not strictly used for the final XPCS results. Implementation of _static_ binning is left for individual libraries to document. We encourage usage of :ref:`NXcanSAS` to represent standard SAXS results or development of new NeXus definitions for GI-SAXS or other reciprocal space intensity mapping. ' -root['/entry/instrument/masks/dynamic_roi_map'].attrs['EX_doc'] = 'roi index array or labeled array The values of this mask index (or map to) the :math:`Q` value from the the ``dynamic_q_list`` field. Not that the value of ``0`` represents in-action. XPCS computations are performed on all pixels with a value > 0. The ``units`` attribute should be set to ``"au"`` indicating arbitrary units. ' -root['/entry/instrument/masks/dynamic_q_list'].attrs['EX_doc'] = '1-D list of :math:`Q` values, one for each roi index value. List order is determined by the index value of the associated roi map starting at ``1``. The only requirement for the list is that it may be iterable. Some expected formats are: * iterable list of floats (i.e., :math:`Q(r)`) * iterable list of tuples (i.e., :math:`Q(r)`, :math:`\varphi`), but preferable use the seperate :math:`\varphi` field below * iterable list of tuples (e.g., (H, K, L); (qx, qy, qz); (horizontal_pixel, vertical_pixel)) * iterable list of integers (for Nth roi_map value) or strings This format is chosen because results plotting packages are not common and simple I/O is required by end user. The lists can be accessed as lists, arrays or via keys ' -root['/entry/instrument/masks/dynamic_phi_list'].attrs['EX_doc'] = 'Array of :math:`\varphi` value for each pixel. List order is determined by the index value of the associated roi map starting at ``1``. ' -root['/entry/instrument/masks/static_roi_map'].attrs['EX_doc'] = 'roi index array. The values of this mask index the :math:`|Q|` value from the the ``static_q_list`` field. The ``units`` attribute should be set to ``"au"`` indicating arbitrary units. ' -root['/entry/instrument/masks/static_q_list'].attrs['EX_doc'] = '1-D list of :math:`|Q|` values, 1 for each roi. ' -root['/entry/sample/temperature_set'].attrs['EX_doc'] = 'Sample temperature setpoint, (C or K). ' -root['/entry/sample/temperature'].attrs['EX_doc'] = 'Sample temperature actual, (C or K). ' -root['/entry/ROI'].attrs['EX_doc'] = '**THIS FIELD IS SCHEDULED FOR DELETION on or about March 1, 2022.** Contact abarbour@bnl.gov or jemian@anl.gov to object. Region(s) of interest. NAME: The NeXus convention, to use all upper case to indicate the name (here ``roi``), is left to the file writer. In our case, follow the suggested name pattern and sequence: roi_1, roi_2, roi_3, ... Start with ``roi_1`` if the first one, otherwise pick the next number in this sequence. ' -root['/entry/NOTE'].attrs['EX_doc'] = 'Any other notes. NAME: The NeXus convention, to use all upper case to indicate the name (here ``NOTE``), is left to the file writer. In our case, follow the suggested name pattern and sequence: note_1, note_2, note_3, ... Start with ``note_1`` if the first one, otherwise pick the next number in this sequence. ' - - -# Create the ATTRIBUTES -root['/entry/data/g2'].attrs['storage_mode'] = 'SAMPLE-CHAR-DATA' -root['/entry/data/g2_derr'].attrs['storage_mode'] = 'SAMPLE-CHAR-DATA' -root['/entry/data/G2_unnormalized'].attrs['storage_mode'] = 'SAMPLE-CHAR-DATA' -root['/entry/data/delay_difference'].attrs['storage_mode'] = 'SAMPLE-CHAR-DATA' -root['/entry/twotime/two_time_corr_func'].attrs['storage_mode'] = 'SAMPLE-CHAR-DATA' -root['/entry/twotime/two_time_corr_func'].attrs['time_origin_location'] = 'SAMPLE-CHAR-DATA' -root['/entry/twotime/two_time_corr_func'].attrs['populated_elements'] = 'SAMPLE-CHAR-DATA' -root['/entry/twotime/g2_from_two_time_corr_func'].attrs['storage_mode'] = 'SAMPLE-CHAR-DATA' -root['/entry/twotime/g2_err_from_two_time_corr_func'].attrs['storage_mode'] = 'SAMPLE-CHAR-DATA' -root['/entry/twotime/g2_from_two_time_corr_func_partials'].attrs['storage_mode'] = 'SAMPLE-CHAR-DATA' -root.attrs['default'] = 'entry' -root['/entry/data'].set_default() -root['/entry/data'].attrs['signal'] = 'G2_unnormalized' -root['/entry/data/G2_unnormalized'].attrs['signal'] = '1' - -# Save the file -root.save('NXxpcs.nxs', 'w') - - diff --git a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxrot.py b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxrot.py index 8ef121c..debf095 100644 --- a/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxrot.py +++ b/autogenerated_examples/nxdl/python_scripts/nexusformat/ex_nexusformat_NXxrot.py @@ -35,7 +35,7 @@ root['/entry/title'].attrs['type'] = 'NX_CHAR' root['/entry/title'].attrs['EX_required'] = 'true' -root['/entry/start_time'] = NXfield('2022-03-03T14:34:19.414948') +root['/entry/start_time'] = NXfield('2022-03-04T14:56:40.218872') root['/entry/start_time'].attrs['type'] = 'NX_DATE_TIME' root['/entry/start_time'].attrs['EX_required'] = 'true' @@ -208,6 +208,10 @@ # Create the ATTRIBUTES + +# Valid enumeration values for root['/entry/instrument/detector/data']['signal'] are: +# 1 +root['/entry/instrument/detector/data'].attrs['signal'] = '1' root.attrs['default'] = 'entry' root['/entry/data'].set_default() root['/entry/data'].attrs['signal'] = 'data' diff --git a/nxdl/nxdl_to_hdf5.py b/nxdl/nxdl_to_hdf5.py index b0a6013..1865d76 100755 --- a/nxdl/nxdl_to_hdf5.py +++ b/nxdl/nxdl_to_hdf5.py @@ -1235,25 +1235,41 @@ def standardize_link_target_str(trgt): def _soft_link(nxgrp, name, target): nxgrp[name] = h5py.SoftLink(target) -def create_attributes(nf):#, dct): +def create_attributes(nf, sym_dct):#, dct): ''' + pull all attributes from the database and create them ''' - #paths_lst = get_all_paths_in_hdf5(nf) add_line_to_scripts('# Create the ATTRIBUTES ', with_prec_newline=True) for d in tables_dct['attribute'].all(): #print(d) ppath = get_parent_path(d['abspath']) + # get all enumerations if any exist for this parent path + name = fix_nx_name(d['attrib']['name']) + enums = get_enums(d['abspath']) + _type = get_type(d) + if ppath not in nf: - print(f"\t-Error: while creating Attributes, this parent path [{ppath}] not exist in generated file") + print('\t-Error: while creating Attributes, this parent path [%s] not exist in generated file' % ppath) exit() else: pgrp = nf[ppath] - if('type' in d['attrib'].keys()): - data = get_nx_data_by_type(d['attrib']['type']) + if len(enums) > 0: + #if this is an enumerated data type just use teh first enumeration as the data + data = enums[0] + # and include a comment in teh script + print_list_attr(pgrp, name, enums) else: data = get_nx_data_by_type('NX_CHAR') + # if(data is None): + # print('\t\tError: There is an issue with a non standard field for fieldname [%s]' % name) + # return(False) + # + # if('type' in d['attrib'].keys()): + # data = get_nx_data_by_type(d['attrib']['type']) + # else: + # data = get_nx_data_by_type('NX_CHAR') if type(data) is str: _string_attr(pgrp, d['attrib']['name'], data) @@ -1437,7 +1453,7 @@ def make_class_as_nf_file(class_nm, dest_dir, symbol_dct={}, rel_ver='UNKNOWN'): if(res): # create Attributes - create_attributes(nf) + create_attributes(nf, sym_dct) _string_attr(nf, 'file_name', fpath.replace('\\', '/'), do_print=False) _string_attr(nf, 'file_time', make_timestamp_now(), do_print=False) @@ -1566,7 +1582,7 @@ def process_nxdl(class_path, def_dir, def_subdir, sym_args_dct, rel_ver, report_ as well as example scripts using h5py and nexusformat ''' def_dir = class_path.parent.parent - if class_path.is_file(): + if pathlib.Path(class_path).is_file(): if class_path.name.find('.nxdl.xml') > -1: class_nm = class_path.name.replace('.nxdl.xml', '') build_class_db(def_subdir, desired_class=class_nm, @@ -1600,6 +1616,7 @@ def main(): class_nm = None class_path = None report_symbols_only = False + if args.file: print(f"\tProcess this specific definition [{args.file}]") class_nm = args.file