|
12
|
1 <tool id="V20.10_detrend_sci" name="DT" version="20.05">
|
|
|
2 <description>Detrend</description>
|
|
|
3
|
|
|
4 <requirements>
|
|
|
5 <requirement type="package" version="6.0.2" >scilab</requirement>
|
|
|
6 </requirements>
|
|
|
7
|
|
|
8 <stdio>
|
|
|
9 <exit_code range="1:" level="fatal" />
|
|
|
10 </stdio>
|
|
|
11
|
|
|
12 <command><![CDATA[
|
|
|
13 if [ ! -d /data/singularity ]; then $__root_dir__/packages/scilab-6.1.0/bin/scilab-cli -nb -quit -f $* < ${script_file}; else /usr/local/bin/singularity exec -B /data /data/singularity/scilab.sif scilab-cli -nb -quit -f $* < ${script_file}; fi
|
|
|
14 ]]>
|
|
|
15 </command>
|
|
|
16
|
|
|
17 <configfiles>
|
|
|
18 <configfile name="script_file">
|
|
|
19 lasterror(); ...
|
|
|
20 if ~isdef('pls') then ...
|
|
|
21 atomsInstall('FACT'); ...
|
|
|
22 atomsLoad('FACT'); ...
|
|
|
23 end; ...
|
|
|
24 lasterror(%f); ...
|
|
|
25 x=glx_tab2div("${Xdata.file_name}"); ...
|
|
|
26 x2=detrending(x,${degre}); ...
|
|
|
27 div2tab(x2,"${DT}"); ...
|
|
|
28 if ~isempty(lasterror(%f)) ...
|
|
|
29 write(0,lasterror()) ...
|
|
|
30 end
|
|
|
31 </configfile>
|
|
|
32 </configfiles>
|
|
|
33
|
|
|
34 <inputs>
|
|
|
35 <param name="Xdata" type="data" format="tabular" label="Select X data" help="Dataset (n x p) containing the n spectra of p variables."/>
|
|
|
36 <param name="degre" type="integer" value="2" min="0" max="5" label="Degree of the polynom"/>
|
|
|
37 </inputs>
|
|
|
38
|
|
|
39 <outputs>
|
|
|
40 <data name="DT" format="tabular" label="DT(${Xdata.name})" />
|
|
|
41 </outputs>
|
|
|
42
|
|
|
43 <tests>
|
|
|
44 <test>
|
|
|
45 <param name="Xdata" value="test_detrend_input.tabular"/>
|
|
|
46 <param name="degre" value="2" />
|
|
|
47
|
|
|
48 <output name="DT" >
|
|
|
49 <assert_contents>
|
|
|
50 <has_text text="0.000838"/>
|
|
|
51 <has_text text="-0.000194"/>
|
|
|
52 <has_text text="-0.000131"/>
|
|
|
53 <has_text text="0.001114"/>
|
|
|
54 </assert_contents>
|
|
|
55 </output>
|
|
|
56
|
|
|
57 </test>
|
|
|
58 </tests>
|
|
|
59
|
|
|
60 <help>
|
|
|
61
|
|
|
62 .. class:: warningmark
|
|
|
63
|
|
|
64 **TIP:** If your data is not TAB delimited, use *Convert format data Tools->Convert*
|
|
|
65
|
|
|
66 .. class:: infomark
|
|
|
67
|
|
|
68 **Authors** Fabien Gogé (IRSTEA), Virginie Rossard (INRA), Eric Latrille (INRA), Jean-Michel Roger (IRSTEA), Jean-Claude Boulet (INRA)
|
|
|
69
|
|
|
70
|
|
|
71 ---------------------------------------------------
|
|
|
72
|
|
|
73 =======
|
|
|
74 DETREND
|
|
|
75 =======
|
|
|
76
|
|
|
77 -----------
|
|
|
78 Description
|
|
|
79 -----------
|
|
|
80
|
|
|
81
|
|
|
82 Performs **Detrend**, a baseline correction by orthogonal projection onto a n-order polynomial.
|
|
|
83 Missing values are not allowed. This scripts uses the FACT-version module.
|
|
|
84
|
|
|
85
|
|
|
86 -----------
|
|
|
87 Input files
|
|
|
88 -----------
|
|
|
89
|
|
|
90 A matrix of numeric data with headers (tabular format) and decimal separator ".".
|
|
|
91
|
|
|
92
|
|
|
93 +--------+-------+--------+
|
|
|
94 | Name | 400 | 402 |
|
|
|
95 +========+=======+========+
|
|
|
96 |M102T645| 0.63 |0.64 |
|
|
|
97 +--------+-------+--------+
|
|
|
98 |M105T604| 0.5 |0.49 |
|
|
|
99 +--------+-------+--------+
|
|
|
100
|
|
|
101 ----------
|
|
|
102 Parameters
|
|
|
103 ----------
|
|
|
104
|
|
|
105 **Degree of the polynom**
|
|
|
106
|
|
|
107 The degree of the polynom used in the Detrend correction
|
|
|
108
|
|
|
109 ------------
|
|
|
110 Output files
|
|
|
111 ------------
|
|
|
112
|
|
|
113 **DT(input.file_name)**
|
|
|
114
|
|
|
115 A dataset containing the input file after the Detrend correction; format = tabular.
|
|
|
116
|
|
|
117 </help>
|
|
|
118
|
|
|
119 <citations>
|
|
|
120
|
|
|
121 <citation type="doi">10.1366/0003702894202201</citation>
|
|
|
122
|
|
|
123 </citations>
|
|
|
124
|
|
|
125
|
|
|
126 </tool>
|