Skip to content

Instantly share code, notes, and snippets.

@cbassa
Created August 11, 2022 20:16
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/c5a7c2cb1545c45659f69fc6ad047e40 to your computer and use it in GitHub Desktop.
Save cbassa/c5a7c2cb1545c45659f69fc6ad047e40 to your computer and use it in GitHub Desktop.
gphoto2 DSLR image capture and FITS conversion
#!/bin/bash
# Wait for nearest full second
waitfor
# Log date
timestamp=`date -u +%FT%T`
echo $timestamp >>log.txt
# Capture
gphoto2 --capture-image-and-download --filename $timestamp.jpg >>log.txt
echo "Capture done"
# Create fits
echo "Creating fits file"
jpg2fits -i $timestamp.jpg -o $timestamp.fits -t $timestamp -d 0.264 -c 4171 -T 10.06 &
# Sleep
sleep 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment