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

Measurement File Comment: Only Default Comment is Read #438

Closed
a543c23 opened this issue Nov 16, 2020 · 8 comments
Closed

Measurement File Comment: Only Default Comment is Read #438

a543c23 opened this issue Nov 16, 2020 · 8 comments

Comments

@a543c23
Copy link

a543c23 commented Nov 16, 2020

Python version

('python=3.8.0 (tags/v3.8.0:fa919fd, Oct 14 2019, 19:37:50) [MSC v.1916 64 bit '
'(AMD64)]')
'os=Windows-7-6.1.7601-SP1'
'numpy=1.19.4'
'asammdf=5.23.1'

Code

MDF version

3.0 + 4.1

Code snippet

N/A

Traceback

N/A

Description

Task: Convert MDF 3.0 file to MDF 4.1 with compression.

Result:
When opening the original MDF 3.0 file, the measurement comment is read, but only the part "Default Comments" (in ETAS MDA terminology).
Exporting basically works, but in the exported file, all of the comments are missing.
When opening the exported MDF 4.1 file, the measurement comment reads like follows:
<HDComment> <TX></TX> <common_properties> <e name="author"></e> <e name="department"></e> <e name="project"></e> <e name="subject"></e> </common_properties> </HDComment>

@danielhrisca
Copy link
Owner

Please give a concrete example (screenshots of MDFValidator or asammdf GUI) . I don't use ETAS and don't know what specific handling they use

@a543c23
Copy link
Author

a543c23 commented Nov 16, 2020

Thanks for the suggestion of using MDFValidator. I checked into it again. I created a test MDF 3.0 file, converted it to MDF4.1 with asammdf and can conclude the following:

  1. Original MDF 3.0 File Comment Fields read out as follows:
    a) Fields in MDA:
    image
    b) Fields in MDFValidator:
    image
    c) Fields in asammdf:
    image

  2. Converted MDF 4.1 Fields:
    a) Fields in MDA:
    image
    b) Fields in MDFValidator:
    image
    c) Fields in asammdf:
    image

So it seems that the header properties are not translated into mdf 4.1 format.

@danielhrisca
Copy link
Owner

Should work now with the development branch code

@a543c23
Copy link
Author

a543c23 commented Nov 18, 2020

Thank you for quickly implementing the changes! :-) I tested it with the same file.
The result is as follows:

  1. Original MDF 3.0 File Comment Fields read out as follows:
    a) Fields in MDA:
    image
    b) Fields in MDFValidator:
    image
    c) Fields in asammdf:
    image

  2. Converted MDF 4.1 Fields:
    a) Fields in MDA:
    image
    b) Fields in MDFValidator:
    image
    c) Fields in asammdf:
    image

It seems that User Comment and Default Comment are yet missing.

I checked how the user and default comment looks in correct MDF 4.1 file:
image

@danielhrisca
Copy link
Owner

can you show the comment block from the initial mdf file? (hd_txblock @ 0x0221)

@a543c23
Copy link
Author

a543c23 commented Nov 18, 2020

Ah, sorry, I slipped that.
Yes, sure:
image

@danielhrisca
Copy link
Owner

ok, I think the new code covers everything

@a543c23
Copy link
Author

a543c23 commented Nov 18, 2020

Thanks again for the quick fix. Now it works like a charm:

MDF 4.1 file view in:

a) MDA:
image
b) MDFValidator:
image
c) asammdf:
image

@a543c23 a543c23 closed this as completed Nov 18, 2020
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

2 participants