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

Add Widefield segmentation data for blue and violet channels #13

Merged
merged 15 commits into from
Nov 21, 2023

Conversation

weiglszonja
Copy link
Collaborator

@weiglszonja weiglszonja commented Oct 31, 2023

Add segmentation data for the Widefield imaging session

  • PlaneSegmentationProcessedBlue contains the ROIs (centroids and labels) and the image_masks for the downsampled imaging (blue channel) links to ImagingPlaneBlue
  • SegmentationImagesBlue contains the manual mask and the contrast based vasculature mask for the blue channel in the full size session image. (1024 x 1024)
  • SegmentationImagesProcessedBlue contains the contrast based vasculature and the pca mask for the blue channel in the binned image. (128 x 128)
  • SegmentationImagesProcessedViolet contains the pca mask for the violet channel in the binned image. (128 x 128)

@weiglszonja weiglszonja self-assigned this Oct 31, 2023
@weiglszonja weiglszonja marked this pull request as draft October 31, 2023 12:03
Base automatically changed from add_widefield_imaging to main November 3, 2023 13:57
@weiglszonja
Copy link
Collaborator Author

Stub file on s3 is at pinto-lab-to-nwb/new_stub_DrChicken_20230419_20hz.nwb

@weiglszonja weiglszonja marked this pull request as ready for review November 8, 2023 15:21
@CodyCBakerPhD
Copy link
Member

Everything looks good except for the processed 1P series (in discussion, not sure why this was getting set in this way) is currently float64 but should be uint16? Possibly something to do with how the numpy array is pre-allocated?

@weiglszonja
Copy link
Collaborator Author

weiglszonja commented Nov 9, 2023

@CodyCBakerPhD
For the processed 1P, the dtype of video is determined from the dtype from DatasetView as we read the mat file in, which is float64

self._video = DatasetView(file[expected_struct_name])

But I also checked for the raw 1P, and that should be float16 which is float64 right now, but that should be an easy fix in roiextractors (and this one is because of creating a pre-allocated array without specifying the data type, which defaults to float64): catalystneuro/roiextractors#257

@CodyCBakerPhD
Copy link
Member

@weiglszonja OK let me know when there's a new file to check and this should be good

@weiglszonja
Copy link
Collaborator Author

@CodyCBakerPhD Thanks, this change should be reflected at new_stub_DrChicken_20230419_20hz.nwb

@CodyCBakerPhD
Copy link
Member

@weiglszonja It looks like the same neurodata objects still have the same float64 data type in the new file

@weiglszonja
Copy link
Collaborator Author

weiglszonja commented Nov 15, 2023

For the raw they show up as uint16 for me as here:
Screenshot 2023-11-15 at 16 21 16

updated: stub_DrChicken_20230419_20hz.nwb

@weiglszonja weiglszonja marked this pull request as draft November 20, 2023 15:37
@weiglszonja weiglszonja marked this pull request as ready for review November 20, 2023 15:46
@CodyCBakerPhD
Copy link
Member

@weiglszonja Sorry for not being clear with which data set I'm talking about

image

@weiglszonja
Copy link
Collaborator Author

TODO:
as per our meeting add dtype at init for processed imaging interface, which will either keep the float64 if they request or cast it to int16 by default

@weiglszonja
Copy link
Collaborator Author

updated file: DrChicken_20230419_20hz.nwb

@CodyCBakerPhD
Copy link
Member

Yep, that looks great now!

@CodyCBakerPhD CodyCBakerPhD merged commit d944a05 into main Nov 21, 2023
1 check passed
@CodyCBakerPhD CodyCBakerPhD deleted the add_widefield_segmentation branch November 21, 2023 15:01
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.

2 participants