ColRadPy icon indicating copy to clipboard operation
ColRadPy copied to clipboard

read_adf11.py filepathing not robust

Open d-v-t opened this issue 1 year ago • 2 comments

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

d-v-t avatar Apr 10 '24 16:04 d-v-t

Do you want to make a pull request? Otherwise I'll do it an merge it.

johnson-c avatar Apr 11 '24 21:04 johnson-c

Done!

d-v-t avatar Apr 11 '24 21:04 d-v-t