Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

picoscope data format #10

Open
greyltc opened this issue Jun 12, 2018 · 0 comments
Open

picoscope data format #10

greyltc opened this issue Jun 12, 2018 · 0 comments

Comments

@greyltc
Copy link
Member

greyltc commented Jun 12, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant