-
-
Notifications
You must be signed in to change notification settings - Fork 227
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
asammdf based signal.append functionality doesn't handle conversion type #1080
Comments
output always like this : conversion:<ChannelConversion (name: , unit: , comment: , formula: , referenced blocks: None, address: 0, fields: ['address:0', 'block_len:80', 'comment:', 'comment_addr:0', 'conversion_type:0', 'flags:0', 'formula:', "id:b'##CC'", 'inv_conv_addr:0', 'links_nr:4', 'max_phy_value:0', 'min_phy_value:0', 'name:', 'name_addr:0', 'precision:1', 'ref_param_nr:0', 'referenced_blocks:None', 'reserved0:0', 'unit:', 'unit_addr:0', 'val_param_nr:0'])> but I expect convesion_type like that : {0:xx,1:yy,2:xxx} under conversion type attribute |
You probably need to setup the correct dict keys like the example shows Line 90 in 1585aa9
|
For my case : input look like 'conversion_type': 'lookup_dict', 'lookup_dict': [[0, 'FALSE'], [1, 'TRUE']]}
|
Like I said, you need to follow the dict key naming. This will not work with any doct that you throw at it |
Do you wanna align like this |
I would also add the |
Basically those approach worked but while extracting mdf4 files converstion automatically applied on values in array (np.array) values of concerned signal.. for example : {'val_0': 0, 'val_1': 1, 'text_0': 'FALSE', 'text_1': 'TRUE', 'default': b'default key'} after applied on mdf4 file ...then try to extract information conversion type automatically applied on 0 to False and 1 to True (in np.array).. how to make conversion type visible in attribute level instead of applied on data ??? |
Call get or select with raw=True |
1 similar comment
Call get or select with raw=True |
Yes, it worked with proper data but converstion type based information missed and giving as attribute info like this : conversion:{"dict":{}m "type":7} instead of {'val_0': 0, 'val_1': 1, 'text_0': 'FALSE', 'text_1': 'TRUE'} or {0:True, 1:False} ... how to fix |
print(ch.conversion) |
before building below mdf file with converstion value : enter conversion:{'val_0': 0, 'val_1': 1, 'val_2': 2, 'val_3': 3, 'val_4': 4, 'val_5': 5, 'val_6': 6, 'val_7': 7, 'val_8': 8, 'text_0': 'EmiCtrl', 'text_1': 'PartialFC', 'text_2': 'EmiOSC', 'text_3': 'EmiHeat', 'text_4': 'EmiGpf', 'text_5': 'Diagnostics (SwiftLamOffs)', 'text_6': 'ProtExh', 'text_7': 'ProtIgn', 'text_8': 'Debug', 'default': b'default key'} after try to view the file via below: 1.mdf = asammdf.MDF('particular.mf4') signal(as below): [<Signal rVcLamTar_D_LamSrc: conclusion : converstion type applied on samples but conversion comes as None so here my query : I don't wanna apply conversion_type on samples but i just wanna see the converstion information in conversion ... how to do this? |
|
asammdf based signal.append functionality doesn't handle conversion type:
Example :not possible to add this conversion as part of signal if conversion attribute of signal : {0:xx,1:yy,2:xxx}
output : it seeting defualt None or conversion_type=0 if pass above dict values
Kindly make fix on this?
The text was updated successfully, but these errors were encountered: