Skip to content

picoscope data format #10

@greyltc

Description

@greyltc

To save file space and avoid recording the same giant time vector in every file, we changed the way my picoscope code returns data. It seems like maybe the associated changes never made it into your code base.

h5g.create_dataset('x_data', data=self.data['time'], compression='gzip')

won't work any more.
Instead, you should just add the attributes I now provide to the y_data dataset so that I can reconstruct the time vector in my analysis. Your write_datasets function might then become something like this:

def write_datasets(self, h5g):
       y_dset = h5g.create_dataset('y_data', data=self.data['current'], compression='gzip')
	for key, value in self.data:
		if key != 'current':
			y_dset.attrs[key] = value
        for attr, value in self._ps.getMetadata().items():
            h5g.attrs[attr] = value

See the example usage code for my picoscope library here:

https://github.com/uio-ess/ps-control/blob/2dbc94a7bd070f774f9c1b3764bb3d7099b30cd1/exampleUsage.py#L41-L45

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions