<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
                   "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<!-- lifted from troff+man by doclifter -->
<refentry id='cmbmcs1'>
<!--  @(#)cmbmcs.1 2001/04/02 NIST -->
<!--  I Image Group -->
<!--  G. T. Candela &amp; Craig I. Watson -->

<refmeta>
<refentrytitle>CMBMCS</refentrytitle>
<manvolnum>1A</manvolnum>
<refmiscinfo class='date'>02 April 2001</refmiscinfo>
<refmiscinfo class='source'>NIST</refmiscinfo>
<refmiscinfo class='manual'>NFIS Reference Manual</refmiscinfo>
</refmeta>
<refnamediv id='name'>
<refname>cmbmcs</refname>
<refpurpose>combines PCASYS mean/covariance data file pairs.</refpurpose>
</refnamediv>
<!-- body begins here -->
<refsynopsisdiv id='synopsis'>
<cmdsynopsis>
  <command>cmbmcs</command>    
    <arg choice='plain'><replaceable>&lt;meanfile_in</replaceable></arg>
    <arg choice='opt' rep='repeat'><replaceable>meanfile_in</replaceable></arg>
    <arg>&gt;</arg>
    <arg choice='plain'><replaceable>&lt;covfile_in</replaceable></arg>
    <arg choice='opt' rep='repeat'><replaceable>covfile_in</replaceable></arg>
    <arg>&gt;</arg>
    <arg choice='plain'><replaceable>&lt;meanfile_out&gt;&lt;meanfile_out_desc&gt;&lt;covfile_out&gt;&lt;covfile_out_desc&gt;&lt;ascii_outfiles&gt;</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>


<refsect1 id='description'><title>DESCRIPTION</title>
<para><emphasis remap='B'>Cmbmcs</emphasis>
combines pairs of PCASYS mean vector and covariance matrix
data files, to produce a mean/covariance pair that is approximately
the same as would have resulted if all the vectors that were used to
make the input means and covariances had been given to the meancov
function in one large set.  So, if the sample covariance matrix needs to
be made from a large set of vectors, and several processors are
available, it may be possible to save run time by, first, running
several simultaneous instances of meancov, each on a subset of the
vectors, and second, running cmbmcs to combine the means
and covariances made by the meancov instances.  (Even if only the
covariance is ultimately needed, i.e. not the mean, it is necessary
for the meancov instances to compute the means and for cmbmcs to
use them, to compute the overall covariance.)</para>
</refsect1>

<refsect1 id='options'><title>OPTIONS</title>
<variablelist remap='TP'>
  <varlistentry>
  <term><emphasis remap='I'>&lt;meanfile_in[meanfile_in...]&gt;</emphasis></term>
  <listitem>
<para>Input files each containing a mean vector.  These files must be in
PCASYS "matrix" format, each with first dimension 1 and all having the
same second dimension. (Usually the output of <emphasis remap='B'>meancov</emphasis>.)</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='I'>&lt;covfile_in[covfile_in...]&gt;</emphasis></term>
  <listitem>
<para>Input files each containing a covariance matrix.  These files must be
in PCASYS "covariance" format.  The i'th input covariance file goes
with the i'th input mean file.  These covariances must all have the
same order, which must be the second dimension of the input mean
vector files. (Usually the output of <emphasis remap='B'>meancov</emphasis>.)</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='I'>&lt;meanfile_out&gt;</emphasis></term>
  <listitem>
<para>Mean file to be written, in PCASYS "matrix" format.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='I'>&lt;meanfile_out_desc&gt;</emphasis></term>
  <listitem>
<para>A string to be written into the mean output files description
string.  This string can be of any length, but must not contain
embedded newline characters.  If it contains spaces, tabs, or shell
metacharacters that are not to be expanded, then it should be quoted.
To leave the description empty, use '' (two single quotes, i.e.
single-quoted empty string).  To let cmbmcs make a description
(stating that this is a mean vector made by cmbmcs and listing the
names of the input files), use - (hyphen).</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='I'>&lt;covfile_out&gt;</emphasis></term>
  <listitem>
<para>Covariance file to be produced, in PCASYS "covariance" format.  Its
"number of vectors" field will be set to the sum of the values of that
field across the input covariances.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='I'>&lt;covfile_out_desc&gt;</emphasis></term>
  <listitem>
<para>Description string for output covariance file or - to let cmbmcs make
the description (as for output mean file description).</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='I'>&lt;ascii_outfiles&gt;</emphasis></term>
  <listitem>
<para>If y, makes ascii output files; if n, binary.  Binary is recommended,
unless the output files must be portable across different byte orders
or floating_point formats.</para>
  </listitem>
  </varlistentry>
</variablelist>
</refsect1>

<refsect1 id='examples'><title>EXAMPLE(S)</title>
<para>From <emphasis remap='I'>test/pcasys/execs/cmbmcs/cmbmcs.src</emphasis>:</para>

<!-- .RS -->
<para><emphasis remap='B'>% cmbmcs ../meancov/fv1.men ../meancov/fv2.men ../meancov/fv1.cov ../meancov/fv2.cov fv_tst.men - fv_tst.cov - n</emphasis>
<!-- .br -->
Combines the mean/covariance files for fv1 and fv2 into a
mean/covariance set of files.</para>
</refsect1>

<refsect1 id='see_also'><title>SEE ALSO</title>
<para>meancov (1A)</para>

</refsect1>

<refsect1 id='author'><title>AUTHOR</title>
<para>NIST/ITL/DIV894/Image Group</para>
</refsect1>
</refentry>

