Closed drsadaula closed 4 months ago
can you uninstall BatAnalysis with pip uninstall BatAnalysis
and then try to install from pypi with pip install BatAnalysis
? I expect the error will be the same, but I would like to verify that first.
It still shows the same error. To inform you, I tried in the sciserver the same way, it worked fine. I could import batanalysis without any issues.
the other thing that I would like to try is to start an ipython session and try to import BatAnalysis within there. If you do that, does it import without any issues?
The same error popped up!
in ipython, what does os.environ["CALDB"]
print out?
Below is the printout.
Something strange is going on with the bash environment. can you run your heainit script in the terminal and then retry the ipython steps above, in that same terminal?
Again, the same error popped up!
another thing to try is to download an observation and try to run HEASOFT's batsurvey on it. this will help us determine if this is an heasoft environment issue that is occurring elsewhere or something wrong with the code itself.
the issue was related to a different package not being imported and throwing an error.
I followed the installation instructions in GitHub.
git clone https://github.com/parsotat/BatAnalysis.git cd BatAnalysis/ pip install -e .
This worked fine.
When I try to run a notebook, the following error pops up. The issue arises when trying to import bat analysis as BA. It says CALDB has not been installed or initialized. I am using the CALDB for remote access. This is working fine on my computer for NICER and SWIFT XRT. Could anyone help me with this?
I got this in the notebook when I ran the os.environ["CALDB"] command. It may help you figure out the issue.
os.environ["CALDB"]
AttributeError
Cell In [8], line 4 2 import os 3 import sys ----> 4 import batanalysis as ba 5 import matplotlib.pyplot as plt 6 import numpy as np
File ~/xray_analysis/sibasish/swift/bat_obs/BatAnalysis/batanalysis/init.py:21 15 raise EnvironmentError('CALDB does not seem to be initialized/installed. ' 16 'BatAnalysis cannot be imported without this.')