changeset 1:c55240b22f3e draft

Uploaded
author jcb-mpl
date Fri, 03 May 2019 16:49:11 -0400
parents 6e7e32f72354
children f478340e107e
files detrend_sci602.xml
diffstat 1 files changed, 22 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/detrend_sci602.xml	Mon Apr 29 17:18:56 2019 -0400
+++ b/detrend_sci602.xml	Fri May 03 16:49:11 2019 -0400
@@ -1,30 +1,35 @@
-<tool id="V18.10_detrend_sci602" name="DT" version="0.0.1">
+<tool id="V18.10_detrend_sci602bis" name="DT" version="0.0.1">
   <description>  Detrend </description>
   <requirements>
-   <requirement type="package" version="6.0.2">Scilab</requirement>
-   <requirement type="package" version="1.0">FACT</requirement>
+  
   </requirements>
+ 
+<stdio> 
+<exit_code range="1:" level="fatal" />
+</stdio>  
 
-  <command interpreter="bash">scilab602_wrapper.sh $script_file</command>
+<command><![CDATA[
+if [ ! -d $__root_dir__/database/dependencies/scilab-6.0.2 ]; then  echo 'cp -r . $__root_dir__/database/dependencies'  >> $__tool_directory__/conda_scilab6.0.2/build.sh;  conda-build $__tool_directory__/conda_scilab6.0.2; else $__root_dir__/database/dependencies/scilab-6.0.2/bin/scilab-cli -nb -f '$script_file'; fi
+]]>
+ </command>
 
-  <configfiles>
+
+ <configfiles>
     <configfile name="script_file">
-      ... //Verification de l'installation de Scilab
-      if ~isdef('pls') then  ...
-	atomsInstall('FACT'); ...
+      if ~isdef('pls') then ...
+      atomsInstall('FACT'); ...
+      atomsLoad('FACT'); ...
       end; ...
-      ...
-      x=glx_tab2div("${Xdata.file_name}"); ... //importation des donnees
-      ...
-      x2=detrending(x,${degre}); ... // calcul de detrend
-      ...
-      kill=div2tab(x2,"${DT}"); ... // Export des resultats
-      if ~isempty(lasterror(%f)); ... //ecrit le message d'erreur dans stderr si erreur
-        write(0,lasterror()); ...
-      end;
+      x=glx_tab2div("${Xdata.file_name}"); ...
+      x2=detrending(x,${degre}); ...
+      kill=div2tab(x2,"${DT}"); ...
+      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"/>