-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
134 lines (100 loc) · 5.07 KB
/
Makefile
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# General settings
OBJ =NGC7635_Bubble
# Channel stretch settings
STRETCH=-autoScale 2.0 -scaleBlack 3.0
# Example for Hubble palette
CHAN=S2HaO3
COMBINE=-chromaGamma 1.4 -rotFrom 120 -rotTo 147.5 -rotBy -35 -scnr 0.5 -ppGamma 2.7
# Provide paths to your master dark frames here (they depend on exposure length, temperature, gain and bias)
DARKL =calib/dark_L.fits
DARKR =calib/dark_RGB.fits
DARKG =calib/dark_RGB.fits
DARKB =calib/dark_RGB.fits
DARKHa=calib/dark_Ha.fits
DARKO3=calib/dark_O3.fits
DARKS2=calib/dark_S2.fits
# Provide paths to your master flat frames here (they mostly depend on the filter, as well as on gain and bias)
FLATL =calib/flat_L.fits
FLATR =calib/flat_R.fits
FLATG =calib/flat_G.fits
FLATB =calib/flat_B.fits
FLATHa=calib/flat_Ha.fits
FLATO3=calib/flat_O3.fits
FLATS2=calib/flat_S2.fits
# Additional per-channel settings (put e.g. pre-determined stacking sigmas here to avoid the goal seek)
PARAML =
PARAMR =
PARAMG =
PARAMB =
PARAMHa=
PARAMO3=
PARAMS2=
# Additional overall settings (typically not necessary)
STD =
# Set the path to your nightlight executable here
NL =nightlight
# Makefile targets and rules. These should usually not require any changes
all: $(OBJ)_$(CHAN).fits
backup:
mkdir -p backup && mv *.fits *.jpg *.log backup/
clean:
rm -f $(OBJ)_RGB.fits $(OBJ)_LRGB.fits $(OBJ)_HaS2O3.fits $(OBJ)_HaO3S2.fits $(OBJ)_S2HaO3.fits $(OBJ)_HaO3O3.fits $(OBJ)_HaS2S2.fits \
$(OBJ)_RGB.jpg $(OBJ)_LRGB.jpg $(OBJ)_HaS2O3.jpg $(OBJ)_HaO3S2.jpg $(OBJ)_S2HaO3.jpg $(OBJ)_HaO3O3.jpg $(OBJ)_HaS2S2.jpg \
$(OBJ)_RGB.log $(OBJ)_LRGB.log $(OBJ)_HaS2O3.log $(OBJ)_HaO3S2.log $(OBJ)_S2HaO3.log $(OBJ)_HaO3O3.log $(OBJ)_HaS2S2.log
realclean: clean
rm -f $(OBJ)_L.fits $(OBJ)_R.fits $(OBJ)_G.fits $(OBJ)_B.fits \
$(OBJ)_Ha.fits $(OBJ)_O3.fits $(OBJ)_S2.fits \
$(OBJ)_L.log $(OBJ)_R.log $(OBJ)_G.log $(OBJ)_B.log \
$(OBJ)_Ha.log $(OBJ)_O3.log $(OBJ)_S2.log \
rm -f $(OBJ)_L_stretch.fits $(OBJ)_R_stretch.fits $(OBJ)_G_stretch.fits $(OBJ)_B_stretch.fits \
$(OBJ)_Ha_stretch.fits $(OBJ)_O3_stretch.fits $(OBJ)_S2_stretch.fits \
$(OBJ)_L_stretch.log $(OBJ)_R_stretch.log $(OBJ)_G_stretch.log $(OBJ)_B_stretch.log \
$(OBJ)_Ha_stretch.log $(OBJ)_O3_stretch.log $(OBJ)_S2_stretch.log
folders:
for f in *_L_*.fits; do if test -f "$$f"; then mkdir -p L; mv *_L_*.fits L/; fi; break; done
for f in *_R_*.fits; do if test -f "$$f"; then mkdir -p R; mv *_R_*.fits R/; fi; break; done
for f in *_G_*.fits; do if test -f "$$f"; then mkdir -p G; mv *_G_*.fits G/; fi; break; done
for f in *_B_*.fits; do if test -f "$$f"; then mkdir -p B; mv *_B_*.fits B/; fi; break; done
for f in *_Ha_*.fits; do if test -f "$$f"; then mkdir -p Ha; mv *_Ha_*.fits Ha/; fi; break; done
for f in *_O3_*.fits; do if test -f "$$f"; then mkdir -p O3; mv *_O3_*.fits O3/; fi; break; done
for f in *_S2_*.fits; do if test -f "$$f"; then mkdir -p S2; mv *_S2_*.fits S2/; fi; break; done
count:
for f in L R G B Ha O3 S2; do if test -e "$$f"; then echo "$$f" has `ls $$f | wc -l` frames; fi ; done
%.stats: %.fits
$(NL) $(STD) $(STATS) -log $@ stats $^
%_S2HaO3.fits: %_S2_stretch.fits %_Ha_stretch.fits %_O3_stretch.fits
$(NL) $(STD) $(COMBINE) -out $@ rgb $^
%_HaS2O3.fits: %_Ha_stretch.fits %_S2_stretch.fits %_O3_stretch.fits
$(NL) $(STD) $(COMBINE) -out $@ rgb $^
%_HaO3S2.fits: %_Ha_stretch.fits %_O3_stretch.fits %_S2_stretch.fits
$(NL) $(STD) $(COMBINE) -out $@ rgb $^
%_HaO3O3.fits: %_Ha_stretch.fits %_O3_stretch.fits
$(NL) $(STD) $(COMBINE) -out $@ rgb $^ $*_O3.fits
%_HaS2S2.fits: %_Ha_stretch.fits %_S2_stretch.fits
$(NL) $(STD) $(COMBINE) -out $@ rgb $^ $*_S2.fits
%_RGB.fits: %_R_stretch.fits %_G_stretch.fits %_B_stretch.fits
$(NL) $(STD) $(COMBINE) -out $@ rgb $^
%_aRGB.fits: %_L_stretch.fits %_R_stretch.fits %_G_stretch.fits %_B_stretch.fits
$(NL) $(STD) $(COMBINE) -out $@ argb $^
%_LRGB.fits: %_L_stretch.fits %_R_stretch.fits %_G_stretch.fits %_B_stretch.fits
$(NL) $(STD) $(COMBINE) -out $@ lrgb $^
%_HaRGB.fits: %_Ha_stretch.fits %_R_stretch.fits %_G_stretch.fits %_B_stretch.fits
$(NL) $(STD) $(COMBINE) -out $@ lrgb $^
%_stretch.fits: %.fits
$(NL) $(STD) $(STRETCH) -out $@ stretch $^
# Don't delete intermediate FITS files from stretching
.PRECIOUS: %_stretch.fits
$(OBJ)_L.fits: L/*.fits
$(NL) $(STD) $(PARAML) -dark $(DARKL) -flat $(FLATL) -out $@ stack "L/*.fits"
$(OBJ)_R.fits: R/*.fits
$(NL) $(STD) $(PARAMR) $(RGB_BINNING) -dark $(DARKR) -flat $(FLATR) -out $@ stack "R/*.fits"
$(OBJ)_G.fits: G/*.fits
$(NL) $(STD) $(PARAMG) $(RGB_BINNING) -dark $(DARKG) -flat $(FLATG) -out $@ stack "G/*.fits"
$(OBJ)_B.fits: B/*.fits
$(NL) $(STD) $(PARAMB) $(RGB_BINNING) -dark $(DARKB) -flat $(FLATB) -out $@ stack "B/*.fits"
$(OBJ)_Ha.fits: Ha/*.fits
$(NL) $(STD) $(PARAMHa) -dark $(DARKHa) -flat $(FLATHa) -out $@ stack "Ha/*.fits"
$(OBJ)_O3.fits: O3/*.fits
$(NL) $(STD) $(PARAMO3) -dark $(DARKO3) -flat $(FLATO3) -out $@ stack "O3/*.fits"
$(OBJ)_S2.fits: S2/*.fits
$(NL) $(STD) $(PARAMS2) -dark $(DARKS2) -flat $(FLATS2) -out $@ stack "S2/*.fits"