Reader for NSDF format
Bases: object
Reader for NSDF files.
This class encapsulates an NSDF file and provides utility functions to read the data in an organized manner.
Get event variable recorded from population.
In NSDF a variable is recorded from a population of sources and data is organized as population/variable. This function retrieve this dataset and creates EventData object containing (source, data) pairs.
Parameters: |
|
---|
Returns: nsdf.EventData
Note: Data is converted to float64 for VLEN dialect.
Returns the names of event variables recorded for population.
Parameters: | population (str) – name of the population. |
---|---|
Returns: | list of str: names of the groups storing event variables. |
Get nonuniform data variable under population.
In NSDF a variable is recorded from a population of sources and data is organized as population/variable. This function retrieve this dataset and creates NonuniformData object containing (source, data) pairs. In case all the sources share the same sampling times, it is the NonuniformRegularData, a subclass of NonuniformData and contains the sampling times as a separate array. Otherwise, data is tuple of variable values and sampling times.
Parameters: |
|
---|---|
Returns: | nsdf.NonuniformRegularData if dialect of the file is NUREGULAR. nsdf.NonuniformData otherwise. |
Note: Data is converted to float64 for VLEN dialect.
Returns the names of nonuniform variables recorded for population.
Parameters: | population (str) – name of the population. |
---|---|
Returns: | list of str: names of the groups storing nonuniform variables. |
Returns a UniformData object contents for recorded variable from population.
Parameters: |
|
---|---|
Returns: | dataobject – data container filled with
|
Return type: | nsdf.UniformData |
Returns the data sources and data contents for recorded variable varname from population.
Parameters: |
|
---|---|
Returns: | (sources, data): sources is an dataset containing the source identifiers and data is a 2D dataset whose i-th row is the data from the i-th entry in sources. |
Returns sampling interval and time-unit for the uniform dataset varname recorded from population.
Parameters: |
|
---|---|
Returns: | (dt, unit) : dt is the sampling interval for this dataset and unit is a string representing the unit of time. |
Get the data for field variable recorded from source with unique id srcid.
Parameters: |
|
---|---|
Returns: | (data, unit, times, timeunit) |
Returns an array of sampling times and time-unit for the uniform dataset varname recorded from population.
Parameters: |
|
---|---|
Returns: | (times, unit) : times is an array of doubles containing the sampling time for each column of the dataset and unit is a string representing the unit of time. |
Returns the names of uniform variables recorded for population.
Parameters: | population (str) – name of the population. |
---|---|
Returns: | list of str: names of the datasets storing uniform variables. |
Names of the populations for which variables have been recorded with nonuniform sampling.