Skip to content

Conversation

@grg2rsr
Copy link
Contributor

@grg2rsr grg2rsr commented Jan 13, 2025

previously, the Streamer was instantiated with a absolute path of the meta file (also not ideal in the context of the Streamers constructors call signature, where the first argument is named sglx_file and a dedicated argument meta_file exists. link). While this looks like a bug, it is recovered there in the following lines under normal (=non-SDSC) usage as this line

meta_file = meta_file or _get_companion_file(sglx_file, ".meta")

recoveres the correct file paths.

However, this breaks on the SDSC as the file paths an uuid, and when the corresponding file path for the meta for the bin (or vice versa) are constructed, the uuid is wrong.

The proposed patch checks if the .meta filename contains an uuid, and if so, finds the correct uuid for the .cbin file, constructs absolute paths for both. Either way, uuid or not, the Streamer is now instantiated with both paths for .meta and .bin (or .cbin).

@grg2rsr grg2rsr requested a review from oliche January 13, 2025 19:26
@grg2rsr grg2rsr marked this pull request as draft January 13, 2025 19:39
@grg2rsr
Copy link
Contributor Author

grg2rsr commented Jan 13, 2025

thinking more about this, this could also be patched in a different way, where the uuid completing functionality is added to the _get_companion_file() function in ibl-neuropixel/spikeglx, with a remove_uuid=True as a default kwarg, which is then turned to False either here and passed through the Streamer constructor. This could cover future occurrences of this bug.

Copy link
Member

@oliche oliche left a comment

Choose a reason for hiding this comment

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

SDSC is probably the only place on Earth where we do not need the Streaming functionality ! 😄

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.

3 participants