Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError on resample: MF4 opened using the channels option #712

Closed
novack96 opened this issue May 31, 2022 · 4 comments
Closed

TypeError on resample: MF4 opened using the channels option #712

novack96 opened this issue May 31, 2022 · 4 comments

Comments

@novack96
Copy link

Python version

Please run the following snippet and write the output here

python=3.8.0 (default, Nov  6 2019, 16:00:02) [MSC v.1916 64 bit (AMD64)]
os=Windows-10-10.0.19041-SP0
numpy=1.22.2
asammdf=7.0.4

Code

MDF version

4.10

Code snippet

import asammdf as mdf
channelFilterList=["A1","A2", "iconInfo"]
etalonSignalName = "iconInfo"
filepath="C:\\meas\\test.mf4"
meas = mdf.MDF(filepath, memory="minimum", channels=channelFilterList)
meas.configure(integer_interpolation=2)
resampled = meas.resample(etalonSignalName)

Traceback

File "C:\git\kpitool\Preprocess\Preprocess.py", line 149, in resampleSignalsInMDF
resampled = meas.resample(etalonSignalName)
File "C:\Users\NOA1BP.conda\envs\kpitool\lib\site-packages\asammdf\mdf.py", line 2835, in resample
MDF._transfer_channel_group_data(mdf.groups[dg_cntr].channel_group, cg)
2022-05-31 15:33:20,983 [CRITICAL] TypeError: list indices must be integers or slices, not NoneType

Description

I have to open and work with large measurement files (~10GB, and with over 1,000,000 signals) so I need to filter and resample the measurement files before the actual data processing, and I ran into this issue.

I've tried resampling by removing the channels and memory options from the opening, and that's working just fine, but it takes way too long obviously because there are over a million signals. So I've applied a filter to it, (see below) so at least it is running without error.

meas = mdf.MDF(filepath).filter(["A1","A2", "iconInfo"])

But I think the resampling should be working for the channel filtered MDF object as well.

I cannot send these measurement files due to confidelity aggreements.

Thank you for your time and consideration.

@novack96
Copy link
Author

Quick update:

I updated to the latest version v7.0.7, and retried but got the same error.

@danielhrisca
Copy link
Owner

The memory argument has been dropped since 5.0.0

Regarding the error I will have a look later

@david32 david32 mentioned this issue May 31, 2022
@david32
Copy link
Contributor

david32 commented May 31, 2022

It's just trying to resample channels that weren't loaded, see fix in the PR.

danielhrisca added a commit that referenced this issue Jun 2, 2022
@novack96
Copy link
Author

novack96 commented Jun 2, 2022

I've tried the development branch and now it's working flawlessly! 👏 💯 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants