External non-python software dependencies should be removed
DaveStrickland opened this issue · 2 comments
Currently I'm using external, non-python, tools for image resampling/co-addition and color composite generation, and also adaptive smoothing.
- Astromatic swarp (resampling/coaddition) and stiff (FITS to rgb image composition), installed via macports (or dnf)
- Jeremy Sanders' contbin (adaptive S/N-dependent image smoothing), installed via git and compiled locally, and requiring some Makefile modifications to get working.
These are used currently in my driver bash scripts (see Issue #2), not called directly from python. I also can't do exposure maps properly or very easily with swarp without requiring more tools to do FITS image math (e.g. Heasoft farith, fcarith).
These external dependencies make it harder for other potential users to install and use the software, and introduce potential points of software instability. A pure python solution would be more flexible and robust going forward, even if it sacrificed some of the power that these 3rd party non-python tools provide. It would also make it easier to write fully python end-to-end processing scripts that would not need to call subprocess.
Added motivation for moving away from non-pythonic dependencies.
Fedora 39 does not have RPMs for stiff
, and the astromatic repo itself only supplies RPMs to Fedora 37. Attempting to clone and build stiff
from github eventually fails (after installing dependencies and running autoreconf -f -i
) at the build stage.
Error message is multiple definitions of large numbers of functions. Googling shows debian
patched the stiff
C sources (large number of added extern ...
). I'm not sure I want to have to do the same.
After looking at the mageia
source rpm for stiff
I see that they add -fcommon
to the CFLAGS
. Which allowed me to build stiff from the astromatic github source code:
export GCC
autoreconf -vfi
autoupdate
./configure 'CFLAGS=-O2 -g -fcommon'
make
sudo make install