Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JOSS review: installation #22

Closed
3 of 4 tasks
grburgess opened this issue Mar 14, 2021 · 7 comments
Closed
3 of 4 tasks

JOSS review: installation #22

grburgess opened this issue Mar 14, 2021 · 7 comments

Comments

@grburgess
Copy link

grburgess commented Mar 14, 2021

Here are the issues with getting into a state of being able to run the python example_simplest.py

  1. The main required dependency for the fitting, ultranest is not installed automatically either by pip or python setup.py install

  2. The setup currently does not run on MacOS.

All of the following is run in a clean virtual environment on Ubuntu 20.04.2 with python 3.8 (no conda)

After completing the install for CIAO with the following steps:

bash ciao_install
pip install sherpa # (installs numpy)
python setup.py install # inside BXA folder cloned from GitHub

the following steps need to be run to avoid errors:

pip install ultranest

From this point I try to run python example_simplest.py

Result:

WARNING: imaging routines will not be available,
failed to import sherpa.image.ds9_backend due to
'RuntimeErr: DS9Win unusable: Could not find ds9 on your PATH'
WARNING: failed to import sherpa.astro.xspec; XSPEC models will not be available
read RMF file athenapp_ir_b4c_wfi_withfilter_fov40.0arcmin_avg.rsp
Traceback (most recent call last):
  File "example_simplest.py", line 20, in <module>
    set_model(xspowerlaw.mypow)
NameError: name 'xspowerlaw' is not defined

It would be useful to modify the following:

  • add all required dependencies to the install/setup script

  • include examples that work with Sherpa alone as it is the easiest entry point into testing the code.

  • as BXA is a plugin to the XSPEC/Sherpa analysis software, warning to the user upon installation that the environment does not detect the required essential dependencies to run upon install.

  • perhaps an end-to-end example in the documentation (including data) would be helpful.

While it is not BXA should not be responsible for upkeep of XSPEC/Sherpa's installation procedures and capabilities, its focus as a plugin to these software means that it needs to perhaps guide the user thru the installation of its core functionality.

In regards to the software not installing on MacOS, this is again an issue of the core packages, but should be reflected in the caveats / platforms listed in the README and documentation. A few of these may be addressed with #21

@grburgess
Copy link
Author

linking openjournals/joss-reviews#3045

@grburgess
Copy link
Author

The XSPEC install works perfectly. However, there are a number of required packages that not installed with either the ultranest package or BXA. These include:

scipy
astropy
tqdm
h5py

can these be added to the requirements so that the examples work out-of-the-box?

@JohannesBuchner
Copy link
Owner

After completing the install for CIAO with the following steps:

bash ciao_install
pip install sherpa # (installs numpy)
python setup.py install # inside BXA folder cloned from GitHub

You should not do pip install sherpa. ciao comes with sherpa and the xspec models. I suspect that the pip install overwrote something. Please follow the steps on https://cxc.cfa.harvard.edu/ciao/download/ciao_install.html

the following steps need to be run to avoid errors:

pip install ultranest

From this point I try to run python example_simplest.py

Result:

WARNING: imaging routines will not be available,
failed to import sherpa.image.ds9_backend due to
'RuntimeErr: DS9Win unusable: Could not find ds9 on your PATH'
WARNING: failed to import sherpa.astro.xspec; XSPEC models will not be available
read RMF file athenapp_ir_b4c_wfi_withfilter_fov40.0arcmin_avg.rsp
Traceback (most recent call last):
  File "example_simplest.py", line 20, in <module>
    set_model(xspowerlaw.mypow)
NameError: name 'xspowerlaw' is not defined

It would be useful to modify the following:

* [ ]  add all required dependencies to the install/setup script

done, and release 4.0.3 includes them.

* [ ]  include examples that work with Sherpa alone as it is the easiest entry point into testing the code.

done, modified example_simplest.py

* [ ]   as BXA is a plugin to the XSPEC/Sherpa analysis software, warning to the user upon installation that the environment does not detect the required essential dependencies  to run upon install.

added.

* [ ]  perhaps an end-to-end example in the documentation (including data) would be helpful.

solved in #20 now, available at https://github.com/JohannesBuchner/BXA/tree/master/examples/sherpa as README.

@grburgess
Copy link
Author

setup.py is still missing SciPy. Other than that, XSPEC examples run out-of-box on linux

@JohannesBuchner
Copy link
Owner

JohannesBuchner commented Mar 29, 2021

BXA only requires scipy for some plotting niceties for xspec. However, sometimes scipy is difficult to install on servers, so I do not want to make it a formal requirement in setup.py.

I updated the doc to recommend the installation of scipy (here), and mention in the doc which functionality requires scipy (specifically here).

Let me know if there are any issues remaining here.

@JohannesBuchner
Copy link
Owner

You mentioned here the MacOS install attempt:

After completing the install for CIAO with the following steps:

bash ciao_install
pip install sherpa # (installs numpy)
python setup.py install # inside BXA folder cloned from GitHub

Please try again in a clean environment with:

bash ciao_install
source /path/to/soft/ciao-4.13/bin/ciao.bash
python3 setup.py install # inside BXA folder cloned from GitHub

(This is following https://cxc.cfa.harvard.edu/ciao/download/ciao_install.html)

@JohannesBuchner
Copy link
Owner

closing due to inactivity. Please reopen if this is still an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants