-
Notifications
You must be signed in to change notification settings - Fork 17
Description
Hello,
quite new to the community and i hope that i state this issue in a helpful manner.
I am using yadg to extract data from mpr files which works for a lot of them,
but now i have gotten a format that is not covered yet,
it is CPW used to establish Ragone plots,
it would be great to implement this mode to,
i am happy to provide a solution if i can help but i think i would need slightly better understanding of the data structure
from hacking around i have figured out a way to read it by changing 3 lines in the yadg repo,
this might be helpful to see what is a good minimal solution for the professionals,
- would be: in tequniques.py line nr. 1388 (in the technique_params_dtypes dictionary):
just add one line:
0x88: ("BCD", _bcd_params_dtypes),\b
0x24: ("CPW", _ca_params_dtypes), #ca works for cpw!<-----------added Ox24 is otherwise unrecognised
}
- would be in mpr.py line 275:
from:
pardict[k] = param_from_key(k, v, to_str=True)
to:
try:
pardict[k] = param_from_key(k, v, to_str=True)
except:
pardict[k]=str(k)
which is a dirty hack but still delivers reasanobale results, problaby people with better understanding of the data can produce a cleaner solution.
- would be in mpr.py line 599:
from
Eranges = [a - b for a, b in zip(E_range_max, E_range_min)]
to:
Eranges = [a - (b if not np.isnan(float(b)) else 0.0) for a, b in zip(E_range_max, E_range_min)]
which just replaces a string 'nan' with a default 0, which is probably needed due to my dirty hacking in step 2)
Please let me know what you think about this solution,
is it easy to imporve in terms of cleanliness?
do i make a mistake that i just dont get?
the data i get looks quite promising (i mainly look at voltage and current curves over time at teh moment,
best regards
Franz