-
Notifications
You must be signed in to change notification settings - Fork 0
/
main_wf_phase1.php
executable file
·60 lines (52 loc) · 1.65 KB
/
main_wf_phase1.php
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
<?php
error_reporting(E_ALL);
$filename = "bundle_list.json";
$handle = fopen($filename, "r");
$contents = fread($handle, filesize($filename));
fclose($handle);
if(empty(json_decode($contents, true)))
{
print("fail to parse json");
exit();
}
$json = json_decode($contents, true);
$bundle_list = $json["BUNDLE_LIST"];
$CLEANED_META_DIR = "cleanmetadata_out/";
$TIFS_DIR = "flir2tif_out/";
$MEANTEMP_DIR= "meantemp_out/";
// $PLOTCLIP_DIR = "plotclip_out/";
$SENSOR = "flirIrCamera";
// $MOSAIC_BOUNDS = "-111.9747932 33.0764785 -111.9750545 33.0745238";
$DATA_BASE_URL = "128.196.142.26/";
?>
{
"define": {
},
"rules": [
<?php foreach ($bundle_list as &$bundle) :?>
{
# processing for one bundle of data sets (from cleanmetadata to flir2tif)
"command": "echo ${BUNDLE_JSON} && python3 process_bundle.py ${BUNDLE_JSON}",
"environment": {
"DATA_BASE_URL": "<?=$DATA_BASE_URL?>",
"BUNDLE_JSON": "bundle/bundle_" + "<?=$bundle["ID"]?>" + ".json"
},
"inputs": [
"process_bundle.py",
"process_one_set.sh",
"bundle/bundle_" + "<?=$bundle["ID"]?>" + ".json",
"cached_betydb/bety_experiments.json"
],
"outputs":
[
<?php foreach ($bundle["DATA_SETS"] as &$data_set): ?>
"<?=$CLEANED_META_DIR?>" + "<?=$data_set["UUID"]?>" + "_metadata_cleaned.json",
"<?=$TIFS_DIR?>" + "<?=$data_set["UUID"]?>" + "_ir.tif",
"<?=$MEANTEMP_DIR?>" + "<?=$data_set["UUID"]?>/" + "meantemp.csv",
"<?=$MEANTEMP_DIR?>" + "<?=$data_set["UUID"]?>/" + "meantemp_geostreams.csv",
<?php endforeach; ?>
]
},
<?php endforeach; ?>
]
}