Skip to content

Instantly share code, notes, and snippets.

@dmoulton
Created September 25, 2020 16:54
Show Gist options
  • Save dmoulton/2ebf66db82c6d2e120b9cd46e0f2d524 to your computer and use it in GitHub Desktop.
Save dmoulton/2ebf66db82c6d2e120b9cd46e0f2d524 to your computer and use it in GitHub Desktop.
# Small helper script for weeding out bad images before stacking astroimages
# Requires DS9 fits viewer https://sites.google.com/cfa.harvard.edu/saoimageds9
# Meant to be run in the directory with your fits files
mkdir -p bad
for f in *.fit[s]
do
echo "Opening $f"
ds9 $f
read -p "Press 'b' for a bad image or enter to proceed: " k
if [ $k = b ] ; then
echo "Moving $f to bad directory"
mv $f ./bad/
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment