Skip to content

Not able to extract data from different devices with same channel name #192

@motthomasn

Description

@motthomasn

Python version

Please write here the output of printing sys.version
3.7.4 (default, Aug 9 2019, 18:34:13) [MSC v.1915 64 bit (AMD64)]

Platform information

Please write here the output of printing platform.platform()
Windows-10-10.0.19041-SP0

Numpy version

Please write here the output of printing numpy.__version__
1.16.5

mdfreader version

Please write here the output of printing mdfreader.__version__
4.1

Description

This is probably more of a feature request than an issue.

Firstly, thank you very much for creating this package. It has been very useful for working with mdf files and accessing the data in different ways.
Recently I began working on a project where I record data from 2off identical modules and the channel names from each module are also the same. INCA & MDA differentiate channels with the same name using the source path name but I have not been able to do this with mdfreader.

If I have a channel name "nEngine" which exists in both modules, source path names "source:1" & "source:2", and I read the mdf file using:
data = mdfreader.Mdf( file, ["nEngine"], convert_after_read=False)
The resulting object has a size of only 2, the time channel and one of the "nEngine" data channels. The second "nEngine" data channel is not returned.

Ideally I would like both channels to be returned with the source path name added to the channel name. This is the way that the channels are displayed in INCA. i.e. "nEngine\source:1" & "nEngine\source:2".
In my files, the source path name is contained within the channel dict key "id" at index [2][2]. However, I cannot say for certain that key always exists in all mdf files.

Ultimately, I generally convert the data to Pandas dataframe using return_pandas_dataframe() and in this case, having channel names that correspond to the INCA display names would be ideal.

Do you think adding this feature may be possible without affecting the existing functionality too much? I would like to have a look through the source code myself also to see how it might be done but I am relatively new to Python so I may not be that productive.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions