-
-
Notifications
You must be signed in to change notification settings - Fork 217
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
Reading some columns in raw #1026
Comments
I've made some changes in the development branch. You can provide the
from asammdf import MDF
m = MDF(r'c:\ASAP2_Demo_V171.mf4')
print(m.to_dataframe(["ASAM.M.SCALAR.UBYTE.FORM_X_PLUS_4", "ASAM.M.SCALAR.UBYTE.TAB_INTP_DEFAULT_VALUE"]))
print(m.to_dataframe(["ASAM.M.SCALAR.UBYTE.FORM_X_PLUS_4", "ASAM.M.SCALAR.UBYTE.TAB_INTP_DEFAULT_VALUE"], raw=False))
print(m.to_dataframe(["ASAM.M.SCALAR.UBYTE.FORM_X_PLUS_4", "ASAM.M.SCALAR.UBYTE.TAB_INTP_DEFAULT_VALUE"], raw=True))
print('------------')
print(m.to_dataframe(["ASAM.M.SCALAR.UBYTE.FORM_X_PLUS_4", "ASAM.M.SCALAR.UBYTE.TAB_INTP_DEFAULT_VALUE"], raw={"__default__": True}))
print(m.to_dataframe(["ASAM.M.SCALAR.UBYTE.FORM_X_PLUS_4", "ASAM.M.SCALAR.UBYTE.TAB_INTP_DEFAULT_VALUE"], raw={"__default__": False}))
print('------------')
print(m.to_dataframe(["ASAM.M.SCALAR.UBYTE.FORM_X_PLUS_4", "ASAM.M.SCALAR.UBYTE.TAB_INTP_DEFAULT_VALUE"], raw={"__default__": True, "ASAM.M.SCALAR.UBYTE.FORM_X_PLUS_4": False}))
print(m.to_dataframe(["ASAM.M.SCALAR.UBYTE.FORM_X_PLUS_4", "ASAM.M.SCALAR.UBYTE.TAB_INTP_DEFAULT_VALUE"], raw={"__default__": False, "ASAM.M.SCALAR.UBYTE.FORM_X_PLUS_4": True}))
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I need to read specific signals from MDF file, but some signals should be read as raw. I know in advance which signals should be read as raw. It seems that
raw
parameter into_dataframe
accepts single value and not value for each of specified signal. Is there some way to achieve that some signals are read raw while others not?My approach is to create new
MDF
with usingappend
in a loop for wanted signals which are retrieved withget
with specifiedraw
parameter. After retrieving I putsignal.raw = False
and append. At the end I useto_data.frame
and this approach seems to work, but its 'hacky' way of doing it. Is there maybe more straightforward and clear way?The text was updated successfully, but these errors were encountered: