ColRadPy
ColRadPy copied to clipboard
read_adf11.py filepathing not robust
While attempting to run the ss_ion_ball_adf11.py example, I kept getting errors saying the computer was attempting to establish a rank 4 tensor that would take 3-8 GB to allocate. Parsing through read_adf11.py, I noticed that there is a check for
if( 'r' in re.split('_',re.split('/',fil)[-1])[0]):
Splitting by '/' is fine for Linux but doesn't work for windows where paths are split by '\'. I edited read_adf11.py to use pathlib and made a couple of performance/readability improvements related to checking ACD/SCD/XCD/etc status. read_adf11.zip
Do you want to make a pull request? Otherwise I'll do it an merge it.
Done!