Feature/tuples as column names
Compare changes
GitLab service scheduled maintenance on Friday, March 21st 2025 as of 08h00 Geneva time for an estimated period of 1 hour. Further information under OTG0154918.
This MR contains two commits, we have to decide which one we want to follow:
('FIELD NAME', slot, link, position)
('FIELD NAME', 'BLOCK ID', 'SUB BLOCK', slot, link, position)
Since the performance drop is not significant (and anyways it is an improvement over the f-strings), I'd go for the second option as this would greatly simplify the analysis. The end goal for analysis would be to convert the pandas.DataFrame
returned by unpacker to pandas.MultiIndex
and then it can easily be sliced or cross-sectioned to select required subset of data (e.g. select all VFATs, or all VFATs from AMC N GEB M etc.)
Note: the documentation will require an update. I do not include it here for two reasons:
Closes #11 (closed)
Tested by unpacking a test dataset. Performance result on MBP 13" Fall 2014:
python -m timeit -n 1 "from gdh import unpacker; unpacker.run('./doc/notebooks/test_data/test_sdram.dat','sdram')"
1 loop, best of 5: 3.39 sec per loop
For comparison, previous result was 3.9s