[Casa-framework] Setting default values

Wes Young wyoung at nrao.edu
Wed Sep 27 07:34:36 EDT 2006


Greetings,

Here are a few examples of default parameter settings. A couple of  
things to note,

1. Setting default record is not currently implemented,
2. Multiple choices aren't currently implement.
3. The use of the direction attribute is ignored, things belong in  
input, output, and inout elements. So put all your input parameter  
inside an <input> block, output parameters inside and <output> block,  
and in/out parameters inside an <inout> block.

These examples are on the twiki, at

https://wikio.nrao.edu/bin/view/Software/ 
Implementation#Examples_of_setting_Parameters_i

wes
wyoung at aoc.nrao.edu

-----

An example setting a record default

      <param xsi:type="any"  name="height">
      <any type="record"/>
      <defaultrecord>
            <value name="amp" xsi:type="double">1.0</value>
      </defaultrecord>
      <description>amplitude of Gaussian, or 3 numeric values</ 
description>
      </param>

Example setting  a single value

      <param xsi:type="double" direction="in" name="center">
      <description>center of Gaussian</description>
      <value>0</value>
      </param>

Example setting a "Quantity"

      <param xsi:type="double" name="mstart" units="m/s">
      <description>Start velocity (e.g. '20Km/s')</description>
      <value>0.0</value>
      </param>

Example setting an array with one value.

      <param xsi:type="intArray" name="start">
      <description>Start channels (0-relative)</description>
      <value>0</value>
      </param>

Example of an empty array

           <param xsi:type="intArray" name="spwid">
      <description>Spectral Window Ids (0 relative) to select</ 
description>
      <value type="vector"></value>
      </param>

Example setting a vector with more than one value

      <param xsi:type="intArray" name="quack">
      <description>Flag VLA quacks -- scan interval and quack length,  
in seconds</description>
      <value type="vector">
      <value>0</value>
      <value>0</value> </value>
      </param>


Example setting a complex array

      <param xsi:type="complexArray" name="flux">
      <description>The flux value.
      A vector with four real or complex numbers</description>
      <value type="vector">
              <value type="struct"><value name="re">1.0</value><value  
name="im">0.0</value></value>
              <value type="struct"><value name="re">0.0</value><value  
name="im">0.0</value></value>
              <value type="struct"><value name="re">0.0</value><value  
name="im">0.0</value></value>
              <value type="struct"><value name="re">0.0</value><value  
name="im">0.0</value></value>
      </value>
      </param>

Example of a multiple choice, note default is last option.

      <param xsi:type="string" name="polarization">
      <description>The polarization of the value field.
      ``Stokes'', ``linear'' or ``circular''</description>
      <value>Circular</value>
      <value>Linear</value>
      <value>Stokes</value>
      </param>







More information about the Casa-framework mailing list