Commit e3b40909b2071c6d850c86021a27ff22d52e414c
1 parent
a8da7fc5
Exists in
master
and in
82 other branches
spectro ihm et param derivee
Showing
4 changed files
with
24 additions
and
4 deletions
Show diff stats
generic_data/Functions/functions.xml
... | ... | @@ -109,8 +109,9 @@ |
109 | 109 | <info_brief>Shifts parameter by T secs back (T < 0) and forth (T > 0))</info_brief> |
110 | 110 | <new_kernel>#timeShift</new_kernel> |
111 | 111 | </function> |
112 | - <function name="filter()" kind="amda" group="space"> | |
113 | - <info_brief>Remove Spikes</info_brief> | |
112 | + <function name="filter()" args="3" kind="filter" group="space"> | |
113 | + <default_args>,100,6</default_args> | |
114 | + <info_brief>Remove Spikes: filter(param, nPoints, factor)</info_brief> | |
114 | 115 | <new_kernel>#filter</new_kernel> |
115 | 116 | </function> |
116 | 117 | <function name="vAlfven(,)" args="2" kind="physics" group="space"> | ... | ... |
js/app/models/PlotObjects/PlotSpectroObject.js
... | ... | @@ -26,7 +26,10 @@ Ext.define('amdaPlotObj.PlotSpectroObject', { |
26 | 26 | {name: 'spectro-value-min', type: 'float', useNull:true}, |
27 | 27 | {name: 'spectro-value-max', type: 'float', useNull:true}, |
28 | 28 | {name: 'spectro-log0-as-min', type: 'boolean'}, |
29 | - {name: 'spectro-normalization', type: 'string'} | |
29 | + {name: 'spectro-normalization', type: 'string'}, | |
30 | + //Filtering | |
31 | + {name: 'filtering-activated', type: 'boolean'}, | |
32 | + {name:'filtering-level', type:'int'} | |
30 | 33 | ], |
31 | 34 | |
32 | 35 | constructor: function(){ |
... | ... | @@ -58,6 +61,9 @@ Ext.define('amdaPlotObj.PlotSpectroObject', { |
58 | 61 | this.set('spectro-resolution', amdaPlotObj.PlotObjectConfig.defaultValues.spectro.resolution); |
59 | 62 | this.set('spectro-log0-as-min', false); |
60 | 63 | this.set('spectro-normalization', "none"); |
64 | + // filtering | |
65 | + this.set( 'filtering-activated', false); | |
66 | + this.set('filtering-level', amdaPlotObj.PlotObjectConfig.defaultValues.filtering.level); | |
61 | 67 | }, |
62 | 68 | |
63 | 69 | getJsonValues : function() |
... | ... | @@ -70,6 +76,8 @@ Ext.define('amdaPlotObj.PlotSpectroObject', { |
70 | 76 | spectroValues['spectro-value-max'] = this.get('spectro-value-max'); |
71 | 77 | spectroValues['spectro-log0-as-min'] = this.get('spectro-log0-as-min'); |
72 | 78 | spectroValues['spectro-normalization'] = this.get('spectro-normalization'); |
79 | + spectroValues['filtering-activated'] = this.get('filtering-activated'); | |
80 | + spectroValues['filtering-level'] = this.get('filtering-level'); | |
73 | 81 | return spectroValues; |
74 | 82 | } |
75 | 83 | }); | ... | ... |
js/app/views/CalculatorUI.js
... | ... | @@ -592,6 +592,7 @@ Ext.define('amdaUI.CalculatorUI', { |
592 | 592 | this.createFunctionBtns('ModelFunctions', 'Models', '#calc_tab_func_id'); |
593 | 593 | this.createFunctionBtns('AmdaFunctions', 'TimeShift', '#calc_tab_func_id'); |
594 | 594 | this.createFunctionBtns('FramesFunctions', 'Frames', '#calc_tab_func_id'); |
595 | + this.createFunctionBtns('FilterFunctions', 'Filter', '#calc_tab_func_id'); | |
595 | 596 | amdaUI.CalculatorUI.functionStore.clearFilter(); |
596 | 597 | |
597 | 598 | // group stat |
... | ... | @@ -699,6 +700,10 @@ Ext.define('amdaUI.CalculatorUI', { |
699 | 700 | amdaUI.CalculatorUI.functionStore.filter('kind', 'frames'); |
700 | 701 | width = .45; |
701 | 702 | break; |
703 | + case 'FilterFunctions' : | |
704 | + amdaUI.CalculatorUI.functionStore.filter('kind', 'filter'); | |
705 | + width = .45; | |
706 | + break; | |
702 | 707 | } |
703 | 708 | |
704 | 709 | var crtTab = funcTab[0].add( | ... | ... |
js/app/views/PlotComponents/PlotSpectroForm.js
... | ... | @@ -22,6 +22,11 @@ Ext.define('amdaPlotComp.PlotSpectroForm', { |
22 | 22 | this.addStandardFloat2('spectro-value-max', 'Max value', -Number.MAX_VALUE, Number.MAX_VALUE, true) |
23 | 23 | ]; |
24 | 24 | }, |
25 | + getFilteringItems: function(){ | |
26 | + return[ | |
27 | + this.addStandardCombo('filtering-level', 'Level', amdaPlotObj.PlotObjectConfig.availableFilteringLevel) | |
28 | + ]; | |
29 | + }, | |
25 | 30 | |
26 | 31 | getFormItems: function() { |
27 | 32 | var me = this; |
... | ... | @@ -43,7 +48,8 @@ Ext.define('amdaPlotComp.PlotSpectroForm', { |
43 | 48 | { |
44 | 49 | me.object.set('spectro-normalization', value); |
45 | 50 | } |
46 | - }) | |
51 | + }), | |
52 | + this.addStandardFieldSet('Filtering', 'filtering-activated', this.getFilteringItems()) | |
47 | 53 | ]; |
48 | 54 | } |
49 | 55 | }); | ... | ... |