-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathastro_dss_list.sh
87 lines (73 loc) · 2.14 KB
/
astro_dss_list.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#!/bin/bash
# DSS TOOLS
# astro_dss_lst.sh
#
# The purpose of this script is to create DSS file lists.
#
# Initially, the first file list to be created is a list of FIT files from all channels. By creating a single
# file containing images from all channels, we can register, and consequently score the quality of all files
# in one operation.
echo "DSS file list"
echo "CHECKED TYPE FILE"
for img in $(find $1 -name $2)
do
echo "1 light $img"
done
if ! [ "$3" = "" ]
then
echo "0 reflight $3"
fi
REF_IMAGE=$3
BIN=$5
EXPOSURE_TIME=$6
if [ "$4" = "cal" ]
then
if [ "$BIN" = "" ]
then
echo "When using calibration, you must specify Bin1, Bin2, etc... "
exit 1
fi
if [ "$EXPOSURE_TIME" = "" ]
then
echo "When using calibration, you must specify exposure time, e.g. 30.0s, 180.0s etc."
exit 1
fi
# Bias frames are very fast, with no light on the sensor
BIAS_FOLDER="$BIAS_PATH/$BIN"
if [ -d "$BIAS_FOLDER" ]
then
for img in $(find "$BIAS_FOLDER" -name "*.fit")
do
echo "1 bias $img"
done
fi
# Dark flats have the same exposure time as the flats, but with no light on the sensor
DARK_FLATS_FOLDER="$DARK_FLATS_PATH/$BIN"
if [ -d "$DARK_FLATS_FOLDER" ]
then
for img in $(find "$DARK_FLATS_FOLDER" -name "*$BIN*.fit")
do
echo "1 darkflat $img"
done
fi
# Flats have a fast exposure time and a flat image, to calibrate the optics all the way from the camera, through the aperture
FLATS_FOLDER="$FLATS_PATH/$BIN"
if [ -d "$FLATS_FOLDER" ]
then
for img in $(find "$FLATS_FOLDER" -name "*$BIN*.fit")
do
echo "1 flat $img"
done
fi
# Darks should probably be in the data directory with the lights
# Darks have the same exposure time as lights, but with no light on the sensor
DARKS_FOLDER="$DARKS_PATH/$BIN/$EXPOSURE_TIME"
if [ -d "$DARKS_FOLDER" ]
then
for img in $(find "$DARKS_FOLDER" -name "*$BIN*.fit")
do
echo "1 dark $img"
done
fi
fi
cat $ASTRO_HOME/scripts/dss_prefs.txt