Skip to content

Params File - #17

Open
thomasrgray wants to merge 2177 commits into
narendramukherjee:masterfrom
katzlabbrandeis:master
Open

Params File#17
thomasrgray wants to merge 2177 commits into
narendramukherjee:masterfrom
katzlabbrandeis:master

Conversation

@thomasrgray

Copy link
Copy Markdown

Params file can be more descriptively named

@narendramukherjee

Copy link
Copy Markdown
Owner

@abuzarmahmood @thomasrgray Are you guys planning to merge this to master and is there something you need me to do?

Right now, your branch has conflicts with the master here - maybe try merging the master from here onto your branch and resolving any conflicts?

abuzarmahmood and others added 29 commits January 22, 2026 10:20
…p column to string type

- Convert CAR_group column to string type after loading to handle float values (NaN)
- Also convert when overwriting with original_CAR_group to maintain consistency
- Fixes TypeError: bad operand type for unary ~: 'float' at line 491
Replace confusing double-indexing pattern (emg_bool[none_bool]) with
direct indexing using electrode_ind from the filtered electrode_layout_frame.
This ties the correlation matrix indexing directly to the electrode layout
frame, avoiding indexing issues with emg and none CAR groups.

Addresses comment on PR #669 about adequate indexing of corr-mat.

Co-authored-by: Ona <no-reply@ona.com>
- Add print statement showing which attributes are created when stacking is done
- Add print statement showing which attributes are created when stacking is not done
- Addresses issue #725 by providing clearer information about available attributes
- Includes test to verify correct attribute names are displayed

Co-authored-by: openhands <openhands@all-hands.dev>
- Include array shapes in the generated attributes print statements
- For stacking case: shows shapes of all 6 generated attributes
- For non-stacking case: shows shapes of firing_list arrays and time_vector
- Updated test to verify shape information is included
- Provides users with complete information about data structure dimensions

Co-authored-by: openhands <openhands@all-hands.dev>
- Improved readability by putting each generated attribute on its own line
- Added proper indentation for visual hierarchy
- Updated test to verify multi-line format with indentation
- Enhanced user experience with clearer, more organized output

Co-authored-by: openhands <openhands@all-hands.dev>
…rates-print-statements

Update print statements in get_firing_rates to show generated attributes
- Check if 'original_CAR_group' exists and use it if present.
- Display message indicating the usage of original CAR groups.
- Ensure 'CAR_group' values are converted to lowercase and whitespace is trimmed.
…_averages

- Calculate `num_groups` dynamically using the `CAR_group` column in `electrode_layout_frame`.
- Simplify logic for assigning predicted cluster numbers to `CAR_group` names.
- Add an assertion to ensure the number of predictions matches the number of electrodes.
- Refine logic for warning on average intra-CAR similarity by directly accessing the threshold parameter.
- Use more precise criteria for triggering a similarity warning.
Centralizes test data configuration in test_config.json:
- Test data directory location
- Dataset names and Google Drive IDs

Updates download_test_data.sh, prefect_pipeline.py, and s3_utils.py
to read from the config file instead of hardcoded values.

Fixes #624

Co-authored-by: Ona <no-reply@ona.com>
- Relocate argument parsing into conditional blocks for isolated testing.
- Implement xarray to save the correlation matrix, retaining full metadata.
- Ensure accurate execution log generation for better traceability.
- Clean up redundant and misplaced code elements to improve readability.
- Added `xarray` import to enable advanced manipulation of data arrays.
- Transitioned correlation matrix format from `.npy` to `.nc` using `xarray` for improved indexing and selection capabilities.
- Enhanced code clarity by using `xarray` for direct channel selection.
- Ensured datatype consistency by converting CAR_group columns to strings for uniformity.
- Improved error handling by raising runtime errors during intra-CAR similarity checks for better debugging information.

Context: Addressed issues in corr_mat handling with `xarray` indexing.
…e NaN values

