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 EXTRACTSegmentation class for PyNWB #4

Merged
merged 18 commits into from
Oct 20, 2022
Merged

Conversation

weiglszonja
Copy link
Contributor

@weiglszonja weiglszonja commented Sep 29, 2022

Update extension for storing the available configuration parameters from the EXTRACT algorithm.
The update concerns the PyNWB side where an EXTRACTSegmentation class is defined with all the configuration parameters that can be extracted from the EXTRACT output file.
The extensions yaml file is updated:

  • from float32 to float64
  • from uint8 to bool where the description of the configuration setting indicates the usage of a boolean data type.
    All configuration values are optional.

function.
required: false
- name: pre_mask_on
dtype: bool
Copy link
Member

Choose a reason for hiding this comment

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

In MATLAB this say's it is encoded as a double (float64), but I doubt it would ever be a value other than 0 or 1, so fine to keep as bool. Just leaving this as a note

dtype: int32
doc: int32ean flag that determines whether to subtract the (spatial) background
(largest spatiotemporal mode of the movie matrix).
dtype: bool
Copy link
Member

Choose a reason for hiding this comment

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

Similar to above, this is encoded in MATLAB as double, but usage seems to be binary so fine to keep as bool here.

@CodyCBakerPhD
Copy link
Member

The schema data type changes LGTM - from the MATLAB view, all such values are either 'logical' (MATLAB native 'bool') or 'double' (float64, or just 'float' in Python).

I'm inclined to trust all the autogenerated extension stuff, but maybe @rly would know more about all that.

@weiglszonja
Copy link
Contributor Author

Leaving here as a mental note that to read the NWB files produced with this update using matNWB needs NeurodataWithoutBorders/matnwb#467 to support reading boolean values.

To install matNWB with this branch run this command from MATLAB:

!git clone --branch 466-support-bools https://github.com/NeurodataWithoutBorders/matnwb.git
cd matnwb/
generateCore();

@CodyCBakerPhD
Copy link
Member

LGTM! Thanks for all the work on this

@CodyCBakerPhD
Copy link
Member

Will approve and merge once NeurodataWithoutBorders/matnwb#467 is merged in MatNWB

@CodyCBakerPhD CodyCBakerPhD merged commit d58ed03 into main Oct 20, 2022
@CodyCBakerPhD CodyCBakerPhD deleted the update_extension branch October 20, 2022 20:46
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