vrruiz / xisfits

Convert images from XISF to FITS
MIT License
8 stars 0 forks source link

Building and using xisfits corrections to instructions #22

Open jcinaz opened 2 years ago

jcinaz commented 2 years ago

The instructions for building and using xisfits given at https://github.com/vrruiz/xisfits is completely wrong. The correct build instruction is simply: cargo build The correct run instruction is: cargo run --input And it can only be run while IN the xisfits-master directory. I have created a rather crude bash script 'xisfits' that allows running it from anywhere. Notice that I have put 'xisfits-master' in my bin directory. if you run cargo from the xisfits-master directory, then 'cargo run --help' or 'cargo help run' will provide more information.

! bash

USAGE="USAGE: xisfits file [...] Where file must have the extension .xisf The output file will be put in the subdirectory 'fits' and have the extension .fits"

if [ $# -eq 0 ]; then echo "$USAGE" 1>&2 exit 1 fi

srcdir=pwd fitsdir=$srcdir/fits

cd ~/bin/xisfits-master while [ $# -ne 0 ]; do

file=`echo $1 | sed 's/\.xisf//'`

if [ ! -e $srcdir/$file.xisf ]; then
    echo "$srcdir/$file.xisf does not exist" 1>&2
    exit 1
fi

if [ ! -d $fitsdir ]; then
    mkdir $fitsdir
fi

cargo run $fitsdir/$file.fits --input $srcdir/$file.xisf
shift

done

mrhaoxx commented 3 months ago

note that the building is also broken due to a compatibility problem of num-bigint (lib) with today's rust I fixed it by simply do cargo update