I’m trying to use python package lasio. It is geological library and its main purpose is to read textual files of format
After installing it (
pip install lasio) I can use it as follows:
import lasio las = lasio.read("path/to/las/file") # I provide an example file below
The problem is that if I read this
.las file (via command
las = lasio.read("path/to/las/file")) in Slicer’s python shell then it works noticeably slower (about 5 seconds) than when I open
PythonSlicer.exe in Windows 10 cmd and type the same command (it takes less than a second).
Also when I do that in Slicer’s python shell then I get warning:
Opening D:\D\A_Kerbel.las as ascii and treating errors with "replace"
wich is produced by this source code I think.
I don’t get this warning if I work inside cmd in
What may be the reason of perfomance penalty? If somebody has idea please share it. Probably it is somehow connected with character encoding detection but I tried to turn it off and still Slicer’s python shell works much slower. Or maybe there are many modules loaded to Slicer? Don’t know…
To test it you need relatively big .las file
P.S. I work with this library as I need it in my SlicerCAT and I can see that this problem doesn’t depend whether I use original Slicer or SlicerCAT