Created
August 11, 2022 20:17
-
-
Save cbassa/cdf9b3cd84284343fb73d798d5aefe0a to your computer and use it in GitHub Desktop.
Star finding script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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