- Convert 'CAR_group' and 'original_CAR_group' columns to string type.
- Fill NaN values in 'original_CAR_group' with 'none' to ensure consistent data representation.
- Address issue where 'none' was incorrectly saved as a string representation.
- Remove unnecessary empty line for cleaner code formatting.
Move pipeline check initialization and logging to the correct section within the non-testing conditional block. This ensures that pipeline checks are correctly initialized in production environments.
Fix correlation matrix indexing to use electrode_ind directly
Calculate channel correlations after common average reference and generate
comparison plots in QA_output:
- Heatmaps showing correlation matrices before/after CAR with difference
- Paired points plot showing correlation changes per channel pair
- Histogram of correlation changes with summary statistics

Closes #727

Co-authored-by: Ona <no-reply@ona.com>
pre-commit-ci Bot and others added 30 commits March 7, 2026 18:14
- Changed the comment to clarify that noise waveforms are discarded from GMM fitting instead of training.
- Updated the format for electrode arrays to use formatted strings for clarity.
- Added print statements to log the completion of LFP extraction for each electrode and digital input for better tracking of the process.
- Removed unused variable `dig_in_channels` in two functions to clean up the code.
- Added support for recursive node removal in `remove_node` function.
- Updated STFT processing to handle multiple datasets, specifically for different tastes.
- Refined the extraction of LFP data and improved printing for debug clarity.
- Modularized STFT calculations for amplitude and phase across multiple datasets.
- Introduced error handling and assertion for STFT computation consistency.
- Improved data writing logic to the HDF5 file by using dig-in names for organization.
- Introduced `method_kwargs` to define test parameters for specific methods.
- Extended `test_ephys_data` to run methods with specified kwargs where applicable.
- Added checks and iteration over parameters to ensure comprehensive method testing.
- Introduced `load_stft_data` function to encapsulate the logic for loading STFT data from HDF5.
- Reduced redundancy by calling the new function instead of duplicating code.
- Added checks and warnings for missing STFT data nodes within the HDF5 file.
- Ensured recalculation flags are set appropriately if data nodes are missing.
- Introduced a new section in README.md for community and support, directing users to the Discourse forum and GitHub issues for different needs.
- Provided guidance on where users should address questions and feature requests.

style(ephys): improve code readability with better formatting

- Reformatted print statements and list comprehensions for better readability in `ephys_data.py`.
- Ensured consistent indentation and line breaks to enhance code clarity.
Co-authored-by: aider (claude-sonnet-4-5) <aider@aider.chat>
Co-authored-by: aider (claude-sonnet-4-5) <aider@aider.chat>
Co-authored-by: aider (claude-sonnet-4-5) <aider@aider.chat>
Co-authored-by: aider (claude-sonnet-4-5) <aider@aider.chat>
This update addresses issue #792 by documenting that 'none' and 'emg'
are privileged/hardcoded CAR group names:

- 'none': Channels marked with CAR group 'none' are excluded from
  common average reference (CAR) processing and will not be analyzed
- 'emg' (or any CAR group containing 'emg'): Channels with CAR groups
  containing 'emg' are treated as EMG channels and processed separately
  for EMG analysis

Changes:
- docs/tutorials.md: Added 'Reserved CAR Group Names' section
- docs/reference/core-pipeline.md: Added CAR groups section to
  blech_common_avg_reference.py documentation
- blech_exp_info.py: Improved prompt message to clarify reserved names

Co-authored-by: openhands <openhands@all-hands.dev>
- Added new documentation file: docs/resources/intan_headstage_pinouts.md
- This document provides reference information for Intan headstage electrode
  connector pinouts, which is useful when creating the electrode_layout_frame
  in blech_exp_info.py
- Added links to the new documentation from docs/index.md and docs/tutorials.md
- References the official Intan Technologies documentation at intantech.com

Fixes #793
…r-group-names

docs: clarify reserved CAR group names 'none' and 'emg' (fixes #792)
- Include 32-channel and 64-channel headstage pinout images in docs
- Images sourced from Intan Technologies documentation (via issue #793)
- Updates existing intan_headstage_pinouts.md with visual pinout references

Closes #793
…-images

Include Intan headstage pinout images in documentation
…stage-pinouts-docs

Add Intan headstage pinouts documentation
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.

5 participants