-
Notifications
You must be signed in to change notification settings - Fork 172
/
Makefile
144 lines (111 loc) · 6.5 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
135
136
137
138
139
140
141
142
143
144
# This Makefile is just a demo of what is possible with MER. I hope to
# document at some point and to get the hazard cams working.
# Stereo from the Microscopic imager doesn't work unforunately because
# the CAHVOR is not modelling the variable focal length they're using.
# Users with custom paths must override this variables
EXECDIR ?= ../../bin/
# Executables
ifeq ($(EXECDIR),)
EEXECDIR=
else
EEXECDIR=../$(EXECDIR)
endif
STEREO = $(EXECDIR)stereo
DISPARITYDEBUG = $(EEXECDIR)disparitydebug
POINT2MESH = $(EXECDIR)point2mesh
MER2CAMERA = $(EXECDIR)mer2camera
# User interfaces
###############################################
all: stereo mesh
stereo: pan01/pan01-PC.tif nav01/nav01-PC.tif mi01/mi01-PC.tif fh01lin/fh01lin-PC.tif fh01/fh01-PC.tif fh02/fh02-PC.tif rh01/rh01-PC.tif pan02/pan02-PC.tif
mesh: pan01/pan01.ive nav01/nav01.ive mi01/mi01.ive fh01lin/fh01lin.ive fh01/fh01.ive fh02/fh02.ive rh01/rh01.ive pan02/pan02.ive
# Actual processing
###############################################
%.tif: %.img
gdal_translate -scale -ot byte $< $@
%.cahvor: %.img
$(MER2CAMERA) $<
%.cahv: %.img
$(MER2CAMERA) $<
%.cahvore: %.img
$(MER2CAMERA) $<
pan01/pan01-PC.tif: 1p270664103esf90csp2566l2m1.tif 1p270664103esf90csp2566r2m1.tif 1p270664103esf90csp2566l2m1.cahvor 1p270664103esf90csp2566r2m1.cahvor
$(STEREO) $^ pan01/pan01
nav01/nav01-PC.tif: 1n270487304eff90cip1952l0m1.tif 1n270487304eff90cip1952r0m1.tif 1n270487304eff90cip1952l0m1.cahvor 1n270487304eff90cip1952r0m1.cahvor
$(STEREO) $^ nav01/nav01
mi01/mi01-PC.tif: 2m147677487eff8800p2976m2f1.tif 2m147677547eff8800p2976m2f1.tif 2m147677487eff8800p2976m2f1.cahvor 2m147677547eff8800p2976m2f1.cahvor
$(STEREO) $^ mi01/mi01
fh01lin/fh01lin-PC.tif: 2f194370083fflap00p1214r0m1.tif 2f194370083fflap00p1214l0m1.tif 2f194370083fflap00p1214r0m1.cahv 2f194370083fflap00p1214l0m1.cahv
$(STEREO) $^ fh01lin/fh01lin
fh01/fh01-PC.tif: 2f194370083effap00p1214l0m1.tif 2f194370083effap00p1214r0m1.tif 2f194370083effap00p1214l0m1.cahvore 2f194370083effap00p1214r0m1.cahvore
$(STEREO) $^ fh01/fh01
fh02/fh02-PC.tif: 2f191703508effanhep1110l0m1.tif 2f191703508effanhep1110r0m1.tif 2f191703508effanhep1110l0m1.cahvore 2f191703508effanhep1110r0m1.cahvore
$(STEREO) $^ fh02/fh02
rh01/rh01-PC.tif: 2r195521583effaq00p1301l0m1.tif 2r195521583effaq00p1301r0m1.tif 2r195521583effaq00p1301l0m1.cahvore 2r195521583effaq00p1301r0m1.cahvore
$(STEREO) $^ rh01/rh01
pan02/pan02-PC.tif: 1p227709787eff80k7p2389l2c1.tif 1p227709787eff80k7p2389r2c1.tif 1p227709787eff80k7p2389l2c1.cahvor 1p227709787eff80k7p2389r2c1.cahvor
$(STEREO) $^ pan02/pan02
pan01/pan01.ive: pan01/pan01-PC.tif
$(POINT2MESH) -s 1 -l $^ pan01/pan01-L.tif
nav01/nav01.ive: nav01/nav01-PC.tif
$(POINT2MESH) -s 1 -l $^ nav01/nav01-L.tif
mi01/mi01.ive: mi01/mi01-PC.tif
$(POINT2MESH) -s 1 -l $^ mi01/mi01-L.tif
fh01lin/fh01lin.ive: fh01lin/fh01lin-PC.tif
$(POINT2MESH) -s 1 -l $^ fh01lin/fh01lin-L.tif
fh01/fh01.ive: fh01/fh01-PC.tif
$(POINT2MESH) -s 1 -l $^ fh01/fh01-L.tif
fh02/fh02.ive: fh02/fh02-PC.tif
$(POINT2MESH) -s 1 -l $^ fh02/fh02-L.tif
rh01/rh01.ive: rh01/rh01-PC.tif
$(POINT2MESH) -s 1 -l $^ rh01/rh01-L.tif
pan02/pan02.ive: pan02/pan02-PC.tif
$(POINT2MESH) -s 1 -l $^ pan02/pan02-L.tif
# Downloading data
##############################################
# PAN01
1p270664103esf90csp2566l2m1.img:
wget -O $@ 'http://pds-imaging.jpl.nasa.gov/pds/prod?q=OFSN+%3D+/data/mer/opportunity//mer1po_0xxx/data/sol1605/edr//1p270664103esf90csp2566l2m1.img+AND+RT+%3D+RAW'
1p270664103esf90csp2566r2m1.img:
wget -O $@ 'http://pds-imaging.jpl.nasa.gov/pds/prod?q=OFSN+%3D+/data/mer/opportunity//mer1po_0xxx/data/sol1605/edr//1p270664103esf90csp2566r2m1.img+AND+RT+%3D+RAW'
# NAV01
1n270487304eff90cip1952l0m1.img:
wget -O $@ 'http://pds-imaging.jpl.nasa.gov/pds/prod?q=OFSN+%3D+/data/mer/opportunity//mer1no_0xxx/data/sol1603/edr//1n270487304eff90cip1952l0m1.img+AND+RT+%3D+RAW'
1n270487304eff90cip1952r0m1.img:
wget -O $@ 'http://pds-imaging.jpl.nasa.gov/pds/prod?q=OFSN+%3D+/data/mer/opportunity//mer1no_0xxx/data/sol1603/edr//1n270487304eff90cip1952r0m1.img+AND+RT+%3D+RAW'
# FH01
2f194370083effap00p1214l0m1.img:
wget -O $@ 'http://pds-imaging.jpl.nasa.gov/pds/prod?q=OFSN+%3D+/data/mer/spirit//mer2ho_0xxx/data/sol0766/edr//2f194370083effap00p1214l0m1.img+AND+RT+%3D+RAW'
2f194370083effap00p1214r0m1.img:
wget -O $@ 'http://pds-imaging.jpl.nasa.gov/pds/prod?q=OFSN+%3D+/data/mer/spirit//mer2ho_0xxx/data/sol0766/edr//2f194370083effap00p1214r0m1.img+AND+RT+%3D+RAW'
# FH01 (linearized)
2f194370083fflap00p1214r0m1.img:
wget -O $@ 'http://pds-imaging.jpl.nasa.gov/pds/prod?q=OFSN+%3D+/data/mer/spirit//mer2ho_0xxx/data/sol0766/rdr//2f194370083fflap00p1214r0m1.img+AND+RT+%3D+RAW'
2f194370083fflap00p1214l0m1.img:
wget -O $@ 'http://pds-imaging.jpl.nasa.gov/pds/prod?q=OFSN+%3D+/data/mer/spirit//mer2ho_0xxx/data/sol0766/rdr//2f194370083fflap00p1214l0m1.img+AND+RT+%3D+RAW'
# RH01
2r195521583effaq00p1301l0m1.img:
wget -O $@ 'http://pds-imaging.jpl.nasa.gov/pds/prod?q=OFSN+%3D+/data/mer/spirit//mer2ho_0xxx/data/sol0779/edr//2r195521583effaq00p1301l0m1.img+AND+RT+%3D+RAW'
2r195521583effaq00p1301r0m1.img:
wget -O $@ 'http://pds-imaging.jpl.nasa.gov/pds/prod?q=OFSN+%3D+/data/mer/spirit//mer2ho_0xxx/data/sol0779/edr//2r195521583effaq00p1301r0m1.img+AND+RT+%3D+RAW'
# FH02
2f191703508effanhep1110l0m1.img:
wget -O $@ 'http://pds-imaging.jpl.nasa.gov/pds/prod?q=OFSN+%3D+/data/mer/spirit//mer2ho_0xxx/data/sol0736/edr//2f191703508effanhep1110l0m1.img+AND+RT+%3D+RAW'
2f191703508effanhep1110r0m1.img:
wget -O $@ 'http://pds-imaging.jpl.nasa.gov/pds/prod?q=OFSN+%3D+/data/mer/spirit//mer2ho_0xxx/data/sol0736/edr//2f191703508effanhep1110r0m1.img+AND+RT+%3D+RAW'
# MI01
2m147677487eff8800p2976m2f1.img:
wget -O $@ 'http://pds-imaging.jpl.nasa.gov/pds/prod?q=OFSN+%3D+/data/mer/spirit//mer2ms_0xxx/data/sol0240/edr//2m147677487eff8800p2976m2f1.img+AND+RT+%3D+RAW'
2m147677547eff8800p2976m2f1.img:
wget -O $@ 'http://pds-imaging.jpl.nasa.gov/pds/prod?q=OFSN+%3D+/data/mer/spirit//mer2ms_0xxx/data/sol0240/edr//2m147677547eff8800p2976m2f1.img+AND+RT+%3D+RAW'
# PAN02
1p227709787eff80k7OBp2389l2c1.img:
wget -O $@ 'http://pds-geosciences.wustl.edu/mer/mer1-m-pancam-2-edr-sci-v1/mer1pc_0xxx/data/sol1121/1p227709787eff80k7p2389l2c1.img'
1p227709787eff80k7p2389r2c1.img:
wget -O $@ 'http://pds-geosciences.wustl.edu/mer/mer1-m-pancam-2-edr-sci-v1/mer1pc_0xxx/data/sol1121/1p227709787eff80k7p2389r2c1.img'
# Clean up functions
##############################################
clean:
rm -rf *.cahv *.cahvor *.cahvore *.tif nav01 pan01 mi01 fh01lin fh01 rh01 fh02 pan02
distclean: clean
rm *.img *.IMG *~