User Guide¶
Start with the question you want to answer from spikes, tracking, and behavior. Each route explains the analysis choices and how to interpret the figures.
Choose a Scientific Task¶
| I want to… | Start here | Check before interpreting |
|---|---|---|
| Analyze my recorded spikes and tracking | Load NWB data | Position units, clocks, unit labels and recording windows |
| Find where a neuron fires | First place field | Occupancy, smoothing scale and missing spatial coverage |
| Compare conditions or trials | Place fields on outbound and inbound runs | One environment, identical analysis settings, matched unit IDs and observed time in each condition |
| Classify candidate spatial cells | Cell classification | Threshold screens versus shuffle evidence |
| Summarize a population: coverage, remapping, assemblies and reactivation | Population analysis | Which units passed a spatial screen, bins visited in every condition and one unit selection across periods |
| Evaluate decoding on new data | Held-out decoding | Separate training/test periods and locations visited during training |
| Segment laps and quantify movement | Trajectory and behavioral analysis | Tracking gaps and invalid positions |
| Measure speed, heading or position-based features around events | Behavior around events | Tracking dropouts inside event windows and angle features declared circular |
| Measure firing around cues | Raster and PSTH example | Which cues have fully recorded before/after windows |
| Save results I can interpret later | Analysis settings and exports | Units, neuron labels, analyzed periods, bin widths and smoothing |
Contents¶
- Environments: Creating and working with Environment objects
- Layout Engines: Understanding different discretization strategies
- Regions: Defining and managing regions of interest
- Video Annotation: Define environments from video frames interactively
- Composite Environments: Merging multiple environments
- Alignment & Transforms: Transforming spatial representations
- Spatial Analysis: Trajectory analysis, movement patterns, and field operations
- Population Analysis: Coverage, remapping, cell assemblies, reactivation and decoding across many units
- Performance & Caching: Memory management, optimization, and benchmarks
- Complete Workflows: End-to-end analysis examples
- Interoperability: Recording holders, SpikeTrains, BayesianDecoder, and pynapple / NWB adapters
Who This Guide Is For¶
This guide is for users who:
- Have completed the Quickstart
- Want to understand specific features in depth
- Need to solve complex spatial analysis problems
- Want to customize neurospatial for their use case
Prerequisites¶
- Completed Getting Started section
- Familiarity with NumPy arrays and basic Python
- Understanding of spatial coordinates
Navigation¶
Each page covers a specific feature area with:
- Conceptual explanations
- Code examples
- Common patterns and best practices
- Troubleshooting tips
Quick Links¶
Common Tasks:
- Creating different environment types
- Open-field, linear-track and maze presets
- Choosing the right layout engine
- Defining regions
- Annotating video frames
- Computing occupancy and firing rates
- Analyzing movement patterns
- Computing distance fields
- Combining multiple environments
- Aligning spatial maps
- Optimizing performance and managing memory
See Also¶
- API Reference: Detailed API documentation
- Examples: Real-world use cases
- Getting Started: Beginner tutorials