qcodes/data/gnuplot_format.py
def write_metadata(self, data_set: 'DataSet', io_manager, location,
                       read_first=True, **kwargs):
        """
        Write all metadata in this DataSet to storage.

        Args:
            data_set: the data we're storing

            io_manager (io_manager): the base location to write to

            location (str): the file location within io_manager

            read_first (Optional[bool]): read previously saved metadata before
                writing? The current metadata will still be the used if
                there are changes, but if the saved metadata has information
                not present in the current metadata, it will be retained.
                Default True.
        """
        if read_first:
            # In case the saved file has more metadata than we have here,
            # read it in first. But any changes to the in-memory copy should
            # override the saved file data.
            memory_metadata = data_set.metadata
            data_set.metadata = {}
            self.read_metadata(data_set)
            deep_update(data_set.metadata, memory_metadata)

        fn = io_manager.join(location, self.metadata_file)
        with io_manager.open(fn, 'w', encoding='utf8') as snap_file:
            json.dump(data_set.metadata, snap_file, sort_keys=False,
                      indent=4, ensure_ascii=False, cls=NumpyJSONEncoder)

        Write all metadata in this DataSet to storage.

        Args:
            data_set: the data we're storing

            io_manager (io_manager): the base location to write to

            location (str): the file location within io_manager

            read_first (Optional[bool]): read previously saved metadata before
                writing? The current metadata will still be the used if
                there are changes, but if the saved metadata has information
                not present in the current metadata, it will be retained.
                Default True.
        
Write all metadata in this DataSet to storage.
Write all metadata in this DataSet to storage .
def write_metadata(self, data_set: 'DataSet', io_manager, location,
                       read_first=True, **kwargs):
        if read_first:
            memory_metadata = data_set.metadata
            data_set.metadata = {}
            self.read_metadata(data_set)
            deep_update(data_set.metadata, memory_metadata)
        fn = io_manager.join(location, self.metadata_file)
        with io_manager.open(fn, 'w', encoding='utf8') as snap_file:
            json.dump(data_set.metadata, snap_file, sort_keys=False,
                      indent=4, ensure_ascii=False, cls=NumpyJSONEncoder)
def write_metadata ( self , data_set : 'DataSet' , io_manager , location , read_first = True , ** kwargs ) : if read_first : memory_metadata = data_set . metadata data_set . metadata = { } self . read_metadata ( data_set ) deep_update ( data_set . metadata , memory_metadata ) fn = io_manager . join ( location , self . metadata_file ) with io_manager . open ( fn , 'w' , encoding = 'utf8' ) as snap_file : json . dump ( data_set . metadata , snap_file , sort_keys = False , indent = 4 , ensure_ascii = False , cls = NumpyJSONEncoder )
Write all metadata in this DataSet to storage.
Write all metadata in this DataSet to storage .
"""
        Write all metadata in this DataSet to storage.

        Args:
            data_set: the data we're storing

            io_manager (io_manager): the base location to write to

            location (str): the file location within io_manager

            read_first (Optional[bool]): read previously saved metadata before
                writing? The current metadata will still be the used if
                there are changes, but if the saved metadata has information
                not present in the current metadata, it will be retained.
                Default True.
        """ # In case the saved file has more metadata than we have here, # read it in first. But any changes to the in-memory copy should # override the saved file data.
self
data_set
'DataSet'
the data we're storing
the data we ' re storing
io_manager
the base location to write to
the base location to write to
location
the file location within io_manager
the file location within io_manager
read_first
read previously saved metadata before
writing. The current metadata will still be the used if
there are changes, but if the saved metadata has information
not present in the current metadata, it will be retained.
Default True.
read previously saved metadata before writing . The current metadata will still be the used if there are changes but if the saved metadata has information not present in the current metadata it will be retained . Default True .