Closed MontyTHall closed 5 years ago
It's kinda hard following the code if it's not formatted properly using the Insert code
feature. Also, where do you get masterName
from? Are you using, for example, mdf.getChannelMaster(cav_id)
?
Looks like the following change works:
for i, t in enumerate(mdf.getChannelData(mdf.getChannelMaster(name_cav_id))):
As far as i can tell, that's the correct way to get the time vector associated with a certain data channel.
Is there a forum of some type for this channel for basic q&a?
Not as far as i know. Would be nice to have a forum. Would be even nicer if GitHub had a conversation page for each repo.
Sounds like I need to purchase the spec if I need to have questions answered. Because I thought there was only 1 timer. I had no idea that I needed to get a "master" for my channel.
No need to purchase any spec. You can get it for free from ASAM. Also, if you use MDF Validator from Vector you can understand some things about the structure of the file. You can also ask questions here, i think.
Hi, Thanks Cristi for supporting, I was bit out of sight for some time. There is a documentation going along with the package but I must admit this auto generated pdf is bit difficult to get in. Otherwise, if you look at the readme, major examples are there. I would advise you to use the attribute .masterChannelList as much as possible. It will help you understand your file data structure, especially the rasters, just print it for instance in an interactive session like ipython. For each dataGroup you have a time channel, however, the channels could be absent or ommitted --> that is why you could have more time channels than actual data channels. Otherwise, like mentionned Cristi, you could open your file with MDFValidator. If you still have questions, please ask
I guess questions were answered, long time
Pyhton version
Please write here the output of printing
sys.version
'2.7.15 (v2.7.15:ca079a3ea3, Apr 30 2018, 16:30:26) [MSC v.1500 64 bit (AMD64)]'Platform information
Please write here the output of printing
platform.platform()
'Windows-7-6.1.7601-SP1'Numpy version
Please write here the output of printing
numpy.__version__
'1.14.3'mdfreader version
Please write here the output of printing
mdfreader.__version__
'2.7.5' `Description
Please describe the issue here and eventually script used to use mdfreader
cav_id has 1095 rows master has 1128 rows. Should they be the same?
The mf4 file was generated with dSPACE control desk. "for i, t in enumerate(mdf.getChannelData(masterName)): " should iterate over the time stamps right? Why do I have 1128 time stamps, yet my signal "cav_id", "cav_x" and "cav_y" all have 1095 rows?
Thanks,
M
Also mentionning version of mdf file will be helpfull (using mdfvalidator or mdfreader if functionnal for reading)
print of issue related variables at the errors location and eventually mdfvalidator screenshots can help troubleshooting complicated issues