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 |
|---|---|---|
| Try an analysis on a published recording | Public datasets | The session's "Watch out" section, its conversions and its license |
| Analyze my recorded spikes and tracking | Load NWB data | Position units, clocks, unit labels and recording windows |
| Find where a neuron fires | First rate map | 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 | Which place-cell function? | 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 |
| Test candidate events for replay and compare published methods | Comparing replay methods | Each method's false-positive rate on several kinds of null data, by event cells and duration |
| Test whether task co-firing returns in rest, as published methods do | Comparing reactivation methods | Rest before the task as the control, pairs on different tetrodes, and rate changes that mimic reactivation |
| 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 |
| Lay trials out by time or along the route, tabulate them, or hand them to a model | Compute on trials and segments | Trials that end inside the window, and cross-validation folds that split a trial |
| 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
- Comparing Replay Methods: Published replay tests on the same events, their false-positive rates on null data, and comparison at a matched rate
- Comparing Reactivation Methods: Published explained-variance and assembly reactivation analyses on one session, and what they report on data without reactivation
- Performance & Caching: Memory management, optimization, and benchmarks
- Complete Workflows: End-to-end analysis examples
- Public Datasets: Load six published recordings with their conversions, checks and pitfalls; one page per dataset
- 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