Skip to content

nexus_string_views

tk widgets for viewing text based nexus data

HdfNexusStr

Bases: _StringView

Nexus Info String object

Source code in mmg_toolbox/tkguis/widgets/nexus_string_views.py
class HdfNexusStr(_StringView):
    """
    Nexus Info String object
    """

    def populate(self, hdf_map: hdfmap.NexusMap):
        """Load HDF file, populate ttk.treeview object"""
        tree_str = hdf_map.info_nexus()
        self._populate(tree_str)

populate(hdf_map)

Load HDF file, populate ttk.treeview object

Source code in mmg_toolbox/tkguis/widgets/nexus_string_views.py
def populate(self, hdf_map: hdfmap.NexusMap):
    """Load HDF file, populate ttk.treeview object"""
    tree_str = hdf_map.info_nexus()
    self._populate(tree_str)

HdfTreeStr

Bases: _StringView

HDF Tree String object

Source code in mmg_toolbox/tkguis/widgets/nexus_string_views.py
class HdfTreeStr(_StringView):
    """
    HDF Tree String object
    """
    def populate(self, hdf_filename: str):
        """Load HDF file, populate ttk.treeview object"""
        tree_str = hdfmap.hdf_tree_string(hdf_filename)
        self._populate(tree_str)

populate(hdf_filename)

Load HDF file, populate ttk.treeview object

Source code in mmg_toolbox/tkguis/widgets/nexus_string_views.py
def populate(self, hdf_filename: str):
    """Load HDF file, populate ttk.treeview object"""
    tree_str = hdfmap.hdf_tree_string(hdf_filename)
    self._populate(tree_str)

Nexus2SrsStr

Bases: _StringView

Display output of NeXus2SRS

Source code in mmg_toolbox/tkguis/widgets/nexus_string_views.py
class Nexus2SrsStr(_StringView):
    """
    Display output of NeXus2SRS
    """

    def populate(self, hdf_map: hdfmap.NexusMap):
        """Load HDF file, populate ttk.treeview object"""
        from nexus2srs.nexus2srs import generate_datafile
        with hdf_map.load_hdf() as hdf:
            outstr, detector_image_paths = generate_datafile(hdf, hdf_map)
        self._populate(outstr)

populate(hdf_map)

Load HDF file, populate ttk.treeview object

Source code in mmg_toolbox/tkguis/widgets/nexus_string_views.py
def populate(self, hdf_map: hdfmap.NexusMap):
    """Load HDF file, populate ttk.treeview object"""
    from nexus2srs.nexus2srs import generate_datafile
    with hdf_map.load_hdf() as hdf:
        outstr, detector_image_paths = generate_datafile(hdf, hdf_map)
    self._populate(outstr)

NxTransformationsStr

Bases: _StringView

Display output of NeXus2Transformations

Source code in mmg_toolbox/tkguis/widgets/nexus_string_views.py
class NxTransformationsStr(_StringView):
    """
    Display output of NeXus2Transformations
    """
    def populate(self, hdf_filename: str):
        from mmg_toolbox.nexus.nexus_transformations import generate_nxtranformations_string
        outstr = generate_nxtranformations_string(hdf_filename)
        self._populate(outstr)