[Debian-astro-commits] [cpl-plugin-sinfo] 01/03: New upstream version 2.6.8+dfsg

Ole Streicher olebole at moszumanska.debian.org
Wed Sep 23 09:26:13 UTC 2015


This is an automated email from the git hooks/post-receive script.

olebole pushed a commit to tag debian/2.6.8+dfsg-1
in repository cpl-plugin-sinfo.

commit e6ab0c9c19f23934590dd966530ff1dc38c1da3a
Author: Ole Streicher <debian at liska.ath.cx>
Date:   Wed Sep 23 11:19:18 2015 +0200

    New upstream version 2.6.8+dfsg
---
 ChangeLog                             |   4 +
 calib/gasgano/config/SINFO.prefs      |   2 +-
 configure                             |  20 +-
 configure.ac                          |   2 +-
 irplib/irplib_utils.c                 |   1 +
 recipes/sinfo_utl_cube_combine.c      |  12 +
 reflex/sinfo.xml.in                   | 524 ++++++++++++++++++++++++++++------
 sinfoni/sinfo_absolute.c              |  21 +-
 sinfoni/sinfo_absolute.h              |   4 +-
 sinfoni/sinfo_baryvel.c               |   3 -
 sinfoni/sinfo_baryvel.h               |  24 +-
 sinfoni/sinfo_boltzmann.c             |  14 +-
 sinfoni/sinfo_coltilt.c               |   5 +-
 sinfoni/sinfo_cube_construct.c        |  10 +
 sinfoni/sinfo_dfs.c                   | 238 ++-------------
 sinfoni/sinfo_distortion.c            |   2 +
 sinfoni/sinfo_dump.c                  | 242 ++++++++--------
 sinfoni/sinfo_dump.h                  |  41 +--
 sinfoni/sinfo_fft_base.c              |   2 +
 sinfoni/sinfo_fit.c                   |   3 +
 sinfoni/sinfo_focus.c                 |   1 +
 sinfoni/sinfo_function_1d.c           |  13 +
 sinfoni/sinfo_functions.h             |  14 +-
 sinfoni/sinfo_globals.c               |   4 +
 sinfoni/sinfo_new_cubes_coadd.c       |   6 +-
 sinfoni/sinfo_new_objnod.c            |   5 +-
 sinfoni/sinfo_utilities_scired.c      | 410 ++++++++++----------------
 sinfoni/sinfo_utilities_scired.h      |  17 +-
 sinfoni/sinfo_utl_cube_combine.c      |  15 +-
 sinfoni/tests/Makefile.am             |  13 +-
 sinfoni/tests/Makefile.in             |  75 ++++-
 sinfoni/tests/sinfo_absolute_test.c   | 398 ++++++++++++++++++++++++++
 sinfoni/tests/sinfo_baryvel_test.c    | 124 ++++++++
 sinfoni/tests/sinfo_boltzmann_test.c  | 296 +++++++++++++++++++
 sinfoni/tests/sinfo_cube_coadd_test.c | 293 +++++++++----------
 35 files changed, 1906 insertions(+), 952 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index c7170f9..ff74980 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2.6.8 14/09/2015 Addressed DFS-11239
+2.6.7 10/09/2015 
+                 "changed status of parameter SetProductExplorerMode to Triggered" sinfo.xml.in
+2.6.6 24/08/2015 release added param to allow change of offset convention in sinfo_utl_cube_combine
 2.6.5 04/08/2015 release 2.6.5
 2.6.5b2 02/08/2015 Candidate release 2.6.5b2
                   Fixed PIPE-6103
diff --git a/calib/gasgano/config/SINFO.prefs b/calib/gasgano/config/SINFO.prefs
index 2a80906..6e1e6fd 100644
--- a/calib/gasgano/config/SINFO.prefs
+++ b/calib/gasgano/config/SINFO.prefs
@@ -41,7 +41,7 @@ PRINTER_NAME=lp
 PRINT_FONT=Monospaced:16
 PRINT_ORIENTATION=P
 RADEC_CONVERSION=true
-RECIPE_SET=sinfo_rec_detlin=/home/quality/pipelines/sinfo/lib/esopipes-plugins/sinfo-2.6.5/sinfo_rec_detlin.so;sinfo_rec_distortion=/home/quality/pipelines/sinfo/lib/esopipes-plugins/sinfo-2.6.5/sinfo_rec_distortion.so;sinfo_rec_jitter=/home/quality/pipelines/sinfo/lib/esopipes-plugins/sinfo-2.6.5/sinfo_rec_jitter.so;sinfo_rec_mdark=/home/quality/pipelines/sinfo/lib/esopipes-plugins/sinfo-2.6.5/sinfo_rec_mdark.so;sinfo_rec_mflat=/home/quality/pipelines/sinfo/lib/esopipes-plugins/sinfo-2. [...]
+RECIPE_SET=sinfo_rec_detlin=/home/quality/pipelines/sinfo/lib/esopipes-plugins/sinfo-2.6.8/sinfo_rec_detlin.so;sinfo_rec_distortion=/home/quality/pipelines/sinfo/lib/esopipes-plugins/sinfo-2.6.8/sinfo_rec_distortion.so;sinfo_rec_jitter=/home/quality/pipelines/sinfo/lib/esopipes-plugins/sinfo-2.6.8/sinfo_rec_jitter.so;sinfo_rec_mdark=/home/quality/pipelines/sinfo/lib/esopipes-plugins/sinfo-2.6.8/sinfo_rec_mdark.so;sinfo_rec_mflat=/home/quality/pipelines/sinfo/lib/esopipes-plugins/sinfo-2. [...]
 SCRIPTS_DIR=/home/astro4/gasgano/scripts/gas-scripts
 SHORTEN_FILES_PATH=false
 SHORT_FILENAME=true
diff --git a/configure b/configure
index a870e47..55ba057 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for SINFONI Instrument Pipeline 2.6.5.
+# Generated by GNU Autoconf 2.69 for SINFONI Instrument Pipeline 2.6.8.
 #
 # Report bugs to <usd-help at eso.org>.
 #
@@ -590,8 +590,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='SINFONI Instrument Pipeline'
 PACKAGE_TARNAME='sinfo'
-PACKAGE_VERSION='2.6.5'
-PACKAGE_STRING='SINFONI Instrument Pipeline 2.6.5'
+PACKAGE_VERSION='2.6.8'
+PACKAGE_STRING='SINFONI Instrument Pipeline 2.6.8'
 PACKAGE_BUGREPORT='usd-help at eso.org'
 PACKAGE_URL=''
 
