Skip to content

Metadata module, user guide

Aurore Finco edited this page Feb 11, 2022 · 3 revisions

Presentation of the module

This module is here to help you to handle the general metadata. It is like a GUI for the metadata part of the save logic. With this module, you can:

  • Read the content of the list of additional parameters currently set in the save logic.
  • Add more parameters to this list.
  • Change their value.
  • Read the timestamp of the last file which was saved, and the associated module name.
  • Send the metadata parameters to another save logic, e.g. on a remote computer.

At the moment, the odmr module automatically sends the CW parameters as metadata in the save logic. More modules will behave similarly in the future.

Notes about code

GUI description

The GUI is very simple. Everytime a new parameter is added, a new line appears, allowing you to read, edit or even remove it.

To add a new parameter, click the "Add entry" button. A small dialog opens, where you can set the parameter name ("Key" field), and its value. For numeric parameters, I recommend putting the unit at the end of the name, so that the value can actually be treated as a number.

At the bottom of the window, the timestamp of the last file which was saved, and the associated module name are displayed.

Working with a remote PC

There is a new possibilty to connect another savelogic to the main one, in order to send the metadata to a remote PC. In this case, when the metadata is updated, the main savelogic also modifies the metadata of the remote savelogic. With this application in mind, the metadatagui can be launched as read-only, in order to display the metadata of the remote savelogic.

Config file example

Without remote PC

logic:
    savelogic:
        module.Class: 'save_logic.SaveLogic'
        win_data_directory: 'C:/Data'  
        unix_data_directory: 'Data/'
        log_into_daily_directory: True
        save_pdf: False
        save_png: True
		
gui:

    metadata:
        module.Class: 'metadata.metadatagui.MetadataGui'
        connect:
            savelogic: 'savelogic'

With a remote PC

On the main PC:

logic:
    savelogic:
        module.Class: 'save_logic.SaveLogic'
        win_data_directory: 'C:/Data'  
        unix_data_directory: 'Data/'
        log_into_daily_directory: True
        save_pdf: False
        save_png: True
        connect:
            saveremote: 'saveremote'
			
    saveremote:
        module.Class: 'save_logic.SaveLogic'
        remote: 'rpyc://XX.XX.XX.XX:12345/saveremote'

gui:
    metadata:
        module.Class: 'metadata.metadatagui.MetadataGui'
        read_only: False
        connect:
            savelogic: 'savelogic'		

On the remote PC:

logic:
    saveremote:
        module.Class: 'save_logic.SaveLogic'
        win_data_directory: 'C:/Data'  
        unix_data_directory: 'Data/'
        log_into_daily_directory: True
        save_pdf: False
        save_png: True

gui:
    metadata:
        module.Class: 'metadata.metadatagui.MetadataGui'
        read_only: True
        connect:
            savelogic: 'saveremote'