I am trying to use TFITSHDU class to read a fits file using the ROOT kernel of a jupyter notebook running on a centos7 machine. The ROOT has been started with
root --notebook
and then connect with my browser.
When I try to read the fits file with the code
TFITSHDU f0("my_fits_file.fits",0);
the ROOT kernel takes a lot of time (few minute) to read the file. If i check which process is running con I see python2.7 running.
If I do the same in normal interactive root session the file is read immediately.
Is there any setting that have to be tuned speed up the system? Is this related to the version of python?
The reason for the hanging does not have anything to do with TFITSHDU. It has to do with the name of the file.
In the ROOT C++ Jupyter kernel, we define a couple of regular expressions to match identifiers and function calls in the code you type in the cell. Those expressions are applied by Jupyter (in particular, the metakernel package) and, when there is a long string in it, it can take a looong time to pre-process that cell.
So in the end, if you just run your code with a shorter file name (e.g. my_fits_file.fits, instead of nisp_em_test_NOM_20190423_151617_00014_000001.lv1) you should not see it hanging. On our side, we will try to optimize those expressions.