Commit e5910daab99d550e4d11e3b9f71c3d7ba8357145
Exists in
master
and in
95 other branches
Fix merge conflit
Showing
5 changed files
with
106 additions
and
4 deletions
Show diff stats
generic_data/Functions/functions.xml
... | ... | @@ -88,7 +88,7 @@ |
88 | 88 | <prompt/> |
89 | 89 | <info_brief>GSE to SM transformation</info_brief> |
90 | 90 | </function>--> |
91 | - <function name="angle(,)" params="2" kind="vectors"> | |
91 | + <function name="angle(,)" args="2" kind="vectors"> | |
92 | 92 | <info_brief>Angle between two vectors</info_brief> |
93 | 93 | <new_kernel>angle</new_kernel> |
94 | 94 | </function> |
... | ... |
js/app/models/PlotObjects/PlotObjectConfig.js
... | ... | @@ -333,7 +333,12 @@ Ext.define('amdaPlotObj.PlotObjectConfig', { |
333 | 333 | {'key' : '0', 'value' : 'Default'}, |
334 | 334 | {'key' : '1', 'value' : 'Blue Red'}, |
335 | 335 | {'key' : '2', 'value' : 'Blue Yellow'}, |
336 | - {'key' : '3', 'value' : 'Grayscale'} | |
336 | + {'key' : '3', 'value' : 'Grayscale'}, | |
337 | + {'key' : '4', 'value' : 'AMDA Default'}, | |
338 | + {'key' : '5', 'value' : 'GeoWhite'}, | |
339 | + {'key' : '6', 'value' : 'GeoBlack'}, | |
340 | + {'key' : '7', 'value' : 'Violet Yellow'}, | |
341 | + {'key' : '8', 'value' : 'Red Blue 4'} | |
337 | 342 | ], |
338 | 343 | |
339 | 344 | availableColors : [ |
... | ... |
php/classes/CatalogCacheIntervalObject.php
... | ... | @@ -68,7 +68,7 @@ class CatalogCacheIntervalObject extends TimeTableCacheIntervalObject |
68 | 68 | } |
69 | 69 | break; |
70 | 70 | case 3: //int |
71 | - fwrite($handle,pack('L', intval($value))); | |
71 | + fwrite($handle,pack('l', intval($value))); | |
72 | 72 | break; |
73 | 73 | default: // not defined => string |
74 | 74 | fwrite($handle,pack('L', strlen($value))); |
... | ... | @@ -121,7 +121,7 @@ class CatalogCacheIntervalObject extends TimeTableCacheIntervalObject |
121 | 121 | |
122 | 122 | break; |
123 | 123 | case 3: //int |
124 | - if (!$res = unpack('Lval',fread($handle,4))) { | |
124 | + if (!$res = unpack('lval',fread($handle,4))) { | |
125 | 125 | break; |
126 | 126 | } |
127 | 127 | $val = $res['val']; |
... | ... |
... | ... | @@ -0,0 +1,38 @@ |
1 | +<?php | |
2 | + | |
3 | + define("AMDA_INTERNAL_METADATA",getenv("AMDAINTERNALDIR")); | |
4 | + | |
5 | + $info = new DomDocument("1.0"); | |
6 | + // $infoName = $argv[1]; | |
7 | + $pattern = "info_psp_loic_*.xml"; | |
8 | + foreach (glob(AMDA_INTERNAL_METADATA."/PARAM_INFO_PREDEFINED/".$pattern) as $infoName) { | |
9 | + $info->load($infoName); | |
10 | + | |
11 | + $dimensions = $info->getElementsByTagName("dimensions")->item(0); | |
12 | + | |
13 | + $dim_1 = $dimensions->getAttribute("dim_1"); | |
14 | + $dim_2 = null; | |
15 | + if ($dimensions->hasAttribute("dim_2")) | |
16 | + $dim_2 = $dimensions->getAttribute("dim_2"); | |
17 | + | |
18 | + | |
19 | + $tables = $info->getElementsByTagName("table"); | |
20 | + | |
21 | + foreach ($tables as $table) { | |
22 | + $channels = $table->getElementsByTagName("channel"); | |
23 | + $dim = $table->getAttribute("relatedDim"); | |
24 | + if ( $dim == "dim_1" ) $dim_ = $dim_1; | |
25 | + if ( $dim == "dim_2" ) $dim_ = $dim_2; | |
26 | + if ($dim_ != $channels->length) { | |
27 | + $dimensions->setAttribute($dim, $channels->length); | |
28 | + echo $infoName.PHP_EOL; | |
29 | + echo $dim_." ".$channels->length.PHP_EOL; | |
30 | + } | |
31 | + } | |
32 | + $info->save($infoName); | |
33 | + } | |
34 | + | |
35 | +?> | |
36 | + | |
37 | + | |
38 | + | |
... | ... |
... | ... | @@ -0,0 +1,59 @@ |
1 | +<?php | |
2 | + | |
3 | + function remove_children(&$node) { | |
4 | + while ($node->firstChild) { | |
5 | + while ($node->firstChild->firstChild) { | |
6 | + remove_children($node->firstChild); | |
7 | + } | |
8 | + $node->removeChild($node->firstChild); | |
9 | + } | |
10 | + } | |
11 | + | |
12 | + define("NEWMETA",getenv("NEWMETA")); | |
13 | + define("AMDA_INTERNAL_METADATA",getenv("AMDAINTERNALDIR")); | |
14 | + | |
15 | + $pattern = "info_psp_om*.xml"; | |
16 | + $info = new DomDocument("1.0"); | |
17 | + | |
18 | + // $infoName = $argv[1]; | |
19 | + foreach (glob(NEWMETA."/ParamInfo/".$pattern) as $infoName) { | |
20 | + | |
21 | + $info->load($infoName); | |
22 | + $dimensions = $info->getElementsByTagName("dimensions")->item(0); | |
23 | + | |
24 | + if ($dimensions->hasAttribute("dim_2") && $dimensions->getAttribute("dim_2") == "1") | |
25 | + $dimensions->removeAttribute("dim_2"); | |
26 | + | |
27 | + $components = $info->getElementsByTagName("components"); | |
28 | + if ($components->length == 0) continue; | |
29 | + if ( !$components->item(0)->hasChildNodes() ) continue; // has been already processed | |
30 | + $a=$components->item(0); | |
31 | + remove_children($a); | |
32 | + | |
33 | + $channels = $info->getElementsByTagName("channel"); | |
34 | + foreach ($channels as $channel) { | |
35 | + $min = $channel->getAttribute("min"); | |
36 | + $max = $channel->getAttribute("max"); | |
37 | + | |
38 | + if ( $min == "nan" ) { | |
39 | + $channel->setAttribute("min", "-"); | |
40 | + } | |
41 | + if ( $max== "nan" ) { | |
42 | + $channel->setAttribute("max", "-"); | |
43 | + } | |
44 | + if (is_numeric($min)) | |
45 | + $channel->setAttribute("min",number_format($min,1,".","")); | |
46 | + if (is_numeric($max)) | |
47 | + $channel->setAttribute("max",number_format($max,1,".","")); | |
48 | + | |
49 | + } | |
50 | + echo basename($infoName).PHP_EOL; | |
51 | + $info->save(AMDA_INTERNAL_METADATA."/PARAM_INFO_PREDEFINED/".basename($infoName)); | |
52 | + } | |
53 | + | |
54 | +?> | |
55 | + | |
56 | + | |
57 | + | |
58 | + | |
59 | + | |
... | ... |