]> Creatis software - vip-workflow-creaphase.git/commitdiff
integrated 3wires and 1D simulators; renamed existing one in circle
authorSorina Pop <sorina.pop@creatis.insa-lyon.fr>
Tue, 13 Sep 2016 11:04:27 +0000 (13:04 +0200)
committerSorina Pop <sorina.pop@creatis.insa-lyon.fr>
Tue, 13 Sep 2016 11:04:27 +0000 (13:04 +0200)
bin/1D_CreaPhase.sh [new file with mode: 0755]
bin/3wires_CreaPhase.sh [new file with mode: 0755]
bin/circle_CreaPhase.sh [new file with mode: 0755]
gasw/1D_CreaPhase.xml [new file with mode: 0644]
gasw/3wires_CreaPhase.xml [new file with mode: 0644]
gasw/circle_CreaPhase.xml [new file with mode: 0644]
workflow/1D_CreaPhase.gwendia [new file with mode: 0644]
workflow/3wires_CreaPhase.gwendia [new file with mode: 0644]
workflow/circle_CreaPhase.gwendia [new file with mode: 0644]

diff --git a/bin/1D_CreaPhase.sh b/bin/1D_CreaPhase.sh
new file mode 100755 (executable)
index 0000000..0e0e6c2
--- /dev/null
@@ -0,0 +1,114 @@
+#!/bin/bash
+
+#     Functions     #
+
+function info {
+  local D=`date`
+  echo [ INFO - $D ] $*
+}
+
+function warning {
+  local D=`date`
+  echo [ WARN - $D ] $*
+}
+
+function error {
+  local D=`date`
+  echo [ ERROR - $D ] $* >&2
+}
+
+function downloadLFN {
+
+  local LFN=$1
+  local LOCAL=${PWD}/`basename ${LFN}`
+
+  info "getting file size and computing sendReceiveTimeout"
+  size=`lfc-ls -l ${LFN} | awk -F' ' '{print $5}'`
+  sendReceiveTimeout=`echo $[${size}/150/1024]`
+  if [ "$sendReceiveTimeout" = "" ] || [ $sendReceiveTimeout -le 900 ]; then echo "sendReceiveTimeout empty or too small, setting it to 900s"; sendReceiveTimeout=900; else echo "sendReceiveTimeout is $sendReceiveTimeout"; fi;
+  info "Removing file ${LOCAL} in case it is already here"
+  \rm -f ${LOCAL}
+
+  info "Checking if the file is on local SE ${VO_BIOMED_DEFAULT_SE}"
+  local closeSURL=`lcg-lr lfn:${LFN} | grep ${VO_BIOMED_DEFAULT_SE}`
+  if [ "${closeSURL}" != "" ]
+  then
+    info "It is. Trying to download the file from there"
+    LINE="lcg-cp -v --connect-timeout 10 --sendreceive-timeout $sendReceiveTimeout --bdii-timeout 10 --srm-timeout 30 ${closeSURL} file:${LOCAL}"
+    info ${LINE}
+    ${LINE} &> lcg-log
+    if [ $? = 0 ]
+    then
+      info "lcg-cp worked fine"
+      lcg_source=`cat lcg-log | awk -F"://" '/Trying SURL srm/ {print $2}' | awk -F"/" '{print $1}'|awk -F":" '{print $1}'`;
+      lcg_destination=`hostname`;
+      lcg_time=`cat lcg-log | awk '/Transfer took/ {print $3$4}'`;
+      info "DownloadCommand=lcg-cp Source=$lcg_source Destination=$lcg_destination Size=$size Time=$lcg_time";
+      return 0
+    else
+      error "It failed, falling back on regular lcg-cp"
+    fi
+  else
+    info "It's not, falling back on regular lcg-cp"
+  fi
+
+info "Downloading file ${LFN}..."
+LINE="lcg-cp -v --connect-timeout 10 --sendreceive-timeout $sendReceiveTimeout --bdii-timeout 10 --srm-timeout 30 lfn:${LFN} file:${LOCAL}"
+info ${LINE}
+${LINE} &> lcg-log
+if [ $? = 0 ]
+then
+  info "lcg-cp worked fine"
+  lcg_source=`cat lcg-log | awk -F"://" '/Trying SURL srm/ {print $2}' | awk -F"/" '{print $1}'|awk -F":" '{print $1}'`;
+  lcg_destination=`hostname`;
+  lcg_time=`cat lcg-log | awk '/Transfer took/ {print $3$4}'`;
+  info "DownloadCommand=lcg-cp Source=$lcg_source Destination=$lcg_destination Size=$size Time=$lcg_time";
+else
+  error "lcg-cp failed"
+  error "`cat lcg-log`"
+  return 1
+fi
+\rm lcg-log 
+}
+
+# Arguments parsing #
+RES=$1
+COMM_LINE=`echo "${@:2:$(($#-2))}"`
+# Command-line construction #
+
+#echo "COMM line is $COMM_LINE"
+#remove flags starting with --
+#BOUTIQUES_ARGS="$(echo ${COMM_LINE} | sed 's/[--][[:alpha:]]*/,/g')"
+BOUTIQUES_ARGS="$(echo ${COMM_LINE} | sed 's/ , /, /g')"
+#remove leading ,,
+#BOUTIQUES_ARGS="$(echo ${BOUTIQUES_ARGS} | sed 's/^,, //g')"
+BOUTIQUES_COMMAND_LINE="octave --silent --eval \"SimuPBI_unknown_1D_func(${BOUTIQUES_ARGS})\""
+echo "Boutiques COMM line is $BOUTIQUES_COMMAND_LINE"
+
+
+#WARNING Cheating here : we know that outputs are written in dirOut
+DIROUT="dirOut"
+# Command-line execution #
+
+cat << DOCKERJOB > .dockerjob.sh
+#!/bin/bash -l
+cd /CreaPhase
+${BOUTIQUES_COMMAND_LINE}
+DOCKERJOB
+
+mkdir $DIROUT
+chmod 755 .dockerjob.sh
+#.dockerjob.sh script needs to be found in the workdir, ten we need to cd to /CreaPhase to be able to execute SimuPBI_circle_func
+docker run --rm -v $PWD:/gasw-dir -v $PWD/$DIROUT:/CreaPhase/$DIROUT -v $PWD/../cache:$PWD/../cache -w /gasw-dir -u `id -u`:`id -g` camarasu/creaphase ./.dockerjob.sh
+
+if [ $? != 0 ]
+then
+    echo "CreaPhase execution failed!"
+    exit 1
+fi
+
+tar -czvf result.tgz $DIROUT
+
+
+echo "Execution of CreaPhase completed."
+
diff --git a/bin/3wires_CreaPhase.sh b/bin/3wires_CreaPhase.sh
new file mode 100755 (executable)
index 0000000..86f77dd
--- /dev/null
@@ -0,0 +1,114 @@
+#!/bin/bash
+
+#     Functions     #
+
+function info {
+  local D=`date`
+  echo [ INFO - $D ] $*
+}
+
+function warning {
+  local D=`date`
+  echo [ WARN - $D ] $*
+}
+
+function error {
+  local D=`date`
+  echo [ ERROR - $D ] $* >&2
+}
+
+function downloadLFN {
+
+  local LFN=$1
+  local LOCAL=${PWD}/`basename ${LFN}`
+
+  info "getting file size and computing sendReceiveTimeout"
+  size=`lfc-ls -l ${LFN} | awk -F' ' '{print $5}'`
+  sendReceiveTimeout=`echo $[${size}/150/1024]`
+  if [ "$sendReceiveTimeout" = "" ] || [ $sendReceiveTimeout -le 900 ]; then echo "sendReceiveTimeout empty or too small, setting it to 900s"; sendReceiveTimeout=900; else echo "sendReceiveTimeout is $sendReceiveTimeout"; fi;
+  info "Removing file ${LOCAL} in case it is already here"
+  \rm -f ${LOCAL}
+
+  info "Checking if the file is on local SE ${VO_BIOMED_DEFAULT_SE}"
+  local closeSURL=`lcg-lr lfn:${LFN} | grep ${VO_BIOMED_DEFAULT_SE}`
+  if [ "${closeSURL}" != "" ]
+  then
+    info "It is. Trying to download the file from there"
+    LINE="lcg-cp -v --connect-timeout 10 --sendreceive-timeout $sendReceiveTimeout --bdii-timeout 10 --srm-timeout 30 ${closeSURL} file:${LOCAL}"
+    info ${LINE}
+    ${LINE} &> lcg-log
+    if [ $? = 0 ]
+    then
+      info "lcg-cp worked fine"
+      lcg_source=`cat lcg-log | awk -F"://" '/Trying SURL srm/ {print $2}' | awk -F"/" '{print $1}'|awk -F":" '{print $1}'`;
+      lcg_destination=`hostname`;
+      lcg_time=`cat lcg-log | awk '/Transfer took/ {print $3$4}'`;
+      info "DownloadCommand=lcg-cp Source=$lcg_source Destination=$lcg_destination Size=$size Time=$lcg_time";
+      return 0
+    else
+      error "It failed, falling back on regular lcg-cp"
+    fi
+  else
+    info "It's not, falling back on regular lcg-cp"
+  fi
+
+info "Downloading file ${LFN}..."
+LINE="lcg-cp -v --connect-timeout 10 --sendreceive-timeout $sendReceiveTimeout --bdii-timeout 10 --srm-timeout 30 lfn:${LFN} file:${LOCAL}"
+info ${LINE}
+${LINE} &> lcg-log
+if [ $? = 0 ]
+then
+  info "lcg-cp worked fine"
+  lcg_source=`cat lcg-log | awk -F"://" '/Trying SURL srm/ {print $2}' | awk -F"/" '{print $1}'|awk -F":" '{print $1}'`;
+  lcg_destination=`hostname`;
+  lcg_time=`cat lcg-log | awk '/Transfer took/ {print $3$4}'`;
+  info "DownloadCommand=lcg-cp Source=$lcg_source Destination=$lcg_destination Size=$size Time=$lcg_time";
+else
+  error "lcg-cp failed"
+  error "`cat lcg-log`"
+  return 1
+fi
+\rm lcg-log 
+}
+
+# Arguments parsing #
+RES=$1
+COMM_LINE=`echo "${@:2:$(($#-2))}"`
+# Command-line construction #
+
+#echo "COMM line is $COMM_LINE"
+#remove flags starting with --
+#BOUTIQUES_ARGS="$(echo ${COMM_LINE} | sed 's/[--][[:alpha:]]*/,/g')"
+BOUTIQUES_ARGS="$(echo ${COMM_LINE} | sed 's/ , /, /g')"
+#remove leading ,,
+#BOUTIQUES_ARGS="$(echo ${BOUTIQUES_ARGS} | sed 's/^,, //g')"
+BOUTIQUES_COMMAND_LINE="octave --silent --eval \"SimuPBI_3WiresPhant_func(${BOUTIQUES_ARGS})\""
+echo "Boutiques COMM line is $BOUTIQUES_COMMAND_LINE"
+
+
+#WARNING Cheating here : we know that outputs are written in dirOut
+DIROUT="dirOut"
+# Command-line execution #
+
+cat << DOCKERJOB > .dockerjob.sh
+#!/bin/bash -l
+cd /CreaPhase
+${BOUTIQUES_COMMAND_LINE}
+DOCKERJOB
+
+mkdir $DIROUT
+chmod 755 .dockerjob.sh
+#.dockerjob.sh script needs to be found in the workdir, ten we need to cd to /CreaPhase to be able to execute SimuPBI_circle_func
+docker run --rm -v $PWD:/gasw-dir -v $PWD/$DIROUT:/CreaPhase/$DIROUT -v $PWD/../cache:$PWD/../cache -w /gasw-dir -u `id -u`:`id -g` camarasu/creaphase ./.dockerjob.sh
+
+if [ $? != 0 ]
+then
+    echo "CreaPhase execution failed!"
+    exit 1
+fi
+
+tar -czvf result.tgz $DIROUT
+
+
+echo "Execution of CreaPhase completed."
+
diff --git a/bin/circle_CreaPhase.sh b/bin/circle_CreaPhase.sh
new file mode 100755 (executable)
index 0000000..bf04443
--- /dev/null
@@ -0,0 +1,114 @@
+#!/bin/bash
+
+#     Functions     #
+
+function info {
+  local D=`date`
+  echo [ INFO - $D ] $*
+}
+
+function warning {
+  local D=`date`
+  echo [ WARN - $D ] $*
+}
+
+function error {
+  local D=`date`
+  echo [ ERROR - $D ] $* >&2
+}
+
+function downloadLFN {
+
+  local LFN=$1
+  local LOCAL=${PWD}/`basename ${LFN}`
+
+  info "getting file size and computing sendReceiveTimeout"
+  size=`lfc-ls -l ${LFN} | awk -F' ' '{print $5}'`
+  sendReceiveTimeout=`echo $[${size}/150/1024]`
+  if [ "$sendReceiveTimeout" = "" ] || [ $sendReceiveTimeout -le 900 ]; then echo "sendReceiveTimeout empty or too small, setting it to 900s"; sendReceiveTimeout=900; else echo "sendReceiveTimeout is $sendReceiveTimeout"; fi;
+  info "Removing file ${LOCAL} in case it is already here"
+  \rm -f ${LOCAL}
+
+  info "Checking if the file is on local SE ${VO_BIOMED_DEFAULT_SE}"
+  local closeSURL=`lcg-lr lfn:${LFN} | grep ${VO_BIOMED_DEFAULT_SE}`
+  if [ "${closeSURL}" != "" ]
+  then
+    info "It is. Trying to download the file from there"
+    LINE="lcg-cp -v --connect-timeout 10 --sendreceive-timeout $sendReceiveTimeout --bdii-timeout 10 --srm-timeout 30 ${closeSURL} file:${LOCAL}"
+    info ${LINE}
+    ${LINE} &> lcg-log
+    if [ $? = 0 ]
+    then
+      info "lcg-cp worked fine"
+      lcg_source=`cat lcg-log | awk -F"://" '/Trying SURL srm/ {print $2}' | awk -F"/" '{print $1}'|awk -F":" '{print $1}'`;
+      lcg_destination=`hostname`;
+      lcg_time=`cat lcg-log | awk '/Transfer took/ {print $3$4}'`;
+      info "DownloadCommand=lcg-cp Source=$lcg_source Destination=$lcg_destination Size=$size Time=$lcg_time";
+      return 0
+    else
+      error "It failed, falling back on regular lcg-cp"
+    fi
+  else
+    info "It's not, falling back on regular lcg-cp"
+  fi
+
+info "Downloading file ${LFN}..."
+LINE="lcg-cp -v --connect-timeout 10 --sendreceive-timeout $sendReceiveTimeout --bdii-timeout 10 --srm-timeout 30 lfn:${LFN} file:${LOCAL}"
+info ${LINE}
+${LINE} &> lcg-log
+if [ $? = 0 ]
+then
+  info "lcg-cp worked fine"
+  lcg_source=`cat lcg-log | awk -F"://" '/Trying SURL srm/ {print $2}' | awk -F"/" '{print $1}'|awk -F":" '{print $1}'`;
+  lcg_destination=`hostname`;
+  lcg_time=`cat lcg-log | awk '/Transfer took/ {print $3$4}'`;
+  info "DownloadCommand=lcg-cp Source=$lcg_source Destination=$lcg_destination Size=$size Time=$lcg_time";
+else
+  error "lcg-cp failed"
+  error "`cat lcg-log`"
+  return 1
+fi
+\rm lcg-log 
+}
+
+# Arguments parsing #
+RES=$1
+COMM_LINE=`echo "${@:2:$(($#-2))}"`
+# Command-line construction #
+
+#echo "COMM line is $COMM_LINE"
+#remove flags starting with --
+#BOUTIQUES_ARGS="$(echo ${COMM_LINE} | sed 's/[--][[:alpha:]]*/,/g')"
+BOUTIQUES_ARGS="$(echo ${COMM_LINE} | sed 's/ , /, /g')"
+#remove leading ,,
+#BOUTIQUES_ARGS="$(echo ${BOUTIQUES_ARGS} | sed 's/^,, //g')"
+BOUTIQUES_COMMAND_LINE="octave --silent --eval \"SimuPBI_circle_func(${BOUTIQUES_ARGS})\""
+echo "Boutiques COMM line is $BOUTIQUES_COMMAND_LINE"
+
+
+#WARNING Cheating here : we know that outputs are written in dirOut
+DIROUT="dirOut"
+# Command-line execution #
+
+cat << DOCKERJOB > .dockerjob.sh
+#!/bin/bash -l
+cd /CreaPhase
+${BOUTIQUES_COMMAND_LINE}
+DOCKERJOB
+
+mkdir $DIROUT
+chmod 755 .dockerjob.sh
+#.dockerjob.sh script needs to be found in the workdir, ten we need to cd to /CreaPhase to be able to execute SimuPBI_circle_func
+docker run --rm -v $PWD:/gasw-dir -v $PWD/$DIROUT:/CreaPhase/$DIROUT -v $PWD/../cache:$PWD/../cache -w /gasw-dir -u `id -u`:`id -g` camarasu/creaphase ./.dockerjob.sh
+
+if [ $? != 0 ]
+then
+    echo "CreaPhase execution failed!"
+    exit 1
+fi
+
+tar -czvf result.tgz $DIROUT
+
+
+echo "Execution of CreaPhase completed."
+
diff --git a/gasw/1D_CreaPhase.xml b/gasw/1D_CreaPhase.xml
new file mode 100644 (file)
index 0000000..6a79eef
--- /dev/null
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<description>
+  <executable name="1D_CreaPhase.sh">
+    <access type="LFN" cached="true"/> 
+    <retrycount value="1"/>
+    <value value="[BIN_DIR]/1D_CreaPhase.sh"/>
+    <executor value="LOCAL"/>
+    <input name="results-directory" option="no1"> 
+    </input>
+    <input name="oversamp" option=","> 
+    </input>
+    <input name="basename" option=","> 
+    </input>
+    <input name="dist" option=","> 
+    </input>
+    <input name="energy" option=","> 
+    </input>
+    <input name="pixelSize" option=","> 
+    </input>
+    <input name="nbProj" option=","> 
+    </input>
+    <input name="rangeAngle" option=","> 
+    </input>
+    <input name="modelCtf" option=","> 
+    </input>
+    <input name="modelFresnel" option=","> 
+    </input>
+    <input name="muMat" option="no2"> 
+      <access type="LFN" cached="true">
+    </input>
+    <input name="deltaMat" option="no3"> 
+      <access type="LFN" cached="true">
+    </input>
+    <input name="muMat" option=","> 
+    </input>
+    <input name="deltaMat" option=","> 
+    </input>
+    <input name="dirOut" option=","> 
+    </input>
+    <input name="noiseType" option=","> 
+    </input>
+    <input name="noiseAmount" option=","> 
+    </input>
+    <output name="resultTarball" option="no20">
+      <template value="$dir1/$na1/result.tgz"/>
+      <access type="LFN"/>
+    </output>
+  </executable>
+</description>
diff --git a/gasw/3wires_CreaPhase.xml b/gasw/3wires_CreaPhase.xml
new file mode 100644 (file)
index 0000000..1b112bc
--- /dev/null
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<description>
+  <executable name="3wires_CreaPhase.sh">
+    <access type="LFN" cached="true"/> 
+    <retrycount value="1"/>
+    <value value="[BIN_DIR]/3wires_CreaPhase.sh"/>
+    <executor value="LOCAL"/>
+    <input name="results-directory" option="no1"> 
+    </input>
+    <input name="vers" option="no2"> 
+    </input>
+    <input name="oversamp" option=","> 
+    </input>
+    <input name="basename" option=","> 
+    </input>
+    <input name="dist" option=","> 
+    </input>
+    <input name="energy" option=","> 
+    </input>
+    <input name="pixelSize" option=","> 
+    </input>
+    <input name="nbProj" option=","> 
+    </input>
+    <input name="rangeAngle" option=","> 
+    </input>
+    <input name="modelCtf" option=","> 
+    </input>
+    <input name="modelFresnel" option=","> 
+    </input>
+    <input name="height" option=","> 
+    </input>
+    <input name="dirOut" option=","> 
+    </input>
+    <input name="noiseType" option=","> 
+    </input>
+    <input name="noiseAmount" option=","> 
+    </input>
+    <output name="resultTarball" option="no20">
+      <template value="$dir1/$na1/result.tgz"/>
+      <access type="LFN"/>
+    </output>
+  </executable>
+</description>
diff --git a/gasw/circle_CreaPhase.xml b/gasw/circle_CreaPhase.xml
new file mode 100644 (file)
index 0000000..efef116
--- /dev/null
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<description>
+  <executable name="circle_CreaPhase.sh">
+    <access type="LFN" cached="true"/> 
+    <retrycount value="1"/>
+    <value value="[BIN_DIR]/circle_CreaPhase.sh"/>
+    <executor value="LOCAL"/>
+    <input name="results-directory" option="no1"> 
+    </input>
+    <input name="vers" option="no2"> 
+    </input>
+    <input name="oversamp" option=","> 
+    </input>
+    <input name="basename" option=","> 
+    </input>
+    <input name="dist" option=","> 
+    </input>
+    <input name="energy" option=","> 
+    </input>
+    <input name="pixelSize" option=","> 
+    </input>
+    <input name="nbProj" option=","> 
+    </input>
+    <input name="rangeAngle" option=","> 
+    </input>
+    <input name="modelCtf" option=","> 
+    </input>
+    <input name="modelFresnel" option=","> 
+    </input>
+    <input name="muMat" option=","> 
+    </input>
+    <input name="deltaMat" option=","> 
+    </input>
+    <input name="Rcircle" option=","> 
+    </input>
+    <input name="imageSize" option=","> 
+    </input>
+    <input name="circleCenter" option=","> 
+    </input>
+    <input name="dirOut" option=","> 
+    </input>
+    <input name="noiseType" option=","> 
+    </input>
+    <input name="noiseAmount" option=","> 
+    </input>
+    <output name="resultTarball" option="no20">
+      <template value="$dir1/$na1/result.tgz"/>
+      <access type="LFN"/>
+    </output>
+  </executable>
+</description>
diff --git a/workflow/1D_CreaPhase.gwendia b/workflow/1D_CreaPhase.gwendia
new file mode 100644 (file)
index 0000000..16a58ae
--- /dev/null
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<workflow name="1D_CreaPhase" version="0.1">
+
+  <description>Propagation-based phase contrast images generation</description>
+
+  <interface>
+    <source name="results-directory" type="uri">
+      <source-comment>&lt;b&gt;&lt;font color=blue&gt;results-directory&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;Directory&lt;/font&gt;&lt;/b&gt;): Directory where the results will be stored.
+      </source-comment>
+    </source>
+    <source name="oversamp" type="string">
+      <source-comment>&lt;b&gt;&lt;font color=blue&gt;oversamp&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;Number&lt;/font&gt;&lt;/b&gt;): Oversampling of the projections : use 2 or 4
+      </source-comment>
+    </source>
+    <source name="basename" type="string">
+      <source-comment>&lt;b&gt;&lt;font color=blue&gt;basename&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;String&lt;/font&gt;&lt;/b&gt;): Basename of the result files
+      </source-comment>
+    </source>
+    <source name="dist" type="string">
+      <source-comment>&lt;b&gt;&lt;font color=blue&gt;dist&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;String&lt;/font&gt;&lt;/b&gt;):  Distances of propagation (in m), e.g. 0 0.01 0.1 0.20 0.50
+      </source-comment>
+    </source>
+    <source name="energy" type="string">
+      <source-comment>&lt;b&gt;&lt;font color=blue&gt;energy&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;Number&lt;/font&gt;&lt;/b&gt;): Energy of the incoming X-ray beam (in keV)
+      </source-comment>
+    </source>
+    <source name="pixelSize" type="string">
+      <source-comment>&lt;b&gt;&lt;font color=blue&gt;pixelSize&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;Number&lt;/font&gt;&lt;/b&gt;): Pixel size of the detector (in um)
+      </source-comment>
+    </source>
+    <source name="nbProj" type="string">
+      <source-comment>&lt;b&gt;&lt;font color=blue&gt;nbProj&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;Number&lt;/font&gt;&lt;/b&gt;): Number of projections (e.g., 360)
+      </source-comment>
+    </source>
+    <source name="rangeAngle" type="string">
+      <source-comment>&lt;b&gt;&lt;font color=blue&gt;rangeAngle&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;Number&lt;/font&gt;&lt;/b&gt;): Range of the tomography : 180 or 360 degrees
+      </source-comment>
+    </source>
+    <source name="modelCtf" type="string">
+      <source-comment>&lt;b&gt;&lt;font color=blue&gt;modelCtf&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;Number&lt;/font&gt;&lt;/b&gt;):  Which model do you want to use for the propagation? use 1 or 0
+      </source-comment>
+    </source>
+    <source name="modelFresnel" type="string">
+      <source-comment>&lt;b&gt;&lt;font color=blue&gt;modelFresnel&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;Number&lt;/font&gt;&lt;/b&gt;): Which model do you want to use for the propagation? use 1 or 0
+      </source-comment>
+    </source>
+    <source name="muMatLfn" type="uri">
+      <source-comment>&lt;b&gt;&lt;font color=blue&gt;muMat&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;String&lt;/font&gt;&lt;/b&gt;):  Attenuation map file (in cm^-1)
+      </source-comment>
+    </source>
+    <source name="deltaMatLfn" type="uri">
+      <source-comment>&lt;b&gt;&lt;font color=blue&gt;deltaMat&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;String&lt;/font&gt;&lt;/b&gt;): Refractive index decrement map file (delta)
+      </source-comment>
+    </source>
+    <source name="noiseType" type="string">
+      <source-comment>&lt;b&gt;&lt;font color=blue&gt;noiseType&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;String&lt;/font&gt;&lt;/b&gt;): Use noise='gaussian' (addition of gaussian noise) or noise='poisson' (generation of Poisson noise).
+      </source-comment>
+    </source>
+    <source name="noiseAmount" type="string">
+      <source-comment>&lt;b&gt;&lt;font color=blue&gt;noiseAmount&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;String&lt;/font&gt;&lt;/b&gt;): If 'gaussian' (additive noise), please specify the Peak-to-peak Signe-to-noise ratio (PPSNR, in dB). If 'poisson', please specify a scaling factor ranging in [0:1].
+      </source-comment>
+    </source>
+    <constant name="dirOut" type="string" value="dirOut" cardinality="scalar" />
+    <sink name="resultTarball" type="uri" />
+  </interface>
+
+  <processors>
+    <processor name="append-date" >
+      <in name="dir" type="uri" depth="0" />
+      <out name="result" type="string" depth="0" />
+      <beanshell>/*----------Beginning of Beanshell------------*/
+                        import java.text.DateFormat;
+                        import java.text.SimpleDateFormat;
+                        import java.util.Date;
+
+DateFormat dateFormat = new SimpleDateFormat("dd-MM-yyyy_HH:mm:ss");
+String result = dir.toString()+"/"+(dateFormat.format(System.currentTimeMillis()));
+/*------------End of Beanshell------------*/
+      </beanshell>
+    </processor>
+    <processor name="CreaPhase" >
+      <in name="dirOut" type="string" depth="0" />
+      <in name="dist" type="string" depth="0" />
+      <in name="pixelSize" type="string" depth="0" />
+      <in name="muMat" type="string" depth="0" />
+      <in name="deltaMat" type="string" depth="0" />
+      <in name="modelFresnel" type="string" depth="0" />
+      <in name="rangeAngle" type="string" depth="0" />
+      <in name="nbProj" type="string" depth="0" />
+      <in name="oversamp" type="string" depth="0" />
+      <in name="basename" type="string" depth="0" />
+      <in name="modelCtf" type="string" depth="0" />
+      <in name="noiseAmount" type="string" depth="0" />
+      <in name="noiseType" type="string" depth="0" />
+      <in name="muLfn" type="uri" depth="0" />
+      <in name="deltaLfn" type="uri" depth="0" />
+      <in name="results-directory" type="string" depth="0" />
+      <in name="energy" type="string" depth="0" />
+      <out name="resultTarball" type="uri" depth="0" />
+      <iterationstrategy>
+        <cross>
+          <port name="results-directory" />
+          <port name="oversamp" />
+          <port name="basename" />
+          <port name="dist" />
+          <port name="energy" />
+          <port name="pixelSize" />
+          <port name="nbProj" />
+          <port name="rangeAngle" />
+          <port name="modelCtf" />
+          <port name="modelFresnel" />
+          <port name="muMat" />
+          <port name="deltaMat" />
+          <port name="dirOut" />
+          <port name="noiseType" />
+          <port name="noiseAmount" />
+          <port name="muLfn" />
+          <port name="deltaLfn" />
+        </cross>
+      </iterationstrategy>
+      <gasw descriptor="[GASW_DIR]/1D_CreaPhase.xml"/>
+    </processor>
+    <processor name="append-brackets" >
+      <in name="inputString" type="string" depth="0" />
+      <out name="out" type="string" depth="0" />
+      <beanshell>/*----------Beginning of Beanshell------------*/
+//String toAppend="\\\"";
+out="["+inputString+"]";
+      </beanshell>
+    </processor>
+    <processor name="append-simple-quotes_2" >
+      <in name="inputString" type="string" depth="0" />
+      <out name="out" type="string" depth="0" />
+      <beanshell>/*----------Beginning of Beanshell------------*/
+String toAppend="'";
+out=toAppend+inputString+toAppend;
+      </beanshell>
+    </processor>
+    <processor name="append-simple-quotes_3" >
+      <in name="inputString" type="string" depth="0" />
+      <out name="out" type="string" depth="0" />
+      <beanshell>/*----------Beginning of Beanshell------------*/
+String toAppend="'";
+out=toAppend+inputString+toAppend;
+      </beanshell>
+    </processor>
+    <processor name="append-simple-quotes_4" >
+      <in name="inputString" type="string" depth="0" />
+      <out name="out" type="string" depth="0" />
+      <beanshell>/*----------Beginning of Beanshell------------*/
+String toAppend="'";
+out=toAppend+inputString+toAppend;
+      </beanshell>
+    </processor>
+    <processor name="getFileName_1" >
+      <in name="lfn" type="uri" depth="0" />
+      <out name="fileName" type="string" depth="0" />
+      <beanshell>/*----------Beginning of Beanshell------------*/
+String[] bits = lfn.toString().split("/");
+String lastOne = bits[bits.length-1];
+String toAppend="'";
+fileName=toAppend+lastOne+toAppend;
+      </beanshell>
+    </processor>
+    <processor name="getFileName_2" >
+      <in name="lfn" type="uri" depth="0" />
+      <out name="fileName" type="string" depth="0" />
+      <beanshell>/*----------Beginning of Beanshell------------*/
+String[] bits = lfn.toString().split("/");
+String lastOne = bits[bits.length-1];
+String toAppend="'";
+fileName=toAppend+lastOne+toAppend;
+      </beanshell>
+    </processor>
+  </processors>
+
+  <links>
+      <link from="results-directory" to="append-date:dir" />
+      <link from="append-date:result" to="CreaPhase:results-directory" />
+      <link from="oversamp" to="CreaPhase:oversamp" />
+      <link from="energy" to="CreaPhase:energy" />
+      <link from="pixelSize" to="CreaPhase:pixelSize" />
+      <link from="nbProj" to="CreaPhase:nbProj" />
+      <link from="rangeAngle" to="CreaPhase:rangeAngle" />
+      <link from="modelCtf" to="CreaPhase:modelCtf" />
+      <link from="modelFresnel" to="CreaPhase:modelFresnel" />
+      <link from="noiseAmount" to="CreaPhase:noiseAmount" />
+      <link from="CreaPhase:resultTarball" to="resultTarball" />
+      <link from="dist" to="append-brackets:inputString" />
+      <link from="append-brackets:out" to="CreaPhase:dist" />
+      <link from="basename" to="append-simple-quotes_2:inputString" />
+      <link from="append-simple-quotes_2:out" to="CreaPhase:basename" />
+      <link from="append-simple-quotes_3:out" to="CreaPhase:dirOut" />
+      <link from="noiseType" to="append-simple-quotes_4:inputString" />
+      <link from="append-simple-quotes_4:out" to="CreaPhase:noiseType" />
+      <link from="dirOut" to="append-simple-quotes_3:inputString" />
+      <link from="deltaMatLfn" to="CreaPhase:deltaLfn" />
+      <link from="muMatLfn" to="CreaPhase:muLfn" />
+      <link from="deltaMatLfn" to="getFileName_2:lfn" />
+      <link from="getFileName_2:fileName" to="CreaPhase:deltaMat" />
+      <link from="muMatLfn" to="getFileName_1:lfn" />
+      <link from="getFileName_1:fileName" to="CreaPhase:muMat" />
+  </links>
+
+</workflow>
diff --git a/workflow/3wires_CreaPhase.gwendia b/workflow/3wires_CreaPhase.gwendia
new file mode 100644 (file)
index 0000000..6a1787d
--- /dev/null
@@ -0,0 +1,186 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<workflow name="3wires_CreaPhase" version="0.1">
+
+  <description>Propagation-based phase contrast images generation</description>
+
+  <interface>
+    <source name="results-directory" type="uri">
+      <source-comment>&lt;b&gt;&lt;font color=blue&gt;results-directory&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;Directory&lt;/font&gt;&lt;/b&gt;): Directory where the results will be stored.
+      </source-comment>
+    </source>
+    <source name="vers" type="string">
+      <source-comment>&lt;b&gt;&lt;font color=blue&gt;vers&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;String&lt;/font&gt;&lt;/b&gt;): are the projections calculated analytically or using the Radon transform? use the strings 'Radon' OR 'Analytical'
+      </source-comment>
+    </source>
+    <source name="oversamp" type="string">
+      <source-comment>&lt;b&gt;&lt;font color=blue&gt;oversamp&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;Number&lt;/font&gt;&lt;/b&gt;): Oversampling of the projections : use 2 or 4
+      </source-comment>
+    </source>
+    <source name="basename" type="string">
+      <source-comment>&lt;b&gt;&lt;font color=blue&gt;basename&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;String&lt;/font&gt;&lt;/b&gt;): Basename of the result files
+      </source-comment>
+    </source>
+    <source name="dist" type="string">
+      <source-comment>&lt;b&gt;&lt;font color=blue&gt;dist&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;String&lt;/font&gt;&lt;/b&gt;):  Distances of propagation (in m), e.g. 0 0.01 0.1 0.20 0.50
+      </source-comment>
+    </source>
+    <source name="energy" type="string">
+      <source-comment>&lt;b&gt;&lt;font color=blue&gt;energy&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;Number&lt;/font&gt;&lt;/b&gt;): Energy of the incoming X-ray beam (in keV)
+      </source-comment>
+    </source>
+    <source name="pixelSize" type="string">
+      <source-comment>&lt;b&gt;&lt;font color=blue&gt;pixelSize&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;Number&lt;/font&gt;&lt;/b&gt;): Pixel size of the detector (in um)
+      </source-comment>
+    </source>
+    <source name="nbProj" type="string">
+      <source-comment>&lt;b&gt;&lt;font color=blue&gt;nbProj&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;Number&lt;/font&gt;&lt;/b&gt;): Number of projections (e.g., 360)
+      </source-comment>
+    </source>
+    <source name="rangeAngle" type="string">
+      <source-comment>&lt;b&gt;&lt;font color=blue&gt;rangeAngle&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;Number&lt;/font&gt;&lt;/b&gt;): Range of the tomography : 180 or 360 degrees
+      </source-comment>
+    </source>
+    <source name="modelCtf" type="string">
+      <source-comment>&lt;b&gt;&lt;font color=blue&gt;modelCtf&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;Number&lt;/font&gt;&lt;/b&gt;):  Which model do you want to use for the propagation? use 1 or 0
+      </source-comment>
+    </source>
+    <source name="modelFresnel" type="string">
+      <source-comment>&lt;b&gt;&lt;font color=blue&gt;modelFresnel&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;Number&lt;/font&gt;&lt;/b&gt;): Which model do you want to use for the propagation? use 1 or 0
+      </source-comment>
+    </source>
+    <source name="height" type="string">
+      <source-comment>&lt;b&gt;&lt;font color=blue&gt;imageSize&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;String&lt;/font&gt;&lt;/b&gt;): height of the object. If height == 1, the simulation is computed in 1D. If height &gt;=2 , the simulation turns into 2D.
+      </source-comment>
+    </source>
+    <source name="noiseType" type="string">
+      <source-comment>&lt;b&gt;&lt;font color=blue&gt;noiseType&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;String&lt;/font&gt;&lt;/b&gt;): Use noise='gaussian' (addition of gaussian noise) or noise='poisson' (generation of Poisson noise).
+      </source-comment>
+    </source>
+    <source name="noiseAmount" type="string">
+      <source-comment>&lt;b&gt;&lt;font color=blue&gt;noiseAmount&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;String&lt;/font&gt;&lt;/b&gt;): If 'gaussian' (additive noise), please specify the Peak-to-peak Signe-to-noise ratio (PPSNR, in dB). If 'poisson', please specify a scaling factor ranging in [0:1].
+      </source-comment>
+    </source>
+    <constant name="dirOut" type="string" value="dirOut" cardinality="scalar" />
+    <sink name="resultTarball" type="uri" />
+  </interface>
+
+  <processors>
+    <processor name="append-date" >
+      <in name="dir" type="uri" depth="0" />
+      <out name="result" type="string" depth="0" />
+      <beanshell>/*----------Beginning of Beanshell------------*/
+                        import java.text.DateFormat;
+                        import java.text.SimpleDateFormat;
+                        import java.util.Date;
+
+DateFormat dateFormat = new SimpleDateFormat("dd-MM-yyyy_HH:mm:ss");
+String result = dir.toString()+"/"+(dateFormat.format(System.currentTimeMillis()));
+/*------------End of Beanshell------------*/
+      </beanshell>
+    </processor>
+    <processor name="CreaPhase" >
+      <in name="dirOut" type="string" depth="0" />
+      <in name="vers" type="string" depth="0" />
+      <in name="dist" type="string" depth="0" />
+      <in name="pixelSize" type="string" depth="0" />
+      <in name="modelFresnel" type="string" depth="0" />
+      <in name="rangeAngle" type="string" depth="0" />
+      <in name="nbProj" type="string" depth="0" />
+      <in name="oversamp" type="string" depth="0" />
+      <in name="basename" type="string" depth="0" />
+      <in name="modelCtf" type="string" depth="0" />
+      <in name="noiseAmount" type="string" depth="0" />
+      <in name="noiseType" type="string" depth="0" />
+      <in name="results-directory" type="string" depth="0" />
+      <in name="energy" type="string" depth="0" />
+      <in name="height" type="string" depth="0" />
+      <out name="resultTarball" type="uri" depth="0" />
+      <iterationstrategy>
+        <cross>
+          <port name="results-directory" />
+          <port name="vers" />
+          <port name="oversamp" />
+          <port name="basename" />
+          <port name="dist" />
+          <port name="energy" />
+          <port name="pixelSize" />
+          <port name="nbProj" />
+          <port name="rangeAngle" />
+          <port name="modelCtf" />
+          <port name="modelFresnel" />
+          <port name="dirOut" />
+          <port name="noiseType" />
+          <port name="noiseAmount" />
+          <port name="height" />
+        </cross>
+      </iterationstrategy>
+      <gasw descriptor="[GASW_DIR]/3wires_CreaPhase.xml"/>
+    </processor>
+    <processor name="append-brackets" >
+      <in name="inputString" type="string" depth="0" />
+      <out name="out" type="string" depth="0" />
+      <beanshell>/*----------Beginning of Beanshell------------*/
+//String toAppend="\\\"";
+out="["+inputString+"]";
+      </beanshell>
+    </processor>
+    <processor name="append-simple-quotes" >
+      <in name="inputString" type="string" depth="0" />
+      <out name="out" type="string" depth="0" />
+      <beanshell>/*----------Beginning of Beanshell------------*/
+String toAppend="'";
+out=toAppend+inputString+toAppend;
+      </beanshell>
+    </processor>
+    <processor name="append-simple-quotes_2" >
+      <in name="inputString" type="string" depth="0" />
+      <out name="out" type="string" depth="0" />
+      <beanshell>/*----------Beginning of Beanshell------------*/
+String toAppend="'";
+out=toAppend+inputString+toAppend;
+      </beanshell>
+    </processor>
+    <processor name="append-simple-quotes_3" >
+      <in name="inputString" type="string" depth="0" />
+      <out name="out" type="string" depth="0" />
+      <beanshell>/*----------Beginning of Beanshell------------*/
+String toAppend="'";
+out=toAppend+inputString+toAppend;
+      </beanshell>
+    </processor>
+    <processor name="append-simple-quotes_4" >
+      <in name="inputString" type="string" depth="0" />
+      <out name="out" type="string" depth="0" />
+      <beanshell>/*----------Beginning of Beanshell------------*/
+String toAppend="'";
+out=toAppend+inputString+toAppend;
+      </beanshell>
+    </processor>
+  </processors>
+
+  <links>
+      <link from="results-directory" to="append-date:dir" />
+      <link from="append-date:result" to="CreaPhase:results-directory" />
+      <link from="oversamp" to="CreaPhase:oversamp" />
+      <link from="energy" to="CreaPhase:energy" />
+      <link from="pixelSize" to="CreaPhase:pixelSize" />
+      <link from="nbProj" to="CreaPhase:nbProj" />
+      <link from="rangeAngle" to="CreaPhase:rangeAngle" />
+      <link from="modelCtf" to="CreaPhase:modelCtf" />
+      <link from="modelFresnel" to="CreaPhase:modelFresnel" />
+      <link from="noiseAmount" to="CreaPhase:noiseAmount" />
+      <link from="CreaPhase:resultTarball" to="resultTarball" />
+      <link from="dist" to="append-brackets:inputString" />
+      <link from="append-brackets:out" to="CreaPhase:dist" />
+      <link from="vers" to="append-simple-quotes:inputString" />
+      <link from="append-simple-quotes:out" to="CreaPhase:vers" />
+      <link from="basename" to="append-simple-quotes_2:inputString" />
+      <link from="append-simple-quotes_2:out" to="CreaPhase:basename" />
+      <link from="append-simple-quotes_3:out" to="CreaPhase:dirOut" />
+      <link from="noiseType" to="append-simple-quotes_4:inputString" />
+      <link from="append-simple-quotes_4:out" to="CreaPhase:noiseType" />
+      <link from="dirOut" to="append-simple-quotes_3:inputString" />
+      <link from="height" to="CreaPhase:height" />
+  </links>
+
+</workflow>
diff --git a/workflow/circle_CreaPhase.gwendia b/workflow/circle_CreaPhase.gwendia
new file mode 100644 (file)
index 0000000..362608e
--- /dev/null
@@ -0,0 +1,223 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<workflow name="circle_CreaPhase" version="0.1">
+
+  <description>Propagation-based phase contrast images generation</description>
+
+  <interface>
+    <source name="results-directory" type="uri">
+      <source-comment>&lt;b&gt;&lt;font color=blue&gt;results-directory&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;Directory&lt;/font&gt;&lt;/b&gt;): Directory where the results will be stored.
+      </source-comment>
+    </source>
+    <source name="vers" type="string">
+      <source-comment>&lt;b&gt;&lt;font color=blue&gt;vers&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;String&lt;/font&gt;&lt;/b&gt;): are the projections calculated analytically or using the Radon transform? use the strings 'Radon' OR 'Analytical'
+      </source-comment>
+    </source>
+    <source name="oversamp" type="string">
+      <source-comment>&lt;b&gt;&lt;font color=blue&gt;oversamp&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;Number&lt;/font&gt;&lt;/b&gt;): Oversampling of the projections : use 2 or 4
+      </source-comment>
+    </source>
+    <source name="basename" type="string">
+      <source-comment>&lt;b&gt;&lt;font color=blue&gt;basename&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;String&lt;/font&gt;&lt;/b&gt;): Basename of the result files
+      </source-comment>
+    </source>
+    <source name="dist" type="string">
+      <source-comment>&lt;b&gt;&lt;font color=blue&gt;dist&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;String&lt;/font&gt;&lt;/b&gt;):  Distances of propagation (in m), e.g. 0 0.01 0.1 0.20 0.50
+      </source-comment>
+    </source>
+    <source name="energy" type="string">
+      <source-comment>&lt;b&gt;&lt;font color=blue&gt;energy&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;Number&lt;/font&gt;&lt;/b&gt;): Energy of the incoming X-ray beam (in keV)
+      </source-comment>
+    </source>
+    <source name="pixelSize" type="string">
+      <source-comment>&lt;b&gt;&lt;font color=blue&gt;pixelSize&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;Number&lt;/font&gt;&lt;/b&gt;): Pixel size of the detector (in um)
+      </source-comment>
+    </source>
+    <source name="nbProj" type="string">
+      <source-comment>&lt;b&gt;&lt;font color=blue&gt;nbProj&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;Number&lt;/font&gt;&lt;/b&gt;): Number of projections (e.g., 360)
+      </source-comment>
+    </source>
+    <source name="rangeAngle" type="string">
+      <source-comment>&lt;b&gt;&lt;font color=blue&gt;rangeAngle&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;Number&lt;/font&gt;&lt;/b&gt;): Range of the tomography : 180 or 360 degrees
+      </source-comment>
+    </source>
+    <source name="modelCtf" type="string">
+      <source-comment>&lt;b&gt;&lt;font color=blue&gt;modelCtf&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;Number&lt;/font&gt;&lt;/b&gt;):  Which model do you want to use for the propagation? use 1 or 0
+      </source-comment>
+    </source>
+    <source name="modelFresnel" type="string">
+      <source-comment>&lt;b&gt;&lt;font color=blue&gt;modelFresnel&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;Number&lt;/font&gt;&lt;/b&gt;): Which model do you want to use for the propagation? use 1 or 0
+      </source-comment>
+    </source>
+    <source name="muMat" type="string">
+      <source-comment>&lt;b&gt;&lt;font color=blue&gt;muMat&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;String&lt;/font&gt;&lt;/b&gt;): Linear attenuation coefficient of the material of the circle (e.g. 0.89 cm-1 for PET at 19keV)
+      </source-comment>
+    </source>
+    <source name="deltaMat" type="string">
+      <source-comment>&lt;b&gt;&lt;font color=blue&gt;deltaMat&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;String&lt;/font&gt;&lt;/b&gt;): Refractive index decrement of the material of the circle, in 10^-7 (e.g. 8.265 for PET at 19keV)
+      </source-comment>
+    </source>
+    <source name="Rcircle" type="string">
+      <source-comment>&lt;b&gt;&lt;font color=blue&gt;Rcircle&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;String&lt;/font&gt;&lt;/b&gt;): Radius of the circle (in pixels)
+      </source-comment>
+    </source>
+    <source name="imageSize" type="string">
+      <source-comment>&lt;b&gt;&lt;font color=blue&gt;imageSize&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;String&lt;/font&gt;&lt;/b&gt;): Size of the image (square; in pixels)
+      </source-comment>
+    </source>
+    <source name="circleCenter" type="string">
+      <source-comment>&lt;b&gt;&lt;font color=blue&gt;circleCenter&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;String&lt;/font&gt;&lt;/b&gt;): 2D coordinates of the circle center (in pixels; e.g., 200 250)
+      </source-comment>
+    </source>
+    <source name="noiseType" type="string">
+      <source-comment>&lt;b&gt;&lt;font color=blue&gt;noiseType&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;String&lt;/font&gt;&lt;/b&gt;): Use noise='gaussian' (addition of gaussian noise) or noise='poisson' (generation of Poisson noise).
+      </source-comment>
+    </source>
+    <source name="noiseAmount" type="string">
+      <source-comment>&lt;b&gt;&lt;font color=blue&gt;noiseAmount&lt;/font&gt;&lt;/b&gt; (&lt;b&gt;&lt;font color=green&gt;String&lt;/font&gt;&lt;/b&gt;): If 'gaussian' (additive noise), please specify the Peak-to-peak Signe-to-noise ratio (PPSNR, in dB). If 'poisson', please specify a scaling factor ranging in [0:1].
+      </source-comment>
+    </source>
+    <constant name="dirOut" type="string" value="dirOut" cardinality="scalar" />
+    <sink name="resultTarball" type="uri" />
+  </interface>
+
+  <processors>
+    <processor name="append-date" >
+      <in name="dir" type="uri" depth="0" />
+      <out name="result" type="string" depth="0" />
+      <beanshell>/*----------Beginning of Beanshell------------*/
+                        import java.text.DateFormat;
+                        import java.text.SimpleDateFormat;
+                        import java.util.Date;
+
+DateFormat dateFormat = new SimpleDateFormat("dd-MM-yyyy_HH:mm:ss");
+String result = dir.toString()+"/"+(dateFormat.format(System.currentTimeMillis()));
+/*------------End of Beanshell------------*/
+      </beanshell>
+    </processor>
+    <processor name="CreaPhase" >
+      <in name="dirOut" type="string" depth="0" />
+      <in name="vers" type="string" depth="0" />
+      <in name="dist" type="string" depth="0" />
+      <in name="Rcircle" type="string" depth="0" />
+      <in name="pixelSize" type="string" depth="0" />
+      <in name="muMat" type="string" depth="0" />
+      <in name="deltaMat" type="string" depth="0" />
+      <in name="modelFresnel" type="string" depth="0" />
+      <in name="rangeAngle" type="string" depth="0" />
+      <in name="nbProj" type="string" depth="0" />
+      <in name="oversamp" type="string" depth="0" />
+      <in name="circleCenter" type="string" depth="0" />
+      <in name="basename" type="string" depth="0" />
+      <in name="modelCtf" type="string" depth="0" />
+      <in name="noiseAmount" type="string" depth="0" />
+      <in name="noiseType" type="string" depth="0" />
+      <in name="imageSize" type="string" depth="0" />
+      <in name="results-directory" type="string" depth="0" />
+      <in name="energy" type="string" depth="0" />
+      <out name="resultTarball" type="uri" depth="0" />
+      <iterationstrategy>
+        <cross>
+          <port name="results-directory" />
+          <port name="vers" />
+          <port name="oversamp" />
+          <port name="basename" />
+          <port name="dist" />
+          <port name="energy" />
+          <port name="pixelSize" />
+          <port name="nbProj" />
+          <port name="rangeAngle" />
+          <port name="modelCtf" />
+          <port name="modelFresnel" />
+          <port name="muMat" />
+          <port name="deltaMat" />
+          <port name="Rcircle" />
+          <port name="imageSize" />
+          <port name="circleCenter" />
+          <port name="dirOut" />
+          <port name="noiseType" />
+          <port name="noiseAmount" />
+        </cross>
+      </iterationstrategy>
+      <gasw descriptor="[GASW_DIR]/circle_CreaPhase.xml"/>
+    </processor>
+    <processor name="append-brackets" >
+      <in name="inputString" type="string" depth="0" />
+      <out name="out" type="string" depth="0" />
+      <beanshell>/*----------Beginning of Beanshell------------*/
+//String toAppend="\\\"";
+out="["+inputString+"]";
+      </beanshell>
+    </processor>
+    <processor name="append-brackets_2" >
+      <in name="inputString" type="string" depth="0" />
+      <out name="out" type="string" depth="0" />
+      <beanshell>/*----------Beginning of Beanshell------------*/
+//String toAppend="\\\"";
+out="["+inputString+"]";
+      </beanshell>
+    </processor>
+    <processor name="append-simple-quotes" >
+      <in name="inputString" type="string" depth="0" />
+      <out name="out" type="string" depth="0" />
+      <beanshell>/*----------Beginning of Beanshell------------*/
+String toAppend="'";
+out=toAppend+inputString+toAppend;
+      </beanshell>
+    </processor>
+    <processor name="append-simple-quotes_2" >
+      <in name="inputString" type="string" depth="0" />
+      <out name="out" type="string" depth="0" />
+      <beanshell>/*----------Beginning of Beanshell------------*/
+String toAppend="'";
+out=toAppend+inputString+toAppend;
+      </beanshell>
+    </processor>
+    <processor name="append-simple-quotes_3" >
+      <in name="inputString" type="string" depth="0" />
+      <out name="out" type="string" depth="0" />
+      <beanshell>/*----------Beginning of Beanshell------------*/
+String toAppend="'";
+out=toAppend+inputString+toAppend;
+      </beanshell>
+    </processor>
+    <processor name="append-simple-quotes_4" >
+      <in name="inputString" type="string" depth="0" />
+      <out name="out" type="string" depth="0" />
+      <beanshell>/*----------Beginning of Beanshell------------*/
+String toAppend="'";
+out=toAppend+inputString+toAppend;
+      </beanshell>
+    </processor>
+  </processors>
+
+  <links>
+      <link from="results-directory" to="append-date:dir" />
+      <link from="append-date:result" to="CreaPhase:results-directory" />
+      <link from="oversamp" to="CreaPhase:oversamp" />
+      <link from="energy" to="CreaPhase:energy" />
+      <link from="pixelSize" to="CreaPhase:pixelSize" />
+      <link from="nbProj" to="CreaPhase:nbProj" />
+      <link from="rangeAngle" to="CreaPhase:rangeAngle" />
+      <link from="modelCtf" to="CreaPhase:modelCtf" />
+      <link from="modelFresnel" to="CreaPhase:modelFresnel" />
+      <link from="muMat" to="CreaPhase:muMat" />
+      <link from="deltaMat" to="CreaPhase:deltaMat" />
+      <link from="Rcircle" to="CreaPhase:Rcircle" />
+      <link from="imageSize" to="CreaPhase:imageSize" />
+      <link from="noiseAmount" to="CreaPhase:noiseAmount" />
+      <link from="CreaPhase:resultTarball" to="resultTarball" />
+      <link from="dist" to="append-brackets:inputString" />
+      <link from="circleCenter" to="append-brackets_2:inputString" />
+      <link from="append-brackets_2:out" to="CreaPhase:circleCenter" />
+      <link from="append-brackets:out" to="CreaPhase:dist" />
+      <link from="vers" to="append-simple-quotes:inputString" />
+      <link from="append-simple-quotes:out" to="CreaPhase:vers" />
+      <link from="basename" to="append-simple-quotes_2:inputString" />
+      <link from="append-simple-quotes_2:out" to="CreaPhase:basename" />
+      <link from="append-simple-quotes_3:out" to="CreaPhase:dirOut" />
+      <link from="noiseType" to="append-simple-quotes_4:inputString" />
+      <link from="append-simple-quotes_4:out" to="CreaPhase:noiseType" />
+      <link from="dirOut" to="append-simple-quotes_3:inputString" />
+  </links>
+
+</workflow>