# gridcells.core.arena - Defining arenas¶

The arena module provides class definitions of arenas. These can subsequently be used as input to process spiking data and generate spatial firing fields/autocorrelations.

## These types of arenas are currently defined:¶

 Arena An abstract class for arenas. CircularArena(radius, discretisation) A circular arena. RectangularArena(size, discretisation) A rectangular arena. SquareArena(size, discretisation) A square arena.
class gridcells.core.arena.Arena[source]

Bases: object

An abstract class for arenas.

This class is an interface for obtaining discretisations of the arenas and masks when the shape is not rectangular.

getDiscretisation()[source]

Obtain the discretisation of this arena.

Returns: d : gridcells.core.Pair2D A pair of x and y coordinates for the positions in the arena. Units are arbitrary.
getMask()[source]

Return mask (a 2D np.ndarray) of where the positions in the arena are valid.

For isntance with a circular arena, all positions outside its radius are invalid.

class gridcells.core.arena.CircularArena(radius, discretisation)[source]

A circular arena.

sz

Return the size of the arena. Equivalent to getSize().

class gridcells.core.arena.RectangularArena(size, discretisation)[source]

A rectangular arena.

Use RectangularArena when you need to work with rectangular arenas.

Note

The origin (0, 0) of the coordinate system in all the arenas is in the bottom-left corner of the arena.

sz

Return the size of the arena. Equivalent to getSize().

class gridcells.core.arena.SquareArena(size, discretisation)[source]

A square arena.

sz

Return the size of the arena. Equivalent to getSize().