Documentation ¶
Overview ¶
Package libmbd contains data structures and helper routines for extracting reaction data from binary mcell reaction data output files
Index ¶
- Constants
- type API1Data
- type API2Data
- type BlockData
- type BlockEntry
- type CountData
- type MCellData
- func (d *MCellData) BlockDataByID(id uint64) (*CountData, error)
- func (d *MCellData) BlockDataByName(name string) (*CountData, error)
- func (d *MCellData) BlockDataByRegex(selection string) (map[string]*CountData, error)
- func (d *MCellData) BlockLen() uint64
- func (d *MCellData) DataNames() []string
- func (d *MCellData) IDtoBlockName(id uint64) (string, error)
- func (d *MCellData) NumDataBlocks() uint64
- func (d *MCellData) OutputStepLen() float64
- func (d *MCellData) OutputTimes() []float64
- func (d *MCellData) OutputType() uint16
Constants ¶
const ( Step uint16 = 1 << iota TimeListType IterationListType )
enumeration describing the output type of the included data
const ( API1 = "MCELL_BINARY_API_1" API2 = "MCELL_BINARY_API_2" )
list of currently know API versions
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API1Data ¶
type API1Data struct { Offset uint64 // offset into data buffer BlockEntries []BlockEntry }
API1Data are data items specific to API version 1 of the mcell binary output format.
type API2Data ¶
API2Data are data items specific to API version 1 of the mcell binary output format.
type BlockData ¶
BlockData is used for API version 2. It stores metadata for a given data block such as the data name, number of data columns, the type of data stored (int/double), and the internal offset into the buffer at which the data can be found.
type BlockEntry ¶
BlockEntry is used for API version 1. It stores the beginning and end of each data block within the data buffer.
type CountData ¶
CountData is a container holding the data corresponding to a reaction data output block consisting of a number of columns
type MCellData ¶
type MCellData struct { Buffer util.ReadBuf OutputListType uint16 BlockSize uint64 StepSize float64 TimeList []float64 NumBlocks uint64 BlockNames []string BlockNameMap map[string]uint64 API string API1Data API2Data }
MCellData tracks the data contained in the binary mcell file as well as relevant metadata to retrieve specific data items. NOTE: Depending on the API version of the binary output data not all fields are defined
func (*MCellData) BlockDataByID ¶
BlockDataByID returns the data stored in the data block of the given ID as a CountData struct NOTE: This is the only method of MCellData which is API sensitive
func (*MCellData) BlockDataByName ¶
BlockDataByName returns the data stored in the data block of the given name as a CountData struct
func (*MCellData) BlockDataByRegex ¶
BlockDataByRegex returns a map with all datasets whose name matched the supplied regex. The map keys are the dataset names, the values are the corresponding count data items.
func (*MCellData) IDtoBlockName ¶
IDtoBlockName returns the blockname corresponding to the given id
func (*MCellData) NumDataBlocks ¶
NumDataBlocks returns the number of available datablocks
func (*MCellData) OutputStepLen ¶
OutputStepLen returns the output step length. NOTE: The returns value is only meaningful is OutputListType == Step, otherwise this function returns 0
func (*MCellData) OutputTimes ¶
OutputTimes returns a slice with the output times corresponding to the column data (either computed from STEP or via ITERATION_LIST/TIME_LIST) NOTE: In the case of STEP we cache the timelist after the first request
func (*MCellData) OutputType ¶
OutputType returns the output type (STEP, ITERATION_LIST/TIME_LIST)