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

Fixed bug with ScanImage's parse_metadata so that it works properly when hStackManager is disabled #373

Merged
merged 2 commits into from
Oct 11, 2024

Conversation

pauladkisson
Copy link
Member

Fixes #372

@pauladkisson
Copy link
Member Author

@k1o0, This should fix the bug you found. Please let me know if you run into any more problems.

Copy link
Collaborator

@h-mayorquin h-mayorquin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM. Two things:

  • Any chance @k1o0 could test this just to be sure?
  • Maybe we can stub the example file that he shared with us and add it to the examples?

As we have many tiff based systems it might be a good investment of developer time to understand the format to the degree that we can stub so we can add this this and future examples to our testing suite. Probably this discussion deserves its own issue.

@pauladkisson
Copy link
Member Author

Maybe we can stub the example file that he shared with us and add it to the examples?

Can be tricky to stub sometimes...
In this case one of the existing examples already has SI.hStackManager.enable = "false", so I think we have it covered.

@h-mayorquin
Copy link
Collaborator

Maybe we can stub the example file that he shared with us and add it to the examples?

Can be tricky to stub sometimes... In this case one of the existing examples already has SI.hStackManager.enable = "false", so I think we have it covered.

So how come it was not failing?

@pauladkisson
Copy link
Member Author

Maybe we can stub the example file that he shared with us and add it to the examples?

Can be tricky to stub sometimes... In this case one of the existing examples already has SI.hStackManager.enable = "false", so I think we have it covered.

So how come it was not failing?

It was only testing the metadata parsing function (not e.g. get_video), and instead of Inf, it had some (presumably inaccurate) ints for num_planes and frames_per_slice.

@k1o0
Copy link

k1o0 commented Oct 11, 2024

I was able to successfully extract the metadata and generate an NWB file from the tif. Happy for you to use this file as a test fixture.

@h-mayorquin
Copy link
Collaborator

Thanks @k1o0
we will be merging this and storing your file. As Paul says it might be tricky to stub (basically make a shorter version of it for continuous integration purposes) but I will give it a try as soon as I can.

Thanks for reporting the issue and following up.

One final question, can you give us a bit of provenance for the file? what system was used to acquire it and whatever you remember from when you make the recording?

@h-mayorquin
Copy link
Collaborator

Ah, I see that you answered here:

catalystneuro/neuroconv#1108 (comment)

Thanks a bunch.

@h-mayorquin h-mayorquin merged commit 2cf9235 into main Oct 11, 2024
29 checks passed
@h-mayorquin h-mayorquin deleted the scanimage_parse_metadata branch October 11, 2024 14:36
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

Successfully merging this pull request may close these issues.

[Bug]: invalid literal for int() 'Inf' for SI.hStackManager.framesPerSlice #1108
3 participants