Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Filtering units for decoding (LorenFrankLab#807)
* Remove old decoding notebook * Save initial conditions and discrete transitions * Apply suggestions from code review Co-authored-by: Chris Brozdowski <[email protected]> * Be more specific with import error * Remove unneeded comments * Remove incorrect dimension name * Project merge_id from SpikeSortingOutput for clarity * Update src/spyglass/decoding/v0/clusterless.py Co-authored-by: Chris Brozdowski <[email protected]> * Update src/spyglass/decoding/v0/clusterless.py Co-authored-by: Chris Brozdowski <[email protected]> * Update src/spyglass/decoding/v0/clusterless.py Co-authored-by: Chris Brozdowski <[email protected]> * Fix linting * Update notebooks * Ignore .pem * Add session as a primary key for Groups * Add some helper methods * Update notebooks * Update README.md * Update pyscripts * Update 42_Decoding_Clusterless.ipynb * Update CHANGELOG.md * Add fetch and insert * Simplify class conversion * Do the dictionary conversion of class for the user * Update CHANGELOG.md * Update .gitignore * Use methods in populate * Avoid fetching interval range if not needed * Generalize finding class from modules * Use args/kwargs * Simplify tuple unpacking * Make decoding kwargs nullable * Add function for get_recording and get_sorting to the spikesorting merge table * make decoding waveform features agnostic to spikesorting source * Fix spelling * Use fetch1_dataframe for position * Use self instead of class * Update src/spyglass/decoding/v1/sorted_spikes.py Co-authored-by: Samuel Bray <[email protected]> * Be more careful about populating select keys * Make more readable/remove unused imports * Save classifier * Clean up saved model paths * add function load_linear_position_info * Update src/spyglass/decoding/v1/sorted_spikes.py Co-authored-by: Samuel Bray <[email protected]> * Update 41_Extracting_Clusterless_Waveform_Features.py * Update docstring * Apply suggestions from code review Co-authored-by: Chris Brozdowski <[email protected]> * Update src/spyglass/decoding/v1/clusterless.py Co-authored-by: Chris Brozdowski <[email protected]> * Update src/spyglass/decoding/v1/clusterless.py Co-authored-by: Chris Brozdowski <[email protected]> * Fix linting * Fix syntax * Rename variable to avoid confusion * Restrict UnitWaveformFeaturesGroup and SortedSpikesGroup * Concatenate linear position and position dataframes * Static methods don't require instantiating class * Avoid merge restrict * Add version to defaults * Remove unused import * Fix classifier path * Add dry run * Remove non-default * Handle permissions and file not found * Keep position info within encoding/decoding interval * Add methods to get the spike_times, spike_indicators, firing rate * Fix docstring to match default * Implement function rather than import * Remove unused broken imports * Add decoding cleanup * Fix import * Put old vis code back * Fix import * Add draft helper functions * Limit options on input * Fix logic * Fix where the key is passed * Update notebooks * Host main visualizations in non_local_detector repo * Update notebooks/py_scripts/41_Extracting_Clusterless_Waveform_Features.py Co-authored-by: Chris Brozdowski <[email protected]> * Update src/spyglass/spikesorting/merge.py Co-authored-by: Chris Brozdowski <[email protected]> * Update src/spyglass/decoding/decoding_merge.py Co-authored-by: Chris Brozdowski <[email protected]> * Revert "Limit options on input" This reverts commit 386714c. * Use f-string for version * Add useful imports to the top level This would have to change a bit if there were multiple versions of the pipeline. * Make source class a hidden attribute * Update CHANGELOG.md * Centralize get_class logic in Merge (LorenFrankLab#749) * get_class logic -> dj_merge * blackify --------- Co-authored-by: Eric Denovellis <[email protected]> * Add _nwb_table for fetch_nwb * Method is static method * Add merge insert * string split is brittle, use defaults if it didn't work * WIP: Mixin resolves _nwb_table attr for Merge (LorenFrankLab#783) * Change import * Handle single position 3D case * Fix getting source from key * Use merge_restrict_class for fetch_nwb on merge tables * Move this back * Remove for now * Temp patch for tests * Revert "Temp patch for tests" This reverts commit 281bf36. * Temp patch for tests * Handle None decoding kwargs * fetch_nwb is a method not a class method now * Fix _merge_repr for numeric data types (LorenFrankLab#786) * Easily calculate firing rate * Add sorting spike times by place field and ahead behind distance * Account for differently named position variables * Handle orientation name and fix linear position fetch * Fix 2D ahead/behind * Add `UnitSelection` table (LorenFrankLab#788) * Add UnitSelection * Rename table * Addressing LorenFrankLab#789, failing tests (LorenFrankLab#795) * Addressing LorenFrankLab#789. See details. - Edit settings.py to permit fail to load config on startup - Simplify instructions to use func to generate config, negating need for config.py script - Edit notebook 00 and installation doc to point to save-config func - Expand example config to demonstrate all possible values - Lint dj_merge_table.py to remove unused import and `var is True` * LorenFrankLab#794 * Fix failing tests * Update Changelog * Typo: chared -> shared * Apply suggestions from code review Co-authored-by: Chris Brozdowski <[email protected]> * Fix formatting * Update src/spyglass/common/common_behav.py Co-authored-by: Chris Brozdowski <[email protected]> * Update src/spyglass/settings.py Co-authored-by: Chris Brozdowski <[email protected]> * Fix syntax * Update merge.py * Revert "Update merge.py" This reverts commit 4e5e5dc. * Change load_results to fetch_results for consistency * More load -> fetch * load -> fetch * Use merge table methods * load -> fetch * Rename SortedSpikesGroup.SortGroup to SortedSpikesGroup.Units * Move old spike sorting pipeline to v0 for organizational purposes * Specify full import path * Rename merge module for consistency with other pipelines * Fix import * Fix notebook v0/v1 imports * Fix import * Fix import * Fix import * Fix names * Formatting imports * Remove visualization folder * Move figurl views * Fix formatting for black==24.*.* * Use full import path * Fix method name * Add UnitInclusion merge table * Update 43_Decoding_SortedSpikes.py * Update pyscripts * Remove unneeded sections * Move import inside function * Fix versioning * Fix versioning * Be more uniform about explicit imports * Update CHANGELOG.md * Fix import * Fix LorenFrankLab#752 * Make imports more explicit * Only import cv2 when needed because it sometimes causes issues * Remove position tools as dependency The functions are relatively simple so copying them over doesn't cause much burden * Fix import name * Rename to linearization_merge for consistency with other modules * Reduce cv2 dependency * Remove unused import * Remove defaults channel to avoid issues * Remove position tools dependency * Add opencv dependency position tools had this as a dependency but since this is removed * Revert "Remove position tools as dependency" This reverts commit 35cd5ed. * Revert "Remove position tools dependency" This reverts commit 451e058. * Revert "Add opencv dependency" This reverts commit 996be9b. * Update dependencies to match environment.yml * Update environment_position.yml * Add figure 1 image and pypi version badge * Update citation * Update to add all authors * Add features to readme * Create CODE_OF_CONDUCT.md * Create .mailmap * Update .mailmap * Fix linting * Remove unused tables * Fix imports * Don't make time relative * Move sorted spikes group to spikesorting * Add MUA detection * Update CHANGELOG.md * Handle discrete states and squeeze to avoid intervals if possible * Fix table name * Add intervallist to exclude artifacts * Remove .mailmap * Revert "Add intervallist to exclude artifacts" This reverts commit 205874a. * Apply suggestions from code review Co-authored-by: Chris Brozdowski <[email protected]> * Revert "Revert "Add intervallist to exclude artifacts"" This reverts commit e102646. * remove interval list * Fix linting * Fix linting * Add missing authors * Update CHANGELOG.md * Fix schema name * Remove unused imports * Revert back * Use quotes * Fix name * Move mua because of dependency on position * Fix prefix * Fix schema prefix * Fix name * Add mua * Update 51_MUA_Detection.ipynb * Update src/spyglass/spikesorting/v1/unit_inclusion.py Co-authored-by: Chris Brozdowski <[email protected]> * Imported spikes annotation * Fix name of annotated keys and add documentation * Enable SortedSpikesGroup to filter directly on the SpikeSortingOutput nwb file * improve filter_units execution * Apply suggestions from code review Co-authored-by: Chris Brozdowski <[email protected]> * style cleanup * remove UnitInclusion tables * fix fetch_spike_data for case where no units in merge id * Update src/spyglass/decoding/v1/sorted_spikes.py Co-authored-by: Samuel Bray <[email protected]> * rename UnitSelectionParams * updated sorted decoding notebook * fix linting * fix linting * Fix spelling * Fix import order * Squeeze posterior * Make spike indicator 2D * insert class contents --------- Co-authored-by: Chris Brozdowski <[email protected]> Co-authored-by: Sam Bray <[email protected]> Co-authored-by: Kyu Hyun Lee <[email protected]>
- Loading branch information