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

The index for reading spike waveforms from data packets is not right #5

Open
xuanma opened this issue Jul 6, 2021 · 2 comments
Open

Comments

@xuanma
Copy link

xuanma commented Jul 6, 2021

https://github.com/BlackrockMicrosystems/Python-Utilities/blob/2b93f0d10ff8fd9dcb627e3eb579ca88e5f39b87/brpylib.py#L501
With the original codes one may lose 2 temporal samples for each spike waveform. It seems that the right codes should be wfs = np.ndarray((nPackets,int((self.basic_header['BytesInDataPackets']-(tsBytes+6))/2)), '<h', rawdata, tsBytes+6, (self.basic_header['BytesInDataPackets'], 2))

@xuanma xuanma changed the title The index for reading spike waveforms from a data package is not right The index for reading spike waveforms from data packets is not right Jul 6, 2021
@yanchenyuxia
Copy link

I think right code is this:
wfs = np.ndarray((nPackets,int((self.basic_header['BytesInDataPackets']-(tsBytes+4))/2)), '<h', rawdata, tsBytes+4, (self.basic_header['BytesInDataPackets'], 2))

@dkluger
Copy link
Contributor

dkluger commented Mar 22, 2023

I agree with this change. This has been added to my current working branch PTPFix #22

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

3 participants