Skip to content

Instantly share code, notes, and snippets.

@cbassa
Created August 11, 2022 20:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cbassa/cdf9b3cd84284343fb73d798d5aefe0a to your computer and use it in GitHub Desktop.
Save cbassa/cdf9b3cd84284343fb73d798d5aefe0a to your computer and use it in GitHub Desktop.
Star finding script
#!/bin/bash
# Copy first file
if [ ! -e "test.fits" ]; then
ls -1 2*.fits | head -n1 | awk '{printf("cp %s test.fits\n",$1)}' | sh
fi
# Loop over files
for file in *.fits; do
if [ ! -e $file.cat ]; then
# Run sextractor
sextractor $file -c $ST_DATADIR/sextractor/nondefault.sex 2>/dev/null
mv test.cat $file.cat
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment