Plate-solve quickly using locally installed astrometry.net code
# Get a sample calibrated, but plate-unsolved image
wget http://dmaitra.webspace.wheatoncollege.edu/calibrated_no_wcs.fits
# Some stuff like parity may not be known beforehand
solve-field calibrated_no_wcs.fits \
--ra 16:35:15 --dec 38:08:04 --radius 1.5 \
--scale-units arcsecperpix --scale-low 0.9 --scale-high 1.1 \
--new-fits "%s.wcs.fits" \
--fits-image \
--overwrite \
--no-verify \
--parity neg \
--no-plots \
--rdls none \
--index-xyls none \
--solved none \
--match none \
--temp-axy \
--corr none
Concatenate PDFs:
pdftk 1.pdf 2.pdf 3.pdf cat output merged.pdf
(For more options see: http://www.ubuntuhowtos.com/howtos/merge_pdf_files (accessed 2014 June 11))
Copy contents of a folder recursively, keeping symlinks, to another machine
tar -c mydir/ | ssh -C username@machine "tar -C /path/to/dest/ -x"
(based on http://directed-procrastination.blogspot.com/2010/10/scp-and-symlinks.html accessed 2015 Feb 23)
Use wget to recursively get contents of a webpage
wget -e robots=off -rH -l <levels> -np www.blah.edu/path/to/some/directory
(See e.g. http://stackoverflow.com/questions/15434173/wget-downloads-only-one-index-html-file-instead-of-other-some-500-html-files (accessed 2014 June 19))
Use wget to download only certain files from a password protected site, e.g. to download all filenames matching 150308 from ftp://myserver.nonexistent/pub/myfiles/
wget -rH -nd -A "*150308*" --user=<username> --password=<topsecret> ftp://myserver.nonexistent/pub/myfiles/
Based on http://www.gnu.org/software/wget/manual/html_node/Recursive-Retrieval-Options.html and http://askubuntu.com/questions/29079/how-do-i-provide-a-username-and-password-to-wget (accessed 2015 Mar 10)
Bash read multi-column ASCII file line by line with different columns as different variables
Contents of a sample file called test.txt
a11 a12 a13 a14
a21 a22 a23 a24
a31 a32 a33 a34
The following script will print the second and fourth columns of test.txt
while read -r c1 c2 c3 c4; do
echo $c2 $c4
done < test.txt
(From http://stackoverflow.com/questions/15442220/pipe-file-line-by-line-into-multiple-read-variables/ accessed on 2014 Jul 07).
DS9 center on certain RA, Dec in a plate-solved fits image and save as a png image
ds9 <ip.fits> -zscale -align yes -geometry 640x480 -view colorbar no -view panner no \
-view info no -view magnifier no -view buttons no -zoom 0.5 \
-pan to 20:24:03.83 +33:52:02.2 wcs fk5 \
-saveimage png op.png
Connect to my old machine with old ssh
ssh -XY -c aes128-cbc username@machine
Flash a message on another machine's local display
ssh user@host 'DISPLAY=:0 notify-send "TEST MESSAGE."'
Send email using mutt, including an attachment
echo "Email, message body." | mutt -e "my_hdr From:My Name <myname@wherever.com>" -s "My Subject" recipient1@example.com,recipient2@somewhere.org -a /path/to/attachment.pdf
Slideshow using feh (based on this link)
feh -qrzZYFD 5 /home/username/Pictures