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

Reading Annotation Volume as 16-bit, not 32-bit uints #2

Open
dgoodwin208 opened this issue Feb 20, 2014 · 0 comments
Open

Reading Annotation Volume as 16-bit, not 32-bit uints #2

dgoodwin208 opened this issue Feb 20, 2014 · 0 comments

Comments

@dgoodwin208
Copy link

I think there is a subtle issue with the foldchange.py example

In the api documentation the annotation volume is listed at as a 32-bit uint:
http://help.brain-map.org/display/mousebrain/API

But in the foldchange code, the data is loaded from the zip with the 'H' (unsigned short, 16-bit) designation.

I was running around in circles trying to figure out why the annot variable in the main() was twice as long as the gene-specific data. I believe this is the issue.

The solution is easy: change "arr = array.array('H', raw)" to arr = array.array('I', raw) in the DownloadAnnotationVolume() function
(reference: http://docs.python.org/2/library/array.html)

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