modeling

basic classes

Base classes for data models – the Data class itself.

Classes:

Data()

A recursive unit of data.

Table()

To be made into a table!

Attributes()

A set of attributes that's intended to be singular, rather than made into a table.

Schema()

A special type of type intended to be a representation of an abstract structure/schema of data, rather than a live container of data objects themselves.

Group(*[, args, kwargs])

A generic representation of a "Group" if present in a given interface.

Node(*[, args, kwargs])

Group, but for nodes.

class Data[source]

Bases: autopilot.root.Autopilot_Type

A recursive unit of data.

We need to have the abstract representation of data: eg. for this experiment

expect this kind of data in general. It will come in as a series rather than a unit.

and we also need the instantaneous representation of data: using as an instance,

link my data to this other data right here.

There is no distinction between trialwise vs continuous data. A unit of data is just that collection of things that you would collect in a moment.

So we need
  • something that can declare data as a particular type (its representation)

  • something that can declare data as a semantic value (this has this particular meaning

    of a piece of data, eg. this is a positional series or a

but the relationship between them and it can get especially tricky when you get performance

needs involved. eg. you want a very thin wrapper around the literal values of things, so being able to abstract their implementation from their structure is the whole point: use the ‘pytables’ backend when you want fast local writing, use some database when you want reliable storage split async across multiple clients, use nwb to export to but not necessarily to write to (but be able to translate data from another representation to it).

So a data container should yield an active means of interacting with it. The data object

exposes several APIs * type declaration * reading/writing routines (mixin? context provider? eg like when used by this object you provide this type?) * link structure between different declared data elements.

Data may have

  • A Value – the

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

class Table[source]

Bases: autopilot.data.modeling.base.Data

To be made into a table!

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

Methods:

to_pytables_description()

Convert the fields of this table to a pytables description

from_pytables_description(description)

Create an instance of a table from a pytables description

to_df()

Create a dataframe from the lists of fields

classmethod to_pytables_description() Type[tables.description.IsDescription][source]

Convert the fields of this table to a pytables description

classmethod from_pytables_description(description: Type[tables.description.IsDescription]) autopilot.data.modeling.base.Table[source]

Create an instance of a table from a pytables description

to_df() pandas.core.frame.DataFrame[source]

Create a dataframe from the lists of fields

Returns

pandas.DataFrame

class Attributes[source]

Bases: autopilot.data.modeling.base.Data

A set of attributes that’s intended to be singular, rather than made into a table.

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

class Schema[source]

Bases: autopilot.root.Autopilot_Type

A special type of type intended to be a representation of an abstract structure/schema of data, rather than a live container of data objects themselves. This class is used for constructing data containers, translating between formats, etc. rather than momentary data handling

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

class Group(*, args: list = None, kwargs: dict = None)[source]

Bases: autopilot.root.Autopilot_Type

A generic representation of a “Group” if present in a given interface. Useful for when, for example in a given container format you want to make an empty group that will be filled later, or one that has to be present for syntactic correctness.

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

Attributes:

args

kwargs

args: Optional[list]
kwargs: Optional[dict]
class Node(*, args: list = None, kwargs: dict = None)[source]

Bases: autopilot.root.Autopilot_Type

Group, but for nodes.

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

Attributes:

args

kwargs

args: Optional[list]
kwargs: Optional[dict]