Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/improve_bruker_get_…
Browse files Browse the repository at this point in the history
…streams' into improve_bruker_get_streams
  • Loading branch information
h-mayorquin committed Jun 11, 2024
2 parents 2b9ec6a + 4182d5f commit 3612f0a
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -302,14 +302,14 @@ def get_streams(cls, folder_path: PathType) -> dict:
streams: dict
The dictionary of available streams.
"""

channel_names = cls.get_available_channels(folder_path=folder_path)

natsort = get_package(package_name="natsort", installation_instructions="pip install natsort")
unique_channel_names = natsort.natsorted(channel_names)
streams = dict(channel_streams=unique_channel_names)
return streams

@staticmethod
def get_available_channels(folder_path: PathType) -> set[str]:
"""
Expand Down Expand Up @@ -338,13 +338,11 @@ def get_available_channels(folder_path: PathType) -> set[str]:
for subelem in elem:
if subelem.tag == "File":
channel_names.add(subelem.attrib["channelName"])

break

break

return channel_names


def __init__(self, folder_path: PathType, stream_name: Optional[str] = None):
"""Create a BrukerTiffSinglePlaneImagingExtractor instance from a folder path that contains the image files.
Expand Down

0 comments on commit 3612f0a

Please sign in to comment.