nasa-fornax / fornax-demo-notebooks

Demo notebooks for the Fornax project
https://nasa-fornax.github.io/fornax-demo-notebooks/
BSD 3-Clause "New" or "Revised" License
9 stars 19 forks source link

nway.py call is not general #313

Closed zoghbi-a closed 2 months ago

zoghbi-a commented 3 months ago

https://github.com/nasa-fornax/fornax-demo-notebooks/blob/fa9688e6631d9a5f59e13f6f3e1587dde8d83057/forced_photometry/multiband_photometry.md?plain=1#L793

The above line fails when nway is installed in the system. In that case !nway.py ... should work. A general solution would be to change the code to be: !nway.py, but add /home/jovyan/.local/bin/nway.py to $PATH, so if nway is installed in the user space it also works. i.e.:

Somewhere at the top:

os.environ['PATH'] = f"/home/jovyan/.local:{os.environ['PATH']}"

Then change the above line to:

!nway.py 'data/Chandra/COSMOS_chandra.fits' :ERROR_RADIUS 'data/multiband_phot.fits' 0.1 --out=data/Chandra/chandra_multiband.fits --radius 15 --prior-completeness 0.9