Skip to content

Commit

Permalink
update suite2p args (#868)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Cody Baker <[email protected]>
  • Loading branch information
3 people authored May 28, 2024
1 parent 3d83b80 commit bb1057e
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions src/neuroconv/datainterfaces/ophys/suite2p/suite2pdatainterface.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,18 @@ class Suite2pSegmentationInterface(BaseSegmentationExtractorInterface):
associated_suffixes = (".npy",)
info = "Interface for Suite2p segmentation."

@classmethod
def get_source_schema(cls) -> dict:
schema = super().get_source_schema()
schema["properties"]["folder_path"][
"description"
] = "Path to the folder containing Suite2p segmentation data. Should contain 'plane#' subfolder(s)."
schema["properties"]["plane_name"][
"description"
] = "The name of the plane to load. This interface only loads one plane at a time. Use the full name, e.g. 'plane0'. If this value is omitted, the first plane found will be loaded."

return schema

@classmethod
def get_available_planes(cls, folder_path: FolderPathType) -> dict:
from roiextractors import Suite2pSegmentationExtractor
Expand All @@ -66,18 +78,20 @@ def __init__(
plane_name: Optional[str] = None,
plane_segmentation_name: Optional[str] = None,
verbose: bool = True,
combined: Optional[bool] = False, # TODO: to be removed
plane_no: Optional[int] = None, # TODO: to be removed
):
"""
Parameters
----------
folder_path : FolderPathType
Path to the folder containing Suite2p segmentation data. Should contain 'plane#' sub-folders.
channel_name: str, optional
The name of the channel to load, to determine what channels are available use Suite2pSegmentationInterface.get_available_channels(folder_path).
The name of the channel to load.
To determine what channels are available, use ``Suite2pSegmentationInterface.get_available_channels(folder_path)``.
plane_name: str, optional
The name of the plane to load, to determine what planes are available use Suite2pSegmentationInterface.get_available_planes(folder_path).
The name of the plane to load. This interface only loads one plane at a time.
If this value is omitted, the first plane found will be loaded.
To determine what planes are available, use ``Suite2pSegmentationInterface.get_available_planes(folder_path)``.
plane_segmentation_name: str, optional
The name of the plane segmentation to be added.
"""
Expand Down

0 comments on commit bb1057e

Please sign in to comment.