@@ -1376,7 +1376,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures SINFONI Instrument Pipeline 2.6.5 to adapt to many kinds of systems.
+\`configure' configures SINFONI Instrument Pipeline 2.6.8 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1447,7 +1447,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of SINFONI Instrument Pipeline 2.6.5:";;
+     short | recursive ) echo "Configuration of SINFONI Instrument Pipeline 2.6.8:";;
    esac
   cat <<\_ACEOF
 
@@ -1575,7 +1575,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-SINFONI Instrument Pipeline configure 2.6.5
+SINFONI Instrument Pipeline configure 2.6.8
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1990,7 +1990,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by SINFONI Instrument Pipeline $as_me 2.6.5, which was
+It was created by SINFONI Instrument Pipeline $as_me 2.6.8, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2969,7 +2969,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='sinfo'
- VERSION='2.6.5'
+ VERSION='2.6.8'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -14932,7 +14932,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by SINFONI Instrument Pipeline $as_me 2.6.5, which was
+This file was extended by SINFONI Instrument Pipeline $as_me 2.6.8, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -14998,7 +14998,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-SINFONI Instrument Pipeline config.status 2.6.5
+SINFONI Instrument Pipeline config.status 2.6.8
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff --git a/configure.ac b/configure.ac
index e799a9e..140be92 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
 # Process this file with autoconf to produce a configure script.
 
-AC_INIT([SINFONI Instrument Pipeline], [2.6.5], [usd-help at eso.org], [sinfo])
+AC_INIT([SINFONI Instrument Pipeline], [2.6.8], [usd-help at eso.org], [sinfo])
 
 AC_PREREQ([2.59])
 
diff --git a/irplib/irplib_utils.c b/irplib/irplib_utils.c
index e99ccf6..98ad3c2 100644
--- a/irplib/irplib_utils.c
+++ b/irplib/irplib_utils.c
@@ -1,6 +1,7 @@
 /*
  * This file is part of the irplib package
  * Copyright (C) 2002,2003,2014 European Southern Observatory
+ *               2004  Free Software Foundation, Inc.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
diff --git a/recipes/sinfo_utl_cube_combine.c b/recipes/sinfo_utl_cube_combine.c
index 002daeb..857fd7e 100644
--- a/recipes/sinfo_utl_cube_combine.c
+++ b/recipes/sinfo_utl_cube_combine.c
@@ -189,6 +189,18 @@ static int sinfo_utl_cube_combine_create(cpl_plugin * plugin)
     cpl_parameterlist_append(recipe->parameters, p) ;
 
 
+    p = cpl_parameter_new_value("sinfoni.sinfo_utl_cube_combine.offset_mode",
+                       CPL_TYPE_BOOL, "Offset conventions. If TRUE applies "
+                                      "reference offset correction. If FALSE: "
+                                      "take user offsets. The reference offset "
+                                      "is computed as (min_off+max_off)/2",
+                       "sinfoni.sinfo_utl_cube_combine", CPL_TRUE) ;
+    cpl_parameter_set_alias(p, CPL_PARAMETER_MODE_CLI, "offset_mode") ;
+    cpl_parameterlist_append(recipe->parameters, p) ;
+
+
+
+
     /* Return */
     return 0;
 }
diff --git a/reflex/sinfo.xml.in b/reflex/sinfo.xml.in
index df41c06..40e218e 100644
--- a/reflex/sinfo.xml.in
+++ b/reflex/sinfo.xml.in
@@ -1,8 +1,7 @@
 <?xml version="1.0" standalone="no"?>
 <!DOCTYPE entity PUBLIC "-//UC Berkeley//DTD MoML 1//EN"
     "http://ptolemy.eecs.berkeley.edu/xml/dtd/MoML_1.dtd">
-<entity name="sinfo_ref2" class="ptolemy.actor.TypedCompositeActor">
-    <display name="sinfo_1"/>
+<entity name="sinfo" class="ptolemy.actor.TypedCompositeActor">
     <property name="Rectangle6" class="ptolemy.vergil.kernel.attributes.RectangleAttribute">
         <property name="_hideName" class="ptolemy.data.expr.SingletonParameter" value="true">
         </property>
@@ -29,11 +28,11 @@
 <property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Edward A. Lee</configure></property>
 <property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
 <property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure><p>The Rectangle attribute renders a rectangle on the Workflow canvas. Single-click the rectangle to drag the resize handles and adjust the shape's size, or double-click the rectangle to customize its height, width, line width, color, and fill color.</p></configure></property>
-<property name="prop:lineWidth" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The line width. The value is a double that defaults to 1.0.</configure></property>
 <property name="prop:height" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The vertical extent. The value is a double that defaults to 100.0.</configure></property>
-<property name="prop:dashArray" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify a dash-pattern for dashed or dotted lines. The value consists of an array of doubles that specify the length of the alternating solid and transparent segments. An empty value indicates that the line should not be dashed (the default).</configure></property>
-<property name="prop:centered" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Indicate whether the shape should be centered on its origin. By default, the location is the upper-left corner.</configure></property>
+<property name="prop:lineWidth" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The line width. The value is a double that defaults to 1.0.</configure></property>
 <property name="prop:rounding" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The amount of rounding of the corners. The value is a double that defaults to 0.0, which indicates no rounding.</configure></property>
+<property name="prop:centered" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Indicate whether the shape should be centered on its origin. By default, the location is the upper-left corner.</configure></property>
+<property name="prop:dashArray" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify a dash-pattern for dashed or dotted lines. The value consists of an array of doubles that specify the length of the alternating solid and transparent segments. An empty value indicates that the line should not be dashed (the default).</configure></property>
 <property name="prop:width" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The horizontal extent. The value is a double that defaults to 100.0.</configure></property>
 <property name="prop:lineColor" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The line color. Specify a string representing an array of four elements: red, green, blue, and alpha, where alpha is transparency. The default is an opaque black, {0.0, 0.0, 0.0, 1.0}</configure></property>
 <property name="prop:fillColor" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The fill color. Specify a string representing an array of four elements: red, green, blue, and alpha, where alpha is transparency. By default, the value is "none."</configure></property>
@@ -52,7 +51,7 @@
     </property>
     <property name="_createdBy" class="ptolemy.kernel.attributes.VersionAttribute" value="9.1.devel">
     </property>
-    <property name="_windowProperties" class="ptolemy.actor.gui.WindowPropertiesAttribute" value="{bounds={312, 33, 1608, 1015}, maximized=false}">
+    <property name="_windowProperties" class="ptolemy.actor.gui.WindowPropertiesAttribute" value="{bounds={156, 78, 1608, 1015}, maximized=false}">
     </property>
     <property name="_vergilSize" class="ptolemy.actor.gui.SizeAttribute" value="[1296, 863]">
     </property>
@@ -119,8 +118,8 @@
 <property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Gang Zhou</configure></property>
 <property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
 <property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>
            <p> The dynamic dataflow (DDF) domain is a superset of the synchronous
            dataflow(SDF) and Boolean dataflow(BDF) domains. In the SDF domain,
            an actor consumes and produces a fixed number of tokens per firing.
            This static information makes possible compile-time scheduling. In the
            DDF domain, there are few  [...]
-<property name="prop:iterations" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify the number of times a workflow is iterated. By default, this parameter is set to "0". Note that "0" does not mean "no iterations." Rather, "0" means that the workflow will iterate forever. Values greater than zero specify the actual number of times the director should execute the entire workflow. </configure></property>
 <property name="prop:maximumReceiverCapacity" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>A Parameter representing the maximum capacity of each receiver controlled by this director. This is an integer that defaults to 0, which means the queue in each receiver is unbounded. To specify bounded queues, set this to a positive integer. </configure></property>
+<property name="prop:iterations" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify the number of times a workflow is iterated. By default, this parameter is set to "0". Note that "0" does not mean "no iterations." Rather, "0" means that the workflow will iterate forever. Values greater than zero specify the actual number of times the director should execute the entire workflow. </configure></property>
 <property name="prop:runUntilDeadlockInOneIteration" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>A parameter indicating whether one iteration consists of repeated basic iterations until deadlock. If this parameter is true, the model will be executed until deadlock in one iteration. The default value is a BooleanToken with the value false. It cannot be set to true if this director is at the top level.</configure></property>
 </property>        <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:kepler-project.org:director:5:1">
         </property>
@@ -454,7 +453,7 @@
         <property name="_location" class="ptolemy.kernel.util.Location" value="[675.0, 1190.0]">
         </property>
     </property>
-    <property name="END_PRODUCTS_SUBDIR" class="ptolemy.data.expr.StringParameter" value="2015-07-16T16:25:51/SINFO.2011-01-02T08:46:36.871_tpl">
+    <property name="END_PRODUCTS_SUBDIR" class="ptolemy.data.expr.StringParameter" value="2015-09-15T08:46:16/SINFO.2011-01-02T08:46:36.871_tpl">
 <property name="KeplerDocumentation" class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
 <property name="description" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
 <property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Edward A. Lee</configure></property>
@@ -524,7 +523,7 @@
         <property name="_location" class="ptolemy.kernel.util.Location" value="[1030.0, 110.0]">
         </property>
     </property>
-    <property name="GLOBAL_TIMESTAMP" class="ptolemy.data.expr.StringParameter" value="2015-07-16T16:25:51">
+    <property name="GLOBAL_TIMESTAMP" class="ptolemy.data.expr.StringParameter" value="2015-09-15T08:46:16">
 <property name="KeplerDocumentation" class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
 <property name="description" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
 <property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Edward A. Lee</configure></property>
@@ -690,7 +689,7 @@
 <property name="prop:textColor" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The font color. Specify a string representing an array of four elements: red, green, blue, and alpha, where alpha is transparency. The default is an opaque black, {0.0, 0.0, 0.0, 1.0}</configure></property>
 <property name="prop:textSize" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The font size. Select an integer from the drop-down menu or specify a new size by typing it directly into the value field.  The default is 14.</configure></property>
 <property name="prop:text" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The text of the annotation.</configure></property>
-</property>        <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:kepler-project.org/ns/:41649:250:2">
+</property>        <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:kepler-project.org/ns/:79705:52:1">
         </property>
         <property name="class" class="ptolemy.kernel.util.StringAttribute" value="ptolemy.vergil.kernel.attributes.TextAttribute">
             <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:1199:1">
@@ -702,7 +701,7 @@
         </property>
         <property name="_location" class="ptolemy.kernel.util.Location" value="[380.0, -185.0]">
         </property>
-        <property name="derivedFrom" class="org.kepler.moml.NamedObjIdReferralList" value="urn:lsid:kepler-project.org/ns/:2479:34:2">
+        <property name="derivedFrom" class="org.kepler.moml.NamedObjIdReferralList" value="urn:lsid:kepler-project.org/ns/:2479:34:2:urn:lsid:kepler-project.org/ns/:41649:250:2">
         </property>
     </property>
     <property name="Rectangle" class="ptolemy.vergil.kernel.attributes.RectangleAttribute">
@@ -731,11 +730,11 @@
 <property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Edward A. Lee</configure></property>
 <property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
 <property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure><p>The Rectangle attribute renders a rectangle on the Workflow canvas. Single-click the rectangle to drag the resize handles and adjust the shape's size, or double-click the rectangle to customize its height, width, line width, color, and fill color.</p></configure></property>
-<property name="prop:lineWidth" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The line width. The value is a double that defaults to 1.0.</configure></property>
 <property name="prop:height" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The vertical extent. The value is a double that defaults to 100.0.</configure></property>
-<property name="prop:dashArray" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify a dash-pattern for dashed or dotted lines. The value consists of an array of doubles that specify the length of the alternating solid and transparent segments. An empty value indicates that the line should not be dashed (the default).</configure></property>
-<property name="prop:centered" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Indicate whether the shape should be centered on its origin. By default, the location is the upper-left corner.</configure></property>
+<property name="prop:lineWidth" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The line width. The value is a double that defaults to 1.0.</configure></property>
 <property name="prop:rounding" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The amount of rounding of the corners. The value is a double that defaults to 0.0, which indicates no rounding.</configure></property>
+<property name="prop:centered" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Indicate whether the shape should be centered on its origin. By default, the location is the upper-left corner.</configure></property>
+<property name="prop:dashArray" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify a dash-pattern for dashed or dotted lines. The value consists of an array of doubles that specify the length of the alternating solid and transparent segments. An empty value indicates that the line should not be dashed (the default).</configure></property>
 <property name="prop:width" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The horizontal extent. The value is a double that defaults to 100.0.</configure></property>
 <property name="prop:lineColor" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The line color. Specify a string representing an array of four elements: red, green, blue, and alpha, where alpha is transparency. The default is an opaque black, {0.0, 0.0, 0.0, 1.0}</configure></property>
 <property name="prop:fillColor" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The fill color. Specify a string representing an array of four elements: red, green, blue, and alpha, where alpha is transparency. By default, the value is "none."</configure></property>
@@ -776,11 +775,11 @@
 <property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Edward A. Lee</configure></property>
 <property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
 <property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure><p>The Rectangle attribute renders a rectangle on the Workflow canvas. Single-click the rectangle to drag the resize handles and adjust the shape's size, or double-click the rectangle to customize its height, width, line width, color, and fill color.</p></configure></property>
-<property name="prop:height" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The vertical extent. The value is a double that defaults to 100.0.</configure></property>
 <property name="prop:lineWidth" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The line width. The value is a double that defaults to 1.0.</configure></property>
-<property name="prop:rounding" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The amount of rounding of the corners. The value is a double that defaults to 0.0, which indicates no rounding.</configure></property>
-<property name="prop:centered" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Indicate whether the shape should be centered on its origin. By default, the location is the upper-left corner.</configure></property>
+<property name="prop:height" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The vertical extent. The value is a double that defaults to 100.0.</configure></property>
 <property name="prop:dashArray" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify a dash-pattern for dashed or dotted lines. The value consists of an array of doubles that specify the length of the alternating solid and transparent segments. An empty value indicates that the line should not be dashed (the default).</configure></property>
+<property name="prop:centered" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Indicate whether the shape should be centered on its origin. By default, the location is the upper-left corner.</configure></property>
+<property name="prop:rounding" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The amount of rounding of the corners. The value is a double that defaults to 0.0, which indicates no rounding.</configure></property>
 <property name="prop:width" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The horizontal extent. The value is a double that defaults to 100.0.</configure></property>
 <property name="prop:lineColor" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The line color. Specify a string representing an array of four elements: red, green, blue, and alpha, where alpha is transparency. The default is an opaque black, {0.0, 0.0, 0.0, 1.0}</configure></property>
 <property name="prop:fillColor" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The fill color. Specify a string representing an array of four elements: red, green, blue, and alpha, where alpha is transparency. By default, the value is "none."</configure></property>
@@ -821,11 +820,11 @@
 <property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Edward A. Lee</configure></property>
 <property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
 <property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure><p>The Rectangle attribute renders a rectangle on the Workflow canvas. Single-click the rectangle to drag the resize handles and adjust the shape's size, or double-click the rectangle to customize its height, width, line width, color, and fill color.</p></configure></property>
-<property name="prop:height" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The vertical extent. The value is a double that defaults to 100.0.</configure></property>
 <property name="prop:lineWidth" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The line width. The value is a double that defaults to 1.0.</configure></property>
-<property name="prop:rounding" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The amount of rounding of the corners. The value is a double that defaults to 0.0, which indicates no rounding.</configure></property>
-<property name="prop:centered" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Indicate whether the shape should be centered on its origin. By default, the location is the upper-left corner.</configure></property>
+<property name="prop:height" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The vertical extent. The value is a double that defaults to 100.0.</configure></property>
 <property name="prop:dashArray" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify a dash-pattern for dashed or dotted lines. The value consists of an array of doubles that specify the length of the alternating solid and transparent segments. An empty value indicates that the line should not be dashed (the default).</configure></property>
+<property name="prop:centered" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Indicate whether the shape should be centered on its origin. By default, the location is the upper-left corner.</configure></property>
+<property name="prop:rounding" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The amount of rounding of the corners. The value is a double that defaults to 0.0, which indicates no rounding.</configure></property>
 <property name="prop:width" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The horizontal extent. The value is a double that defaults to 100.0.</configure></property>
 <property name="prop:lineColor" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The line color. Specify a string representing an array of four elements: red, green, blue, and alpha, where alpha is transparency. The default is an opaque black, {0.0, 0.0, 0.0, 1.0}</configure></property>
 <property name="prop:fillColor" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The fill color. Specify a string representing an array of four elements: red, green, blue, and alpha, where alpha is transparency. By default, the value is "none."</configure></property>
@@ -866,11 +865,11 @@
 <property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Edward A. Lee</configure></property>
 <property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
 <property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure><p>The Rectangle attribute renders a rectangle on the Workflow canvas. Single-click the rectangle to drag the resize handles and adjust the shape's size, or double-click the rectangle to customize its height, width, line width, color, and fill color.</p></configure></property>
-<property name="prop:height" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The vertical extent. The value is a double that defaults to 100.0.</configure></property>
 <property name="prop:lineWidth" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The line width. The value is a double that defaults to 1.0.</configure></property>
-<property name="prop:rounding" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The amount of rounding of the corners. The value is a double that defaults to 0.0, which indicates no rounding.</configure></property>
-<property name="prop:centered" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Indicate whether the shape should be centered on its origin. By default, the location is the upper-left corner.</configure></property>
+<property name="prop:height" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The vertical extent. The value is a double that defaults to 100.0.</configure></property>
 <property name="prop:dashArray" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify a dash-pattern for dashed or dotted lines. The value consists of an array of doubles that specify the length of the alternating solid and transparent segments. An empty value indicates that the line should not be dashed (the default).</configure></property>
+<property name="prop:centered" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Indicate whether the shape should be centered on its origin. By default, the location is the upper-left corner.</configure></property>
+<property name="prop:rounding" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The amount of rounding of the corners. The value is a double that defaults to 0.0, which indicates no rounding.</configure></property>
 <property name="prop:width" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The horizontal extent. The value is a double that defaults to 100.0.</configure></property>
 <property name="prop:lineColor" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The line color. Specify a string representing an array of four elements: red, green, blue, and alpha, where alpha is transparency. The default is an opaque black, {0.0, 0.0, 0.0, 1.0}</configure></property>
 <property name="prop:fillColor" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The fill color. Specify a string representing an array of four elements: red, green, blue, and alpha, where alpha is transparency. By default, the value is "none."</configure></property>
@@ -913,11 +912,11 @@
 <property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Edward A. Lee</configure></property>
 <property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
 <property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure><p>The Rectangle attribute renders a rectangle on the Workflow canvas. Single-click the rectangle to drag the resize handles and adjust the shape's size, or double-click the rectangle to customize its height, width, line width, color, and fill color.</p></configure></property>
-<property name="prop:lineWidth" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The line width. The value is a double that defaults to 1.0.</configure></property>
 <property name="prop:height" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The vertical extent. The value is a double that defaults to 100.0.</configure></property>
-<property name="prop:dashArray" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify a dash-pattern for dashed or dotted lines. The value consists of an array of doubles that specify the length of the alternating solid and transparent segments. An empty value indicates that the line should not be dashed (the default).</configure></property>
-<property name="prop:centered" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Indicate whether the shape should be centered on its origin. By default, the location is the upper-left corner.</configure></property>
+<property name="prop:lineWidth" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The line width. The value is a double that defaults to 1.0.</configure></property>
 <property name="prop:rounding" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The amount of rounding of the corners. The value is a double that defaults to 0.0, which indicates no rounding.</configure></property>
+<property name="prop:centered" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Indicate whether the shape should be centered on its origin. By default, the location is the upper-left corner.</configure></property>
+<property name="prop:dashArray" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify a dash-pattern for dashed or dotted lines. The value consists of an array of doubles that specify the length of the alternating solid and transparent segments. An empty value indicates that the line should not be dashed (the default).</configure></property>
 <property name="prop:width" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The horizontal extent. The value is a double that defaults to 100.0.</configure></property>
 <property name="prop:lineColor" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The line color. Specify a string representing an array of four elements: red, green, blue, and alpha, where alpha is transparency. The default is an opaque black, {0.0, 0.0, 0.0, 1.0}</configure></property>
 <property name="prop:fillColor" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The fill color. Specify a string representing an array of four elements: red, green, blue, and alpha, where alpha is transparency. By default, the value is "none."</configure></property>
@@ -1526,11 +1525,11 @@
 <property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Edward A. Lee</configure></property>
 <property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
 <property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure><p>The Rectangle attribute renders a rectangle on the Workflow canvas. Single-click the rectangle to drag the resize handles and adjust the shape's size, or double-click the rectangle to customize its height, width, line width, color, and fill color.</p></configure></property>
-<property name="prop:lineWidth" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The line width. The value is a double that defaults to 1.0.</configure></property>
 <property name="prop:height" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The vertical extent. The value is a double that defaults to 100.0.</configure></property>
-<property name="prop:dashArray" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify a dash-pattern for dashed or dotted lines. The value consists of an array of doubles that specify the length of the alternating solid and transparent segments. An empty value indicates that the line should not be dashed (the default).</configure></property>
-<property name="prop:centered" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Indicate whether the shape should be centered on its origin. By default, the location is the upper-left corner.</configure></property>
+<property name="prop:lineWidth" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The line width. The value is a double that defaults to 1.0.</configure></property>
 <property name="prop:rounding" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The amount of rounding of the corners. The value is a double that defaults to 0.0, which indicates no rounding.</configure></property>
+<property name="prop:centered" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Indicate whether the shape should be centered on its origin. By default, the location is the upper-left corner.</configure></property>
+<property name="prop:dashArray" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify a dash-pattern for dashed or dotted lines. The value consists of an array of doubles that specify the length of the alternating solid and transparent segments. An empty value indicates that the line should not be dashed (the default).</configure></property>
 <property name="prop:width" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The horizontal extent. The value is a double that defaults to 100.0.</configure></property>
 <property name="prop:lineColor" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The line color. Specify a string representing an array of four elements: red, green, blue, and alpha, where alpha is transparency. The default is an opaque black, {0.0, 0.0, 0.0, 1.0}</configure></property>
 <property name="prop:fillColor" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The fill color. Specify a string representing an array of four elements: red, green, blue, and alpha, where alpha is transparency. By default, the value is "none."</configure></property>
@@ -1571,11 +1570,11 @@
 <property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Edward A. Lee</configure></property>
 <property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
 <property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure><p>The Rectangle attribute renders a rectangle on the Workflow canvas. Single-click the rectangle to drag the resize handles and adjust the shape's size, or double-click the rectangle to customize its height, width, line width, color, and fill color.</p></configure></property>
-<property name="prop:lineWidth" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The line width. The value is a double that defaults to 1.0.</configure></property>
 <property name="prop:height" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The vertical extent. The value is a double that defaults to 100.0.</configure></property>
-<property name="prop:dashArray" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify a dash-pattern for dashed or dotted lines. The value consists of an array of doubles that specify the length of the alternating solid and transparent segments. An empty value indicates that the line should not be dashed (the default).</configure></property>
-<property name="prop:centered" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Indicate whether the shape should be centered on its origin. By default, the location is the upper-left corner.</configure></property>
+<property name="prop:lineWidth" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The line width. The value is a double that defaults to 1.0.</configure></property>
 <property name="prop:rounding" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The amount of rounding of the corners. The value is a double that defaults to 0.0, which indicates no rounding.</configure></property>
+<property name="prop:centered" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Indicate whether the shape should be centered on its origin. By default, the location is the upper-left corner.</configure></property>
+<property name="prop:dashArray" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify a dash-pattern for dashed or dotted lines. The value consists of an array of doubles that specify the length of the alternating solid and transparent segments. An empty value indicates that the line should not be dashed (the default).</configure></property>
 <property name="prop:width" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The horizontal extent. The value is a double that defaults to 100.0.</configure></property>
 <property name="prop:lineColor" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The line color. Specify a string representing an array of four elements: red, green, blue, and alpha, where alpha is transparency. The default is an opaque black, {0.0, 0.0, 0.0, 1.0}</configure></property>
 <property name="prop:fillColor" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The fill color. Specify a string representing an array of four elements: red, green, blue, and alpha, where alpha is transparency. By default, the value is "none."</configure></property>
@@ -1657,7 +1656,7 @@
             </property>
         </property>
     </property>
-    <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:kepler-project.org/ns/:79200:89:103">
+    <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:kepler-project.org/ns/:79705:51:48">
     </property>
     <property name="Annotation20" class="ptolemy.vergil.kernel.attributes.TextAttribute">
         <property name="_hideName" class="ptolemy.data.expr.SingletonParameter" value="true">
@@ -1726,7 +1725,7 @@
             </property>
         </property>
     </property>
-    <property name="derivedFrom" class="org.kepler.moml.NamedObjIdReferralList" value="urn:lsid:kepler-project.org/ns/:2479:15:19:urn:lsid:kepler-project.org/ns/:5968:14:430:urn:lsid:kepler-project.org/ns/:5968:89:487:urn:lsid:kepler-project.org/ns/:5968:128:105:urn:lsid:kepler-project.org/ns/:10733:22:38:urn:lsid:kepler-project.org/ns/:12415:2:153:urn:lsid:kepler-project.org/ns/:12485:6:15:urn:lsid:kepler-project.org/ns/:12486:8:15:urn:lsid:kepler-project.org/ns/:12555:12:54:urn:lsid:ke [...]
+    <property name="derivedFrom" class="org.kepler.moml.NamedObjIdReferralList" value="urn:lsid:kepler-project.org/ns/:2479:15:19:urn:lsid:kepler-project.org/ns/:5968:14:430:urn:lsid:kepler-project.org/ns/:5968:89:487:urn:lsid:kepler-project.org/ns/:5968:128:105:urn:lsid:kepler-project.org/ns/:10733:22:38:urn:lsid:kepler-project.org/ns/:12415:2:153:urn:lsid:kepler-project.org/ns/:12485:6:15:urn:lsid:kepler-project.org/ns/:12486:8:15:urn:lsid:kepler-project.org/ns/:12555:12:54:urn:lsid:ke [...]
     </property>
     <property name="CALIB_DATA_DIR" class="ptolemy.data.expr.FileParameter" value="CALIB_DATA_PATH_TO_REPLACE/sinfo- at VERSION@">
 <property name="KeplerDocumentation" class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
@@ -1890,11 +1889,11 @@
 <property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Edward A. Lee</configure></property>
 <property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
 <property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure><p>The Rectangle attribute renders a rectangle on the Workflow canvas. Single-click the rectangle to drag the resize handles and adjust the shape's size, or double-click the rectangle to customize its height, width, line width, color, and fill color.</p></configure></property>
-<property name="prop:height" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The vertical extent. The value is a double that defaults to 100.0.</configure></property>
 <property name="prop:lineWidth" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The line width. The value is a double that defaults to 1.0.</configure></property>
-<property name="prop:rounding" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The amount of rounding of the corners. The value is a double that defaults to 0.0, which indicates no rounding.</configure></property>
-<property name="prop:centered" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Indicate whether the shape should be centered on its origin. By default, the location is the upper-left corner.</configure></property>
+<property name="prop:height" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The vertical extent. The value is a double that defaults to 100.0.</configure></property>
 <property name="prop:dashArray" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify a dash-pattern for dashed or dotted lines. The value consists of an array of doubles that specify the length of the alternating solid and transparent segments. An empty value indicates that the line should not be dashed (the default).</configure></property>
+<property name="prop:centered" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Indicate whether the shape should be centered on its origin. By default, the location is the upper-left corner.</configure></property>
+<property name="prop:rounding" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The amount of rounding of the corners. The value is a double that defaults to 0.0, which indicates no rounding.</configure></property>
 <property name="prop:width" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The horizontal extent. The value is a double that defaults to 100.0.</configure></property>
 <property name="prop:lineColor" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The line color. Specify a string representing an array of four elements: red, green, blue, and alpha, where alpha is transparency. The default is an opaque black, {0.0, 0.0, 0.0, 1.0}</configure></property>
 <property name="prop:fillColor" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The fill color. Specify a string representing an array of four elements: red, green, blue, and alpha, where alpha is transparency. By default, the value is "none."</configure></property>
@@ -1939,11 +1938,11 @@
 <property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Edward A. Lee</configure></property>
 <property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
 <property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure><p>The Rectangle attribute renders a rectangle on the Workflow canvas. Single-click the rectangle to drag the resize handles and adjust the shape's size, or double-click the rectangle to customize its height, width, line width, color, and fill color.</p></configure></property>
-<property name="prop:lineWidth" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The line width. The value is a double that defaults to 1.0.</configure></property>
 <property name="prop:height" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The vertical extent. The value is a double that defaults to 100.0.</configure></property>
-<property name="prop:dashArray" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify a dash-pattern for dashed or dotted lines. The value consists of an array of doubles that specify the length of the alternating solid and transparent segments. An empty value indicates that the line should not be dashed (the default).</configure></property>
-<property name="prop:centered" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Indicate whether the shape should be centered on its origin. By default, the location is the upper-left corner.</configure></property>
+<property name="prop:lineWidth" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The line width. The value is a double that defaults to 1.0.</configure></property>
 <property name="prop:rounding" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The amount of rounding of the corners. The value is a double that defaults to 0.0, which indicates no rounding.</configure></property>
+<property name="prop:centered" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Indicate whether the shape should be centered on its origin. By default, the location is the upper-left corner.</configure></property>
+<property name="prop:dashArray" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify a dash-pattern for dashed or dotted lines. The value consists of an array of doubles that specify the length of the alternating solid and transparent segments. An empty value indicates that the line should not be dashed (the default).</configure></property>
 <property name="prop:width" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The horizontal extent. The value is a double that defaults to 100.0.</configure></property>
 <property name="prop:lineColor" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The line color. Specify a string representing an array of four elements: red, green, blue, and alpha, where alpha is transparency. The default is an opaque black, {0.0, 0.0, 0.0, 1.0}</configure></property>
 <property name="prop:fillColor" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The fill color. Specify a string representing an array of four elements: red, green, blue, and alpha, where alpha is transparency. By default, the value is "none."</configure></property>
@@ -3443,7 +3442,7 @@
         </property>
         <property name="italic" class="ptolemy.data.expr.Parameter" value="false">
         </property>
-        <property name="text" class="ptolemy.kernel.util.StringAttribute" value="Show Product Explorer window">
+        <property name="text" class="ptolemy.kernel.util.StringAttribute" value="ProductExplorer pops up after all datasets are finished">
             <property name="_style" class="ptolemy.actor.gui.style.TextStyle">
                 <property name="height" class="ptolemy.data.expr.Parameter" value="20">
                 </property>
@@ -3462,7 +3461,7 @@
 <property name="prop:textColor" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The font color. Specify a string representing an array of four elements: red, green, blue, and alpha, where alpha is transparency. The default is an opaque black, {0.0, 0.0, 0.0, 1.0}</configure></property>
 <property name="prop:textSize" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The font size. Select an integer from the drop-down menu or specify a new size by typing it directly into the value field.  The default is 14.</configure></property>
 <property name="prop:text" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The text of the annotation.</configure></property>
-</property>        <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:kepler-project.org/ns/:44576:61:1">
+</property>        <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:kepler-project.org/ns/:79705:50:1">
         </property>
         <property name="class" class="ptolemy.kernel.util.StringAttribute" value="ptolemy.vergil.kernel.attributes.TextAttribute">
             <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:1199:1">
@@ -3472,9 +3471,9 @@
         </property>
         <property name="semanticType11" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#WorkflowDocumentation">
         </property>
-        <property name="_location" class="ptolemy.kernel.util.Location" value="[1270.0, 345.0]">
+        <property name="_location" class="ptolemy.kernel.util.Location" value="[1265.0, 355.0]">
         </property>
-        <property name="derivedFrom" class="org.kepler.moml.NamedObjIdReferralList" value="urn:lsid:kepler-project.org:actor:436:1:urn:lsid:kepler-project.org/ns/:43955:85:3">
+        <property name="derivedFrom" class="org.kepler.moml.NamedObjIdReferralList" value="urn:lsid:kepler-project.org:actor:436:1:urn:lsid:kepler-project.org/ns/:43955:85:3:urn:lsid:kepler-project.org/ns/:44576:61:1">
         </property>
     </property>
     <property name="Annotation9" class="ptolemy.vergil.kernel.attributes.TextAttribute">
@@ -3574,11 +3573,11 @@
 <property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Edward A. Lee</configure></property>
 <property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
 <property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure><p>The Rectangle attribute renders a rectangle on the Workflow canvas. Single-click the rectangle to drag the resize handles and adjust the shape's size, or double-click the rectangle to customize its height, width, line width, color, and fill color.</p></configure></property>
-<property name="prop:lineWidth" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The line width. The value is a double that defaults to 1.0.</configure></property>
 <property name="prop:height" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The vertical extent. The value is a double that defaults to 100.0.</configure></property>
-<property name="prop:dashArray" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify a dash-pattern for dashed or dotted lines. The value consists of an array of doubles that specify the length of the alternating solid and transparent segments. An empty value indicates that the line should not be dashed (the default).</configure></property>
-<property name="prop:centered" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Indicate whether the shape should be centered on its origin. By default, the location is the upper-left corner.</configure></property>
+<property name="prop:lineWidth" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The line width. The value is a double that defaults to 1.0.</configure></property>
 <property name="prop:rounding" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The amount of rounding of the corners. The value is a double that defaults to 0.0, which indicates no rounding.</configure></property>
+<property name="prop:centered" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Indicate whether the shape should be centered on its origin. By default, the location is the upper-left corner.</configure></property>
+<property name="prop:dashArray" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify a dash-pattern for dashed or dotted lines. The value consists of an array of doubles that specify the length of the alternating solid and transparent segments. An empty value indicates that the line should not be dashed (the default).</configure></property>
 <property name="prop:width" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The horizontal extent. The value is a double that defaults to 100.0.</configure></property>
 <property name="prop:lineColor" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The line color. Specify a string representing an array of four elements: red, green, blue, and alpha, where alpha is transparency. The default is an opaque black, {0.0, 0.0, 0.0, 1.0}</configure></property>
 <property name="prop:fillColor" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The fill color. Specify a string representing an array of four elements: red, green, blue, and alpha, where alpha is transparency. By default, the value is "none."</configure></property>
@@ -3733,7 +3732,7 @@
         <property name="derivedFrom" class="org.kepler.moml.NamedObjIdReferralList" value="urn:lsid:kepler-project.org:actor:436:1:urn:lsid:uuid:474c491b-ecf1-4b44-b72f-10dd25505580:556:10">
         </property>
     </property>
-    <property name="ProductExplorerMode" class="ptolemy.data.expr.StringParameter" value="Enabled">
+    <property name="ProductExplorerMode" class="ptolemy.data.expr.StringParameter" value="Triggered">
 <property name="KeplerDocumentation" class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
 <property name="description" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
 <property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Edward A. Lee</configure></property>
@@ -3764,7 +3763,7 @@
         </property>
         <property name="_editorFactory" class="ptolemy.vergil.toolbox.VisibleParameterEditorFactory">
         </property>
-        <property name="_location" class="ptolemy.kernel.util.Location" value="[1030.0, 355.0]">
+        <property name="_location" class="ptolemy.kernel.util.Location" value="[1030.0, 365.0]">
         </property>
         <property name="derivedFrom" class="org.kepler.moml.NamedObjIdReferralList" value="urn:lsid:kepler-project.org:actor:421:1:urn:lsid:kepler-project.org/ns/:43955:86:1:urn:lsid:kepler-project.org/ns/:44576:60:1">
         </property>
@@ -4014,6 +4013,91 @@
         <property name="derivedFrom" class="org.kepler.moml.NamedObjIdReferralList" value="urn:lsid:kepler-project.org:actor:422:1">
         </property>
     </property>
+    <property name="ProductExplorerEnabled" class="ptolemy.data.expr.StringParameter" value="true">
+<property name="KeplerDocumentation" class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
+<property name="description" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Edward A. Lee</configure></property>
+<property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure><p>StringParameter specifies a persistent string. </p>

<p>Change the name of the StringParameter to better identify the specified value (right-click the parameter and select "Customize Name" from the menu). Other actors may refer to the StringParameter using the $NAME syntax (e.g. $Parameter).
</p></configure></property>
+</property>        <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:kepler-project.org/ns/:44576:60:1">
+        </property>
+        <property name="class" class="ptolemy.kernel.util.StringAttribute" value="ptolemy.data.expr.StringParameter">
+            <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:1185:1">
+            </property>
+        </property>
+        <property name="semanticType00" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#Parameter">
+        </property>
+        <property name="semanticType11" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#Parameter">
+        </property>
+        <property name="_hideName" class="ptolemy.kernel.util.SingletonAttribute">
+        </property>
+        <property name="_icon" class="ptolemy.vergil.icon.ValueIcon">
+            <property name="_color" class="ptolemy.actor.gui.ColorAttribute" value="{1.0, 0.0, 0.0, 1.0}">
+            </property>
+        </property>
+        <property name="_smallIconDescription" class="ptolemy.kernel.util.SingletonConfigurableAttribute">
+            <configure>
+        <svg>
+          <text x="20" style="font-size:14; font-family:SansSerif; fill:red" y="20">-S-</text>
+        </svg>
+      </configure>
+        </property>
+        <property name="_editorFactory" class="ptolemy.vergil.toolbox.VisibleParameterEditorFactory">
+        </property>
+        <property name="_location" class="ptolemy.kernel.util.Location" value="[1030.0, 345.0]">
+        </property>
+        <property name="derivedFrom" class="org.kepler.moml.NamedObjIdReferralList" value="urn:lsid:kepler-project.org:actor:421:1:urn:lsid:kepler-project.org/ns/:43955:86:1">
+        </property>
+    </property>
+    <property name="Annotation40" class="ptolemy.vergil.kernel.attributes.TextAttribute">
+        <property name="_hideName" class="ptolemy.data.expr.SingletonParameter" value="true">
+        </property>
+        <property name="_hideAllParameters" class="ptolemy.data.expr.Parameter" value="true">
+        </property>
+        <property name="textSize" class="ptolemy.data.expr.Parameter" value="14">
+        </property>
+        <property name="textColor" class="ptolemy.actor.gui.ColorAttribute" value="{0.4,0.4,0.0,1.0}">
+        </property>
+        <property name="fontFamily" class="ptolemy.data.expr.StringParameter" value="SansSerif">
+        </property>
+        <property name="bold" class="ptolemy.data.expr.Parameter" value="false">
+        </property>
+        <property name="italic" class="ptolemy.data.expr.Parameter" value="false">
+        </property>
+        <property name="text" class="ptolemy.kernel.util.StringAttribute" value="Show Product Explorer window">
+            <property name="_style" class="ptolemy.actor.gui.style.TextStyle">
+                <property name="height" class="ptolemy.data.expr.Parameter" value="20">
+                </property>
+                <property name="width" class="ptolemy.data.expr.Parameter" value="80">
+                </property>
+            </property>
+        </property>
+<property name="KeplerDocumentation" class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
+<property name="description" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Edward A. Lee</configure></property>
+<property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Use the Annotation attribute to annotate a workflow. Double-click the attribute to customize the content, font size, color, and basic formatting (bold and italics).</configure></property>
+<property name="prop:fontFamily" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The font face. Select a font from the drop-down menu. The default is "SansSerif".</configure></property>
+<property name="prop:italic" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Select to indicate that the type should be italics. By default, type will not be italicized.</configure></property>
+<property name="prop:bold" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Select to indicate that the type should be bold. By default, type will not be bold.</configure></property>
+<property name="prop:textColor" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The font color. Specify a string representing an array of four elements: red, green, blue, and alpha, where alpha is transparency. The default is an opaque black, {0.0, 0.0, 0.0, 1.0}</configure></property>
+<property name="prop:textSize" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The font size. Select an integer from the drop-down menu or specify a new size by typing it directly into the value field.  The default is 14.</configure></property>
+<property name="prop:text" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The text of the annotation.</configure></property>
+</property>        <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:kepler-project.org/ns/:44576:61:1">
+        </property>
+        <property name="class" class="ptolemy.kernel.util.StringAttribute" value="ptolemy.vergil.kernel.attributes.TextAttribute">
+            <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:1199:1">
+            </property>
+        </property>
+        <property name="semanticType00" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#DocumentationActor">
+        </property>
+        <property name="semanticType11" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#WorkflowDocumentation">
+        </property>
+        <property name="_location" class="ptolemy.kernel.util.Location" value="[1260.0, 335.0]">
+        </property>
+        <property name="derivedFrom" class="org.kepler.moml.NamedObjIdReferralList" value="urn:lsid:kepler-project.org:actor:436:1:urn:lsid:kepler-project.org/ns/:43955:85:3">
+        </property>
+    </property>
     <entity name="Wavelength Calibration" class="ptolemy.actor.TypedCompositeActor">
         <property name="_createdBy" class="ptolemy.kernel.attributes.VersionAttribute" value="7.0.2">
         </property>
@@ -4180,8 +4264,8 @@
 <property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Gang Zhou</configure></property>
 <property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
 <property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>
            <p> The dynamic dataflow (DDF) domain is a superset of the synchronous
            dataflow(SDF) and Boolean dataflow(BDF) domains. In the SDF domain,
            an actor consumes and produces a fixed number of tokens per firing.
            This static information makes possible compile-time scheduling. In the
            DDF domain, there are few  [...]
-<property name="prop:iterations" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify the number of times a workflow is iterated. By default, this parameter is set to "0". Note that "0" does not mean "no iterations." Rather, "0" means that the workflow will iterate forever. Values greater than zero specify the actual number of times the director should execute the entire workflow. </configure></property>
 <property name="prop:maximumReceiverCapacity" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>A Parameter representing the maximum capacity of each receiver controlled by this director. This is an integer that defaults to 0, which means the queue in each receiver is unbounded. To specify bounded queues, set this to a positive integer. </configure></property>
+<property name="prop:iterations" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify the number of times a workflow is iterated. By default, this parameter is set to "0". Note that "0" does not mean "no iterations." Rather, "0" means that the workflow will iterate forever. Values greater than zero specify the actual number of times the director should execute the entire workflow. </configure></property>
 <property name="prop:runUntilDeadlockInOneIteration" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>A parameter indicating whether one iteration consists of repeated basic iterations until deadlock. If this parameter is true, the model will be executed until deadlock in one iteration. The default value is a BooleanToken with the value false. It cannot be set to true if this director is at the top level.</configure></property>
 </property>            <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:kepler-project.org/ns/:79200:163:1">
             </property>
@@ -4643,11 +4727,11 @@
 <property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Edward A. Lee</configure></property>
 <property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
 <property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure><p>The Rectangle attribute renders a rectangle on the Workflow canvas. Single-click the rectangle to drag the resize handles and adjust the shape's size, or double-click the rectangle to customize its height, width, line width, color, and fill color.</p></configure></property>
-<property name="prop:height" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The vertical extent. The value is a double that defaults to 100.0.</configure></property>
 <property name="prop:lineWidth" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The line width. The value is a double that defaults to 1.0.</configure></property>
-<property name="prop:rounding" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The amount of rounding of the corners. The value is a double that defaults to 0.0, which indicates no rounding.</configure></property>
-<property name="prop:centered" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Indicate whether the shape should be centered on its origin. By default, the location is the upper-left corner.</configure></property>
+<property name="prop:height" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The vertical extent. The value is a double that defaults to 100.0.</configure></property>
 <property name="prop:dashArray" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify a dash-pattern for dashed or dotted lines. The value consists of an array of doubles that specify the length of the alternating solid and transparent segments. An empty value indicates that the line should not be dashed (the default).</configure></property>
+<property name="prop:centered" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Indicate whether the shape should be centered on its origin. By default, the location is the upper-left corner.</configure></property>
+<property name="prop:rounding" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The amount of rounding of the corners. The value is a double that defaults to 0.0, which indicates no rounding.</configure></property>
 <property name="prop:width" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The horizontal extent. The value is a double that defaults to 100.0.</configure></property>
 <property name="prop:lineColor" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The line color. Specify a string representing an array of four elements: red, green, blue, and alpha, where alpha is transparency. The default is an opaque black, {0.0, 0.0, 0.0, 1.0}</configure></property>
 <property name="prop:fillColor" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The fill color. Specify a string representing an array of four elements: red, green, blue, and alpha, where alpha is transparency. By default, the value is "none."</configure></property>
@@ -4690,11 +4774,11 @@
 <property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Edward A. Lee</configure></property>
 <property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
 <property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure><p>The Rectangle attribute renders a rectangle on the Workflow canvas. Single-click the rectangle to drag the resize handles and adjust the shape's size, or double-click the rectangle to customize its height, width, line width, color, and fill color.</p></configure></property>
-<property name="prop:height" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The vertical extent. The value is a double that defaults to 100.0.</configure></property>
 <property name="prop:lineWidth" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The line width. The value is a double that defaults to 1.0.</configure></property>
-<property name="prop:rounding" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The amount of rounding of the corners. The value is a double that defaults to 0.0, which indicates no rounding.</configure></property>
-<property name="prop:centered" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Indicate whether the shape should be centered on its origin. By default, the location is the upper-left corner.</configure></property>
+<property name="prop:height" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The vertical extent. The value is a double that defaults to 100.0.</configure></property>
 <property name="prop:dashArray" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify a dash-pattern for dashed or dotted lines. The value consists of an array of doubles that specify the length of the alternating solid and transparent segments. An empty value indicates that the line should not be dashed (the default).</configure></property>
+<property name="prop:centered" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Indicate whether the shape should be centered on its origin. By default, the location is the upper-left corner.</configure></property>
+<property name="prop:rounding" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The amount of rounding of the corners. The value is a double that defaults to 0.0, which indicates no rounding.</configure></property>
 <property name="prop:width" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The horizontal extent. The value is a double that defaults to 100.0.</configure></property>
 <property name="prop:lineColor" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The line color. Specify a string representing an array of four elements: red, green, blue, and alpha, where alpha is transparency. The default is an opaque black, {0.0, 0.0, 0.0, 1.0}</configure></property>
 <property name="prop:fillColor" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The fill color. Specify a string representing an array of four elements: red, green, blue, and alpha, where alpha is transparency. By default, the value is "none."</configure></property>
@@ -4723,8 +4807,8 @@
 <property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Gang Zhou</configure></property>
 <property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
 <property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>
            <p> The dynamic dataflow (DDF) domain is a superset of the synchronous
            dataflow(SDF) and Boolean dataflow(BDF) domains. In the SDF domain,
            an actor consumes and produces a fixed number of tokens per firing.
            This static information makes possible compile-time scheduling. In the
            DDF domain, there are few  [...]
-<property name="prop:maximumReceiverCapacity" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>A Parameter representing the maximum capacity of each receiver controlled by this director. This is an integer that defaults to 0, which means the queue in each receiver is unbounded. To specify bounded queues, set this to a positive integer. </configure></property>
 <property name="prop:iterations" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify the number of times a workflow is iterated. By default, this parameter is set to "0". Note that "0" does not mean "no iterations." Rather, "0" means that the workflow will iterate forever. Values greater than zero specify the actual number of times the director should execute the entire workflow. </configure></property>
+<property name="prop:maximumReceiverCapacity" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>A Parameter representing the maximum capacity of each receiver controlled by this director. This is an integer that defaults to 0, which means the queue in each receiver is unbounded. To specify bounded queues, set this to a positive integer. </configure></property>
 <property name="prop:runUntilDeadlockInOneIteration" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>A parameter indicating whether one iteration consists of repeated basic iterations until deadlock. If this parameter is true, the model will be executed until deadlock in one iteration. The default value is a BooleanToken with the value false. It cannot be set to true if this director is at the top level.</configure></property>
 </property>            <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:kepler-project.org/ns/:79200:158:1">
             </property>
@@ -5067,7 +5151,7 @@
             </port>
         </entity>
         <entity name="Directory Maker" class="org.resurgence.actor.DirectoryMaker">
-            <property name="Directory name" class="ptolemy.actor.parameters.PortParameter" value="ROOT_DATA_PATH_TO_REPLACE/reflex_end_products/2015-07-16T16:25:51/SINFO.2011-01-02T08:46:36.871_tpl">
+            <property name="Directory name" class="ptolemy.actor.parameters.PortParameter" value="ROOT_DATA_PATH_TO_REPLACE/reflex_end_products/2015-09-15T08:46:16/SINFO.2011-01-02T08:46:36.871_tpl">
             </property>
 <property name="KeplerDocumentation" class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
 <property name="description" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
@@ -5419,8 +5503,8 @@
 <property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Gang Zhou</configure></property>
 <property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
 <property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>
            <p> The dynamic dataflow (DDF) domain is a superset of the synchronous
            dataflow(SDF) and Boolean dataflow(BDF) domains. In the SDF domain,
            an actor consumes and produces a fixed number of tokens per firing.
            This static information makes possible compile-time scheduling. In the
            DDF domain, there are few  [...]
-<property name="prop:iterations" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify the number of times a workflow is iterated. By default, this parameter is set to "0". Note that "0" does not mean "no iterations." Rather, "0" means that the workflow will iterate forever. Values greater than zero specify the actual number of times the director should execute the entire workflow. </configure></property>
 <property name="prop:maximumReceiverCapacity" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>A Parameter representing the maximum capacity of each receiver controlled by this director. This is an integer that defaults to 0, which means the queue in each receiver is unbounded. To specify bounded queues, set this to a positive integer. </configure></property>
+<property name="prop:iterations" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify the number of times a workflow is iterated. By default, this parameter is set to "0". Note that "0" does not mean "no iterations." Rather, "0" means that the workflow will iterate forever. Values greater than zero specify the actual number of times the director should execute the entire workflow. </configure></property>
 <property name="prop:runUntilDeadlockInOneIteration" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>A parameter indicating whether one iteration consists of repeated basic iterations until deadlock. If this parameter is true, the model will be executed until deadlock in one iteration. The default value is a BooleanToken with the value false. It cannot be set to true if this director is at the top level.</configure></property>
 </property>            <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:kepler-project.org/ns/:31617:99:1">
             </property>
@@ -5631,8 +5715,8 @@
 <property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Gang Zhou</configure></property>
 <property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
 <property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>
            <p> The dynamic dataflow (DDF) domain is a superset of the synchronous
            dataflow(SDF) and Boolean dataflow(BDF) domains. In the SDF domain,
            an actor consumes and produces a fixed number of tokens per firing.
            This static information makes possible compile-time scheduling. In the
            DDF domain, there are few  [...]
-<property name="prop:maximumReceiverCapacity" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>A Parameter representing the maximum capacity of each receiver controlled by this director. This is an integer that defaults to 0, which means the queue in each receiver is unbounded. To specify bounded queues, set this to a positive integer. </configure></property>
 <property name="prop:iterations" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify the number of times a workflow is iterated. By default, this parameter is set to "0". Note that "0" does not mean "no iterations." Rather, "0" means that the workflow will iterate forever. Values greater than zero specify the actual number of times the director should execute the entire workflow. </configure></property>
+<property name="prop:maximumReceiverCapacity" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>A Parameter representing the maximum capacity of each receiver controlled by this director. This is an integer that defaults to 0, which means the queue in each receiver is unbounded. To specify bounded queues, set this to a positive integer. </configure></property>
 <property name="prop:runUntilDeadlockInOneIteration" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>A parameter indicating whether one iteration consists of repeated basic iterations until deadlock. If this parameter is true, the model will be executed until deadlock in one iteration. The default value is a BooleanToken with the value false. It cannot be set to true if this director is at the top level.</configure></property>
 </property>            <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:kepler-project.org/ns/:79200:95:1">
             </property>
@@ -5820,19 +5904,6 @@
         <link port="sinfo_rec_mflat_1.sof in" relation="relation6"/>
         <link port="sinfo_rec_mflat_1.sof out" relation="relation2"/>
     </entity>
-    <entity name="ProductExplorer" class="org.eso.ProductExplorer">
-        <property name="Mode" class="ptolemy.data.expr.StringParameter" value="$ProductExplorerMode">
-        </property>
-        <property name="Enabled" class="ptolemy.data.expr.StringParameter" value="$ProductExplorerEnabled">
-        </property>
-        <property name="_location" class="ptolemy.kernel.util.Location" value="[1565.0, 1080.0]">
-        </property>
-        <port name="start date" class="ptolemy.actor.TypedIOPort">
-            <property name="input"/>
-            <property name="_showName" class="ptolemy.data.expr.SingletonParameter" value="false">
-            </property>
-        </port>
-    </entity>
     <entity name="SofCombiner" class="org.eso.SofCombiner">
         <property name="IgnorePurpose" class="ptolemy.data.expr.Parameter" value="false">
         </property>
@@ -5926,8 +5997,8 @@
 <property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Gang Zhou</configure></property>
 <property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
 <property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>
            <p> The dynamic dataflow (DDF) domain is a superset of the synchronous
            dataflow(SDF) and Boolean dataflow(BDF) domains. In the SDF domain,
            an actor consumes and produces a fixed number of tokens per firing.
            This static information makes possible compile-time scheduling. In the
            DDF domain, there are few  [...]
-<property name="prop:maximumReceiverCapacity" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>A Parameter representing the maximum capacity of each receiver controlled by this director. This is an integer that defaults to 0, which means the queue in each receiver is unbounded. To specify bounded queues, set this to a positive integer. </configure></property>
 <property name="prop:iterations" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify the number of times a workflow is iterated. By default, this parameter is set to "0". Note that "0" does not mean "no iterations." Rather, "0" means that the workflow will iterate forever. Values greater than zero specify the actual number of times the director should execute the entire workflow. </configure></property>
+<property name="prop:maximumReceiverCapacity" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>A Parameter representing the maximum capacity of each receiver controlled by this director. This is an integer that defaults to 0, which means the queue in each receiver is unbounded. To specify bounded queues, set this to a positive integer. </configure></property>
 <property name="prop:runUntilDeadlockInOneIteration" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>A parameter indicating whether one iteration consists of repeated basic iterations until deadlock. If this parameter is true, the model will be executed until deadlock in one iteration. The default value is a BooleanToken with the value false. It cannot be set to true if this director is at the top level.</configure></property>
 </property>            <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:kepler-project.org/ns/:79200:91:1">
             </property>
@@ -6114,8 +6185,8 @@
 <property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Gang Zhou</configure></property>
 <property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
 <property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>
            <p> The dynamic dataflow (DDF) domain is a superset of the synchronous
            dataflow(SDF) and Boolean dataflow(BDF) domains. In the SDF domain,
            an actor consumes and produces a fixed number of tokens per firing.
            This static information makes possible compile-time scheduling. In the
            DDF domain, there are few  [...]
-<property name="prop:iterations" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify the number of times a workflow is iterated. By default, this parameter is set to "0". Note that "0" does not mean "no iterations." Rather, "0" means that the workflow will iterate forever. Values greater than zero specify the actual number of times the director should execute the entire workflow. </configure></property>
 <property name="prop:maximumReceiverCapacity" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>A Parameter representing the maximum capacity of each receiver controlled by this director. This is an integer that defaults to 0, which means the queue in each receiver is unbounded. To specify bounded queues, set this to a positive integer. </configure></property>
+<property name="prop:iterations" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify the number of times a workflow is iterated. By default, this parameter is set to "0". Note that "0" does not mean "no iterations." Rather, "0" means that the workflow will iterate forever. Values greater than zero specify the actual number of times the director should execute the entire workflow. </configure></property>
 <property name="prop:runUntilDeadlockInOneIteration" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>A parameter indicating whether one iteration consists of repeated basic iterations until deadlock. If this parameter is true, the model will be executed until deadlock in one iteration. The default value is a BooleanToken with the value false. It cannot be set to true if this director is at the top level.</configure></property>
 </property>            <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:kepler-project.org/ns/:31989:107:1">
             </property>
@@ -6177,8 +6248,8 @@
 <property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
 <property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
 <property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>
<p>The ElementsToArray actor reads individual elements via its input port and outputs an array consisting of those elements.</p>

<p>The actor accepts input elements of any one type (int, double, etc.). The type must be consistent. Each time the actor fires, it reads one token from each channel of the input port and outputs a corresponding array.</p>&# [...]
-<property name="port:input" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>A multiport that accepts tokens of any one type. The type must be consistent.</configure></property>
 <property name="port:output" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>An output port that broadcasts an assembled array. The type of the array elements matches that of the input.</configure></property>
+<property name="port:input" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>A multiport that accepts tokens of any one type. The type must be consistent.</configure></property>
 </property>            <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:kepler-project.org:actor:32:1">
             </property>
             <property name="class" class="ptolemy.kernel.util.StringAttribute" value="ptolemy.actor.lib.ElementsToArray">
@@ -6322,10 +6393,10 @@
 <property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Xiaojun Liu, Edward A. Lee, Steve Neuendorffer</configure></property>
 <property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
 <property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>
<p>The External Execution actor executes a system command from a workflow. The actor accepts a command, a directory and environment in which to execute the command, and a command input string. Once the command has finished executing, the actor will output the execution results along with any errors. If no results are generated, the actor will output an empty string.</p>&# [...]
-<property name="port:output" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>An output port that broadcasts data generated by the executed command, output as a string after the command has finished executing. If the command generates no data on standard out, then the empty string (a string of length zero) is generated. </configure></property>
 <property name="port:input" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>An input port that accepts strings to pass to the standard input of the subprocess. Note that a newline is not appended to the string. If you require a newline, add one using the AddSubtract actor. This port is an input port of type String.</configure></property>
-<property name="port:error" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>An output port that broadcasts any errors generated by the command execution. Errors are output as a string after the command has finished executing. If the execution generates no errors, an empty string is output. </configure></property>
+<property name="port:output" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>An output port that broadcasts data generated by the executed command, output as a string after the command has finished executing. If the command generates no data on standard out, then the empty string (a string of length zero) is generated. </configure></property>
 <property name="port:trigger" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>If connected, a token must be available on this port before actor will execute.</configure></property>
+<property name="port:error" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>An output port that broadcasts any errors generated by the command execution. Errors are output as a string after the command has finished executing. If the execution generates no errors, an empty string is output. </configure></property>
 <property name="port:exitCode" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>An output port that broadcasts the command's exit code. A non-zero value signifies an error.</configure></property>
 <property name="prop:environment" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>An array of records that name an environment variable and a value:
 
  {{name = "NAME1", value = "value1"}...}
  
Where NAME1 is the name of the environment variable, and value1 is the value. 
For example, {{name = "PTII", value = "c:/ptII"}} would set the value of the PTII to c:/ptII. 
If the parameter is set to {{name="&quot [...]
 <property name="prop:directory" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The directory in which to execute the command. The default value of this parameter $CWD, which represents the user's current working or home directory. </configure></property>
@@ -6584,8 +6655,8 @@
 <property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Gang Zhou</configure></property>
 <property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
 <property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>
            <p> The dynamic dataflow (DDF) domain is a superset of the synchronous
            dataflow(SDF) and Boolean dataflow(BDF) domains. In the SDF domain,
            an actor consumes and produces a fixed number of tokens per firing.
            This static information makes possible compile-time scheduling. In the
            DDF domain, there are few  [...]
-<property name="prop:maximumReceiverCapacity" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>A Parameter representing the maximum capacity of each receiver controlled by this director. This is an integer that defaults to 0, which means the queue in each receiver is unbounded. To specify bounded queues, set this to a positive integer. </configure></property>
 <property name="prop:iterations" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify the number of times a workflow is iterated. By default, this parameter is set to "0". Note that "0" does not mean "no iterations." Rather, "0" means that the workflow will iterate forever. Values greater than zero specify the actual number of times the director should execute the entire workflow. </configure></property>
+<property name="prop:maximumReceiverCapacity" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>A Parameter representing the maximum capacity of each receiver controlled by this director. This is an integer that defaults to 0, which means the queue in each receiver is unbounded. To specify bounded queues, set this to a positive integer. </configure></property>
 <property name="prop:runUntilDeadlockInOneIteration" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>A parameter indicating whether one iteration consists of repeated basic iterations until deadlock. If this parameter is true, the model will be executed until deadlock in one iteration. The default value is a BooleanToken with the value false. It cannot be set to true if this director is at the top level.</configure></property>
 </property>            <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:kepler-project.org/ns/:79200:103:1">
             </property>
@@ -6844,7 +6915,7 @@
             </property>
         </entity>
         <entity name="Write README" class="org.geon.FileWrite">
-            <property name="fileName" class="ptolemy.actor.parameters.FilePortParameter" value="ROOT_DATA_PATH_TO_REPLACE/reflex_end_products/2015-07-16T16:25:51/README">
+            <property name="fileName" class="ptolemy.actor.parameters.FilePortParameter" value="ROOT_DATA_PATH_TO_REPLACE/reflex_end_products/2015-09-15T08:46:16/README">
             </property>
             <property name="append" class="ptolemy.data.expr.Parameter" value="true">
             </property>
@@ -7225,8 +7296,8 @@
 <property name="port:text out" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>A nicely formatted string</configure></property>
 <property name="port:json in" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The input JSON object</configure></property>
 <property name="prop:semanticType41" class="ptolemy.kernel.util.ConfigurableAttribute"><configure></configure></property>
-<property name="prop:Include Header and Footer" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>if true the output text will contain a descriptive header and footer</configure></property>
 <property name="prop:entityId" class="ptolemy.kernel.util.ConfigurableAttribute"><configure></configure></property>
+<property name="prop:Include Header and Footer" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>if true the output text will contain a descriptive header and footer</configure></property>
 <property name="prop:class" class="ptolemy.kernel.util.ConfigurableAttribute"><configure></configure></property>
 </property>            <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:kepler-project.org:actor:907:1">
             </property>
@@ -7487,8 +7558,8 @@
 <property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Wibke Sudholt</configure></property>
 <property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
 <property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure><p>The  StringToInt actor reads a string, converts it to an integer, and outputs the result. </p>

<p>The actor creates the integer by placing one byte (i.e., one character) of the string into the least significant byte of an integer. Typically, this byte is the ASCII code of the character.</p>
</configure></property>
-<property name="port:integer" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>An output port that broadcasts the converted string as an integer.</configure></property>
 <property name="port:string" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>An input port that accepts a string.</configure></property>
+<property name="port:integer" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>An output port that broadcasts the converted string as an integer.</configure></property>
 </property>            <property name="class" class="ptolemy.kernel.util.StringAttribute" value="org.resurgence.actor.StringToInt">
                 <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:1119:1">
                 </property>
@@ -7727,6 +7798,283 @@
             </property>
         </port>
     </entity>
+    <entity name="ProductExplorer" class="ptolemy.actor.TypedCompositeActor">
+        <property name="_location" class="ptolemy.kernel.util.Location" value="[1580.0, 1080.0]">
+        </property>
+        <property name="derivedFrom" class="org.kepler.moml.NamedObjIdReferralList">
+        </property>
+        <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:kepler-project.org/ns/:79705:103:18">
+        </property>
+        <property name="DDF Director" class="ptolemy.domains.ddf.kernel.DDFDirector">
+            <property name="localClock" class="ptolemy.actor.LocalClock">
+                <property name="globalTimeResolution" class="ptolemy.actor.parameters.SharedParameter" value="1E-10">
+                </property>
+                <property name="clockRate" class="ptolemy.data.expr.Parameter" value="1.0">
+                </property>
+            </property>
+            <property name="iterations" class="ptolemy.data.expr.Parameter" value="0">
+            </property>
+            <property name="maximumReceiverCapacity" class="ptolemy.data.expr.Parameter" value="0">
+            </property>
+            <property name="runUntilDeadlockInOneIteration" class="ptolemy.data.expr.Parameter" value="false">
+            </property>
+<property name="KeplerDocumentation" class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
+<property name="description" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Gang Zhou</configure></property>
+<property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>
            <p> The dynamic dataflow (DDF) domain is a superset of the synchronous
            dataflow(SDF) and Boolean dataflow(BDF) domains. In the SDF domain,
            an actor consumes and produces a fixed number of tokens per firing.
            This static information makes possible compile-time scheduling. In the
            DDF domain, there are few  [...]
+<property name="prop:maximumReceiverCapacity" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>A Parameter representing the maximum capacity of each receiver controlled by this director. This is an integer that defaults to 0, which means the queue in each receiver is unbounded. To specify bounded queues, set this to a positive integer. </configure></property>
+<property name="prop:iterations" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Specify the number of times a workflow is iterated. By default, this parameter is set to "0". Note that "0" does not mean "no iterations." Rather, "0" means that the workflow will iterate forever. Values greater than zero specify the actual number of times the director should execute the entire workflow. </configure></property>
+<property name="prop:runUntilDeadlockInOneIteration" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>A parameter indicating whether one iteration consists of repeated basic iterations until deadlock. If this parameter is true, the model will be executed until deadlock in one iteration. The default value is a BooleanToken with the value false. It cannot be set to true if this director is at the top level.</configure></property>
+</property>            <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:kepler-project.org:director:5:1">
+            </property>
+            <property name="class" class="ptolemy.kernel.util.StringAttribute" value="ptolemy.domains.ddf.kernel.DDFDirector">
+                <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:directorclass:5:1">
+                </property>
+            </property>
+            <property name="semanticType00" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#Director">
+            </property>
+            <property name="semanticType11" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#Director">
+            </property>
+            <property name="_location" class="ptolemy.kernel.util.Location" value="[1565.0, 1020.0]">
+            </property>
+        </property>
+        <property name="ProductExplorerMode" class="ptolemy.data.expr.StringParameter" value="$ProductExplorerMode">
+<property name="KeplerDocumentation" class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
+<property name="description" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Edward A. Lee</configure></property>
+<property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure><p>StringParameter specifies a persistent string. </p>

<p>Change the name of the StringParameter to better identify the specified value (right-click the parameter and select "Customize Name" from the menu). Other actors may refer to the StringParameter using the $NAME syntax (e.g. $Parameter).
</p></configure></property>
+</property>            <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:kepler-project.org/ns/:79705:119:1">
+            </property>
+            <property name="class" class="ptolemy.kernel.util.StringAttribute" value="ptolemy.data.expr.StringParameter">
+                <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:1185:1">
+                </property>
+            </property>
+            <property name="semanticType00" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#Parameter">
+            </property>
+            <property name="semanticType11" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#Parameter">
+            </property>
+            <property name="_hideName" class="ptolemy.kernel.util.SingletonAttribute">
+            </property>
+            <property name="_icon" class="ptolemy.vergil.icon.ValueIcon">
+                <property name="_color" class="ptolemy.actor.gui.ColorAttribute" value="{1.0, 0.0, 0.0, 1.0}">
+                </property>
+            </property>
+            <property name="_smallIconDescription" class="ptolemy.kernel.util.SingletonConfigurableAttribute">
+                <configure>
+        <svg>
+          <text x="20" style="font-size:14; font-family:SansSerif; fill:red" y="20">-S-</text>
+        </svg>
+      </configure>
+            </property>
+            <property name="_editorFactory" class="ptolemy.vergil.toolbox.VisibleParameterEditorFactory">
+            </property>
+            <property name="_location" class="ptolemy.kernel.util.Location" value="[1485.0, 1180.0]">
+            </property>
+            <property name="derivedFrom" class="org.kepler.moml.NamedObjIdReferralList" value="urn:lsid:kepler-project.org:actor:421:1">
+            </property>
+        </property>
+        <property name="BOOKKEEPING_DB" class="ptolemy.data.expr.StringParameter" value="$BOOKKEEPING_DB">
+<property name="KeplerDocumentation" class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
+<property name="description" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Edward A. Lee</configure></property>
+<property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure><p>StringParameter specifies a persistent string. </p>

<p>Change the name of the StringParameter to better identify the specified value (right-click the parameter and select "Customize Name" from the menu). Other actors may refer to the StringParameter using the $NAME syntax (e.g. $Parameter).
</p></configure></property>
+</property>            <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:kepler-project.org/ns/:79705:120:3">
+            </property>
+            <property name="class" class="ptolemy.kernel.util.StringAttribute" value="ptolemy.data.expr.StringParameter">
+                <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:1185:1">
+                </property>
+            </property>
+            <property name="semanticType00" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#Parameter">
+            </property>
+            <property name="semanticType11" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#Parameter">
+            </property>
+            <property name="_hideName" class="ptolemy.kernel.util.SingletonAttribute">
+            </property>
+            <property name="_icon" class="ptolemy.vergil.icon.ValueIcon">
+                <property name="_color" class="ptolemy.actor.gui.ColorAttribute" value="{1.0, 0.0, 0.0, 1.0}">
+                </property>
+            </property>
+            <property name="_smallIconDescription" class="ptolemy.kernel.util.SingletonConfigurableAttribute">
+                <configure>
+        <svg>
+          <text x="20" style="font-size:14; font-family:SansSerif; fill:red" y="20">-S-</text>
+        </svg>
+      </configure>
+            </property>
+            <property name="_editorFactory" class="ptolemy.vergil.toolbox.VisibleParameterEditorFactory">
+            </property>
+            <property name="_location" class="ptolemy.kernel.util.Location" value="[1485.0, 1210.0]">
+            </property>
+            <property name="derivedFrom" class="org.kepler.moml.NamedObjIdReferralList" value="urn:lsid:kepler-project.org:actor:421:1">
+            </property>
+        </property>
+        <property name="FITS_VIEWER" class="ptolemy.data.expr.StringParameter" value="$FITS_VIEWER">
+<property name="KeplerDocumentation" class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
+<property name="description" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Edward A. Lee</configure></property>
+<property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure><p>StringParameter specifies a persistent string. </p>

<p>Change the name of the StringParameter to better identify the specified value (right-click the parameter and select "Customize Name" from the menu). Other actors may refer to the StringParameter using the $NAME syntax (e.g. $Parameter).
</p></configure></property>
+</property>            <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:kepler-project.org/ns/:79705:121:3">
+            </property>
+            <property name="class" class="ptolemy.kernel.util.StringAttribute" value="ptolemy.data.expr.StringParameter">
+                <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:1185:1">
+                </property>
+            </property>
+            <property name="semanticType00" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#Parameter">
+            </property>
+            <property name="semanticType11" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#Parameter">
+            </property>
+            <property name="_hideName" class="ptolemy.kernel.util.SingletonAttribute">
+            </property>
+            <property name="_icon" class="ptolemy.vergil.icon.ValueIcon">
+                <property name="_color" class="ptolemy.actor.gui.ColorAttribute" value="{1.0, 0.0, 0.0, 1.0}">
+                </property>
+            </property>
+            <property name="_smallIconDescription" class="ptolemy.kernel.util.SingletonConfigurableAttribute">
+                <configure>
+        <svg>
+          <text x="20" style="font-size:14; font-family:SansSerif; fill:red" y="20">-S-</text>
+        </svg>
+      </configure>
+            </property>
+            <property name="_editorFactory" class="ptolemy.vergil.toolbox.VisibleParameterEditorFactory">
+            </property>
+            <property name="_location" class="ptolemy.kernel.util.Location" value="[1485.0, 1235.0]">
+            </property>
+            <property name="derivedFrom" class="org.kepler.moml.NamedObjIdReferralList" value="urn:lsid:kepler-project.org:actor:421:1">
+            </property>
+        </property>
+        <property name="date_format" class="ptolemy.data.expr.StringParameter" value="yyyy-MM-dd'T'HH:mm:ss">
+<property name="KeplerDocumentation" class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
+<property name="description" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>Edward A. Lee</configure></property>
+<property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure><p>StringParameter specifies a persistent string. </p>

<p>Change the name of the StringParameter to better identify the specified value (right-click the parameter and select "Customize Name" from the menu). Other actors may refer to the StringParameter using the $NAME syntax (e.g. $Parameter).
</p></configure></property>
+</property>            <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:kepler-project.org/ns/:79705:122:1">
+            </property>
+            <property name="class" class="ptolemy.kernel.util.StringAttribute" value="ptolemy.data.expr.StringParameter">
+                <property name="id" class="ptolemy.kernel.util.StringAttribute" value="urn:lsid:kepler-project.org:class:1185:1">
+                </property>
+            </property>
+            <property name="semanticType00" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:1:1#Parameter">
+            </property>
+            <property name="semanticType11" class="org.kepler.sms.SemanticType" value="urn:lsid:localhost:onto:2:1#Parameter">
+            </property>
+            <property name="_hideName" class="ptolemy.kernel.util.SingletonAttribute">
+            </property>
+            <property name="_icon" class="ptolemy.vergil.icon.ValueIcon">
+                <property name="_color" class="ptolemy.actor.gui.ColorAttribute" value="{1.0, 0.0, 0.0, 1.0}">
+                </property>
+            </property>
+            <property name="_smallIconDescription" class="ptolemy.kernel.util.SingletonConfigurableAttribute">
+                <configure>
+        <svg>
+          <text x="20" style="font-size:14; font-family:SansSerif; fill:red" y="20">-S-</text>
+        </svg>
+      </configure>
+            </property>
+            <property name="_editorFactory" class="ptolemy.vergil.toolbox.VisibleParameterEditorFactory">
+            </property>
+            <property name="_location" class="ptolemy.kernel.util.Location" value="[1485.0, 1260.0]">
+            </property>
+            <property name="derivedFrom" class="org.kepler.moml.NamedObjIdReferralList" value="urn:lsid:kepler-project.org:actor:421:1">
+            </property>
+        </property>
+        <port name="start_date" class="ptolemy.actor.TypedIOPort">
+            <property name="input"/>
+            <property name="_showName" class="ptolemy.data.expr.SingletonParameter" value="true">
+            </property>
+            <property name="_location" class="ptolemy.kernel.util.Location" value="[1495.0, 1090.0]">
+            </property>
+        </port>
+        <port name="trigger" class="ptolemy.actor.TypedIOPort">
+            <property name="input"/>
+            <property name="_showName" class="ptolemy.data.expr.SingletonParameter" value="true">
+            </property>
+            <property name="_location" class="ptolemy.kernel.util.Location" value="[1490.0, 1135.0]">
+            </property>
+        </port>
+        <entity name="ProductExplorer" class="org.eso.ProductExplorer">
+            <property name="Mode" class="ptolemy.data.expr.StringParameter" value="$ProductExplorerMode">
+            </property>
+            <property name="Bookkeeping DB" class="ptolemy.data.expr.FileParameter" value="$BOOKKEEPING_DB">
+                <property name="allowFiles" class="ptolemy.data.expr.Parameter" value="true">
+                </property>
+                <property name="allowDirectories" class="ptolemy.data.expr.Parameter" value="false">
+                </property>
+            </property>
+            <property name="FITS Viewer" class="ptolemy.data.expr.StringParameter" value="FITS_VIEWER">
+            </property>
+            <property name="date format" class="ptolemy.data.expr.StringParameter" value="$date_format">
+            </property>
+            <property name="max levels" class="ptolemy.actor.parameters.IntRangeParameter" value="-1">
+                <property name="min" class="ptolemy.data.expr.Parameter" value="-1">
+                </property>
+                <property name="max" class="ptolemy.data.expr.Parameter" value="10">
+                </property>
+                <property name="minLabel" class="ptolemy.data.expr.StringParameter" value="$min">
+                </property>
+                <property name="maxLabel" class="ptolemy.data.expr.StringParameter" value="$max">
+                </property>
+            </property>
+<property name="KeplerDocumentation" class="ptolemy.vergil.basic.KeplerDocumentationAttribute">
+<property name="description" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>null</configure></property>
+<property name="author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>ESO</configure></property>
+<property name="version" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>2.0</configure></property>
+<property name="userLevelDocumentation" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The ProductExplorer allows the suer to browse all the executions of the datasets and to visualize the calibration cascade and the intermediate products. Refer to the Reflex User Manual for a more detailed documentation</configure></property>
+<property name="port:trigger" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>If Mode is triggered a BooleanToken on this port defines whether the actor should pop up or not</configure></property>
+<property name="port:end date" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The newest execution date of the datasets to be displayed: if not connected defaults to now</configure></property>
+<property name="port:bookkeeping db" class="ptolemy.kernel.util.ConfigurableAttribute"><configure></configure></property>
+<property name="port:start date" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The oldest execution date of the datasets to be displayed: if not connected defaults to now-24h</configure></property>
+<property name="prop:FITS Viewer" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The application used to inspect FITS files</configure></property>
+<property name="prop:derivedFrom" class="ptolemy.kernel.util.ConfigurableAttribute"><configure></configure></property>
+<property name="prop:class" class="ptolemy.kernel.util.ConfigurableAttribute"><configure></configure></property>
+<property name="prop:author" class="ptolemy.kernel.util.ConfigurableAttribute"><configure></configure></property>
+<property name="prop:entityId" class="ptolemy.kernel.util.ConfigurableAttribute"><configure></configure></property>
+<property name="prop:max levels" class="ptolemy.kernel.util.ConfigurableAttribute"><configure></configure></property>
+<property name="prop:Bookkeeping DB" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>the file containing the bookkeeping database</configure></property>
+<property name="prop:Mode" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The actor mode, can be either Enabled, Disabled or Triggered</configure></property>
+<property name="prop:date format" class="ptolemy.kernel.util.ConfigurableAttribute"><configure>The format of start and end date</configure></property>
+</property>            <property name="entityId" class="org.kepler.moml.NamedObjId" value="urn:lsid:kepler-project.org/ns/:79705:118:8">
+            </property>
+            <property name="class" class="ptolemy.kernel.util.StringAttribute" value="org.eso.ProductExplorer">
+                <property name="id" class="ptolemy.kernel.util.StringAttribute" value="null">
+                </property>
+            </property>
+            <property name="_location" class="ptolemy.kernel.util.Location" value="[1625.0, 1095.0]">
+            </property>
+            <property name="derivedFrom" class="org.kepler.moml.NamedObjIdReferralList" value="urn:lsid:kepler-project.org/ns/:44602:16:1">
+            </property>
+            <port name="start date" class="ptolemy.actor.TypedIOPort">
+                <property name="input"/>
+                <property name="_showName" class="ptolemy.data.expr.Parameter" value="true">
+                </property>
+            </port>
+            <port name="end date" class="ptolemy.actor.TypedIOPort">
+                <property name="input"/>
+                <property name="_showName" class="ptolemy.data.expr.SingletonParameter" value="false">
+                </property>
+                <property name="_hide" class="ptolemy.data.expr.SingletonParameter" value="true">
+                </property>
+            </port>
+            <port name="trigger" class="ptolemy.actor.TypedIOPort">
+                <property name="input"/>
+                <property name="_showName" class="ptolemy.data.expr.Parameter" value="true">
+                </property>
+            </port>
+        </entity>
+        <relation name="relation2" class="ptolemy.actor.TypedIORelation">
+        </relation>
+        <relation name="relation3" class="ptolemy.actor.TypedIORelation">
+        </relation>
+        <link port="start_date" relation="relation2"/>
+        <link port="trigger" relation="relation3"/>
+        <link port="ProductExplorer.start date" relation="relation2"/>
+        <link port="ProductExplorer.trigger" relation="relation3"/>
+    </entity>
     <relation name="relation30" class="ptolemy.actor.TypedIORelation">
         <property name="width" class="ptolemy.data.expr.Parameter" value="1">
         </property>
@@ -7827,19 +8175,19 @@
         <property name="width" class="ptolemy.data.expr.Parameter" value="1">
         </property>
     </relation>
-    <relation name="relation21" class="ptolemy.actor.TypedIORelation">
+    <relation name="relation16" class="ptolemy.actor.TypedIORelation">
         <property name="width" class="ptolemy.data.expr.Parameter" value="1">
         </property>
     </relation>
-    <relation name="relation5" class="ptolemy.actor.TypedIORelation">
+    <relation name="relation24" class="ptolemy.actor.TypedIORelation">
         <property name="width" class="ptolemy.data.expr.Parameter" value="1">
         </property>
     </relation>
-    <relation name="relation16" class="ptolemy.actor.TypedIORelation">
+    <relation name="relation21" class="ptolemy.actor.TypedIORelation">
         <property name="width" class="ptolemy.data.expr.Parameter" value="1">
         </property>
     </relation>
-    <relation name="relation24" class="ptolemy.actor.TypedIORelation">
+    <relation name="relation5" class="ptolemy.actor.TypedIORelation">
         <property name="width" class="ptolemy.data.expr.Parameter" value="1">
         </property>
     </relation>
@@ -7878,8 +8226,6 @@
     <link port="Master Flat Computation.sof_in" relation="relation4"/>
     <link port="Master Flat Computation.sof_in" relation="relation7"/>
     <link port="Master Flat Computation.sof_out" relation="relation13"/>
-    <link port="ProductExplorer.start date" relation="relation21"/>
-    <link port="ProductExplorer.trigger" relation="relation5"/>
     <link port="SofCombiner.sof in" relation="relation9"/>
     <link port="SofCombiner.sof in" relation="relation18"/>
     <link port="SofCombiner.sof in" relation="relation13"/>
@@ -7898,4 +8244,6 @@
     <link port="Close DataSet.trigger_product_explorer" relation="relation5"/>
     <link port="ProductRenamer.sof_in" relation="relation16"/>
     <link port="ProductRenamer.sof_out" relation="relation24"/>
+    <link port="ProductExplorer.start_date" relation="relation21"/>
+    <link port="ProductExplorer.trigger" relation="relation5"/>
 </entity>
diff --git a/sinfoni/sinfo_absolute.c b/sinfoni/sinfo_absolute.c
index f46207f..df59625 100644
--- a/sinfoni/sinfo_absolute.c
+++ b/sinfoni/sinfo_absolute.c
@@ -174,6 +174,8 @@ sinfo_new_fit_slits2( cpl_image   * lineImage,
            constant intensity value for xdat values greater than pos2
            (see illustration above)
 
+           return 0 in case of invalid input.
+
    @memo  This function calculates the value of a slope function with parameters
           parlist at the position xdat
  */
@@ -184,6 +186,9 @@ sinfo_new_edge ( float * xdat, float * parlist/*, int * npar, int * ndat*/ )
     float return_value ;
     float slope1 ;
 
+    cpl_ensure(xdat , CPL_ERROR_NULL_INPUT, 0.);
+    cpl_ensure(parlist , CPL_ERROR_NULL_INPUT, 0.);
+
     /* compute the slopes */
     slope1 = ( parlist[3] - parlist[2] ) / ( parlist[1] - parlist[0] ) ;
 
@@ -246,6 +251,8 @@ sinfo_new_edge ( float * xdat, float * parlist/*, int * npar, int * ndat*/ )
      linear between pos2 and pos3, linear decreasing between pos3 and pos4,
      and constant background value for xdat values greater than pos4.
      (see figure above)
+
+     TODO: NOT USED
  */
 
 
@@ -331,6 +338,7 @@ sinfo_new_hat2 ( float * xdat, float * parlist/*, int * npar, int * ndat*/ )
      pos2-slope_width, linear decreasing between pos2-slope_width and pos2,
      and constant background value for xdat values greater than pos2.
      (see figure above)
+     TODO: NOT USED
  */
 float 
 sinfo_new_hat1 ( float * xdat, float * parlist/*, int * npar, int * ndat*/ )
@@ -411,12 +419,16 @@ sinfo_new_hat1 ( float * xdat, float * parlist/*, int * npar, int * ndat*/ )
 
  */
 
-void 
+cpl_error_code
 sinfo_new_edge_deriv( float * xdat, float * parlist, 
                       float * dervs/*, int * npar*/ )
 {
     float deriv1_slope1 ;
 
+    cpl_ensure_code(xdat , CPL_ERROR_NULL_INPUT);
+    cpl_ensure_code(parlist , CPL_ERROR_NULL_INPUT);
+    cpl_ensure_code(dervs , CPL_ERROR_NULL_INPUT);
+
     /* compute the slopes */
     deriv1_slope1 =( parlist[3] - parlist[2] ) / SQR(parlist[1] - parlist[0]) ;
 
@@ -442,6 +454,7 @@ sinfo_new_edge_deriv( float * xdat, float * parlist,
         dervs[2] = 0. ;
         dervs[3] = 1. ;
     }
+    return cpl_error_get_code();
 }
 /**
   @name sinfo_new_hat_deriv2
@@ -487,6 +500,7 @@ sinfo_new_edge_deriv( float * xdat, float * parlist,
               |----------|----|------|---|------> X axis
                         pos1 pos2   pos3 pos4
 
+TODO: NOT USED
  */
 
 void 
@@ -597,6 +611,7 @@ sinfo_new_hat_deriv2(float * xdat, float * parlist,
               |----------|----|---------------> X axis
              parlist(0)=pos1 pos2=parlist(1)
 
+TODO: NOT USED
  */
 
 void 
@@ -1233,6 +1248,7 @@ sinfo_new_lsqfit_edge ( float * xdat,
                              first image columns
              #           -7  if not all slitlets could be found
              #           -8  if the least squares fit failed
+TODO: NOT USED
  */
 
 
@@ -1672,6 +1688,8 @@ sinfo_new_fit_slits1( cpl_image   * lineImage,
                              first image columns
             #            -8  if not all slitlets could be found
             #            -9  if the least squares fit failed
+
+TODO: NOT USED
  */
 
 
@@ -2093,6 +2111,7 @@ sinfo_new_fit_slits( cpl_image   * lineImage,
                         using a box bigger than the size of one slitlet and 
                         divides the box into two parts
                         for both edges within the fit function is shifted.
+TODO: NOT USED
  */
 
 int 
diff --git a/sinfoni/sinfo_absolute.h b/sinfoni/sinfo_absolute.h
index 854ba34..d552fde 100644
--- a/sinfoni/sinfo_absolute.h
+++ b/sinfoni/sinfo_absolute.h
@@ -59,11 +59,11 @@ sinfo_new_edge(float * xdat, float * parlist/*, int * npar, int * ndat */) ;
 float 
 sinfo_new_boltz ( float * xdat, float * parlist ) ;
 
-void 
+cpl_error_code
 sinfo_new_edge_deriv(float * xdat, 
                      float * parlist, float * dervs/*, int * npar */) ;
 
-void 
+cpl_error_code
 sinfo_new_boltz_deriv( float * xdat, float * parlist, float * dervs ) ;
 
 int sinfo_new_lsqfit ( float * xdat,
diff --git a/sinfoni/sinfo_baryvel.c b/sinfoni/sinfo_baryvel.c
index ec64f4f..fa4a904 100644
--- a/sinfoni/sinfo_baryvel.c
+++ b/sinfoni/sinfo_baryvel.c
@@ -63,9 +63,6 @@
 
 #include <math.h>
 
-#define H_GEOLAT "ESO TEL GEOLAT"
-#define H_GEOLON "ESO TEL GEOLON"
-#define H_UTC "UTC"
 
 /*-----------------------------------------------------------------------------
   Local functions
diff --git a/sinfoni/sinfo_baryvel.h b/sinfoni/sinfo_baryvel.h
index fd6f262..cc3ed4b 100644
--- a/sinfoni/sinfo_baryvel.h
+++ b/sinfoni/sinfo_baryvel.h
@@ -22,27 +22,6 @@
  * $Date: 2009-04-28 11:42:18 $
  * $Revision: 1.2 $
  * $Name: not supported by cvs2svn $
- * $Log: not supported by cvs2svn $
- * Revision 1.1  2009/01/02 08:38:07  amodigli
- * added to CVS
- *
- * Revision 1.3  2007/06/06 08:17:33  amodigli
- * replace tab with 4 spaces
- *
- * Revision 1.2  2007/04/24 12:50:29  jmlarsen
- * Replaced cpl_propertylist -> uves_propertylist which is much faster
- *
- * Revision 1.1  2006/10/04 11:03:08  jmlarsen
- * Implemented QC.VRAD parameters
- *
- * Revision 1.4  2006/08/17 13:56:52  jmlarsen
- * Reduced max line length
- *
- * Revision 1.3  2006/02/28 09:15:22  jmlarsen
- * Minor update
- *
- * Revision 1.2  2005/12/19 16:17:56  jmlarsen
- * Replaced bool -> int
  *
  */
 #ifndef SINFO_BARYVEL_H
@@ -50,6 +29,9 @@
 
 #include <cpl.h>
 
+#define H_GEOLAT "ESO TEL GEOLAT"
+#define H_GEOLON "ESO TEL GEOLON"
+#define H_UTC "UTC"
 cpl_error_code
 sinfo_baryvel(const cpl_propertylist *raw_header,
          double *barycor,
diff --git a/sinfoni/sinfo_boltzmann.c b/sinfoni/sinfo_boltzmann.c
index ee8fe91..4e97b3a 100644
--- a/sinfoni/sinfo_boltzmann.c
+++ b/sinfoni/sinfo_boltzmann.c
@@ -119,12 +119,14 @@ static int sinfo_new_get_vec ( float * xdat,
                         that is 
                         y = (parlist(0) - parlist(1)) / 
                             (1+exp((x-parlist(2))/parlist(3))) + parlist(1)
-
+  or 0 is the input are invalid
  */
 
 float sinfo_new_boltz ( float * xdat, float * parlist )
 {
     float return_value ;
+    cpl_ensure(xdat , CPL_ERROR_NULL_INPUT, 0.);
+    cpl_ensure(parlist , CPL_ERROR_NULL_INPUT, 0.);
 
     /* now build the boltzman function out of the parameters */
     return_value = 
@@ -156,9 +158,13 @@ float sinfo_new_boltz ( float * xdat, float * parlist )
   @returns               nothing, void
  */
 
-void sinfo_new_boltz_deriv( float * xdat, float * parlist, float * dervs )
+cpl_error_code sinfo_new_boltz_deriv( float * xdat, float * parlist, float * dervs )
 {
     float subst ;
+    cpl_ensure_code(xdat , CPL_ERROR_NULL_INPUT);
+    cpl_ensure_code(parlist , CPL_ERROR_NULL_INPUT);
+    cpl_ensure_code(dervs , CPL_ERROR_NULL_INPUT);
+
 
     subst = (xdat[0] - parlist[2]) / parlist[3] ;
 
@@ -172,6 +178,8 @@ void sinfo_new_boltz_deriv( float * xdat, float * parlist, float * dervs )
     dervs[3] = ( (parlist[0] - parlist[1]) * (xdat[0] - parlist[2]) /
                     (parlist[3]*parlist[3]) * exp(subst) ) /
                     ( (1. + exp(subst)) * (1. + exp(subst)) ) ;
+
+    return cpl_error_get_code();
 }
 
 /**
@@ -1508,7 +1516,7 @@ int sinfo_new_fit_slits_boltz ( cpl_image   * lineImage,
           user given positions.
           The least squares fit is done by using a box smaller than
           the size of two slitlets
-
+TODO: NOT USED
  */
 
 int 
diff --git a/sinfoni/sinfo_coltilt.c b/sinfoni/sinfo_coltilt.c
index b78948c..a469f01 100644
--- a/sinfoni/sinfo_coltilt.c
+++ b/sinfoni/sinfo_coltilt.c
@@ -82,6 +82,7 @@
            fitted through the fitted positions. The slope of this linear fit 
            is returned.
 
+TODO: not used
  */
 
 float 
@@ -407,6 +408,7 @@ sinfo_new_slope_of_spectrum( cpl_image * ns_image,
    @doc   shifts the rows of a raw image by using the output of
           sinfo_slopeOfSpectrum and applying polynomial interpolation
 
+TODO: not used
 
  */
 
@@ -642,7 +644,7 @@ sinfo_new_shift_rows( cpl_image * image,
    @param filename filename of ASCII file
 
    @return void
-
+TODO: NOT USED
  */
 
 void 
@@ -697,6 +699,7 @@ sinfo_new_parameter_to_ascii ( float * parameter,
        each row. Afterwards, a polynomial is fitted through the
        found positions. The polynomial coefficients are returned.
 
+TODO: NOT USED
  *
  */
 
diff --git a/sinfoni/sinfo_cube_construct.c b/sinfoni/sinfo_cube_construct.c
index 22c2525..3e485e4 100644
--- a/sinfoni/sinfo_cube_construct.c
+++ b/sinfoni/sinfo_cube_construct.c
@@ -692,6 +692,7 @@ sinfo_north_south_test( cpl_image * ns_image,
              Can do the same with the bad pixel map image to generate a
              bad pixel mask cube.
 
+TODO: NOT USED
  */
 
 cpl_imagelist * 
@@ -1421,6 +1422,8 @@ sinfo_new_make_cube_dist ( cpl_image * calibImage,
               Can do the same with the bad pixel map image to generate a
               bad pixel mask cube.
 
+              TODO: not used
+
 */
 
 
@@ -1567,6 +1570,7 @@ sinfo_new_make_3D_cube_dist ( cpl_image * calibImage,
           Can do the same with the bad pixel map image to generate a
           bad pixel mask cube.
 
+TODO: not used
 */
 
 
@@ -1661,6 +1665,7 @@ sinfo_new_make_3D_cube ( cpl_image * calibImage,
 
    @return resulting bad pixel data cube (bad pixels: 0, good pixels: 1).
 
+TODO: not used
 
 */
 
@@ -1772,6 +1777,7 @@ sinfo_new_determine_mask_cube ( cpl_imagelist * sourceMaskCube,
              (there must be at least 18) and take the sinfo_median of the valid
              pixels with which the bad pixel is replaced.
 
+TODO: NOT USED
 */
 
 
@@ -2696,6 +2702,8 @@ cpl_imagelist * sinfo_new_fine_tune_cube_by_spline ( cpl_imagelist * cube,
    @doc determines the distances of the spectra from the center
         of the slitlets to be able to find the correct angle of
         the north-south entrance slit.
+
+        TODO: not used
 */
 
 float * 
@@ -3236,6 +3244,8 @@ sinfo_new_calibrate_ns_test( cpl_image * ns_image,
          according to the distances array gained from the north-south test 
          routine. Can do the same with the bad pixel map image to generate a
          bad pixel mask cube.
+
+         TODO: NOT USED
  */
 
 cpl_image * 
diff --git a/sinfoni/sinfo_dfs.c b/sinfoni/sinfo_dfs.c
index b49de1d..31b4e73 100644
--- a/sinfoni/sinfo_dfs.c
+++ b/sinfoni/sinfo_dfs.c
@@ -67,9 +67,6 @@
 
 #define FITS_MAGIC_SZ      6
 
-int
-sinfo_frame_is_raw_dark(char * tag);
-
 /**@{*/
 
 /*---------------------------------------------------------------------------*/
@@ -244,6 +241,7 @@ sinfo_vector_clip(const cpl_vector* vinp,
    @doc
 
    Returns in case of succes -1 else.
+   TODO: not used
  */
 /*--------------------------------------------------------------------------*/
 
@@ -307,6 +305,7 @@ int sinfo_is_fits_file(const char *filename)
    @brief    Extracts raw frames
    @param    set     The input frameset
    @return   CPL_ERROR_NONE iff ok
+   TODO: not used
  */
 /*---------------------------------------------------------------------------*/
 cpl_error_code
@@ -351,6 +350,7 @@ sinfo_table_correl(cpl_table * t1, cpl_table* t2, cpl_table* range,double* xcor)
    @brief    Extracts raw frames
    @param    set     The input frameset
    @return   CPL_ERROR_NONE iff ok
+   TODO: not used
  */
 /*----------------------------------------------------------------------------*/
 cpl_error_code
@@ -573,6 +573,7 @@ int sinfo_pix_scale_isnot_const(float* pix_scale, const int n) {
    @brief    Get pixel scale string
    @param    ps      input pixel scale
    @return   pixel scale
+   TODO: not used
  */
 
 
@@ -731,39 +732,6 @@ int  sinfo_compare_tags(
     else return 1 ;
 }
 
-/**
-   @brief    Extracts raw pinhole frames
-   @param    sof input frameset
-   @param    raw output frameset
-   @return   0 if success
- */
-
-
-int sinfo_extract_raw_pinhole_frames(cpl_frameset * sof, cpl_frameset** raw)
-{
-
-
-
-    int nsof=0;
-    int i=0;
-    nsof = cpl_frameset_get_size(sof);
-    for (i=0 ; i<nsof ; i++) {
-        cpl_frame* frame = cpl_frameset_get_frame(sof,i);
-        char* name= (char*) cpl_frame_get_filename(frame);
-        if(sinfo_is_fits_file(name) == 1) {
-            /* to go on the file must exist */
-            if(cpl_frame_get_tag(frame) != NULL) {
-                /* If the frame has a tag we process it. Else it is an object */
-                char* tag= (char*) cpl_frame_get_tag(frame);
-                if(sinfo_frame_is_pinhole_lamp(tag) == 1) {
-                    cpl_frameset_insert(*raw,frame);
-                }
-            }
-        }
-    }
-    return 0;
-}
-
 
 int sinfo_get_ins_set(char* band,int* ins_set){
 
@@ -785,37 +753,6 @@ int sinfo_get_ins_set(char* band,int* ins_set){
 }
 
 
-int sinfo_remove_qc_frames(cpl_frameset* sof,cpl_frameset** raw)
-{
-
-    int i=0;
-
-    int nsof = cpl_frameset_get_size(sof);
-    for (i=0 ; i<nsof ; i++) {
-        cpl_frame* frame = cpl_frameset_get_frame(sof,i);
-        char* name= (char*) cpl_frame_get_filename(frame);
-        /* sinfo_msg("name=%s",name); */
-        if(sinfo_is_fits_file(name) == 1) {
-            /* sinfo_msg("\t exist "); */
-            /* to go on the file must exist */
-            if(cpl_frame_get_tag(frame) != NULL) {
-                /* If the frame has a tag we process it. Else it is an object */
-                char* tag= (char*) cpl_frame_get_tag(frame);
-                /* sinfo_msg("\t tag %s\n ",tag); */
-                if(strstr(tag,"QC") != NULL) {
-                    /* sinfo_msg("remove frame %s\n",name); */
-                    cpl_frameset_erase(*raw,tag);
-                }
-            }
-        } else {
-            /* sinfo_msg("remove frame\n"); */
-            cpl_frameset_erase_frame(*raw,frame);
-        }
-    }
-    return 0;
-
-}
-
 
 int sinfo_contains_frames_kind(cpl_frameset * sof,
                                cpl_frameset* raw,
@@ -1038,23 +975,6 @@ int sinfo_extract_obj_products(cpl_frameset * sof, cpl_frameset* obj)
     return 0;
 }
 
-int sinfo_extract_on_frames(cpl_frameset * sof, cpl_frameset* on)
-{
-
-
-    int i=0;
-    int nsof = cpl_frameset_get_size(sof);
-    for (i=0 ; i<nsof ; i++) {
-        cpl_frame* frame = cpl_frameset_get_frame(sof,i);
-        if(sinfo_frame_is_on(frame) ==1) {
-            cpl_frame* frame_dup=cpl_frame_duplicate(frame);
-            cpl_frameset_insert(on,frame_dup);
-        }
-    }
-
-    return 0;
-}
-
 int sinfo_extract_sky_frames(cpl_frameset * sof, cpl_frameset* sky)
 {
     int i=0;
@@ -1079,23 +999,6 @@ int sinfo_extract_sky_frames(cpl_frameset * sof, cpl_frameset* sky)
 }
 
 
-
-int sinfo_extract_off_frames(cpl_frameset * sof, cpl_frameset* off)
-{
-
-    int i=0;
-    int nsof = cpl_frameset_get_size(sof);
-    for (i=0 ; i<nsof ; i++) {
-        cpl_frame* frame = cpl_frameset_get_frame(sof,i);
-        if(sinfo_frame_is_on(frame)) {
-            cpl_frame* frame_dup=cpl_frame_duplicate(frame);
-            cpl_frameset_insert(off,frame_dup);
-        }
-    }
-
-    return 0;
-}
-
 int sinfo_extract_mst_frames(cpl_frameset * sof, cpl_frameset* cdb)
 {
 
@@ -1119,68 +1022,8 @@ int sinfo_extract_mst_frames(cpl_frameset * sof, cpl_frameset* cdb)
 
     return 0;
 }
-/* TODO: is the following (not used) function really needed, considering that
- * cpl offers cpl_frameset_join()?
- */
-
-cpl_frameset* sinfo_frameset_join(cpl_frameset* fs1,cpl_frameset* fs2) {
-
-    cpl_frameset* join=cpl_frameset_duplicate(fs1);
-    cpl_frameset_join(join,fs2);
-
-    return join;
-
-}
 
 
-int sinfo_extract_stk_frames(cpl_frameset * sof,
-                             cpl_frameset* res)
-{
-
-    int i=0;
-    int nsof = cpl_frameset_get_size(sof);
-    for (i=0 ; i<nsof ; i++) {
-        cpl_frame* frame = cpl_frameset_get_frame(sof,i);
-        char* name= (char*) cpl_frame_get_filename(frame);
-        if(sinfo_is_fits_file(name) ==1) {
-            /* to go on the file must exist */
-            if(cpl_frame_get_tag(frame) != NULL) {
-                /* If the frame has a tag we process it. Else it is an object */
-                char* tag= (char*) cpl_frame_get_tag(frame);
-                if(sinfo_frame_is_stk(tag) == 1) {
-                    cpl_frame* frame_dup=cpl_frame_duplicate(frame);
-                    cpl_frameset_insert(res,frame_dup);
-                }
-            }
-        }
-    }
-
-    return 0;
-}
-
-
-int
-sinfo_extract_preoptic_frames(cpl_frameset * sof,
-                              cpl_frameset** res,
-                              const char* val)
-{
-
-
-    int nsof = cpl_frameset_get_size(sof);
-    for (int i=0 ; i<nsof ; i++) {
-        cpl_frame* frame = cpl_frameset_get_frame(sof,i);
-        char* name= (char*) cpl_frame_get_filename(frame);
-        if(sinfo_is_fits_file(name) ==1) {
-            if(sinfo_frame_is_preoptic(frame,val) == 1) {
-                cpl_frame* frame_dup=cpl_frame_duplicate(frame);
-                cpl_frameset_insert(*res,frame_dup);
-            }
-        }
-    }
-
-    return 0;
-}
-
 int sinfo_extract_raw_stack_frames(cpl_frameset * sof, cpl_frameset** pro)
 {
 
@@ -1208,29 +1051,6 @@ int sinfo_extract_raw_stack_frames(cpl_frameset * sof, cpl_frameset** pro)
 }
 
 
-int sinfo_extract_raw_slit_frames(cpl_frameset * sof, cpl_frameset** pro)
-{
-
-    int i=0;
-    int nsof = cpl_frameset_get_size(sof);
-    for (i=0 ; i<nsof ; i++) {
-        cpl_frame* frame = cpl_frameset_get_frame(sof,i);
-        char* name= (char*) cpl_frame_get_filename(frame);
-        if(sinfo_is_fits_file(name) ==1) {
-            /* to go on the file must exist */
-            if(cpl_frame_get_tag(frame) != NULL) {
-                /* If the frame has a tag we process it. Else it is an object */
-                char* tag= (char*) cpl_frame_get_tag(frame);
-                if(sinfo_frame_is_slit_lamp(tag) == 1) {
-                    cpl_frameset_insert(*pro,frame);
-                }
-            }
-        }
-    }
-
-    return 0;
-}
-
 /*---------------------------------------------------------------------------*/
 /**
    @brief    Define the input raw frames for sinfo_frame_is_raw
@@ -1359,23 +1179,7 @@ int sinfo_frame_is_raw_stack(char * tag)
    @brief    Define the input raw frames for sinfo_frame_is_raw
    @param    tag     The candidate DO_CATG
    @return   0 for no, 1 for yes, -1 in error case
- */
-/*---------------------------------------------------------------------------*/
-int sinfo_frame_is_raw_dark(char * tag)
-{
-    /* Test entries */
-    if (tag == NULL) return -1 ;
-
-    if (!strcmp(tag, RAW_DARK)) return 1 ;
-
-    return 0 ;
-}
-
-/*---------------------------------------------------------------------------*/
-/**
-   @brief    Define the input raw frames for sinfo_frame_is_raw
-   @param    tag     The candidate DO_CATG
-   @return   0 for no, 1 for yes, -1 in error case
+   TODO not used
  */
 /*---------------------------------------------------------------------------*/
 int sinfo_frame_is_slit_lamp(char * tag)
@@ -1394,6 +1198,7 @@ int sinfo_frame_is_slit_lamp(char * tag)
    @brief    Define the input raw frames for sinfo_frame_is_raw
    @param    tag     The candidate DO_CATG
    @return   0 for no, 1 for yes, -1 in error case
+   TODO not used
  */
 /*---------------------------------------------------------------------------*/
 int sinfo_frame_is_pinhole_lamp(char * tag)
@@ -1475,7 +1280,7 @@ int sinfo_frame_is_cdb(char * tag)
 
 
 
-
+/* TODO not used */
 int sinfo_frame_is_stk(char * tag)
 {
     /* Test entries */
@@ -1493,6 +1298,7 @@ int sinfo_frame_is_stk(char * tag)
 
 }
 
+/* TODO not used */
 int sinfo_frame_is_preoptic(cpl_frame* frame,const char* val)
 {
 
@@ -1527,6 +1333,7 @@ int sinfo_frame_is_preoptic(cpl_frame* frame,const char* val)
 }
 
 
+/* TODO not used */
 int sinfo_get_preoptic(const char* file, const char* val)
 {
 
@@ -2230,6 +2037,7 @@ sinfo_get_ron(cpl_frameset    *   framelist,
    @brief    Define the input raw frames for sinfoni_img_combine
    @param    tag     The candidate DO_CATG
    @return   0 for no, 1 for yes, -1 in error case
+   TODO not used
  */
 /*---------------------------------------------------------------------------*/
 int sinfo_stack_get_pro_tag(char * tag_in, char* tag_out)
@@ -2380,6 +2188,7 @@ int sinfo_is_dark(char * tag)
     return 0 ;
 }
 
+/* TODO not used */
 int sinfo_is_flat_bp(char * tag)
 {
     /* Test entries */
@@ -2398,7 +2207,7 @@ int sinfo_is_flat_lindet(char * tag)
     return 0 ;
 }
 
-
+/* TODO not used */
 int sinfo_blank2dot(const char * in, char* ou)
 {
     int len=0;
@@ -2425,7 +2234,7 @@ int sinfo_is_sky_flat(char * tag)
 }
 
 
-
+/* TODO not used */
 int sinfo_is_master_flat(char * tag)
 {
     /* Test entries */
@@ -2436,6 +2245,7 @@ int sinfo_is_master_flat(char * tag)
     return 0 ;
 }
 
+/* TODO not used */
 int sinfo_is_master_flat_dither(char * tag)
 {
     /* Test entries */
@@ -2461,6 +2271,7 @@ int sinfo_is_stack(char * tag)
     return 0 ;
 }
 
+/* TODO not used */
 int sinfo_is_mflat(char * tag)
 {
     /* Test entries */
@@ -2478,6 +2289,7 @@ int sinfo_is_mflat(char * tag)
    @brief    Define the input raw frames for sinfoni_util_inputs
    @param    tag     The candidate DO_CATG
    @return   0 for no, 1 for yes, -1 in error case
+   TODO not used
  */
 /*---------------------------------------------------------------------------*/
 int sinfo_is_psf_calibrator_stacked(char * tag)
@@ -2493,6 +2305,7 @@ int sinfo_is_psf_calibrator_stacked(char * tag)
    @brief    Define the input raw frames for sinfoni_util_inputs
    @param    tag     The candidate DO_CATG
    @return   0 for no, 1 for yes, -1 in error case
+   TODO not used
  */
 /*---------------------------------------------------------------------------*/
 int sinfo_is_focus_stacked(char * tag)
@@ -2509,6 +2322,7 @@ int sinfo_is_focus_stacked(char * tag)
    @brief    Define the input raw frames for sinfoni_util_inputs
    @param    tag     The candidate DO_CATG
    @return   0 for no, 1 for yes, -1 in error case
+   TODO not used
  */
 /*---------------------------------------------------------------------------*/
 int sinfo_is_lamp_wave_stacked(char * tag)
@@ -2525,6 +2339,7 @@ int sinfo_is_lamp_wave_stacked(char * tag)
    @brief    Define the input raw frames for sinfoni_util_inputs
    @param    tag     The candidate DO_CATG
    @return   0 for no, 1 for yes, -1 in error case
+   TODO: not used
  */
 /*---------------------------------------------------------------------------*/
 int sinfo_is_lamp_flux_stacked(char * tag)
@@ -2541,6 +2356,7 @@ int sinfo_is_lamp_flux_stacked(char * tag)
    @brief    Define the input raw frames for sinfoni_util_inputs
    @param    tag     The candidate DO_CATG
    @return   0 for no, 1 for yes, -1 in error case
+   TODO: not used
  */
 /*---------------------------------------------------------------------------*/
 int sinfo_is_object_nodding_stacked(char * tag)
@@ -2557,6 +2373,7 @@ int sinfo_is_object_nodding_stacked(char * tag)
    @brief    Define the input raw frames for sinfoni_util_inputs
    @param    tag     The candidate DO_CATG
    @return   0 for no, 1 for yes, -1 in error case
+   TODO: not used
  */
 /*---------------------------------------------------------------------------*/
 int sinfo_is_object_skyspider_stacked(char * tag)
@@ -2574,6 +2391,7 @@ int sinfo_is_object_skyspider_stacked(char * tag)
    @brief    Define the input raw frames for sinfoni_util_inputs
    @param    tag     The candidate DO_CATG
    @return   0 for no, 1 for yes, -1 in error case
+   TODO: not used
  */
 /*---------------------------------------------------------------------------*/
 int sinfo_is_sky_nodding_stacked(char * tag)
@@ -2638,6 +2456,7 @@ int sinfo_is_distlist(char * tag)
    @brief    Define the input raw frames for sinfoni_util_inputs
    @param    tag     The candidate DO_CATG
    @return   0 for no, 1 for yes, -1 in error case
+   TODO: not used
  */
 /*---------------------------------------------------------------------------*/
 int sinfo_is_slitpos(char * tag)
@@ -2670,6 +2489,7 @@ int sinfo_is_firstcol(char * tag)
    @brief    Define the bad pixel map
    @param    tag     The candidate DO_CATG
    @return   0 for no, 1 for yes, -1 in error case
+   TODO: not used
  */
 /*---------------------------------------------------------------------------*/
 int sinfo_is_bpmap(char * tag)
@@ -2771,7 +2591,7 @@ int sinfo_get_obsname(cpl_frame * ref_frame, const char* obs_name)
    @param    ref_frame   input frame
    @param    key_name    keyword name
    @return   key_value if ok, -1 otherwise
-
+   TODO: not used
  */
 /*---------------------------------------------------------------------------*/
 
@@ -2812,7 +2632,7 @@ int sinfo_get_keyvalue_int(cpl_frame * ref_frame, const char* key_name)
    @param    ref_frame   input frame
    @param    key_name    keyword name
    @return   key_value if ok, -1 otherwise
-
+   TODO: not used
  */
 /*---------------------------------------------------------------------------*/
 
@@ -2852,7 +2672,7 @@ float sinfo_get_keyvalue_float(cpl_frame * ref_frame, const char* key_name)
    @param    ref_frame   input frame
    @param    key_name    keyword name
    @return   key_value if ok, -1 otherwise
-
+   TODO: not used
  */
 /*---------------------------------------------------------------------------*/
 
@@ -2897,7 +2717,7 @@ char sinfo_get_keyvalue_bool(cpl_frame * ref_frame, const char* key_name)
    @param    ref_frame   input frame
    @param    key_name    keyword name
    @return   key_value if ok, -1 otherwise
-
+   TODO: not used
  */
 /*---------------------------------------------------------------------------*/
 
@@ -3463,7 +3283,7 @@ int sinfo_frame_is_on(cpl_frame * ref_frame)
 }
 
 
-
+/* TODO: not used */
 int
 sinfo_pfits_add_qc(cpl_propertylist       *   plist,
                    qc_log          *   qclog)
diff --git a/sinfoni/sinfo_distortion.c b/sinfoni/sinfo_distortion.c
index bf9c3e8..e6bddbb 100644
--- a/sinfoni/sinfo_distortion.c
+++ b/sinfoni/sinfo_distortion.c
@@ -184,6 +184,7 @@ sinfo_distortion_smooth(cpl_image* inp,const int r,const int d)
   @param    ks_method method used in kappa-sigma clip: 0 (average) 1 (median)
   @param    n number iterations kappa-sigma clip
   @return   smoothed image if succes, NULL else
+  TODO: not used
 */
 
 cpl_image *
@@ -688,6 +689,7 @@ static cpl_apertures * sinfo_distortion_detect_arcs_new(
 
   This polynomial can be used as it is by the CPL warping function to correct
   the image.
+  TODO: not used
  */
 /*---------------------------------------------------------------------------*/
 cpl_polynomial * sinfo_distortion_estimate(
diff --git a/sinfoni/sinfo_dump.c b/sinfoni/sinfo_dump.c
index 2e317f5..2eb1609 100644
--- a/sinfoni/sinfo_dump.c
+++ b/sinfoni/sinfo_dump.c
@@ -45,45 +45,7 @@
 #include <sinfo_msg.h>
 #include <cpl.h>
 
-/*----------------------------------------------------------------*/
-/** 
- * @brief Print a property list.
- * @param pl      The property list to print.
- * @param low     Index of first property to print.
- * @param high    Index of first property not to print.
- * @return CPL_ERROR_NONE iff OK.
- *
- * This function prints all properties in the property list @em pl
- * in the range from @em low (included) to @em high (not included)
- * counting from zero.
- */
-/*----------------------------------------------------------------*/
-cpl_error_code
-sinfo_print_cpl_propertylist(const cpl_propertylist *pl, long low, long high)
-{
-    cpl_property *prop;
-    long i = 0;
-
-    assure(0 <= low && high <= cpl_propertylist_get_size(pl) && low <= high,
-                    CPL_ERROR_ILLEGAL_INPUT, "Illegal range");
-    /* Printing an empty range is allowed but only when low == high */
 
-    if (pl == NULL ) {
-        sinfo_msg("NULL");
-    }
-    else if (cpl_propertylist_is_empty(pl)) {
-        sinfo_msg("[Empty property list]");
-    }
-    else
-        for (i = low; i < high; i++) {
-            /* bug workaround: remove const cast when declaration
-             of cpl_propertylist_get() is changed */
-            prop = cpl_propertylist_get((cpl_propertylist *) pl, i);
-            check(sinfo_print_cpl_property(prop), "Error printing property");
-        }
-
-    cleanup: return cpl_error_get_code();
-}
 /*----------------------------------------------------------------*/
 /** 
  * @brief Print a property.
@@ -94,7 +56,7 @@ sinfo_print_cpl_propertylist(const cpl_propertylist *pl, long low, long high)
  */
 /*----------------------------------------------------------------*/
 
-cpl_error_code
+static cpl_error_code
 sinfo_print_cpl_property(const cpl_property *prop)
 {
     cpl_type t;
@@ -184,77 +146,6 @@ sinfo_print_cpl_property(const cpl_property *prop)
     cleanup: return cpl_error_get_code();
 }
 
-/*----------------------------------------------------------------*/
-/** 
- * @brief Print a frame set
- * @param frames Frame set to print
- * @return CPL_ERROR_NONE iff OK.
- *
- * This function prints all frames in a CPL frame set.
- */
-/*----------------------------------------------------------------*/
-cpl_error_code
-sinfo_print_cpl_frameset(const cpl_frameset *frames)
-{
-    /* Two special cases: a NULL frame set and an empty frame set */
-
-    if (frames == NULL ) {
-        sinfo_msg("NULL");
-    }
-    else {
-
-        cpl_frameset_iterator* it = cpl_frameset_iterator_new(frames);
-        const cpl_frame *f = cpl_frameset_iterator_get_const(it);
-
-        if (f == NULL ) {
-            sinfo_msg("[Empty frame set]");
-        }
-        else {
-            while (f != NULL ) {
-                check(sinfo_print_cpl_frame(f), "Could not print frame");
-
-                cpl_frameset_iterator_advance(it, 1);
-                f = cpl_frameset_iterator_get_const(it);
-
-            }
-        }
-        cpl_frameset_iterator_delete(it);
-    }
-
-    cleanup: return cpl_error_get_code();
-}
-
-/*----------------------------------------------------------------*/
-/** 
- * @brief Print a frame
- * @param f Frame to print
- * @return CPL_ERROR_NONE iff OK.
- *
- * This function prints a CPL frame.
- */
-/*----------------------------------------------------------------*/
-cpl_error_code
-sinfo_print_cpl_frame(const cpl_frame *f)
-{
-    if (f == NULL ) {
-        sinfo_msg("NULL");
-    }
-    else {
-        sinfo_msg("%-7s %-20s '%s'",
-                        sinfo_tostring_cpl_frame_group(cpl_frame_get_group(f)),
-                        cpl_frame_get_tag(f) != NULL ? cpl_frame_get_tag(f) : "Null",
-                        cpl_frame_get_filename(f));
-
-        sinfo_msg_debug("type \t= %s",
-                        sinfo_tostring_cpl_frame_type(cpl_frame_get_type(f)));
-        sinfo_msg_debug("group \t= %s",
-                        sinfo_tostring_cpl_frame_group(cpl_frame_get_group(f)));
-        sinfo_msg_debug("level \t= %s",
-                        sinfo_tostring_cpl_frame_level(cpl_frame_get_level(f)));
-    }
-
-    return cpl_error_get_code();
-}
 
 /*----------------------------------------------------------------*/
 /** 
@@ -263,7 +154,7 @@ sinfo_print_cpl_frame(const cpl_frame *f)
  * @return A textual representation of @em  ft.
  */
 /*----------------------------------------------------------------*/
-const char *
+static const char *
 sinfo_tostring_cpl_frame_type(cpl_frame_type ft)
 {
     switch (ft)
@@ -288,7 +179,7 @@ sinfo_tostring_cpl_frame_type(cpl_frame_type ft)
  * @return A textual representation of @em  fg.
  */
 /*----------------------------------------------------------------*/
-const char *
+static const char *
 sinfo_tostring_cpl_frame_group(cpl_frame_group fg)
 {
     switch (fg)
@@ -306,14 +197,15 @@ sinfo_tostring_cpl_frame_group(cpl_frame_group fg)
         }
 }
 
+
 /*----------------------------------------------------------------*/
-/** 
+/**
  * @brief Convert a frame level to a string
  * @param fl  Frame level to convert
  * @return A textual representation of @em  fl.
  */
 /*----------------------------------------------------------------*/
-const char *
+static const char *
 sinfo_tostring_cpl_frame_level(cpl_frame_level fl)
 {
 
@@ -332,6 +224,39 @@ sinfo_tostring_cpl_frame_level(cpl_frame_level fl)
         }
 }
 
+
+/*----------------------------------------------------------------*/
+/**
+ * @brief Print a frame
+ * @param f Frame to print
+ * @return CPL_ERROR_NONE iff OK.
+ *
+ * This function prints a CPL frame.
+ */
+/*----------------------------------------------------------------*/
+static cpl_error_code
+sinfo_print_cpl_frame(const cpl_frame *f)
+{
+    if (f == NULL ) {
+        sinfo_msg("NULL");
+    }
+    else {
+        sinfo_msg("%-7s %-20s '%s'",
+                        sinfo_tostring_cpl_frame_group(cpl_frame_get_group(f)),
+                        cpl_frame_get_tag(f) != NULL ? cpl_frame_get_tag(f) : "Null",
+                        cpl_frame_get_filename(f));
+
+        sinfo_msg_debug("type \t= %s",
+                        sinfo_tostring_cpl_frame_type(cpl_frame_get_type(f)));
+        sinfo_msg_debug("group \t= %s",
+                        sinfo_tostring_cpl_frame_group(cpl_frame_get_group(f)));
+        sinfo_msg_debug("level \t= %s",
+                        sinfo_tostring_cpl_frame_level(cpl_frame_get_level(f)));
+    }
+
+    return cpl_error_get_code();
+}
+
 /*----------------------------------------------------------------*/
 /** 
  * @brief Convert a CPL type to a string
@@ -405,4 +330,93 @@ sinfo_tostring_cpl_type(cpl_type t)
             return "unrecognized type";
             }
 }
+
+
+
+
+/*----------------------------------------------------------------*/
+/**
+ * @brief Print a property list.
+ * @param pl      The property list to print.
+ * @param low     Index of first property to print.
+ * @param high    Index of first property not to print.
+ * @return CPL_ERROR_NONE iff OK.
+ *
+ * This function prints all properties in the property list @em pl
+ * in the range from @em low (included) to @em high (not included)
+ * counting from zero.
+ * TODO: not used
+ */
+/*----------------------------------------------------------------*/
+cpl_error_code
+sinfo_print_cpl_propertylist(const cpl_propertylist *pl, long low, long high)
+{
+    cpl_property *prop;
+    long i = 0;
+
+    assure(0 <= low && high <= cpl_propertylist_get_size(pl) && low <= high,
+                    CPL_ERROR_ILLEGAL_INPUT, "Illegal range");
+    /* Printing an empty range is allowed but only when low == high */
+
+    if (pl == NULL ) {
+        sinfo_msg("NULL");
+    }
+    else if (cpl_propertylist_is_empty(pl)) {
+        sinfo_msg("[Empty property list]");
+    }
+    else
+        for (i = low; i < high; i++) {
+            /* bug workaround: remove const cast when declaration
+             of cpl_propertylist_get() is changed */
+            prop = cpl_propertylist_get((cpl_propertylist *) pl, i);
+            check(sinfo_print_cpl_property(prop), "Error printing property");
+        }
+
+    cleanup: return cpl_error_get_code();
+}
+
+/*----------------------------------------------------------------*/
+/**
+ * @brief Print a frame set
+ * @param frames Frame set to print
+ * @return CPL_ERROR_NONE iff OK.
+ *
+ * This function prints all frames in a CPL frame set.
+ * TODO: not used
+ */
+/*----------------------------------------------------------------*/
+cpl_error_code
+sinfo_print_cpl_frameset(const cpl_frameset *frames)
+{
+    /* Two special cases: a NULL frame set and an empty frame set */
+
+    if (frames == NULL ) {
+        sinfo_msg("NULL");
+    }
+    else {
+
+        cpl_frameset_iterator* it = cpl_frameset_iterator_new(frames);
+        const cpl_frame *f = cpl_frameset_iterator_get_const(it);
+
+        if (f == NULL ) {
+            sinfo_msg("[Empty frame set]");
+        }
+        else {
+            while (f != NULL ) {
+                check(sinfo_print_cpl_frame(f), "Could not print frame");
+
+                cpl_frameset_iterator_advance(it, 1);
+                f = cpl_frameset_iterator_get_const(it);
+
+            }
+        }
+        cpl_frameset_iterator_delete(it);
+    }
+
+    cleanup: return cpl_error_get_code();
+}
+
+
+
+
 /**@}*/
diff --git a/sinfoni/sinfo_dump.h b/sinfoni/sinfo_dump.h
index 760ebfa..acdeea8 100644
--- a/sinfoni/sinfo_dump.h
+++ b/sinfoni/sinfo_dump.h
@@ -22,24 +22,7 @@
  * $Date: 2011-11-23 17:29:09 $
  * $Revision: 1.6 $
  * $Name: not supported by cvs2svn $
- * $Log: not supported by cvs2svn $
- * Revision 1.5  2006/10/25 06:46:09  amodigli
- * fixed warnings from static checks
- *
- * Revision 1.4  2006/10/17 11:13:30  amodigli
- * added config.h
- *
- * Revision 1.3  2006/10/16 07:26:23  amodigli
- * shortened line length
- *
- * Revision 1.2  2006/10/04 06:17:45  amodigli
- * added doxygen doc
- *
- * Revision 1.1  2006/08/09 12:20:11  amodigli
- * added sinfo_dump.h sinfo_dump.c
- *
- * Revision 1.2  2005/12/19 16:17:56  jmlarsen
- * Replaced bool -> int
+
  *
  */
 #ifndef SINFO_DUMP_H
@@ -52,30 +35,8 @@
 #include <cpl.h>
 #include <sinfo_cpl_size.h>
 
-cpl_error_code 
-sinfo_print_cpl_propertylist(const cpl_propertylist *pl, 
-                             long low, 
-                             long high);
-
-cpl_error_code 
-sinfo_print_cpl_property(const cpl_property *);
-
-cpl_error_code 
-sinfo_print_cpl_frameset(const cpl_frameset *);
-
-cpl_error_code 
-sinfo_print_cpl_frame(const cpl_frame *);
-
 const char *
 sinfo_tostring_cpl_type(cpl_type t);
 
-const char *
-sinfo_tostring_cpl_frame_type(cpl_frame_type);
-
-const char *
-sinfo_tostring_cpl_frame_group(cpl_frame_group);
-
-const char *
-sinfo_tostring_cpl_frame_level(cpl_frame_level);
 
 #endif /* SINFO_DUMP_H */
diff --git a/sinfoni/sinfo_fft_base.c b/sinfoni/sinfo_fft_base.c
index 537b97e..b39c8b0 100644
--- a/sinfoni/sinfo_fft_base.c
+++ b/sinfoni/sinfo_fft_base.c
@@ -215,6 +215,8 @@ sinfo_fftn(
   sinfo_is_power_of_2(1024) returns 10
   sinfo_is_power_of_2(1023) returns -1
   \end{verbatim}
+
+  TODO: not used
  */
 
 int
diff --git a/sinfoni/sinfo_fit.c b/sinfoni/sinfo_fit.c
index e6591de..e442685 100644
--- a/sinfoni/sinfo_fit.c
+++ b/sinfoni/sinfo_fit.c
@@ -308,6 +308,8 @@ sinfo_fit_amotry(double** p, double y[], double psum[], int ndim,
  @param    nref is the maximum number of reflections
  @param    ftbm function to be fit
  @note     parameters begin varying as d2(i)+-range(i)
+
+ TODO: not used
  */
 double
 sinfo_amsub(double d0[], double d1[], double d2[], double value[],
@@ -610,6 +612,7 @@ sinfo_spline(double x, double cons[], double ak[], double *sp, double *spp,
 
 }
 
+/* TODO: not used */
 double
 sinfo_ftbm(const double x, double cons[])
 {
diff --git a/sinfoni/sinfo_focus.c b/sinfoni/sinfo_focus.c
index be74582..0a16d22 100644
--- a/sinfoni/sinfo_focus.c
+++ b/sinfoni/sinfo_focus.c
@@ -1222,6 +1222,7 @@ sinfo_new_fit_2d_gaussian ( cpl_image   * image,
    @param parlist: parameters of 2D-Gaussian
    @return image of the 2D-Gaussian
 
+TODO: not used. Useful in unit tests.
  */
 
 cpl_image * 
diff --git a/sinfoni/sinfo_function_1d.c b/sinfoni/sinfo_function_1d.c
index 07a0010..72f608c 100644
--- a/sinfoni/sinfo_function_1d.c
+++ b/sinfoni/sinfo_function_1d.c
@@ -156,6 +156,8 @@ sinfo_function1d_dup(pixelvalue * arr, int ns)
 
   The position of the peak is located to subpixel precision by
   simply weighting positions with pixelvalues.
+
+  TODO: not used
  */
 double
 sinfo_function1d_find_centroid(
@@ -218,6 +220,8 @@ sinfo_function1d_find_centroid(
   local maximum will be searched +/-5 pixels around the requested position.
 
   Returns a negative value if an error occurred.
+
+  TODO: not used
  */
 
 double
@@ -425,6 +429,8 @@ function1d_generate_smooth_kernel(int filt_type, int hw)
   must be deallocated using sinfo_function1d_del().
 
   For half-widths of 1,2,3,4, the filtering is optimized for speed.
+
+  TODO: not used
  */
 
 pixelvalue * 
@@ -472,6 +478,7 @@ sinfo_function1d_median_smooth(
   must be deallocated using sinfo_function1d_del(). The returned array has
   exactly as many elements as the input array.
 
+TODO: not used
  */
 
 #define LOWFREQ_PASSES        5
@@ -523,6 +530,8 @@ sinfo_function1d_remove_lowfreq(
   The returned array has been allocated using sinfo_function1d_new(), it
   must be freed using sinfo_function1d_del(). The returned array has exactly
   as many samples as the input array.
+
+  TODO: not used
  */
 
 #define SAMPLE_BORDER    10
@@ -857,6 +866,8 @@ sinfo_function1d_natural_spline(
   The input signal is first copied. This copy is then sorted, and the
   highest and lowest pixels are taken out of the list. Remaining
   pixelvalues are averaged and the result is returned.
+
+  TODO: not used
  */
 
 pixelvalue
@@ -912,6 +923,8 @@ sinfo_function1d_average_reject(
 
   Returns -100.0 in case of error. Normally, the cross-sinfo_correlation
   coefficient is normalized so it should stay between -1 and +1.
+
+  TODO: not used
  */
 
 
diff --git a/sinfoni/sinfo_functions.h b/sinfoni/sinfo_functions.h
index 3063b3a..243a1ee 100644
--- a/sinfoni/sinfo_functions.h
+++ b/sinfoni/sinfo_functions.h
@@ -92,11 +92,7 @@ int sinfo_check_rec_status(const int val);
 int 
 sinfoni_extract_raw_linearity_frames(cpl_frameset * sof, cpl_frameset** raw);
 int sinfoni_extract_raw_dark_frames(cpl_frameset * sof, cpl_frameset** raw);
-int sinfo_extract_raw_pinhole_frames(cpl_frameset * sof, cpl_frameset** raw);
-int sinfo_extract_raw_slit_frames(cpl_frameset * sof, cpl_frameset** raw);
 int sinfo_extract_raw_stack_frames(cpl_frameset * sof, cpl_frameset** pro);
-int sinfo_extract_on_frames(cpl_frameset * sof, cpl_frameset* on);
-int sinfo_extract_off_frames(cpl_frameset * sof, cpl_frameset* off);
 
 int sinfo_extract_raw_frames(cpl_frameset * sof, cpl_frameset** raw); 
 int sinfoni_extract_pro_frames(cpl_frameset * sof, cpl_frameset** pro); 
@@ -104,20 +100,14 @@ int sinfo_extract_cdb_frames(cpl_frameset * sof, cpl_frameset** cdb);
  
 int sinfo_extract_obj_frames(cpl_frameset * sof, cpl_frameset* obj);
 int sinfo_extract_sky_frames(cpl_frameset * sof, cpl_frameset* sky);
-int sinfo_extract_mst_frames(cpl_frameset * sof, cpl_frameset* cdb); 
-int sinfo_extract_stk_frames(cpl_frameset * sof, cpl_frameset* res);
-int 
-sinfo_extract_preoptic_frames(cpl_frameset * sof, 
-                              cpl_frameset** res, 
-                              const char* pre_opt);
+int sinfo_extract_mst_frames(cpl_frameset * sof, cpl_frameset* cdb);
+
 
 double sinfo_get_cumoffsetx(cpl_frame * frame);
 double sinfo_get_cumoffsety(cpl_frame * frame);
 int sinfo_tag_is_objpro(char * tag);
 int sinfo_extract_obj_products(cpl_frameset * sof, cpl_frameset* obj);
 
-cpl_frameset* sinfo_frameset_join(cpl_frameset* fs1,cpl_frameset* fs2);
-
 const char* sinfo_get_pix_scale(float ps);
 int sinfo_pix_scale_isnot_const(float* pix_scale, int size);
 
diff --git a/sinfoni/sinfo_globals.c b/sinfoni/sinfo_globals.c
index 4b774ee..2c7fcd4 100644
--- a/sinfoni/sinfo_globals.c
+++ b/sinfoni/sinfo_globals.c
@@ -37,6 +37,7 @@
 @brief structure to change behaviour of amoeba function
 @return pointer to structure
 
+TODO: not used
  */
 amoeba_dat*
 sinfo_amoeba_new(cpl_vector* vx, 
@@ -61,6 +62,7 @@ sinfo_amoeba_new(cpl_vector* vx,
 @brief function to free a fake structure
 @return void
 
+TODO: not used
  */
 void
 sinfo_amoeba_delete(amoeba_dat** a)
@@ -157,6 +159,7 @@ sinfo_wcal_delete(wcal* w)
 @brief structure to change behaviour of prepare stacked frame function
 @return pointer to structure
 
+TODO: not used
  */
 
 stack*
@@ -176,6 +179,7 @@ sinfo_stack_new(void)
 @brief function to free a stack structure
 @return void
 
+TODO: not used
  */
 void
 sinfo_stack_delete(stack* s)
diff --git a/sinfoni/sinfo_new_cubes_coadd.c b/sinfoni/sinfo_new_cubes_coadd.c
index 1a76ce3..4865a83 100644
--- a/sinfoni/sinfo_new_cubes_coadd.c
+++ b/sinfoni/sinfo_new_cubes_coadd.c
@@ -210,7 +210,7 @@ sinfo_new_cubes_coadd (const char* plugin_id,cpl_parameterlist* config,
         }
     }
 
-    ck0(sinfo_auto_size_cube5(cfg,&ref_offx,&ref_offy,
+    ck0(sinfo_auto_size_cube_new(cfg,&ref_offx,&ref_offy,
                     &offx_min,&offy_min,
                     &offx_max,&offy_max),
         "Error resizing cube");
@@ -282,10 +282,10 @@ sinfo_new_cubes_coadd (const char* plugin_id,cpl_parameterlist* config,
             }
             times[n] = exptime ;
 
-            ck0(sinfo_new_assign_offset(n,name,offsetx,offsety,
+            ck0(sinfo_assign_offset_from_fits_header(n,name,offsetx,offsety,
                             ref_offx,ref_offy),
                 "Error assigning offsets");
-
+            //sinfo_msg("assigned offset: %g %g",offsetx[n],offsety[n]);
         }
         sinfo_free_image(&im);
 
diff --git a/sinfoni/sinfo_new_objnod.c b/sinfoni/sinfo_new_objnod.c
index 767fede..5892edb 100644
--- a/sinfoni/sinfo_new_objnod.c
+++ b/sinfoni/sinfo_new_objnod.c
@@ -226,7 +226,7 @@ int sinfo_new_objnod (const char* plugin_id,cpl_parameterlist* config,
         }
     }
 
-    ck0(sinfo_auto_size_cube5(cfg,&ref_offx,&ref_offy,
+    ck0(sinfo_auto_size_cube_new(cfg,&ref_offx,&ref_offy,
                                 &offx_min,&offy_min,
                                 &offx_max,&offy_max),
                              "Error resizing cube");
@@ -289,9 +289,10 @@ int sinfo_new_objnod (const char* plugin_id,cpl_parameterlist* config,
           goto cleanup;
         }
       times[n] = exptime ;
-          ck0(sinfo_new_assign_offset(n,name,offsetx,offsety,
+          ck0(sinfo_assign_offset_from_fits_header(n,name,offsetx,offsety,
                                       ref_offx,ref_offy),
                                       "Error assigning offsets");
+          //sinfo_msg("assigned offset: %g %g",offsetx[n],offsety[n]);
 
     }
 
diff --git a/sinfoni/sinfo_utilities_scired.c b/sinfoni/sinfo_utilities_scired.c
index a97511a..a73e884 100644
--- a/sinfoni/sinfo_utilities_scired.c
+++ b/sinfoni/sinfo_utilities_scired.c
@@ -269,8 +269,68 @@ sinfo_sess2deg(const double sess)
   return deg;
 
 }
+static cpl_error_code
+sinfo_offset_xy_fill(object_config * cfg, float* offsetx, float* offsety)
+{
+    cpl_propertylist * plist=NULL;
+    const int nframes = cfg->nframes;
+
+    for ( int n = 0 ; n < nframes ; n++ ) {
+        char* name = cfg->framelist[n] ;
+        plist=cpl_propertylist_load(name,0);
+
+        float offx = sinfo_pfits_get_cumoffsetx(plist);  /* was - */
+        if(cpl_error_get_code() != CPL_ERROR_NONE) {
+            sinfo_msg_warning(" could not read fits header keyword cummoffsetx!");
+            sinfo_msg_warning(" set it to  0");
+            offx = 0;
+            sinfo_free_propertylist(&plist);
+            cpl_error_reset();
+            /* return -1 ; */
+        }
+
+        offsetx[n]=offx;
+        float offy = sinfo_pfits_get_cumoffsety(plist); /* was - */
+        if(cpl_error_get_code() != CPL_ERROR_NONE) {
+            sinfo_msg_warning(" could not read fits header keyword! cumoffsety") ;
+            sinfo_msg_warning(" set it to 0");
+            offy = 0;
+            sinfo_free_propertylist(&plist);
+            cpl_error_reset();
+            /* return -1 ; */
+        }
+        offsety[n]=offy;
+        sinfo_free_propertylist(&plist);
 
+    }
+    return cpl_error_get_code();
+}
 
+static void
+sinfo_get_xy_min_max(const int nframes,
+                     const float* offsetx, const float* offsety,
+                     float* min_offx, float* max_offx,
+                     float* min_offy, float* max_offy)
+{
+
+    for ( int n = 0 ; n < nframes ; n++ ) {
+        float offx = offsetx[n];  /* was - */
+        float offy = offsety[n];  /* was - */
+        if(n==0) {
+            *min_offx=offx;
+            *min_offy=offy;
+            *max_offx=offx;
+            *max_offy=offy;
+        } else {
+            if(offx > *max_offx) *max_offx=offx;
+            if(offy > *max_offy) *max_offy=offy;
+            if(offx < *min_offx) *min_offx=offx;
+            if(offy < *min_offy) *min_offy=offy;
+        }
+    }
+
+    return;
+}
 /**
   @brief    Computes size of coadded cube
   @param    offsetx  input offset list
@@ -281,6 +341,9 @@ sinfo_sess2deg(const double sess)
   @param    size_x   input/output coadded cube x size
   @param    size_y   input/output coadded cube y size
   @return   size of  coadded cube
+  @note This routine differs from the sinfo_auto_size_cube5 one because
+  allows to input cubes of size different from the one of a single cube
+  component (64).
 */
 
 int
@@ -293,36 +356,30 @@ sinfo_auto_size_cube(float* offsetx,
                     int* size_y)
 {
 
-  int n=0;
-
   float min_offx=0;
   float max_offx=0;
   float min_offy=0;
   float max_offy=0;
 
+  cpl_ensure(offsetx  != NULL, CPL_ERROR_ILLEGAL_INPUT, NULL);
+  cpl_ensure(offsety  != NULL, CPL_ERROR_ILLEGAL_INPUT, NULL);
+  cpl_ensure(nframes > 0, CPL_ERROR_ILLEGAL_INPUT, NULL);
+  cpl_ensure(*size_x >= 64, CPL_ERROR_ILLEGAL_INPUT, NULL);
+  cpl_ensure(*size_y >= 64, CPL_ERROR_ILLEGAL_INPUT, NULL);
+
   sinfo_msg ("Computation of output cube size") ;
-  for ( n = 0 ; n < nframes ; n++ ) {
-    float offx = offsetx[n];  /* was - */
-    float offy = offsety[n];  /* was - */
-    /* sinfo_msg("frame %d offx=%f offy=%f",n,offx,offy); */
-    if(n==0) {
-      min_offx=offx;
-      min_offy=offy;
-      max_offx=offx;
-      max_offy=offy;
-    } else {
-      if(offx > max_offx) max_offx=offx;
-      if(offy > max_offy) max_offy=offy;
-      if(offx < min_offx) min_offx=offx;
-      if(offy < min_offy) min_offy=offy;
-    }
-  }
-  /*
+  sinfo_get_xy_min_max(nframes, offsetx, offsety,&min_offx,&max_offx,
+                         &min_offy, &max_offy);
+
   sinfo_msg("max_offx=%f max_offy=%f",max_offx,max_offy);
   sinfo_msg("min_offx=%f min_offy=%f",min_offx,min_offy);
-  */
+
   *ref_offx=(min_offx+max_offx)/2;
   *ref_offy=(min_offy+max_offy)/2;
+
+  /* The following to allow to compute the size of output cube in case the input
+   * has size different than 64x64
+   */
   *size_x+=2*floor(max_offx-min_offx+0.5);
   *size_y+=2*floor(max_offy-min_offy+0.5);
   sinfo_msg("Output cube size: %d x %d",*size_x,*size_y);
@@ -333,6 +390,7 @@ sinfo_auto_size_cube(float* offsetx,
 
 }
 
+
 /**
   @brief    Computes size of coadded cube
   @param    cfg          inpout parameters configuration
@@ -341,52 +399,23 @@ sinfo_auto_size_cube(float* offsetx,
   @return   size of coadded cube
 */
 int
-sinfo_auto_size_cube5(object_config * cfg,
+sinfo_auto_size_cube_new(object_config * cfg,
                     float* ref_offx, float* ref_offy,
                     float* min_offx, float* min_offy,
                     float* max_offx, float* max_offy)
 {
 
-
-  int n=0;
-
-  cpl_propertylist * plist=NULL;
+  const int nframes = cfg->nframes;
   sinfo_msg ("Automatic computation of output cube size") ;
-  for ( n = 0 ; n < cfg->nframes ; n++ ) {
-    char* name = cfg->framelist[n] ;
-    plist=cpl_propertylist_load(name,0);
-    float offx = sinfo_pfits_get_cumoffsetx(plist);  /* was - */
-    if(cpl_error_get_code() != CPL_ERROR_NONE) {
-      sinfo_msg_warning(" could not read fits header keyword cummoffsetx!");
-      sinfo_msg_warning(" set it to  0");
-      offx = 0;
-      cpl_error_reset();
-      /* return -1 ; */
-    }
+  float* offsetx = (float*) cpl_calloc(nframes,sizeof(float));
+  float* offsety = (float*) cpl_calloc(nframes,sizeof(float));
 
-    float offy = sinfo_pfits_get_cumoffsety(plist); /* was - */
-    sinfo_free_propertylist(&plist);
-    if(cpl_error_get_code() != CPL_ERROR_NONE) {
-      sinfo_msg_warning(" could not read fits header keyword! cumoffsety") ;
-      sinfo_msg_warning(" set it to 0");
-      offy = 0;
-      cpl_error_reset();
-      /* return -1 ; */
-    }
-    //sinfo_msg("n=%d offx=%f offy=%f",n,offx,offy);
+  sinfo_offset_xy_fill(cfg,  offsetx, offsety);
+  sinfo_get_xy_min_max(nframes, offsetx, offsety,min_offx,max_offx,
+                       min_offy, max_offy);
+  cpl_free(offsetx);
+  cpl_free(offsety);
 
-    if(n==0) {
-      *min_offx=offx;
-      *min_offy=offy;
-      *max_offx=offx;
-      *max_offy=offy;
-    } else {
-      if(offx > *max_offx) *max_offx=offx;
-      if(offy > *max_offy) *max_offy=offy;
-      if(offx < *min_offx) *min_offx=offx;
-      if(offy < *min_offy) *min_offy=offy;
-    }
-  }
   *ref_offx=(*min_offx+*max_offx)/2;
   *ref_offy=(*min_offy+*max_offy)/2;
 
@@ -395,10 +424,10 @@ sinfo_auto_size_cube5(object_config * cfg,
  * for example, if diff in offset is 35.5, the formula gives 72 but 71 would be
  * enough, the following candidate is working fine:
  *   if(cfg->size_x == 0)
-	  cfg->size_x=floor(2.0*(*max_offx-*min_offx + 0.5 - 0.00001))+64 ;
-	  Currently the ticket is suspended, because the formula above
-	  would change the scientific results for the previous data.
-	  The same is actual for Y axis.
+      cfg->size_x=floor(2.0*(*max_offx-*min_offx + 0.5 - 0.00001))+64 ;
+      Currently the ticket is suspended, because the formula above
+      would change the scientific results for the previous data.
+      The same is actual for Y axis.
 */
   if(cfg->size_y == 0) cfg->size_y=2*floor(*max_offy-*min_offy+0.5)+64 ;
 
@@ -411,6 +440,7 @@ sinfo_auto_size_cube5(object_config * cfg,
 
 }
 
+
 /**
   @brief    Read slitlets distances
   @param    nslits input number of slitlets
@@ -1784,6 +1814,37 @@ cpl_imagelist** sinfo_new_sinfoni_correct_sky2(cpl_imagelist** cubes,
   return cubes_sky;
 }
 
+static void
+sinfo_set_offset_xy(double mjd_obs,
+                    const double offx, const double offy,const int n,
+                    float* offsetx, float* offsety)
+{
+if (mjd_obs > 53825. ) {
+   /* April 1st 2006 */
+   //sinfo_msg("New cumoffset setting convention");
+   sinfo_new_array_set_value(offsetx,2*offx,n);
+   sinfo_new_array_set_value(offsety,2*offy,n);
+ } else if ((mjd_obs > 53421.58210082 ) && (mjd_obs <= 53825.)){
+   /* after detector's upgrade */
+   /*
+   sinfo_new_array_set_value(offsetx,-offx*2,n);
+   sinfo_new_array_set_value(offsety,+offy*2,n);
+   */
+   sinfo_new_array_set_value(offsetx,-2*offx,n);
+   sinfo_new_array_set_value(offsety,2*offy,n);
+ } else {
+   /* before detector's upgrade */
+   /*
+   sinfo_new_array_set_value(offsetx,+offx*2,n);
+   sinfo_new_array_set_value(offsety,-offy*2,n);
+   */
+   sinfo_new_array_set_value(offsetx,2*offx,n);
+   sinfo_new_array_set_value(offsety,-2*offy,n);
+ }
+
+return;
+
+}
 
 /**
 @brief extracts from each object frame set information
@@ -1798,7 +1859,7 @@ cpl_imagelist** sinfo_new_sinfoni_correct_sky2(cpl_imagelist** cubes,
 */
 
 int
-sinfo_new_assign_offset(const int n,
+sinfo_assign_offset_usr(const int n,
                         const char* name,
                         float* offsetx,
                         float* offsety,
@@ -1809,17 +1870,6 @@ sinfo_new_assign_offset(const int n,
   float offx=0;
   float offy=0;
   double mjd_obs=0;
-  /*
-  double pixelscale=0;
-  double angle=0;
-  double radangle=0;
-  double cd1_1=0;
-  double cd1_2=0;
-  double cd2_1=0;
-  double cd2_2=0;
-  double ra=0;
-  double dec=0;
-  */
 
   cpl_propertylist * plist=NULL;
   sinfo_msg_debug("Assign offsets");
@@ -1830,23 +1880,10 @@ sinfo_new_assign_offset(const int n,
     return -1 ;
   }
 
-  offx = sinfo_pfits_get_cumoffsetx(plist) - ref_offx ;  /* was - */
-  if(cpl_error_get_code() != CPL_ERROR_NONE) {
-    sinfo_msg_warning(" could not read fits header keyword cummoffsetx!") ;
-    sinfo_msg_warning(" Set relative offset to 0 - %f!",ref_offx) ;
-    offx =  - ref_offx;
-    cpl_error_reset();
-    /* return -1 ; */
-  }
+  offx = offsetx[n] - ref_offx ; // was -
+  offy = offsety[n] - ref_offy ; // was -
+
 
-  offy = sinfo_pfits_get_cumoffsety(plist) - ref_offy ; /* was - */
-  if(cpl_error_get_code() != CPL_ERROR_NONE) {
-    sinfo_msg_warning(" could not read fits header keyword! cumoffsety") ;
-    sinfo_msg_warning(" Set relative offset to 0 - %f!",ref_offx) ;
-    offy =  - ref_offy;
-    cpl_error_reset();
-    /* return -1 ; */
-  }
   sinfo_msg_debug("offx=%f offy=%f",offx,offy);
 
   if (cpl_propertylist_has(plist, KEY_NAME_MJD_OBS)) {
@@ -1856,55 +1893,28 @@ sinfo_new_assign_offset(const int n,
     cpl_propertylist_delete(plist) ;
     return -1;
   }
-
   cpl_propertylist_delete(plist) ;
-
-  if (mjd_obs > 53825. ) {
-    /* April 1st 2006 */
-    //sinfo_msg("New cumoffset setting convention");
-    sinfo_new_array_set_value(offsetx,2*offx,n);
-    sinfo_new_array_set_value(offsety,2*offy,n);
-  } else if ((mjd_obs > 53421.58210082 ) && (mjd_obs <= 53825.)){
-    /* after detector's upgrade */
-    /*
-    sinfo_new_array_set_value(offsetx,-offx*2,n);
-    sinfo_new_array_set_value(offsety,+offy*2,n);
-    */
-    sinfo_new_array_set_value(offsetx,-2*offx,n);
-    sinfo_new_array_set_value(offsety,2*offy,n);
-  } else {
-    /* before detector's upgrade */
-    /*
-    sinfo_new_array_set_value(offsetx,+offx*2,n);
-    sinfo_new_array_set_value(offsety,-offy*2,n);
-    */
-    sinfo_new_array_set_value(offsetx,2*offx,n);
-    sinfo_new_array_set_value(offsety,-2*offy,n);
-  }
+  sinfo_set_offset_xy(mjd_obs, offx, offy, n, offsetx, offsety);
 
   return 0;
 
 
 }
 
-
-
-
-
 /**
 @brief extracts from each object frame set information
        relative to the ao setting
- at name sinfo_new_assign_offset
+ at name sinfo_assign_offset_from_fits_header
 @param n      frame index in list
 @param name   file name
 @param offsetx  reference frame X offset
 @param offsety  reference frame Y offset
- at param offsetx frames X offset array
- at param offsety frames Y offset array
+ at param ref_setx frames X offset array
+ at param ref_sety frames Y offset array
 */
 
 int
-sinfo_new_assign_offset2(const int n,
+sinfo_assign_offset_from_fits_header(const int n,
                         const char* name,
                         float* offsetx,
                         float* offsety,
@@ -1917,11 +1927,6 @@ sinfo_new_assign_offset2(const int n,
   double mjd_obs=0;
 
   cpl_propertylist * plist=NULL;
-  sinfo_msg_debug("Assign offsets as set by user");
-  offx = offsetx[n] - ref_offx ;  /* was - */
-  offy = offsety[n] - ref_offy ;  /* was - */
-  sinfo_msg_debug("offx=%f offy=%f",offx,offy);
-
   sinfo_msg_debug("Assign offsets");
 
   if ((cpl_error_code)((plist = cpl_propertylist_load(name, 0)) == NULL)) {
@@ -1930,129 +1935,28 @@ sinfo_new_assign_offset2(const int n,
     return -1 ;
   }
 
-  if (cpl_propertylist_has(plist, KEY_NAME_MJD_OBS)) {
-    mjd_obs=cpl_propertylist_get_double(plist, KEY_NAME_MJD_OBS);
-  } else {
-    sinfo_msg_error("keyword %s does not exist",KEY_NAME_MJD_OBS);
-    cpl_propertylist_delete(plist) ;
-    return -1;
-  }
-  cpl_propertylist_delete(plist) ;
-
-  //sinfo_new_array_set_value(offsetx,-2*offx,n);
-  //sinfo_new_array_set_value(offsety,2*offy,n);
-
-  if (mjd_obs > 53825. ) {
-    /* April 1st 2006 */
-    //sinfo_msg("New cumoffset setting convention");
-    sinfo_new_array_set_value(offsetx,2*offx,n);
-    sinfo_new_array_set_value(offsety,2*offy,n);
-  } else if ((mjd_obs > 53421.58210082 ) && (mjd_obs <= 53825.)){
-    /* after detector's upgrade */
-    /*
-    sinfo_new_array_set_value(offsetx,-offx*2,n);
-    sinfo_new_array_set_value(offsety,+offy*2,n);
-    */
-    sinfo_new_array_set_value(offsetx,-2*offx,n);
-    sinfo_new_array_set_value(offsety,2*offy,n);
-  } else {
-    /* before detector's upgrade */
-    /*
-    sinfo_new_array_set_value(offsetx,+offx*2,n);
-    sinfo_new_array_set_value(offsety,-offy*2,n);
-    */
-    sinfo_new_array_set_value(offsetx,2*offx,n);
-    sinfo_new_array_set_value(offsety,-2*offy,n);
-  }
-
-
-  return 0;
-
-
-}
-
 
-/**
- at brief extracts from each object frame set information
-       relative to the ao setting
- at name sinfo_new_assign_offset
- at param n      frame index in list
- at param name   file name
- at param offsetx  reference frame X offset
- at param offsety  reference frame Y offset
- at param offsetx frames X offset array
- at param offsety frames Y offset array
-*/
-/* TODO: not used */
-int
-sinfo_new_object_assign_offset(const char* name,
-                               const int n,
-                               double* ref_offx,
-                               double* ref_offy,
-                               float** offsetx,
-                               float** offsety)
-{
-
-  float offx=0;
-  float offy=0;
-  double mjd_obs=0;
-  cpl_propertylist * plist=NULL;
-  sinfo_msg_debug("Assign offsets");
+  offx = sinfo_pfits_get_cumoffsetx(plist) - ref_offx ;  /* was - */
+  sinfo_msg("ref_offx=%g frame offsetx=%g assigned offx=%g",
+              ref_offx,sinfo_pfits_get_cumoffsetx(plist),offx);
 
-  if ((cpl_error_code)((plist = cpl_propertylist_load(name, 0)) == NULL)) {
-    sinfo_msg_error( "getting header from reference frame %s",name);
-    cpl_propertylist_delete(plist) ;
-    return -1 ;
+  if(cpl_error_get_code() != CPL_ERROR_NONE) {
+    sinfo_msg_warning(" could not read fits header keyword cummoffsetx!") ;
+    sinfo_msg_warning(" Set relative offset to 0 - %f!",ref_offx) ;
+    offx =  - ref_offx;
+    cpl_error_reset();
+    /* return -1 ; */
   }
-  if ( n == 0 ) {
-
-    *ref_offx = sinfo_pfits_get_cumoffsetx(plist) ;
-    if(cpl_error_get_code() != CPL_ERROR_NONE) {
-      sinfo_msg_error(" could not read fits header keyword cummoffsetx!") ;
-      /* return -1 ; */
-      cpl_error_reset();
-    }
-
-    *ref_offy = sinfo_pfits_get_cumoffsety(plist) ;
-    if(cpl_error_get_code() != CPL_ERROR_NONE) {
-      sinfo_msg_error(" could not read fits header keyword! cumoffsety") ;
-      cpl_error_reset();
-       /* return -1 ; */
-    }
-    sinfo_msg_debug("Reference offx=%f offy=%f",*ref_offx,*ref_offy);
-
-    offx = 0. ;
-    offy = 0. ;
-
-  } else {
 
-    offx = sinfo_pfits_get_cumoffsetx(plist) - *ref_offx ;  /* was - */
-    if(cpl_error_get_code() != CPL_ERROR_NONE) {
-      sinfo_msg_error(" could not read fits header keyword cummoffsetx!") ;
-      cpl_error_reset();
-      /* return -1 ; */
-    }
-
-    offy = sinfo_pfits_get_cumoffsety(plist) - *ref_offy ; /* was - */
-    if(cpl_error_get_code() != CPL_ERROR_NONE) {
-      sinfo_msg_error(" could not read fits header keyword! cumoffsety") ;
-      /* return -1 ; */
-      cpl_error_reset();
-    }
-    sinfo_msg_debug("offx=%f offy=%f",offx,offy);
+  offy = sinfo_pfits_get_cumoffsety(plist) - ref_offy ; /* was - */
+  if(cpl_error_get_code() != CPL_ERROR_NONE) {
+    sinfo_msg_warning(" could not read fits header keyword! cumoffsety") ;
+    sinfo_msg_warning(" Set relative offset to 0 - %f!",ref_offx) ;
+    offy =  - ref_offy;
+    cpl_error_reset();
+    /* return -1 ; */
   }
-
-
-    /* rotate the coordinates
-       offx_rot = cd1_1 * offx + cd2_1 * offy ;
-       offy_rot = cd1_2 * offx + cd2_2 * offy ;
-        convert the coordinates to pixel units
-       offx_rot_pix = offx_rot / pixelscale ;
-       offy_rot_pix = offy_rot / pixelscale ;
-       offsetx[i] = offx_rot_pix ;
-       offsety[i] = offy_rot_pix ;
-    */
-
+  sinfo_msg_debug("offx=%f offy=%f",offx,offy);
 
   if (cpl_propertylist_has(plist, KEY_NAME_MJD_OBS)) {
     mjd_obs=cpl_propertylist_get_double(plist, KEY_NAME_MJD_OBS);
@@ -2063,21 +1967,7 @@ sinfo_new_object_assign_offset(const char* name,
   }
 
   cpl_propertylist_delete(plist) ;
-
-  if (mjd_obs > 53825. ) {
-    /* April 1st 2006 */
-    //sinfo_msg("New cumoffset setting convention");
-    sinfo_new_array_set_value(*offsetx,2*offx,n);
-    sinfo_new_array_set_value(*offsety,2*offy,n);
-  } else if ((mjd_obs > 53421.58210082 ) && (mjd_obs <= 53825.)){
-    /* after detector's upgrade */
-    sinfo_new_array_set_value(*offsetx,-offx*2,n);
-    sinfo_new_array_set_value(*offsety,+offy*2,n);
-  } else {
-    /* before detector's upgrade */
-    sinfo_new_array_set_value(*offsetx,+offx*2,n);
-    sinfo_new_array_set_value(*offsety,-offy*2,n);
-  }
+  sinfo_set_offset_xy(mjd_obs, offx, offy, n, offsetx, offsety);
 
   return 0;
 }
diff --git a/sinfoni/sinfo_utilities_scired.h b/sinfoni/sinfo_utilities_scired.h
index 4c1646c..c240886 100644
--- a/sinfoni/sinfo_utilities_scired.h
+++ b/sinfoni/sinfo_utilities_scired.h
@@ -33,7 +33,11 @@ sinfo_read_distances(const int nslits, const char* distlist);
 float** 
 sinfo_read_slitlets_edges(const int nslits, const char* poslist);
 
-
+int
+sinfo_auto_size_cube_new(object_config * cfg,
+                    float* ref_offx, float* ref_offy,
+                    float* min_offx, float* min_offy,
+                    float* max_offx, float* max_offy);
 int 
 sinfo_check_input_data(object_config* cfg);  
 
@@ -91,20 +95,15 @@ sinfo_new_fine_tune(cpl_imagelist* cube,float* correct_dist,
                     const char* method, const int order, const int nslits) ;
 
 int
-sinfo_new_object_assign_offset(const char* name, const int n, double* ref_offx, 
-                               double* ref_offy, float** offsetx, 
-                               float** offsety);
-
-int
-sinfo_new_assign_offset2(const int n,
+sinfo_assign_offset_usr(const int n,
                         const char* name,
                         float* offsetx,
                         float* offsety,
                         const float ref_offx,
-             const float ref_offy);
+                        const float ref_offy);
 
 int
-sinfo_new_assign_offset(const int n,const char* name,float* offsetx,
+sinfo_assign_offset_from_fits_header(const int n,const char* name,float* offsetx,
                         float* offsety,const float ref_offx,
                         const float ref_offy);
 
diff --git a/sinfoni/sinfo_utl_cube_combine.c b/sinfoni/sinfo_utl_cube_combine.c
index e2a7303..018b9dc 100644
--- a/sinfoni/sinfo_utl_cube_combine.c
+++ b/sinfoni/sinfo_utl_cube_combine.c
@@ -130,7 +130,7 @@ int sinfo_utl_cube_combine(
     FILE* file_list=NULL;
     int cnt=0;
     int onp=0;
-  
+    int offset_mode=CPL_FALSE;
     /* HOW TO RETRIEVE INPUT PARAMETERS */
     /* --stropt */
     check_nomsg(param = cpl_parameterlist_find(parlist, 
@@ -154,6 +154,10 @@ int sinfo_utl_cube_combine(
                         "sinfoni.sinfo_utl_cube_combine.name_o"));
     check_nomsg(name_o = cpl_parameter_get_string(param));
 
+    check_nomsg(param = cpl_parameterlist_find(parlist,
+                            "sinfoni.sinfo_utl_cube_combine.offset_mode"));
+    check_nomsg(offset_mode = cpl_parameter_get_bool(param));
+
 
     /* not used later
     check_nomsg(param = cpl_parameterlist_find(parlist,
@@ -232,8 +236,11 @@ int sinfo_utl_cube_combine(
       size_x=sinfo_pfits_get_naxis1(plist);
       size_y=sinfo_pfits_get_naxis2(plist);
       sinfo_free_propertylist(&plist);
+      //sinfo_msg("reading sizex[%d]=%d sizey[%d]=%d",cnt,size_x,cnt,size_y);
       if(size_x < min_size_x) min_size_x=size_x;
       if(size_y < min_size_y) min_size_y=size_y;
+      //sinfo_msg("Reading offsetx[%d]=%g offsety[%d]=%g",cnt,tmpoffx,cnt,tmpoffy);
+      //sinfo_msg("computing minsizex[%d]=%d minsizey[%d]=%d",cnt,min_size_x,cnt,min_size_y);
       cnt ++ ;
     }
     sinfo_msg("Min input cube size x=%d y=%d",min_size_x,min_size_y);
@@ -252,9 +259,13 @@ int sinfo_utl_cube_combine(
       frame=cpl_frameset_get_frame(framelist,i);
       name=cpl_frame_get_filename(frame);
       check_nomsg(cube_object[i]=cpl_imagelist_load(name,CPL_TYPE_FLOAT,0));
-      ck0(sinfo_new_assign_offset2(i,name,offsetx,offsety,
+      if(offset_mode) {
+      ck0(sinfo_assign_offset_usr(i,name,offsetx,offsety,
                                   ref_offx,ref_offy),
                                   "Error assigning offsets");
+      }
+
+      //sinfo_msg("assigned offset: %g %g",offsetx[i],offsety[i]);
     }
     onp = cpl_imagelist_get_size(cube_object[0]);
 
diff --git a/sinfoni/tests/Makefile.am b/sinfoni/tests/Makefile.am
index cb21bf0..ba12d0b 100644
--- a/sinfoni/tests/Makefile.am
+++ b/sinfoni/tests/Makefile.am
@@ -49,14 +49,21 @@ check_PROGRAMS = sinfo_skycor_test \
 		sinfo_star_index_test \
 		sinfo_star_catalog \
 		sinfo_line_corr_test \
-		test_atmo_disp
+		test_atmo_disp \
+	    sinfo_absolute_test \
+	    sinfo_boltzmann_test \
+	    sinfo_baryvel_test
 
 TESTS = sinfo_skycor_test sinfo_strehl_test sinfo_cube_coadd_test \
 	sinfo_image_ops_test sinfo_cube_ops_test sinfo_table_ops_test \
 	sinfo_kappa_sigma_test sinfo_efficiency_test sinfo_gauss_fit_test \
 	sinfo_star_index_test sinfo_star_catalog sinfo_line_corr_test \
-	test_atmo_disp sinfo_cube_measure_centroid_test
-
+	test_atmo_disp sinfo_cube_measure_centroid_test sinfo_absolute_test \
+	sinfo_boltzmann_test sinfo_baryvel_test
+	
+sinfo_baryvel_test_SOURCES = sinfo_baryvel_test.c 
+sinfo_boltzmann_test_SOURCES = sinfo_boltzmann_test.c 
+sinfo_absolute_test_SOURCES = sinfo_absolute_test.c 
 sinfo_skycor_test_SOURCES = sinfo_skycor_test.c 
 sinfo_strehl_test_SOURCES = sinfo_strehl_test.c
 sinfo_cube_coadd_test_SOURCES = sinfo_cube_coadd_test.c
diff --git a/sinfoni/tests/Makefile.in b/sinfoni/tests/Makefile.in
index f7bfcfd..705bb2f 100644
--- a/sinfoni/tests/Makefile.in
+++ b/sinfoni/tests/Makefile.in
@@ -86,7 +86,9 @@ check_PROGRAMS = sinfo_skycor_test$(EXEEXT) sinfo_strehl_test$(EXEEXT) \
 	sinfo_cube_ops_test$(EXEEXT) sinfo_kappa_sigma_test$(EXEEXT) \
 	sinfo_efficiency_test$(EXEEXT) sinfo_gauss_fit_test$(EXEEXT) \
 	sinfo_star_index_test$(EXEEXT) sinfo_star_catalog$(EXEEXT) \
-	sinfo_line_corr_test$(EXEEXT) test_atmo_disp$(EXEEXT)
+	sinfo_line_corr_test$(EXEEXT) test_atmo_disp$(EXEEXT) \
+	sinfo_absolute_test$(EXEEXT) sinfo_boltzmann_test$(EXEEXT) \
+	sinfo_baryvel_test$(EXEEXT)
 TESTS = sinfo_skycor_test$(EXEEXT) sinfo_strehl_test$(EXEEXT) \
 	sinfo_cube_coadd_test$(EXEEXT) sinfo_image_ops_test$(EXEEXT) \
 	sinfo_cube_ops_test$(EXEEXT) sinfo_table_ops_test$(EXEEXT) \
@@ -94,7 +96,9 @@ TESTS = sinfo_skycor_test$(EXEEXT) sinfo_strehl_test$(EXEEXT) \
 	sinfo_gauss_fit_test$(EXEEXT) sinfo_star_index_test$(EXEEXT) \
 	sinfo_star_catalog$(EXEEXT) sinfo_line_corr_test$(EXEEXT) \
 	test_atmo_disp$(EXEEXT) \
-	sinfo_cube_measure_centroid_test$(EXEEXT)
+	sinfo_cube_measure_centroid_test$(EXEEXT) \
+	sinfo_absolute_test$(EXEEXT) sinfo_boltzmann_test$(EXEEXT) \
+	sinfo_baryvel_test$(EXEEXT)
 subdir = sinfoni/tests
 DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
 	$(top_srcdir)/admin/depcomp $(noinst_HEADERS) \
@@ -115,15 +119,27 @@ mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = $(top_builddir)/config.h
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
-am_sinfo_cube_coadd_test_OBJECTS = sinfo_cube_coadd_test.$(OBJEXT)
-sinfo_cube_coadd_test_OBJECTS = $(am_sinfo_cube_coadd_test_OBJECTS)
-sinfo_cube_coadd_test_LDADD = $(LDADD)
+am_sinfo_absolute_test_OBJECTS = sinfo_absolute_test.$(OBJEXT)
+sinfo_absolute_test_OBJECTS = $(am_sinfo_absolute_test_OBJECTS)
+sinfo_absolute_test_LDADD = $(LDADD)
 am__DEPENDENCIES_1 =
-sinfo_cube_coadd_test_DEPENDENCIES = $(am__DEPENDENCIES_1)
+sinfo_absolute_test_DEPENDENCIES = $(am__DEPENDENCIES_1)
 AM_V_lt = $(am__v_lt_ at AM_V@)
 am__v_lt_ = $(am__v_lt_ at AM_DEFAULT_V@)
 am__v_lt_0 = --silent
 am__v_lt_1 = 
+am_sinfo_baryvel_test_OBJECTS = sinfo_baryvel_test.$(OBJEXT)
+sinfo_baryvel_test_OBJECTS = $(am_sinfo_baryvel_test_OBJECTS)
+sinfo_baryvel_test_LDADD = $(LDADD)
+sinfo_baryvel_test_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am_sinfo_boltzmann_test_OBJECTS = sinfo_boltzmann_test.$(OBJEXT)
+sinfo_boltzmann_test_OBJECTS = $(am_sinfo_boltzmann_test_OBJECTS)
+sinfo_boltzmann_test_LDADD = $(LDADD)
+sinfo_boltzmann_test_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am_sinfo_cube_coadd_test_OBJECTS = sinfo_cube_coadd_test.$(OBJEXT)
+sinfo_cube_coadd_test_OBJECTS = $(am_sinfo_cube_coadd_test_OBJECTS)
+sinfo_cube_coadd_test_LDADD = $(LDADD)
+sinfo_cube_coadd_test_DEPENDENCIES = $(am__DEPENDENCIES_1)
 am_sinfo_cube_measure_centroid_test_OBJECTS =  \
 	sinfo_cube_measure_centroid_test.$(OBJEXT)
 sinfo_cube_measure_centroid_test_OBJECTS =  \
@@ -212,7 +228,9 @@ AM_V_CCLD = $(am__v_CCLD_ at AM_V@)
 am__v_CCLD_ = $(am__v_CCLD_ at AM_DEFAULT_V@)
 am__v_CCLD_0 = @echo "  CCLD    " $@;
 am__v_CCLD_1 = 
-SOURCES = $(sinfo_cube_coadd_test_SOURCES) \
+SOURCES = $(sinfo_absolute_test_SOURCES) $(sinfo_baryvel_test_SOURCES) \
+	$(sinfo_boltzmann_test_SOURCES) \
+	$(sinfo_cube_coadd_test_SOURCES) \
 	$(sinfo_cube_measure_centroid_test_SOURCES) \
 	$(sinfo_cube_ops_test_SOURCES) \
 	$(sinfo_efficiency_test_SOURCES) \
@@ -223,7 +241,9 @@ SOURCES = $(sinfo_cube_coadd_test_SOURCES) \
 	$(sinfo_star_catalog_SOURCES) $(sinfo_star_index_test_SOURCES) \
 	$(sinfo_strehl_test_SOURCES) $(sinfo_table_ops_test_SOURCES) \
 	$(test_atmo_disp_SOURCES)
-DIST_SOURCES = $(sinfo_cube_coadd_test_SOURCES) \
+DIST_SOURCES = $(sinfo_absolute_test_SOURCES) \
+	$(sinfo_baryvel_test_SOURCES) $(sinfo_boltzmann_test_SOURCES) \
+	$(sinfo_cube_coadd_test_SOURCES) \
 	$(sinfo_cube_measure_centroid_test_SOURCES) \
 	$(sinfo_cube_ops_test_SOURCES) \
 	$(sinfo_efficiency_test_SOURCES) \
@@ -632,6 +652,9 @@ AM_CPPFLAGS = $(all_includes)
 LDADD = $(LIBSINFONI)
 AM_LDFLAGS = -static
 noinst_HEADERS = 
+sinfo_baryvel_test_SOURCES = sinfo_baryvel_test.c 
+sinfo_boltzmann_test_SOURCES = sinfo_boltzmann_test.c 
+sinfo_absolute_test_SOURCES = sinfo_absolute_test.c 
 sinfo_skycor_test_SOURCES = sinfo_skycor_test.c 
 sinfo_strehl_test_SOURCES = sinfo_strehl_test.c
 sinfo_cube_coadd_test_SOURCES = sinfo_cube_coadd_test.c
@@ -696,6 +719,18 @@ clean-checkPROGRAMS:
 	echo " rm -f" $$list; \
 	rm -f $$list
 
+sinfo_absolute_test$(EXEEXT): $(sinfo_absolute_test_OBJECTS) $(sinfo_absolute_test_DEPENDENCIES) $(EXTRA_sinfo_absolute_test_DEPENDENCIES) 
+	@rm -f sinfo_absolute_test$(EXEEXT)
+	$(AM_V_CCLD)$(LINK) $(sinfo_absolute_test_OBJECTS) $(sinfo_absolute_test_LDADD) $(LIBS)
+
+sinfo_baryvel_test$(EXEEXT): $(sinfo_baryvel_test_OBJECTS) $(sinfo_baryvel_test_DEPENDENCIES) $(EXTRA_sinfo_baryvel_test_DEPENDENCIES) 
+	@rm -f sinfo_baryvel_test$(EXEEXT)
+	$(AM_V_CCLD)$(LINK) $(sinfo_baryvel_test_OBJECTS) $(sinfo_baryvel_test_LDADD) $(LIBS)
+
+sinfo_boltzmann_test$(EXEEXT): $(sinfo_boltzmann_test_OBJECTS) $(sinfo_boltzmann_test_DEPENDENCIES) $(EXTRA_sinfo_boltzmann_test_DEPENDENCIES) 
+	@rm -f sinfo_boltzmann_test$(EXEEXT)
+	$(AM_V_CCLD)$(LINK) $(sinfo_boltzmann_test_OBJECTS) $(sinfo_boltzmann_test_LDADD) $(LIBS)
+
 sinfo_cube_coadd_test$(EXEEXT): $(sinfo_cube_coadd_test_OBJECTS) $(sinfo_cube_coadd_test_DEPENDENCIES) $(EXTRA_sinfo_cube_coadd_test_DEPENDENCIES) 
 	@rm -f sinfo_cube_coadd_test$(EXEEXT)
 	$(AM_V_CCLD)$(LINK) $(sinfo_cube_coadd_test_OBJECTS) $(sinfo_cube_coadd_test_LDADD) $(LIBS)
@@ -758,6 +793,9 @@ mostlyclean-compile:
 distclean-compile:
 	-rm -f *.tab.c
 
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/sinfo_absolute_test.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/sinfo_baryvel_test.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/sinfo_boltzmann_test.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/sinfo_cube_coadd_test.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/sinfo_cube_measure_centroid_test.Po at am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/sinfo_cube_ops_test.Po at am__quote@
@@ -1091,6 +1129,27 @@ sinfo_cube_measure_centroid_test.log: sinfo_cube_measure_centroid_test$(EXEEXT)
 	--log-file $$b.log --trs-file $$b.trs \
 	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
 	"$$tst" $(AM_TESTS_FD_REDIRECT)
+sinfo_absolute_test.log: sinfo_absolute_test$(EXEEXT)
+	@p='sinfo_absolute_test$(EXEEXT)'; \
+	b='sinfo_absolute_test'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
+sinfo_boltzmann_test.log: sinfo_boltzmann_test$(EXEEXT)
+	@p='sinfo_boltzmann_test$(EXEEXT)'; \
+	b='sinfo_boltzmann_test'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
+sinfo_baryvel_test.log: sinfo_baryvel_test$(EXEEXT)
+	@p='sinfo_baryvel_test$(EXEEXT)'; \
+	b='sinfo_baryvel_test'; \
+	$(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
+	--log-file $$b.log --trs-file $$b.trs \
+	$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
+	"$$tst" $(AM_TESTS_FD_REDIRECT)
 .test.log:
 	@p='$<'; \
 	$(am__set_b); \
diff --git a/sinfoni/tests/sinfo_absolute_test.c b/sinfoni/tests/sinfo_absolute_test.c
new file mode 100644
index 0000000..ce84ecc
--- /dev/null
+++ b/sinfoni/tests/sinfo_absolute_test.c
@@ -0,0 +1,398 @@
+/*                                                                            *
+ *   This file is part of the ESO SINFO Pipeline                              *
+ *   Copyright (C) 2004,2005 European Southern Observatory                    *
+ *                                                                            *
+ *   This library is free software; you can redistribute it and/or modify     *
+ *   it under the terms of the GNU General Public License as published by     *
+ *   the Free Software Foundation; either version 2 of the License, or        *
+ *   (at your option) any later version.                                      *
+ *                                                                            *
+ *   This program is distributed in the hope that it will be useful,          *
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of           *
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            *
+ *   GNU General Public License for more details.                             *
+ *                                                                            *
+ *   You should have received a copy of the GNU General Public License        *
+ *   along with this program; if not, write to the Free Software              *
+ *   Foundation, 51 Franklin St, Fifth Floor, Boston, MA  02111-1307  USA     *
+ *                                                                           */
+ 
+/*
+ * $Author: amodigli $
+ * $Date: 2009-06-05 06:06:11 $
+ * $Revision: 1.5 $
+ * $Name: not supported by cvs2svn $
+ *
+ */
+
+/*-----------------------------------------------------------------------------
+                                Includes
+ -----------------------------------------------------------------------------*/
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+#include<sinfo_msg.h>
+#include<sinfo_absolute.h>
+#include <cpl.h>
+/*-----------------------------------------------------------------------------
+                                Defines
+ -----------------------------------------------------------------------------*/
+static float  sqrarg ;
+#define SQR(a) (sqrarg = (a) , sqrarg*sqrarg)
+/*-----------------------------------------------------------------------------
+                            Functions prototypes
+ -----------------------------------------------------------------------------*/
+
+
+/*----------------------------------------------------------------------------*/
+/**
+ * @defgroup sinfo_absolute_test  SINFO library unit tests
+ */
+/*----------------------------------------------------------------------------*/
+/**@{*/
+
+static cpl_error_code
+sinfo_test_edge(void){
+
+    /*Test all possible NULL param options */
+    float* xdat = NULL;
+    float* parlist = NULL;
+    const int ndat=4;
+    float slope=0;
+
+    /* 1st test both null input: */
+    slope=sinfo_new_edge(NULL, NULL) ;
+    cpl_test_eq(slope, 0);
+    cpl_test_error(CPL_ERROR_NULL_INPUT);
+
+    parlist=cpl_calloc(ndat,sizeof(float)) ;
+    slope=sinfo_new_edge(NULL, parlist) ;
+    cpl_test_eq(slope, 0);
+    cpl_test_error(CPL_ERROR_NULL_INPUT);
+
+    xdat=cpl_calloc(ndat,sizeof(float)) ;
+    slope=sinfo_new_edge(xdat, NULL) ;
+    cpl_test_eq(slope, 0);
+    cpl_test_error(CPL_ERROR_NULL_INPUT);
+
+
+    /* For defined values we have the following cases:
+     */
+
+    /* case 1:
+     * if ( xdat[0] <= parlist[0] ) return_parlist[2] ;
+     * */
+    xdat[0]=0;
+    xdat[1]=1;
+    xdat[2]=2;
+    xdat[3]=3;
+
+    parlist[0]=1;
+    parlist[1]=2;
+    parlist[2]=10;
+    parlist[3]=20;
+
+    slope=sinfo_new_edge(xdat, parlist) ;
+    cpl_test_eq(slope, parlist[2]);
+    cpl_test_error(CPL_ERROR_NONE);
+
+    /* case 2:
+     * if ( xdat[0] >  parlist[1] ) return_parlist[3] ;
+     * */
+    xdat[0]=3;
+    xdat[1]=4;
+    xdat[2]=5;
+    xdat[3]=6;
+
+    parlist[0]=1;
+    parlist[1]=2;
+    parlist[2]=10;
+    parlist[3]=20;
+
+    slope=sinfo_new_edge(xdat, parlist) ;
+    cpl_test_eq(slope, parlist[3]);
+    cpl_test_error(CPL_ERROR_NONE);
+
+
+    /* case 3:
+     *  if ( xdat[0] > parlist[0] && xdat[0] <= parlist[1] )
+           return (xdat[0] - parlist[0]) * slope1 + parlist[2] ;
+       * */
+      xdat[0]=1;
+      xdat[1]=0.5;
+      xdat[2]=2;
+      xdat[3]=3;
+
+      parlist[0]=0;
+      parlist[1]=1;
+      parlist[2]=10;
+      parlist[3]=20;
+      float slope1=( parlist[3] - parlist[2] ) / ( parlist[1] - parlist[0] ) ;
+      float result=(xdat[0] - parlist[0]) * slope1 + parlist[2] ;
+      slope=sinfo_new_edge(xdat, parlist) ;
+      cpl_test_eq(slope, result);
+      cpl_test_error(CPL_ERROR_NONE);
+
+      /* case 4:
+          *  else I think this case is never found!!
+          * */
+
+    /* free memory */
+    cpl_free(xdat);
+    cpl_free(parlist);
+
+    return cpl_error_get_code();
+
+}
+
+static cpl_error_code
+sinfo_test_edge_deriv(void){
+
+
+    /*Test all possible NULL param options */
+    float* xdat = NULL;
+    float* parlist = NULL;
+    float* dervs = NULL;
+    const int ndat=4;
+    float slope=0;
+
+    /* 1st test both null input: */
+    sinfo_new_edge_deriv(NULL, NULL,NULL) ;
+    cpl_test_eq(slope, 0);
+    cpl_test_error(CPL_ERROR_NULL_INPUT);
+
+    parlist=cpl_calloc(ndat,sizeof(float)) ;
+    xdat=cpl_calloc(ndat,sizeof(float)) ;
+    dervs=cpl_calloc(ndat,sizeof(float)) ;
+
+    sinfo_new_edge_deriv(NULL, parlist,dervs) ;
+    cpl_test_eq(slope, 0);
+    cpl_test_error(CPL_ERROR_NULL_INPUT);
+
+    sinfo_new_edge_deriv(xdat, NULL,dervs) ;
+    cpl_test_eq(slope, 0);
+    cpl_test_error(CPL_ERROR_NULL_INPUT);
+
+    sinfo_new_edge_deriv(xdat, parlist,NULL) ;
+    cpl_test_eq(slope, 0);
+    cpl_test_error(CPL_ERROR_NULL_INPUT);
+
+
+    /* For defined values we have the following cases:
+     */
+
+    /* case 1:
+     * if ( xdat[0] <= parlist[0] ) return
+     *  dervs[0] = 0. ;
+        dervs[1] = 0. ;
+        dervs[2] = 1. ;
+        dervs[3] = 0. ;
+     * ;
+     * */
+    xdat[0]=0;
+    xdat[1]=1;
+    xdat[2]=2;
+    xdat[3]=3;
+
+    parlist[0]=1;
+    parlist[1]=2;
+    parlist[2]=10;
+    parlist[3]=20;
+
+    sinfo_new_edge_deriv(xdat, parlist,dervs) ;
+    cpl_test_eq(dervs[0], 0);
+    cpl_test_eq(dervs[1], 0);
+    cpl_test_eq(dervs[2], 1);
+    cpl_test_eq(dervs[3], 0);
+    cpl_test_error(CPL_ERROR_NONE);
+
+
+    /* case 2:
+     * if ( xdat[0] > parlist[0] ) return
+     *  dervs[0] = 0. ;
+        dervs[1] = 0. ;
+        dervs[2] = 0. ;
+        dervs[3] = 1. ;
+
+     *  if ( xdat[0] > parlist[0] && xdat[0] <= parlist[1] )
+           return (xdat[0] - parlist[0]) * slope1 + parlist[2] ;
+     * */
+
+
+    xdat[0]=3;
+    xdat[1]=4;
+    xdat[2]=5;
+    xdat[3]=6;
+
+    parlist[0]=1;
+    parlist[1]=2;
+    parlist[2]=10;
+    parlist[3]=20;
+
+    sinfo_new_edge_deriv(xdat, parlist,dervs) ;
+    cpl_test_eq(dervs[0], 0);
+    cpl_test_eq(dervs[1], 0);
+    cpl_test_eq(dervs[2], 0);
+    cpl_test_eq(dervs[3], 1);
+    cpl_test_error(CPL_ERROR_NONE);
+
+
+    /* case 3:
+     * else if ( xdat[0] > parlist[0] && xdat[0] <= parlist[1] )
+            return:
+            dervs[0] = ( xdat[0] - parlist[1] ) * deriv1_slope1  ;
+            dervs[1] = ( parlist[0] - xdat[0] ) * deriv1_slope1 ;
+            dervs[2] = ( parlist[0] - xdat[0] ) / ( parlist[1] - parlist[0] ) + 1.;
+            dervs[3] = ( xdat[0] - parlist[0] ) / ( parlist[1] - parlist[0] ) ;
+     * */
+
+    xdat[0]=1;
+    xdat[1]=0.5;
+    xdat[2]=2;
+    xdat[3]=3;
+
+    parlist[0]=0;
+    parlist[1]=1;
+    parlist[2]=10;
+    parlist[3]=20;
+    float deriv_slope1 =( parlist[3] - parlist[2] ) / SQR(parlist[1] - parlist[0]) ;
+    float* result=cpl_calloc(ndat,sizeof(float)) ;
+    result[0] = ( xdat[0] - parlist[1] ) * deriv_slope1  ;
+    result[1] = ( parlist[0] - xdat[0] ) * deriv_slope1 ;
+    result[2] = ( parlist[0] - xdat[0] ) / ( parlist[1] - parlist[0] ) + 1.;
+    result[3] = ( xdat[0] - parlist[0] ) / ( parlist[1] - parlist[0] ) ;
+
+    sinfo_new_edge_deriv(xdat, parlist,dervs) ;
+
+    cpl_test_eq(dervs[0], result[0]);
+    cpl_test_eq(dervs[1], result[1]);
+    cpl_test_eq(dervs[2], result[2]);
+    cpl_test_eq(dervs[3], result[3]);
+
+
+
+    cpl_test_error(CPL_ERROR_NONE);
+
+    /* case 4:
+     *  else I think this case is never found!!
+     * */
+
+    /* free memory */
+    cpl_free(xdat);
+    cpl_free(parlist);
+    cpl_free(dervs);
+    cpl_free(result);
+
+    return cpl_error_get_code();
+}
+
+
+
+static cpl_error_code
+sinfo_test_lsqfit_edge(void){
+
+    /*
+    int
+    sinfo_new_lsqfit_edge ( float * xdat,
+                      int   * xdim,
+                      float * ydat,
+                      float * wdat,
+                      int   * ndat,
+                      float * fpar,
+                      float * epar,
+                      int   * mpar,
+                      int   * npar,
+                      float * tol ,
+                      int   * its ,
+                      float * lab  ) ;
+                      */
+    return cpl_error_get_code();
+}
+
+static cpl_error_code
+sinfo_test_fit_slits_edge(void){
+/*
+    int
+    sinfo_new_fit_slits_edge( cpl_image   * lineImage,
+                      FitParams ** par,
+                      float     ** sinfo_slit_pos,
+                      int          box_length,
+                      float        y_box,
+                      float        diff_tol ) ;
+                      */
+
+    return cpl_error_get_code();
+}
+
+static cpl_error_code
+sinfo_test_fit_slits_edge_with_estimate(void){
+
+
+
+
+/*
+    int
+    sinfo_new_fit_slits_edge_with_estimate ( cpl_image   * lineImage,
+                                    float    ** sinfo_slit_pos,
+                                    int         box_length,
+                                    float       y_box,
+                                    float       diff_tol,
+                                    int         low_pos,
+                                    int         high_pos ) ;
+                                    */
+
+    return cpl_error_get_code();
+}
+
+/* NOT USED FUNCTIONS
+float
+sinfo_new_hat1 ( float * xdat, float * parlist)
+void
+sinfo_new_hat_deriv1( float * xdat, float * parlist,
+                      float * dervs)
+void
+sinfo_new_hat_deriv2(float * xdat, float * parlist,
+                     float * dervs)
+
+float
+sinfo_new_hat2 ( float * xdat, float * parlist)
+
+int
+sinfo_new_fit_slits1( cpl_image   * lineImage,
+                      FitParams ** par,
+                      float     ** sinfo_slit_pos,
+                      int          box_length,
+                      float        y_box )
+
+
+*/
+
+/*----------------------------------------------------------------------------*/
+/**
+  @brief   SINFONI pipeline unit test for skycor
+
+**/
+/*----------------------------------------------------------------------------*/
+
+int main(void)
+{
+    /* Initialize CPL + SINFO messaging */
+  cpl_test_init(PACKAGE_BUGREPORT, CPL_MSG_WARNING);
+  sinfo_test_edge();
+
+  sinfo_test_edge_deriv();
+
+/*
+  sinfo_test_lsqfit_edge();
+  sinfo_test_fit_slits_edge();
+  sinfo_test_fit_slits_edge_with_estimate();
+  */
+
+  cpl_test_error(CPL_ERROR_NONE);
+  return cpl_test_end(0);
+
+}
+
+
+/**@}*/
diff --git a/sinfoni/tests/sinfo_baryvel_test.c b/sinfoni/tests/sinfo_baryvel_test.c
new file mode 100644
index 0000000..6a9e00b
--- /dev/null
+++ b/sinfoni/tests/sinfo_baryvel_test.c
@@ -0,0 +1,124 @@
+/*                                                                            *
+ *   This file is part of the ESO SINFO Pipeline                              *
+ *   Copyright (C) 2004,2005 European Southern Observatory                    *
+ *                                                                            *
+ *   This library is free software; you can redistribute it and/or modify     *
+ *   it under the terms of the GNU General Public License as published by     *
+ *   the Free Software Foundation; either version 2 of the License, or        *
+ *   (at your option) any later version.                                      *
+ *                                                                            *
+ *   This program is distributed in the hope that it will be useful,          *
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of           *
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            *
+ *   GNU General Public License for more details.                             *
+ *                                                                            *
+ *   You should have received a copy of the GNU General Public License        *
+ *   along with this program; if not, write to the Free Software              *
+ *   Foundation, 51 Franklin St, Fifth Floor, Boston, MA  02111-1307  USA     *
+ *                                                                           */
+ 
+/*
+ * $Author: amodigli $
+ * $Date: 2009-06-05 06:06:11 $
+ * $Revision: 1.5 $
+ * $Name: not supported by cvs2svn $
+ *
+ */
+
+/*-----------------------------------------------------------------------------
+                                Includes
+ -----------------------------------------------------------------------------*/
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+#include<sinfo_msg.h>
+#include<sinfo_baryvel.h>
+#include<sinfo_key_names.h>
+#include<sinfo_dfs.h>
+#include <cpl.h>
+/*-----------------------------------------------------------------------------
+                                Defines
+ -----------------------------------------------------------------------------*/
+/*-----------------------------------------------------------------------------
+                            Functions prototypes
+ -----------------------------------------------------------------------------*/
+
+
+/*----------------------------------------------------------------------------*/
+/**
+ * @defgroup sinfo_absolute_test  SINFO library unit tests
+ */
+/*----------------------------------------------------------------------------*/
+/**@{*/
+
+static cpl_error_code
+sinfo_test_baryvel(void){
+
+    cpl_propertylist* head=cpl_propertylist_new();
+    double bary_corr=0;
+    double helio_corr=0;
+
+    /*
+    qc_ra       = m$value({p1},O_POS(1))
+     qc_dec      = m$value({p1},O_POS(2))
+     qc_geolat   = m$value({p1},{h_geolat})
+     qc_geolon   = m$value({p1},{h_geolon})
+     qc_obs_time = m$value({p1},O_TIME(7))  !using an image as input it take the
+                                            !date from the descriptor O_TIME(1,2,3)
+                                            !and the UT from O_TIME(5)
+    */
+    /* We use values from demo example file (sinfo_rec_jitter_stdstar.sof)
+    SINFO.2005-08-22T07:47:54.305.fits
+    */
+    const double ra=48.070611;
+
+    const double dec=-20.62172;
+    const double geolat=-24.6270;
+    const double geolon=-70.4040;
+    const double utc=28071.000;
+    const double mjd_obs=53604.32493408;
+    const double bary_corr_expected=22.124927;
+    const double helio_corr_expected= 22.120876;
+
+    cpl_propertylist_append_double(head,"RA",ra);
+    cpl_propertylist_append_double(head,"DEC",dec);
+    cpl_propertylist_append_double(head,H_GEOLON,geolon);
+    cpl_propertylist_append_double(head,H_GEOLAT,geolat);
+    cpl_propertylist_append_double(head,H_UTC,utc);
+    cpl_propertylist_append_double(head,KEY_NAME_MJD_OBS,mjd_obs);
+
+    sinfo_baryvel(head,&bary_corr,&helio_corr);
+
+    cpl_test_eq(bary_corr, bary_corr_expected);
+    cpl_test_eq(helio_corr, helio_corr_expected);
+
+    cpl_test_error(CPL_ERROR_NONE);
+
+    /* free memory */
+    cpl_propertylist_delete(head);
+
+    return cpl_error_get_code();
+}
+
+/*----------------------------------------------------------------------------*/
+/**
+  @brief   SINFONI pipeline unit test for skycor
+
+**/
+/*----------------------------------------------------------------------------*/
+
+int main(void)
+{
+    /* Initialize CPL + SINFO messaging */
+  cpl_test_init(PACKAGE_BUGREPORT, CPL_MSG_WARNING);
+
+  sinfo_test_baryvel();
+
+  cpl_test_error(CPL_ERROR_NONE);
+  return cpl_test_end(0);
+
+}
+
+
+/**@}*/
diff --git a/sinfoni/tests/sinfo_boltzmann_test.c b/sinfoni/tests/sinfo_boltzmann_test.c
new file mode 100644
index 0000000..050d317
--- /dev/null
+++ b/sinfoni/tests/sinfo_boltzmann_test.c
@@ -0,0 +1,296 @@
+/*                                                                            *
+ *   This file is part of the ESO SINFO Pipeline                              *
+ *   Copyright (C) 2004,2005 European Southern Observatory                    *
+ *                                                                            *
+ *   This library is free software; you can redistribute it and/or modify     *
+ *   it under the terms of the GNU General Public License as published by     *
+ *   the Free Software Foundation; either version 2 of the License, or        *
+ *   (at your option) any later version.                                      *
+ *                                                                            *
+ *   This program is distributed in the hope that it will be useful,          *
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of           *
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            *
+ *   GNU General Public License for more details.                             *
+ *                                                                            *
+ *   You should have received a copy of the GNU General Public License        *
+ *   along with this program; if not, write to the Free Software              *
+ *   Foundation, 51 Franklin St, Fifth Floor, Boston, MA  02111-1307  USA     *
+ *                                                                           */
+ 
+/*
+ * $Author: amodigli $
+ * $Date: 2009-06-05 06:06:11 $
+ * $Revision: 1.5 $
+ * $Name: not supported by cvs2svn $
+ *
+ */
+
+/*-----------------------------------------------------------------------------
+                                Includes
+ -----------------------------------------------------------------------------*/
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+#include<sinfo_msg.h>
+#include<sinfo_absolute.h>
+#include <cpl.h>
+/*-----------------------------------------------------------------------------
+                                Defines
+ -----------------------------------------------------------------------------*/
+static float  sqrarg ;
+#define SQR(a) (sqrarg = (a) , sqrarg*sqrarg)
+/*-----------------------------------------------------------------------------
+                            Functions prototypes
+ -----------------------------------------------------------------------------*/
+
+
+/*----------------------------------------------------------------------------*/
+/**
+ * @defgroup sinfo_absolute_test  SINFO library unit tests
+ */
+/*----------------------------------------------------------------------------*/
+/**@{*/
+
+static cpl_error_code
+sinfo_test_bolz(void){
+    /*
+    float
+    sinfo_new_boltz ( float * xdat, float * parlist ) ;*/
+
+
+    /*Test all possible NULL param options */
+    float* xdat = NULL;
+    float* parlist = NULL;
+    const int ndat=4;
+    float slope=0;
+
+    /* 1st test both null input: */
+    slope=sinfo_new_boltz(NULL, NULL) ;
+    cpl_test_eq(slope, 0);
+    cpl_test_error(CPL_ERROR_NULL_INPUT);
+
+    parlist=cpl_calloc(ndat,sizeof(float)) ;
+    slope=sinfo_new_boltz(NULL, parlist) ;
+    cpl_test_eq(slope, 0);
+    cpl_test_error(CPL_ERROR_NULL_INPUT);
+
+    xdat=cpl_calloc(ndat,sizeof(float)) ;
+    slope=sinfo_new_boltz(xdat, NULL) ;
+    cpl_test_eq(slope, 0);
+    cpl_test_error(CPL_ERROR_NULL_INPUT);
+
+
+    /* For defined values we have the following cases:
+     */
+
+    /* case 1:
+     * (parlist[0] - parlist[1]) / (1 + exp(( xdat[0] - parlist[2] ) /
+                                    parlist[3])) + parlist[1] ;
+     * */
+    xdat[0]=0;
+    xdat[1]=1;
+    xdat[2]=2;
+    xdat[3]=3;
+
+    parlist[0]=1;
+    parlist[1]=2;
+    parlist[2]=10;
+    parlist[3]=20;
+    float result=(parlist[0] - parlist[1]) / (1 + exp(( xdat[0] - parlist[2] ) /
+                    parlist[3])) + parlist[1] ;
+
+    slope=sinfo_new_boltz(xdat, parlist) ;
+    cpl_test_eq(slope, result);
+    cpl_test_error(CPL_ERROR_NONE);
+
+    /* free memory */
+    cpl_free(xdat);
+    cpl_free(parlist);
+
+    return cpl_error_get_code();
+}
+
+static cpl_error_code
+sinfo_test_bolz_deriv(void){
+
+    /*  void
+    sinfo_new_boltz_deriv( float * xdat, float * parlist, float * dervs ) ;
+     */
+
+
+
+    /*Test all possible NULL param options */
+    float* xdat = NULL;
+    float* parlist = NULL;
+    float* dervs = NULL;
+    const int ndat=4;
+    float slope=0;
+
+    /* 1st test both null input: */
+    sinfo_new_boltz_deriv(NULL, NULL,NULL) ;
+    cpl_test_eq(slope, 0);
+    cpl_test_error(CPL_ERROR_NULL_INPUT);
+
+    parlist=cpl_calloc(ndat,sizeof(float)) ;
+    xdat=cpl_calloc(ndat,sizeof(float)) ;
+    dervs=cpl_calloc(ndat,sizeof(float)) ;
+
+    sinfo_new_boltz_deriv(NULL, parlist,dervs) ;
+    cpl_test_eq(slope, 0);
+    cpl_test_error(CPL_ERROR_NULL_INPUT);
+
+    sinfo_new_boltz_deriv(xdat, NULL,dervs) ;
+    cpl_test_eq(slope, 0);
+    cpl_test_error(CPL_ERROR_NULL_INPUT);
+
+    sinfo_new_boltz_deriv(xdat, parlist,NULL) ;
+    cpl_test_eq(slope, 0);
+    cpl_test_error(CPL_ERROR_NULL_INPUT);
+
+
+    /* For defined values we have the following cases:
+     */
+
+    /* case 1:
+     * if ( xdat[0] <= parlist[0] ) return
+     *  dervs[0] = 0. ;
+        dervs[1] = 0. ;
+        dervs[2] = 1. ;
+        dervs[3] = 0. ;
+     * ;
+     * */
+    xdat[0]=0;
+    xdat[1]=1;
+    xdat[2]=2;
+    xdat[3]=3;
+
+    parlist[0]=1;
+    parlist[1]=2;
+    parlist[2]=10;
+    parlist[3]=20;
+
+    float subst ;
+    float* result=cpl_calloc(ndat,sizeof(float)) ;
+    subst = (xdat[0] - parlist[2]) / parlist[3] ;
+
+    result[0] = 1. / ( 1. + exp(subst) ) ;
+
+    result[1] = -1. / ( 1. + exp(subst) ) + 1. ;
+
+    result[2] = ( (parlist[0] - parlist[1]) / parlist[3] * exp(subst) ) /
+                    ( (1. + exp(subst)) * (1. + exp(subst)) ) ;
+
+    result[3] = ( (parlist[0] - parlist[1]) * (xdat[0] - parlist[2]) /
+                    (parlist[3]*parlist[3]) * exp(subst) ) /
+                    ( (1. + exp(subst)) * (1. + exp(subst)) ) ;
+
+    sinfo_new_boltz_deriv(xdat, parlist,dervs) ;
+
+    cpl_test_eq(dervs[0], result[0]);
+    cpl_test_eq(dervs[1], result[1]);
+    cpl_test_eq(dervs[2], result[2]);
+    cpl_test_eq(dervs[3], result[3]);
+
+    cpl_test_error(CPL_ERROR_NONE);
+
+
+    /* free memory */
+    cpl_free(xdat);
+    cpl_free(parlist);
+    cpl_free(dervs);
+    cpl_free(result);
+
+    return cpl_error_get_code();
+}
+
+static cpl_error_code
+sinfo_test_lsqfit(void){
+/*
+    int sinfo_new_lsqfit ( float * xdat,
+                 int   * xdim,
+                 float * ydat,
+                 float * wdat,
+                 int   * ndat,
+                 float * fpar,
+                 float * epar,
+                 int   * mpar,
+                 int   * npar,
+                 float * tol ,
+                 int   * its ,
+                 float * lab  ) ;*/
+
+    return cpl_error_get_code();
+}
+
+static cpl_error_code
+sinfo_test_fit_slits_boltz(void){
+/*
+    int
+    sinfo_new_fit_slits_boltz( cpl_image   * lineImage,
+                       FitParams ** par,
+                       float     ** sinfo_slit_pos,
+                       int          box_length,
+                       float        y_box,
+                       float        diff_tol ) ;
+                       */
+    return cpl_error_get_code();
+}
+
+
+
+static cpl_error_code
+sinfo_test_fit_slits_boltz_with_estimate(void){
+/*
+    int
+    sinfo_new_fit_slits_boltz_with_estimate ( cpl_image   * lineImage,
+                                    float     ** sinfo_slit_pos,
+                                    int          box_length,
+                                    float        y_box,
+                                    float        diff_tol,
+                                    int          low_pos,
+                                    int          high_pos ) ;
+                                    */
+    return cpl_error_get_code();
+}
+
+/* NOT USED FUNCTIONS
+int
+sinfo_new_fit_slits_boltz_single_line ( cpl_image   * lineImage,
+                      float     ** sinfo_slit_pos,
+                      int          box_length,absolute
+                      float        y_box,
+                      int          low_pos,
+                      int          high_pos ) ;
+
+*/
+
+/*----------------------------------------------------------------------------*/
+/**
+  @brief   SINFONI pipeline unit test for skycor
+
+**/
+/*----------------------------------------------------------------------------*/
+
+int main(void)
+{
+    /* Initialize CPL + SINFO messaging */
+  cpl_test_init(PACKAGE_BUGREPORT, CPL_MSG_WARNING);
+
+  sinfo_test_bolz();
+  sinfo_test_bolz_deriv();
+/*
+  sinfo_test_lsqfit();
+
+  sinfo_test_fit_slits_boltz();
+  sinfo_test_fit_slits_boltz_single_line();
+  sinfo_test_fit_slits_boltz_with_estimate();
+  */
+
+  cpl_test_error(CPL_ERROR_NONE);
+  return cpl_test_end(0);
+
+}
+
+
+/**@}*/
diff --git a/sinfoni/tests/sinfo_cube_coadd_test.c b/sinfoni/tests/sinfo_cube_coadd_test.c
index 0a2bcef..355e13a 100644
--- a/sinfoni/tests/sinfo_cube_coadd_test.c
+++ b/sinfoni/tests/sinfo_cube_coadd_test.c
@@ -102,12 +102,123 @@ sinfo_cube_gen_gauss2d_with_noise(const int sx,
 
 }
 
+static cpl_error_code
+sinfo_cube_prepare_cube_aux(double* times, float* offx, float* offy,
+                            const int nc)
+{
+    double off = 5;
+    double exptime = 1;
+
+    for(int i = 0;i < nc; i++) {
+        times[i] = exptime;
+        offx[i] =+ off*i;
+        offy[i] =- off*i;
+    }
+    return cpl_error_get_code();
+}
+
+
+static cpl_error_code
+sinfo_cube_prepare_cube_frames(cpl_imagelist** cube_bas,
+                               const int sx, const int sy, const int sz,
+                               const int nc,
+                               double* times, float* offx, float* offy)
+{
+
+    char name[SIZE];
+    cpl_propertylist* plist=NULL;
+    double xc0 = 0.5 * sx;
+    double yc0 = 0.5 * sy;
+    double sigx = sx / 16;
+    double sigy = sy / 16;
+    double min_noise=-1;
+    double max_noise=+1;
+    double mjd_obs=56942.32674796;
+    for(int i=0;i<nc;i++) {
+        double xc=xc0+offx[i];
+        double yc=yc0+offy[i];
+
+        sinfo_msg_warning("xc0= %f %f, offset = %f %f xc= %f %f",
+                          xc0,yc0,offx[i],offy[i],xc,yc);
+        plist=cpl_propertylist_new();
+        cpl_propertylist_append_double(plist,KEY_NAME_CUMOFFX,offx[i]);
+        cpl_propertylist_append_double(plist,KEY_NAME_CUMOFFY,offy[i]);
+        cpl_propertylist_append_double(plist,"EXPTIME",times[i]);
+        cpl_propertylist_append_double(plist,KEY_NAME_MJD_OBS,mjd_obs);
+        cube_bas[i]=sinfo_cube_gen_gauss2d_with_noise(sx,sy,sz,xc,yc,
+                        sigx,sigy,min_noise,max_noise);
+        sprintf(name,"%s%d%s","cub_bas",i,".fits");
+        cpl_imagelist_save(cube_bas[i],name,CPL_BPP_IEEE_FLOAT,plist,CPL_IO_DEFAULT);
+        sinfo_free_propertylist(&plist);
+
+    }
+    return cpl_error_get_code();
+
+}
 
 /**
    @brief      test cube coaddition compuatation
  */
 /*---------------------------------------------------------------------------*/
 #define SIZE 255
+
+cpl_imagelist*
+sinfo_coadd_cubes(const int rsx, const int rsy, const int nc,
+                  cpl_imagelist** cube_obj,
+                  float* offx, float* offy, double* times)
+{
+    int onp;
+    int z_stp=8;
+    int z_siz=0;
+    int z_min=0;
+    int z_max=0;
+    int kappa=2;
+    char name[SIZE];
+    cpl_image* img_j=NULL;
+    cpl_image* img_m=NULL;
+    cpl_imagelist* cube_msk = cpl_imagelist_new();
+    cpl_imagelist* cube_out = cpl_imagelist_new();
+    onp = cpl_imagelist_get_size(cube_obj[0]);
+
+    sinfo_msg_warning("Coadd data");
+    for (int z = 0; z < onp; z += z_stp) {
+
+        z_siz = (z_stp < (onp - z)) ? z_stp : (onp - z);
+        z_min = z;
+        z_max = z_min + z_siz;
+        sinfo_msg("Coadding cubes: range [%4.4d,%4.4d) of 0-%d\n", z_min, z_max,
+                        onp);
+
+        for (int j = z_min; j < z_max; j++) {
+            img_j = cpl_image_new(rsx, rsy, CPL_TYPE_FLOAT);
+            cpl_imagelist_set(cube_out, img_j, j);
+            img_m = cpl_image_new(rsx, rsy, CPL_TYPE_FLOAT);
+            cpl_imagelist_set(cube_msk, img_m, j);
+        }
+
+        sinfo_new_combine_jittered_cubes_thomas_range(cube_obj, cube_out,
+                        cube_msk, nc, offx, offy, times, "tanh", z_min, z_max,
+                        kappa);
+
+    }
+    sinfo_msg_warning("Save final products");
+    sprintf(name, "%s", "cub_pro.fits");
+    cpl_imagelist_save(cube_out,name,CPL_BPP_IEEE_FLOAT, NULL,CPL_IO_DEFAULT);
+    sprintf(name, "%s", "cub_pro_msk.fits");
+    cpl_imagelist_save(cube_msk,name,CPL_BPP_IEEE_FLOAT, NULL,CPL_IO_DEFAULT);
+    sinfo_free_imagelist(&cube_msk);
+    sinfo_free_imagelist(&cube_out);
+    return cube_msk;
+}
+
+static void
+test_cube_coadd_offset_xy_dump(const float* offx,const float* offy,const int n)
+{
+    for(int i=0;i<n;i++){
+        sinfo_msg_warning("offx=%g offy=%g",offx[i],offy[i]);
+    }
+    return;
+}
 static void
 test_cube_coadd_gauss2d(void)
 {
@@ -116,138 +227,55 @@ test_cube_coadd_gauss2d(void)
   int sz=16;
   int nc=3;
   int i=0;
-  int z=0;
-
-
-  int onp=0;
-
-  double xc0=sx/2;
-  double yc0=sy/2;
-  double xc=sx/2;
-  double yc=sy/2;
-  double sigx=sx/16;
-  double sigy=sy/16;
-  double min_noise=-1;
-  double max_noise=+1;
-  int z_siz=0;
-  int z_stp=8;
-  int z_min=0;
-  int z_max=0;
-  int kappa=2;
-  int j=0;
 
   int vllx=0;
   int vlly=0;
   int vurx=0;
   int vury=0;
-  int off=5;
+
   double * times=NULL ;
   float * offx=NULL;
   float * offy=NULL;
-  float * roffx=NULL;
-  float * roffy=NULL;
-  float shftx=0;
-  float shfty=0;
-
-  float min_offx=0;
-  float min_offy=0;
-  float max_offx=0;
-  float max_offy=0;
+
   float ref_offx=0;
   float ref_offy=0;
-  int rsx=0;
-  int rsy=0;
+  int rsx=sx;
+  int rsy=sy;
 
-  cpl_imagelist* cube_out=NULL;
   cpl_imagelist** cube_bas=NULL;
-  cpl_imagelist* cube_msk=NULL;
-
   cpl_imagelist** cube_obj=NULL;
   cpl_imagelist** cube_tmp=NULL;
 
-  cpl_image* img_o=NULL;
-  cpl_image* img_s=NULL;
-  cpl_image* img_m=NULL;
-  cpl_image* img_j=NULL;
-
   char name[SIZE];
-  cknull(times = (double*) cpl_calloc (nc, sizeof (double)),
-	 " could not allocate memory!") ;
  
-  cknull(offx = (float*) cpl_calloc (nc, sizeof(float)),
-	 " could not allocate memory!") ;
-
-  cknull(offy = (float*) cpl_calloc (nc, sizeof(float)),
-	 " could not allocate memory!") ;
-
-
-  cknull(roffx = (float*) cpl_calloc (nc, sizeof(float)),
-	 " could not allocate memory!") ;
-
-  cknull(roffy = (float*) cpl_calloc (nc, sizeof(float)),
-	 " could not allocate memory!") ;
-
-  cknull(cube_bas = (cpl_imagelist**) cpl_calloc (nc,sizeof (cpl_imagelist*)),
-	 "Could not allocate memory for cube_out");
-    
   sinfo_msg_warning("Prepare data cubes with 2D Gauss");
-  for(i=0;i<nc;i++) {
-    times[1]=1;
-    offx[i]=+off*i;
-    offy[i]=-off*i;
-    xc=xc0+offx[i];
-    yc=yc0+offy[i];
-
-    sinfo_msg_warning("xc0= %f %f, offset = %f %f xc= %f %f",
-		      xc0,yc0,offx[i],offy[i],xc,yc);
-    check_nomsg(cube_bas[i]=sinfo_cube_gen_gauss2d_with_noise(sx,sy,sz,xc,yc,
-							      sigx,sigy,
-						              min_noise,
-							      max_noise));
-    sprintf(name,"%s%d%s","cub_bas",i,".fits");
-    check_nomsg(cpl_imagelist_save(cube_bas[i],name,CPL_BPP_IEEE_FLOAT,
-				   NULL,CPL_IO_DEFAULT));
-
-  }
+  times = (double*) cpl_calloc (nc, sizeof (double));
+  offx = (float*) cpl_calloc (nc, sizeof(float));
+  offy = (float*) cpl_calloc (nc, sizeof(float));
+  sinfo_cube_prepare_cube_aux(times, offx, offy, nc);
 
+  cube_bas = (cpl_imagelist**) cpl_calloc (nc,sizeof (cpl_imagelist*));
+  sinfo_cube_prepare_cube_frames(cube_bas, sx, sy, sz, nc, times, offx, offy);
 
 
-  //Get ref offset
-  for ( i = 0 ; i < nc ; i++ ) {
-     if(i==0) {
-      min_offx=offx[i];
-      min_offy=offy[i];
-      max_offx=offx[i];
-      max_offy=offy[i];
-    } else {
-      if(offx[i] > max_offx) max_offx=offx[i];
-      if(offy[i] > max_offy) max_offy=offy[i];
-      if(offx[i] < min_offx) min_offx=offx[i];
-      if(offy[i] < min_offy) min_offy=offy[i];
-    }
-  }
-  ref_offx=(min_offx+max_offx)/2;
-  ref_offy=(min_offy+max_offy)/2;
+  sinfo_auto_size_cube(offx, offy, nc, &ref_offx, &ref_offy, &rsx, &rsy);
 
-  rsx=2*floor(max_offx-min_offx+0.5)+64;
-  rsy=2*floor(max_offy-min_offy+0.5)+64;
-  sinfo_msg_warning("Output cube size: %d x %d",rsx,rsy);
+  sinfo_msg_warning("Output cube size: %d x %d offset: %g, %g",
+                    rsx,rsy,ref_offx,ref_offy);
+  test_cube_coadd_offset_xy_dump(offx,offy,nc);
+  /* AMO: found that this setting does not work because the correction by
+   * reference offset is not proper. Need to comment out to have proper result
 
-  //reassign offsets
   for ( i = 0 ; i < nc ; i++ ) {
-    shftx=offx[i]-ref_offx;
-    shfty=offy[i]-ref_offy;
-
-    sinfo_new_array_set_value(roffx,2*shftx,i);
-    sinfo_new_array_set_value(roffy,2*shfty,i);
+      sprintf(name,"%s%d%s","cub_bas",i,".fits");
+      sinfo_assign_offset_usr(i,name,offx,offy,ref_offx,ref_offy);
   }
+  */
+  sinfo_msg_warning("after");
+  test_cube_coadd_offset_xy_dump(offx,offy,nc);
 
 
-
-
-
-  sinfo_msg_warning("Allocate memory");
-
+  sinfo_msg_warning("Allocate memory to create coadded cube");
   cknull(cube_tmp = (cpl_imagelist**) cpl_calloc (nc, sizeof (cpl_imagelist*)),
 	 "Could not allocate memory for cube_tmp");
 
@@ -276,67 +304,14 @@ test_cube_coadd_gauss2d(void)
 				   NULL,CPL_IO_DEFAULT));
   }
 
-
-  cknull(cube_msk=cpl_imagelist_new(),"could not allocate cube!");
-  cknull(cube_out=cpl_imagelist_new(),"could not allocate cube!");
-
-  check_nomsg(onp=cpl_imagelist_get_size(cube_obj[0]));
-
-
-  sinfo_msg_warning("Coadd data");
-
-  for(z=0;z<onp;z+=z_stp) {
-
-    z_siz=(z_stp < (onp-z)) ? z_stp : (onp-z);
-    z_min=z;
-    z_max=z_min+z_siz;
-    sinfo_msg("Coadding cubes: range [%4.4d,%4.4d) of 0-%d\n",z_min,z_max,onp);
-                          
-    for(j=z_min;j<z_max;j++) {
-      check_nomsg(img_j=cpl_image_new(rsx,rsy,CPL_TYPE_FLOAT));
-      check_nomsg(cpl_imagelist_set(cube_out,img_j,j)); 
-      check_nomsg(img_m = cpl_image_new(rsx,rsy,CPL_TYPE_FLOAT));
-      check_nomsg(cpl_imagelist_set(cube_msk,img_m,j));
-    }
-
-    sinfo_new_combine_jittered_cubes_thomas_range(cube_obj,
-						  cube_out,
-						  cube_msk,
-						  nc,
-						  roffx,
-                                                  roffy,
-						  times,
-						  "tanh",
-						  z_min,
-						  z_max,
-						  kappa);
-
-
-
-  }
-  sinfo_msg_warning("Save final products");
-
-  sprintf(name,"%s","cub_pro.fits");
-  check_nomsg(cpl_imagelist_save(cube_out,name,CPL_BPP_IEEE_FLOAT,
-				 NULL,CPL_IO_DEFAULT));
-
-  sprintf(name,"%s","cub_pro_msk.fits");
-  check_nomsg(cpl_imagelist_save(cube_msk,name,CPL_BPP_IEEE_FLOAT,
-				 NULL,CPL_IO_DEFAULT));
+  sinfo_coadd_cubes(rsx, rsy, nc, cube_obj, offx, offy, times);
 
 
  cleanup:
 
   sinfo_free_float(&offy);
   sinfo_free_float(&offx);
-  sinfo_free_float(&roffy);
-  sinfo_free_float(&roffx);
-
   sinfo_free_double(&times);
-  sinfo_free_image(&img_s);
-  sinfo_free_image(&img_o);
-  sinfo_free_imagelist(&cube_out);
-  sinfo_free_imagelist(&cube_msk);
 
   for ( i = 0 ; i <nc  ; i++ ) {
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-astro/packages/cpl-plugin-sinfo.git



More information about the Debian-astro-commits mailing list