Skip to content

Release v0.12.4: Visualization Enhancements and Grid Cell Documentation

Choose a tag to compare

@Routhleck Routhleck released this 09 Jan 02:29
· 186 commits to master since this release
2e189b8

What's New

🎨 Enhanced Visualization System with Mixed-Mode Saving

  • New finalize_figure helper for streamlined figure finalization and saving
  • Mixed-mode save configuration supporting multiple output formats simultaneously
  • Improved animation infrastructure with optimized rendering and Jupyter integration

📖 Expanded Documentation and Tutorials

  • New comprehensive grid cell velocity model tutorial with spatial analysis
  • Reorganized visualization API documentation with clearer structure
  • Enhanced Chinese documentation with improved formatting and rendering

Major Features / Key Changes

🎨 Visualization System Improvements (PR #77)

  • finalize_figure helper: New utility function for consistent figure finalization, tight layout, and saving
  • Mixed-mode save configuration: Support for saving figures in multiple formats (PNG, PDF, SVG) with a single call
  • Enhanced ownership control: Better management of figure lifecycle and cleanup
  • Verbose logging: Optional detailed logging for debugging visualization pipelines
from canns.analyzer.visualization import finalize_figure

# Save figure in multiple formats with one call
finalize_figure(
    fig, 
    save_path='output',  # Will create output.png, output.pdf, output.svg
    formats=['png', 'pdf', 'svg'],
    dpi=300,
    tight_layout=True
)

📖 Documentation Enhancements (PR #76)

  • Chinese documentation formatting: Fixed rendering issues and improved readability across all Chinese tutorials
  • Sphinx compatibility: Resolved broken display in documentation builds
  • Text refinement: Optimized descriptions for better clarity and consistency
  • Layout improvements: Corrected formatting and style inconsistencies throughout

🧠 Grid Cell Model Documentation

  • New tutorial: 05_grid_cell_velocity_model.ipynb covering velocity-based path integration with spatial representation analysis
  • Torus grid cell model: Added references and descriptions in both English and Chinese documentation
  • Updated model lists: Comprehensive coverage of grid cell models with relevant citations

🔧 API Documentation Reorganization

  • Core visualization subpackage: Reorganized visualization modules into core subpackage for better structure
  • Animation infrastructure docs: Added documentation for optimized animation, parallel rendering, and Jupyter integration
  • Systematic rate map metrics: New documentation for spatial analysis metrics
  • Configuration presets: Improved documentation for common plot type configurations

Technical Improvements

Documentation Structure

  • Reorganized auto-generated API documentation for visualization modules
  • Moved core components to new core subpackage with updated cross-references
  • Extended docs requirements with Sphinx, nbsphinx, MyST, and related extensions

Tutorial Organization

  • Renumbered tutorials: 05_hierarchical_network.ipynb06_hierarchical_network.ipynb
  • Renumbered tutorials: 06_theta_sweep_hd_grid.ipynb07_theta_sweep_hd_grid.ipynb
  • Renumbered tutorials: 07_theta_sweep_place_cell.ipynb08_theta_sweep_place_cell.ipynb
  • Added new 05_grid_cell_velocity_model.ipynb tutorial

Files Modified

Key Changes:

  • src/canns/analyzer/visualization/core/config.py: Added finalize_figure helper and mixed-mode save support
  • docs/zh/: Multiple Chinese tutorial notebooks reformatted for better Sphinx rendering
  • docs/en/01_cann_modeling/05_grid_cell_velocity_model.ipynb: New comprehensive grid cell tutorial
  • docs/zh/01_cann_modeling/05_grid_cell_velocity_model.ipynb: Chinese version of grid cell tutorial
  • docs/autoapi/: Extensive reorganization of visualization API documentation

Statistics:

  • 52 files changed
  • 6,870 insertions(+)
  • 486 deletions(-)

Breaking Changes

None - all additions are backward compatible.

Use Cases

  • Researchers: Benefit from improved grid cell model documentation and spatial analysis tutorials
  • Visualization users: Streamlined figure saving workflow with mixed-mode output support
  • Chinese-speaking users: Enhanced documentation readability and proper rendering
  • Documentation contributors: Better organized API structure for easier navigation

Full Changelog: v0.12.3...v0.12.4