Commit 69602cd7a6b2f6fb35b43fa93f6de19e7511d30e
1 parent
22521f1c
Exists in
master
and in
66 other branches
Use specific plot config for AMDA_Integration. Define adapted color map. Change …
…image orientation with 'portrait' mode
Showing
12 changed files
with
140 additions
and
6 deletions
Show diff stats
... | ... | @@ -0,0 +1 @@ |
1 | +.project | |
... | ... |
config/AMDAIntegrationConfig.php
... | ... | @@ -77,10 +77,10 @@ switch ($localIP) |
77 | 77 | //define('AKKA_SVN', 'true'); |
78 | 78 | |
79 | 79 | //Path to AMDA_Kernel base dir |
80 | - define('NEWKERNEL_BASE_PATH', '/home/benjamin/AMDA-GIT/AMDA/AMDA_Kernel/'); | |
80 | + define('NEWKERNEL_BASE_PATH', '/home/benjamin/AMDA-GIT/AMDA_Kernel/'); | |
81 | 81 | |
82 | 82 | //Path to AMDA_IHM base dir |
83 | - define('IHM_SRC_DIR', '/home/benjamin/AMDA-GIT/AMDA/AMDA_IHM/'); | |
83 | + define('IHM_SRC_DIR', '/home/benjamin/AMDA-GIT/AMDA_IHM/'); | |
84 | 84 | |
85 | 85 | break; |
86 | 86 | } |
... | ... |
... | ... | @@ -0,0 +1,60 @@ |
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<root> | |
3 | + <default> | |
4 | + <page dimension="ISO A4" orientation="landscape" mode="color" dpi="90"> | |
5 | + <font name="sans-serif" size="12" /> | |
6 | + <margin x="15" y="20" /> <!-- in mm --> | |
7 | + </page> | |
8 | + <panel resolution="3000" backgroundColor="[255,255,255]"> <!-- charSizeUnits defines space to set all around plot area --> | |
9 | + <title position="top" align="center" /> | |
10 | + <timeAxis id="timeAxis" format="dd/mm/yy" reverse="false" color="[0,0,0]" position="bottom" thickness="1"> | |
11 | + <legend text="Time, UT" /> | |
12 | + </timeAxis> | |
13 | + <epochAxis id="epochAxis" format="dd/mm/yy" reverse="false" color="[0,0,0]" position="bottom" thickness="1"> | |
14 | + <legend text="Relative Time" /> | |
15 | + </epochAxis> | |
16 | + <colorAxis id="colorAxis" scale="linear" color="[0,0,0]" reverse="false" position="right" /> | |
17 | + <xAxis scale="linear" reverse="false" color="[0,0,0]" position="bottom" thickness="1" /> | |
18 | + <yAxis scale="linear" reverse="false" color="[0,0,0]" position="left" thickness="1" /> | |
19 | + <timePlot xAxis="timeAxis" zAxis="colorAxis"> | |
20 | + <line type="line" style="plain" width="1" /> | |
21 | + <symbol type="no" size="4" color="[0,0,255]" /> | |
22 | + </timePlot> | |
23 | + <epochPlot xAxis="epochAxis" zAxis="colorAxis"> | |
24 | + <line type="line" style="plain" width="1" /> | |
25 | + <symbol type="no" size="4" color="[0,0,255]" /> | |
26 | + </epochPlot> | |
27 | + <xyPlot zAxis="colorAxis"> | |
28 | + <line type="no" style="plain" width="1" /> | |
29 | + <symbol type="dot" size="4" /> | |
30 | + <resampling type="auto"/> | |
31 | + <timeTick step="0" number="0" minor="0" color="[0,0,0]"> | |
32 | + <font name="sans-serif" size="5" style="upright" weight="medium" /> | |
33 | + <firstSymbol type="triangle" size="5" color="[120,0,0]" /> | |
34 | + <symbol type="circle" size="5" color="[120,120,0]" /> | |
35 | + </timeTick> | |
36 | + </xyPlot> | |
37 | + <instantPlot zAxis="colorAxis"> | |
38 | + <line type="no" style="plain" color="[255,0,0]" width="1" /> | |
39 | + <symbol type="dot" size="4" color="[0,0,255]" /> | |
40 | + </instantPlot> | |
41 | + </panel> | |
42 | + </default> | |
43 | + <colormap path="plplot/"> | |
44 | + <grayscale default="0"> <!-- default is map index used for auto line color generation --> | |
45 | + <file index="0">cmap0_black_on_white.pal</file> | |
46 | + <file index="1">cmap1_gray.pal</file> | |
47 | + </grayscale> | |
48 | + <color default="0"> | |
49 | + <file index="0">cmap0_default.pal</file> | |
50 | + <file index="1">cmap1_default.pal</file> | |
51 | + <file index="2">cmap0_test.pal</file> | |
52 | + </color> | |
53 | + <coloraxis default="0"> | |
54 | + <file index="0">cmap1_default.pal</file> | |
55 | + <file index="1">cmap1_blue_red.pal</file> | |
56 | + <file index="2">cmap1_blue_yellow.pal</file> | |
57 | + <file index="3">cmap1_gray.pal</file> | |
58 | + </coloraxis> | |
59 | + </colormap> | |
60 | +</root> | |
... | ... |
src/InputOutput/IHMImpl/Params/PlotImpl/IHMInputOutputParamsPlotClass.php
... | ... | @@ -107,13 +107,15 @@ class IHMInputOutputParamsPlotClass extends IHMInputOutputParamsAbstractClass |
107 | 107 | $pageNode->setTitle($input->description); |
108 | 108 | |
109 | 109 | //orientation = [['landscape','LANDSCAPE'], ['portrait', 'PORTRAIT']]; |
110 | - switch ($input->orientation) | |
110 | + $forceRotation = false; | |
111 | + switch (strtolower($input->orientation)) | |
111 | 112 | { |
112 | - case 'LANDSCAPE' : | |
113 | + case 'landscape' : | |
113 | 114 | $pageNode->setOrientation(RequestOutputPlotPageOrientationEnum::LANDSCAPE); |
114 | 115 | break; |
115 | - case 'PORTRAIT' : | |
116 | + case 'portrait' : | |
116 | 117 | $pageNode->setOrientation(RequestOutputPlotPageOrientationEnum::PORTRAIT); |
118 | + $forceRotation = true; | |
117 | 119 | break; |
118 | 120 | default : |
119 | 121 | $pageNode->setOrientation(RequestOutputPlotPageOrientationEnum::LANDSCAPE); |
... | ... | @@ -134,6 +136,7 @@ class IHMInputOutputParamsPlotClass extends IHMInputOutputParamsAbstractClass |
134 | 136 | $this->isInterractive = false; |
135 | 137 | break; |
136 | 138 | case 'PS' : |
139 | + case 'PostScript' : | |
137 | 140 | $pageNode->setFormat(RequestOutputPlotPageFormatEnum::PS); |
138 | 141 | $this->isInterractive = false; |
139 | 142 | break; |
... | ... | @@ -285,6 +288,8 @@ class IHMInputOutputParamsPlotClass extends IHMInputOutputParamsAbstractClass |
285 | 288 | $postProcessCmd = "mv plot_*"; |
286 | 289 | $postProcessCmd .= $extension; |
287 | 290 | $postProcessCmd .= " ".$resultFile.$extension; |
291 | + if ($forceRotation) | |
292 | + $postProcessCmd .= " | convert ".$resultFile.$extension." -rotate -90 ".$resultFile.$extension; | |
288 | 293 | } |
289 | 294 | |
290 | 295 | $this->paramsData->setPostCmd($postProcessCmd); |
... | ... |
src/Request/Config/KernelConfigClass.php
... | ... | @@ -176,7 +176,7 @@ class KernelConfigClass |
176 | 176 | foreach (self::$libArray as $lib) |
177 | 177 | $appProperties["app.process.LIB"] .= ("-l".$lib." "); |
178 | 178 | |
179 | - $appProperties["app.plot.configfile"] = NEWKERNEL_CONFIG_DIR.self::$plotConfigFile; | |
179 | + $appProperties["app.plot.configfile"] = INTEGRATION_SRC_DIR.'../config/'.self::$plotConfigFile; | |
180 | 180 | |
181 | 181 | $appProperties["app.param.gapthreshold"] = self::$defaultGapThreshold; |
182 | 182 | |
... | ... |