Mercurial > repos > jcb-mpl > detrend
changeset 12:3a9c0c99bb54 draft
avec scilab-6.1.0
author | jcb-mpl |
---|---|
date | Fri, 25 Jun 2021 09:24:37 +0000 |
parents | 9b2e122472a4 |
children | 0cd4026ab644 |
files | detrend_sci.xml |
diffstat | 1 files changed, 126 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/detrend_sci.xml Fri Jun 25 09:24:37 2021 +0000 @@ -0,0 +1,126 @@ +<tool id="V20.10_detrend_sci" name="DT" version="20.05"> + <description>Detrend</description> + +<requirements> + <requirement type="package" version="6.0.2" >scilab</requirement> +</requirements> + +<stdio> +<exit_code range="1:" level="fatal" /> +</stdio> + +<command><![CDATA[ +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 +]]> + </command> + + <configfiles> + <configfile name="script_file"> + lasterror(); ... + if ~isdef('pls') then ... + atomsInstall('FACT'); ... + atomsLoad('FACT'); ... + end; ... + lasterror(%f); ... + x=glx_tab2div("${Xdata.file_name}"); ... + x2=detrending(x,${degre}); ... + div2tab(x2,"${DT}"); ... + if ~isempty(lasterror(%f)) ... + write(0,lasterror()) ... + end + </configfile> + </configfiles> + + <inputs> + <param name="Xdata" type="data" format="tabular" label="Select X data" help="Dataset (n x p) containing the n spectra of p variables."/> + <param name="degre" type="integer" value="2" min="0" max="5" label="Degree of the polynom"/> + </inputs> + + <outputs> + <data name="DT" format="tabular" label="DT(${Xdata.name})" /> + </outputs> + + <tests> + <test> + <param name="Xdata" value="test_detrend_input.tabular"/> + <param name="degre" value="2" /> + + <output name="DT" > + <assert_contents> + <has_text text="0.000838"/> + <has_text text="-0.000194"/> + <has_text text="-0.000131"/> + <has_text text="0.001114"/> + </assert_contents> + </output> + + </test> + </tests> + +<help> + +.. class:: warningmark + +**TIP:** If your data is not TAB delimited, use *Convert format data Tools->Convert* + +.. class:: infomark + +**Authors** Fabien Gogé (IRSTEA), Virginie Rossard (INRA), Eric Latrille (INRA), Jean-Michel Roger (IRSTEA), Jean-Claude Boulet (INRA) + + +--------------------------------------------------- + +======= +DETREND +======= + +----------- +Description +----------- + + +Performs **Detrend**, a baseline correction by orthogonal projection onto a n-order polynomial. +Missing values are not allowed. This scripts uses the FACT-version module. + + +----------- +Input files +----------- + +A matrix of numeric data with headers (tabular format) and decimal separator ".". + + ++--------+-------+--------+ +| Name | 400 | 402 | ++========+=======+========+ +|M102T645| 0.63 |0.64 | ++--------+-------+--------+ +|M105T604| 0.5 |0.49 | ++--------+-------+--------+ + +---------- +Parameters +---------- + +**Degree of the polynom** + +The degree of the polynom used in the Detrend correction + +------------ +Output files +------------ + +**DT(input.file_name)** + +A dataset containing the input file after the Detrend correction; format = tabular. + +</help> + +<citations> + + <citation type="doi">10.1366/0003702894202201</citation> + + </citations> + + +</tool>