![]() |
Multivariate Pattern Analysis in Python |
Some little helper for reading (and writing) common formats from and to disk.
The comprehensive API documentation for this module, including all technical details, is available in the Epydoc-generated API reference for mvpa.misc.io.base (for developers).
Bases: dict
Read data that is stored in columns of text files.
All read data is available via a dictionary-like interface. If column headers are available, the column names serve as dictionary keys. If no header exists an articfical key is generated: str(number_of_column).
Splitting of text file lines is performed by the standard split() function (which gets passed the sep argument as separator string) and each element is converted into the desired datatype.
Because data is read into a dictionary no two columns can have the same name in the header! Each column is stored as a list in the dictionary.
Read data from file into a dictionary.
Parameters: |
|
---|
Write column data to a text file.
Parameters: |
|
---|
See also
Derived classes might provide additional methods via their base classes. Please refer to the list of base classes (if it exists) at the begining of the ColumnData documentation.
Full API documentation of ColumnData in module mvpa.misc.io.base.
Bases: object
Base class for data readers.
Every subclass has to put all information into to variable:
This class provides two methods (and associated properties) to retrieve this information.
Cheap init.
See also
Derived classes might provide additional methods via their base classes. Please refer to the list of base classes (if it exists) at the begining of the DataReader documentation.
Full API documentation of DataReader in module mvpa.misc.io.base.
Bases: mvpa.misc.io.base.ColumnData
Read and write PyMVPA sample attribute definitions from and to text files.
Read PyMVPA sample attributes from disk.
Parameters: |
|
---|
See also
Derived classes might provide additional methods via their base classes. Please refer to the list of base classes (if it exists) at the begining of the SampleAttributes documentation.
Full API documentation of SampleAttributes in module mvpa.misc.io.base.
Bases: mvpa.misc.io.base.ColumnData
Base class for sensor location readers.
Each subclass should provide x, y, z coordinates via the pos_x, pos_y, and pos_z attrbibutes.
Axes should follow the following convention:
x-axis: left -> right y-axis: anterior -> posterior z-axis: superior -> inferior
Pass arguments to ColumnData.
Get the sensor locations as an array.
Return type: | (nchannels x 3) array with coordinates in (x, y, z) |
---|
See also
Derived classes might provide additional methods via their base classes. Please refer to the list of base classes (if it exists) at the begining of the SensorLocations documentation.
Full API documentation of SensorLocations in module mvpa.misc.io.base.
Bases: mvpa.misc.io.base.SensorLocations
Read sensor location definitions from a specific text file format.
File layout is assumed to be 7 columns:
1: sensor name 2: position on y-axis 3: position on x-axis 4: position on z-axis 5-7: same as 2-4, but for some outer surface thingie.
Note that x and y seem to be swapped, ie. y as defined by SensorLocations conventions seems to be first axis and followed by x.
Only inner surface coordinates are reported by locations().
Read sensor locations from file.
Parameters: |
|
---|
See also
Derived classes might provide additional methods via their base classes. Please refer to the list of base classes (if it exists) at the begining of the TuebingenMEGSensorLocations documentation.
Full API documentation of TuebingenMEGSensorLocations in module mvpa.misc.io.base.
Bases: mvpa.misc.io.base.SensorLocations
Read sensor location definitions from a specific text file format.
File layout is assumed to be 5 columns:
- sensor name
- some useless integer
- position on x-axis
- position on y-axis
- position on z-axis
Read sensor locations from file.
Parameters: |
|
---|
See also
Derived classes might provide additional methods via their base classes. Please refer to the list of base classes (if it exists) at the begining of the XAVRSensorLocations documentation.
Full API documentation of XAVRSensorLocations in module mvpa.misc.io.base.
Helper to convert design matrix into a list of labels
Given a design, assign a single label to any given sample
TODO: fix description/naming
Parameters: |
|
---|---|
Output: | list of labels which are taken from column names in ColumnData and baseline_label |
See also
Full API documentation of design2labels() in module mvpa.misc.io.base.
See also
Full API documentation of labels2chunks() in module mvpa.misc.io.base.