Mercurial > repos > jcb-mpl > detrend
changeset 2:f478340e107e draft
Deleted selected files
| author | jcb-mpl |
|---|---|
| date | Fri, 03 May 2019 16:49:42 -0400 |
| parents | c55240b22f3e |
| children | b7200c558191 |
| files | detrend_sci.xml scilab_wrapper.sh |
| diffstat | 2 files changed, 0 insertions(+), 148 deletions(-) [+] |
line wrap: on
line diff
--- a/detrend_sci.xml Fri May 03 16:49:11 2019 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,125 +0,0 @@ -<tool id="V17.10_detrend_sci" name="DT" version="0.0.1"> - <description> Detrend </description> - <requirements> - - </requirements> - - <command interpreter="bash">scilab_wrapper.sh $script_file</command> - - <configfiles> - <configfile name="script_file"> - //importation de FACT - lasterror(); - f=atomsLoad(["FACT"]); - stacksize('max'); - lasterror(%f); - - //importation des donnees - x=glx_tab2div("${Xdata.file_name}"); - - // calcul de detrend - x2=detrending(x,${degre}); - - // Export des resultats - kill=div2tab(x2,"${DT}"); - - //ecrit le error message dans stderr si erreur - if ~isempty(lasterror(%f)) - write(0,lasterror()); - end - </configfile> - </configfiles> - - <inputs> - <param name="Xdata" format="tabular" type="data" 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.054685"/> - <has_text text="0.054962"/> - <has_text text="0.054208"/> - <has_text text="0.055263"/> - </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>
--- a/scilab_wrapper.sh Fri May 03 16:49:11 2019 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,23 +0,0 @@ -#!/bin/sh - -### Run scilab providing the scilab script in $1 as standard input and passing -### the remaining arguments on the command line - -# Function that writes a message to stderr and exits -fail() -{ - echo "$@" >&2 - exit 1 -} - -# Ensure scilab executable is found -which scilab > /dev/null || fail "'scilab' is required by this tool but was not found on path" - -# Extract first argument -infile=$1; shift - -# Ensure the file exists -test -f $infile || fail "scilab input file '$infile' does not exist" - -# Invoke scilab passing file named by first argument to stdin -scilab-cli -nb -noatomsautoload -f $* < $infile
