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 | 473 | {'key' : 'serie-constant', 'value' : 'Serie / Constant'}, |
474 | 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 | 482 | getParamConfig : function(paramId, onParamConfigLoaded) { |
478 | 483 | AmdaAction.getParamPlotInit({"paramId" : paramId}, function (result, e) { | ... | ... |
js/app/models/PlotObjects/PlotSpectroObject.js
... | ... | @@ -22,10 +22,11 @@ Ext.define('amdaPlotObj.PlotSpectroObject', { |
22 | 22 | |
23 | 23 | fields : [ |
24 | 24 | {name: 'spectro-yaxis', type: 'string'}, |
25 | - {name: 'spectro-resolution', type: 'int'}, | |
25 | + {name: 'spectro-resolution', type: 'int'}, | |
26 | 26 | {name: 'spectro-value-min', type: 'float', useNull:true}, |
27 | 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 | 32 | constructor: function(){ |
... | ... | @@ -55,7 +56,8 @@ Ext.define('amdaPlotObj.PlotSpectroObject', { |
55 | 56 | { |
56 | 57 | this.set('spectro-yaxis', amdaPlotObj.PlotObjectConfig.defaultValues.spectro.yAxis); |
57 | 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 | 63 | getJsonValues : function() |
... | ... | @@ -66,8 +68,8 @@ Ext.define('amdaPlotObj.PlotSpectroObject', { |
66 | 68 | spectroValues['spectro-resolution'] = this.get('spectro-resolution'); |
67 | 69 | spectroValues['spectro-value-min'] = this.get('spectro-value-min'); |
68 | 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 | 73 | return spectroValues; |
72 | 74 | } |
73 | 75 | }); | ... | ... |
js/app/views/PlotComponents/PlotSpectroForm.js
... | ... | @@ -37,7 +37,13 @@ Ext.define('amdaPlotComp.PlotSpectroForm', { |
37 | 37 | this.addStandardFieldSet('Min/Max thresholds', '', this.getValuesRangeItems()), |
38 | 38 | this.addStandardCheck('spectro-log0-as-min', 'Show 0 values as Min Values in log scale', function(name, value, oldValue) { |
39 | 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 | }); | ... | ... |