Quick Start¶
First Steps¶
Once installed, you can start processing your data:
- Prepare your data: Ensure you have Intan RHD2132 recordings
- Set up experiment info: Run
python blech_exp_info.pyto annotate channels - Configure parameters: Edit the parameter files in the
params/directory - Run the pipeline: Use the convenience scripts or run individual modules
Basic Workflow¶
1. Experiment Setup¶
# Activate the environment
conda activate blech_clust
# Navigate to your data directory
cd /path/to/your/data
# Run experiment info setup
python /path/to/blech_clust/blech_exp_info.py
This will guide you through annotating your channels and setting up experimental parameters.
2. Data Initialization¶
This creates the necessary directory structure and organizes data files.
3. Common Average Referencing¶
4. Spike Extraction and Clustering¶
This runs spike extraction and clustering in parallel across electrodes.
5. Post-Processing¶
# Add selected units to HDF5
python /path/to/blech_clust/blech_post_process.py
# Plot waveforms
python /path/to/blech_clust/blech_units_plot.py
# Generate spike arrays
python /path/to/blech_clust/blech_make_arrays.py
6. Quality Assessment¶
# Run QA checks
bash /path/to/blech_clust/blech_run_QA.sh
# Analyze unit characteristics
python /path/to/blech_clust/blech_units_characteristics.py
# Generate data summary
python /path/to/blech_clust/blech_data_summary.py
# Grade dataset quality
python /path/to/blech_clust/grade_dataset.py
EMG Analysis¶
If you have EMG data, you can run the EMG analysis pipeline:
# Filter EMG signals
python /path/to/blech_clust/emg/emg_filter.py
# Setup frequency analysis parameters
python /path/to/blech_clust/emg/emg_freq_setup.py
# Choose your analysis approach:
# Option 1: BSA/STFT frequency analysis
python /path/to/blech_clust/emg/emg_freq_post_process.py
python /path/to/blech_clust/emg/emg_freq_plot.py
# Option 2: QDA-based gape detection
python /path/to/blech_clust/emg/gape_QDA_classifier/get_gapes_Li.py
Parameter Configuration¶
Key parameter files to configure:
- clustering_params.json: Clustering algorithm parameters
- spike_detection_params.json: Spike detection thresholds
- emg_params.json: EMG analysis parameters (if using EMG)
Tips¶
- Always activate the conda environment before running scripts
- Check log files in the output directories for debugging
- Use the test dataset to verify your installation
- Refer to the API Reference for detailed function documentation
Next Steps¶
- Explore the Tutorials for detailed walkthroughs
- Check the API Reference for function details