Commit 4c89e8766f4d50ff30df8fee61de836933a01977
1 parent
bb30f90e
Exists in
master
and in
87 other branches
ihn normalization ok
Showing
3 changed files
with
19 additions
and
6 deletions
Show diff stats
js/app/models/PlotObjects/PlotObjectConfig.js
@@ -473,6 +473,11 @@ Ext.define('amdaPlotObj.PlotObjectConfig', { | @@ -473,6 +473,11 @@ Ext.define('amdaPlotObj.PlotObjectConfig', { | ||
473 | {'key' : 'serie-constant', 'value' : 'Serie / Constant'}, | 473 | {'key' : 'serie-constant', 'value' : 'Serie / Constant'}, |
474 | {'key' : 'serie-serie', 'value' : 'Serie / Serie'} | 474 | {'key' : 'serie-serie', 'value' : 'Serie / Serie'} |
475 | ], | 475 | ], |
476 | + availableSpectroNormalization : [ | ||
477 | + {'key' : 'none', 'value' : 'None'}, | ||
478 | + {'key' : 'linear', 'value' : 'linear'}, | ||
479 | + {'key' : 'logarithmic', 'value' : 'log'} | ||
480 | + ], | ||
476 | 481 | ||
477 | getParamConfig : function(paramId, onParamConfigLoaded) { | 482 | getParamConfig : function(paramId, onParamConfigLoaded) { |
478 | AmdaAction.getParamPlotInit({"paramId" : paramId}, function (result, e) { | 483 | AmdaAction.getParamPlotInit({"paramId" : paramId}, function (result, e) { |
js/app/models/PlotObjects/PlotSpectroObject.js
@@ -22,10 +22,11 @@ Ext.define('amdaPlotObj.PlotSpectroObject', { | @@ -22,10 +22,11 @@ Ext.define('amdaPlotObj.PlotSpectroObject', { | ||
22 | 22 | ||
23 | fields : [ | 23 | fields : [ |
24 | {name: 'spectro-yaxis', type: 'string'}, | 24 | {name: 'spectro-yaxis', type: 'string'}, |
25 | - {name: 'spectro-resolution', type: 'int'}, | 25 | + {name: 'spectro-resolution', type: 'int'}, |
26 | {name: 'spectro-value-min', type: 'float', useNull:true}, | 26 | {name: 'spectro-value-min', type: 'float', useNull:true}, |
27 | {name: 'spectro-value-max', type: 'float', useNull:true}, | 27 | {name: 'spectro-value-max', type: 'float', useNull:true}, |
28 | - {name: 'spectro-log0-as-min', type: 'boolean'} | 28 | + {name: 'spectro-log0-as-min', type: 'boolean'}, |
29 | + {name: 'spectro-normalization', type: 'string'} | ||
29 | ], | 30 | ], |
30 | 31 | ||
31 | constructor: function(){ | 32 | constructor: function(){ |
@@ -55,7 +56,8 @@ Ext.define('amdaPlotObj.PlotSpectroObject', { | @@ -55,7 +56,8 @@ Ext.define('amdaPlotObj.PlotSpectroObject', { | ||
55 | { | 56 | { |
56 | this.set('spectro-yaxis', amdaPlotObj.PlotObjectConfig.defaultValues.spectro.yAxis); | 57 | this.set('spectro-yaxis', amdaPlotObj.PlotObjectConfig.defaultValues.spectro.yAxis); |
57 | this.set('spectro-resolution', amdaPlotObj.PlotObjectConfig.defaultValues.spectro.resolution); | 58 | this.set('spectro-resolution', amdaPlotObj.PlotObjectConfig.defaultValues.spectro.resolution); |
58 | - this.set('spectro-log0-as-min', false); | 59 | + this.set('spectro-log0-as-min', false); |
60 | + this.set('spectro-normalization', "none"); | ||
59 | }, | 61 | }, |
60 | 62 | ||
61 | getJsonValues : function() | 63 | getJsonValues : function() |
@@ -66,8 +68,8 @@ Ext.define('amdaPlotObj.PlotSpectroObject', { | @@ -66,8 +68,8 @@ Ext.define('amdaPlotObj.PlotSpectroObject', { | ||
66 | spectroValues['spectro-resolution'] = this.get('spectro-resolution'); | 68 | spectroValues['spectro-resolution'] = this.get('spectro-resolution'); |
67 | spectroValues['spectro-value-min'] = this.get('spectro-value-min'); | 69 | spectroValues['spectro-value-min'] = this.get('spectro-value-min'); |
68 | spectroValues['spectro-value-max'] = this.get('spectro-value-max'); | 70 | spectroValues['spectro-value-max'] = this.get('spectro-value-max'); |
69 | - spectroValues['spectro-log0-as-min'] = this.get('spectro-log0-as-min'); | ||
70 | - | 71 | + spectroValues['spectro-log0-as-min'] = this.get('spectro-log0-as-min'); |
72 | + spectroValues['spectro-normalization'] = this.get('spectro-normalization'); | ||
71 | return spectroValues; | 73 | return spectroValues; |
72 | } | 74 | } |
73 | }); | 75 | }); |
js/app/views/PlotComponents/PlotSpectroForm.js
@@ -37,7 +37,13 @@ Ext.define('amdaPlotComp.PlotSpectroForm', { | @@ -37,7 +37,13 @@ Ext.define('amdaPlotComp.PlotSpectroForm', { | ||
37 | this.addStandardFieldSet('Min/Max thresholds', '', this.getValuesRangeItems()), | 37 | this.addStandardFieldSet('Min/Max thresholds', '', this.getValuesRangeItems()), |
38 | this.addStandardCheck('spectro-log0-as-min', 'Show 0 values as Min Values in log scale', function(name, value, oldValue) { | 38 | this.addStandardCheck('spectro-log0-as-min', 'Show 0 values as Min Values in log scale', function(name, value, oldValue) { |
39 | me.object.set('spectro-log0-as-min', value); | 39 | me.object.set('spectro-log0-as-min', value); |
40 | - }) | 40 | + }), |
41 | + this.addStandardCombo('spectro-normalization', 'Normalization', amdaPlotObj.PlotObjectConfig.availableSpectroNormalization, function(name, value, oldValue) { | ||
42 | + if (me.object.get('spectro-normalization') != value) | ||
43 | + { | ||
44 | + me.object.set('spectro-normalization', value); | ||
45 | + } | ||
46 | + }) | ||
41 | ]; | 47 | ]; |
42 | } | 48 | } |
43 | }); | 49 | }); |