Fix ADF15 parser and refine regex patterns#497
Fix ADF15 parser and refine regex patterns#497munechika-koyo wants to merge 4 commits intocherab:developmentfrom
Conversation
Update regex patterns to handle other raw files (e.g. pec40#w_ic#w0.dat)
|
Looks OK to me. I don't think lifting the declaration of a string literal out of the loop will have any impact on performance, as the assignment operation is trivial. If you really wanted to optimize, you could instead create compiled regex objects using The other thing it would be good to have in place are some unit/regression tests for this. We can't use data from real ADF15 files in unit tests for licensing reasons, but I don't see a problem with creating some mock files using the same format but using dummy numerical data to use in unit tests: try dummy variants of Hydrogen, Carbon and Tungsten files. |
Summary
Because ADF15 raw format for tungsten, like
pec40#w_ic#w12.dat, is different from whatcherabhas handled like:I tried to modify the ADF15 parser to match these lines.
Key changes include:
Fixed the ADF15 parser to handle additional raw file (tungsten) formats.
Moved regex pattern definitions outside of loops for efficiency.