Created
February 27, 2019 09:57
-
-
Save JohannesBuchner/572849d3eb92f0755f2fb2fdeb24aef1 to your computer and use it in GitHub Desktop.
Download GAIA data
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
wget -nc http://cdn.gea.esac.esa.int/Gaia/gdr2/gaia_source/csv/ | |
grep -Eo GaiaSource_.*.csv.gz index.html | while read i; do | |
if [ -e $i ]; then | |
true | |
else | |
wget "http://cdn.gea.esac.esa.int/Gaia/gdr2/gaia_source/csv/$i" -O - | zcat | LC_ALL=C awk -F, '{print $2,$6,$8,sqrt($7**2+$9**2),$48}' | tail -n +2 | gzip > $i.tmp && mv $i.tmp $i | |
fi | |
done | |
{ echo "source_id ra dec poserror phot_g_mean_flux"; | |
ls | grep '.csv.gz'|xargs zcat } | gzip > gaia.gz | |
# build FITS file with stilts | |
java -jar ~/topcat-lite.jar -stilts tcopy ifmt=ascii ofmt=fits-basic in=gaia.gz out=gaia.fits |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment