1
0
Fork 0

sattools processing scripts

giza-pure
Jeff Moe 2022-08-11 14:40:23 -06:00
parent d758689c1a
commit e1444a0531
4 changed files with 67 additions and 0 deletions

25
scripts/README.md 100644
View File

@ -0,0 +1,25 @@
# Scripts
Scripts from `cbassa` in #satnogs-optical matrix.
# `get.sh`
DSLR capture based on sattools: https://gist.github.com/cbassa/c5a7c2cb1545c45659f69fc6ad047e40
https://gist.githubusercontent.com/cbassa/c5a7c2cb1545c45659f69fc6ad047e40/raw/6c5acdf5f0ada3d2ad042a809b2e1c33bb43976a/get.sh
# `find.sh`
Star finding: https://gist.github.com/cbassa/cdf9b3cd84284343fb73d798d5aefe0a
https://gist.githubusercontent.com/cbassa/cdf9b3cd84284343fb73d798d5aefe0a/raw/f6325cf929d7146b449c16b2d902b7d9b1f2ea2f/find.sh
# `id.sh`
Astrometric calibration and prediction: https://gist.github.com/cbassa/16a8cbc20b87eac32ca1b44e76a505d3
https://gist.githubusercontent.com/cbassa/16a8cbc20b87eac32ca1b44e76a505d3/raw/c338d72eb6f48735b0b5b8a85a96707652c3b9da/id.sh
The DSLR capture assumes you've set the camera exposure time to 10 seconds.
# Notes
The call to `jpg2fits -d 0.264 -T 10.06` has arguments with a delay between the gphoto2 call and the shutter actually opening, as well as the actual exposure time.
You can measure this by recording audio of the shutter opening and closing, super posed on computer generated beeps at 1 second boundaries

16
scripts/find.sh 100644
View File

@ -0,0 +1,16 @@
#!/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

19
scripts/get.sh 100644
View File

@ -0,0 +1,19 @@
#!/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

7
scripts/id.sh 100644
View File

@ -0,0 +1,7 @@
wcsfit
for file in 2*.fits; do
if [ ! -e $file.cal ]; then
addwcs -f $file -r test.fits -m 9 -R 20
satid $file $file.png/png 2>/dev/null
fi
done