PIDF ARRAY BINNING DEFINITION BLOCK

The PIDF Array Binning Block contains any schemes for binning array data. This is not a frequently used PIDF block but is useful when the returned measurements are arrays of data which are either irregularly spaced or have different lengths. An simple example would be an array measurement which returns alternately values corresponding to its even and odd indices.

The array binning definitions are used primarily by applications which want to work with a fixed data array (size and values). This definition block allows the read measurement to be transferred to a predefined binning scheme which accomplishes this.

A PIDF array binning definition block consists of a single field which gives the number of binning definition structures followed by the individual structures themselves, each of which contains one binning definition. A PIDF array binning definition block has the generalized form:

int num_bin_sets = ENTRY;
struct BinN
   int     num_bins = Entry;
   int     method = Entry;
   float   min = Entry;
   float   max = Entry;
   int     bin_scaling = Entry;
}
where N is a structure counter which begins at 0 and runs through the number of defined Bin structures less 1. The fields within the structure can be entered in any order.

KEYWORD: num_bin_sets

The number of defined Bin structures in the PIDF. If there are no defined Bin structures listed in the PIDF then this field should be set to 0. The num_bin_sets field can be placed anywhere within the overall PIDF file above the first Bin structure definition and external to any internal PIDF structures. It is an int field.

KEYWORD: num_bins

The number of elements in the binning array. This is an int field and must have a value of 1 or greater.

KEYWORD: method

Specifies how to transfer returned array elements into the new binning array. The recognized options are listed below.

VALUE DEFNITION
1 Use a band storage method. Within the UDF an array element can posess a width or range. If this is the case each returned measurement in an array of sensor values is spread out over all of the defined scan bins which fall within its width. Where partial overlap of a bin occurs, a value proportional to the fractional coverage is stored. Renormalization of the data prior to usage takes care of fractional data entries. Note: this field does not contain any information on how the width of an array element is to be determined. If a width cannot be determined then any routine using this field should default the field value to 2 and use the definition below.
2 Use a point storage method. Each returned element in an array measurement is stored in the scan bin which contains the value of the UDF scan step in the physical units selected for return.

This is an int field.

KEYWORD: min

The center value of the first element in the binning array. This field in conjunction with the max and bin_scaling fields allows the centers and widths of each element in the binning array to be computed. This is a float field.

KEYWORD: max

The center value of the last element in the binning array. This field in conjunction with the min and bin_scaling fields allows the centers and widths of each element in the binning array to be computed. This is a float field.

KEYWORD: bin_scaling

The scaling to use when assigning center values to the elements in the binning array. The recognized values for this field are:

VALUE DEFNITION
1 The bins centers are linearly spaced.
2 The bins centers are logarithmically spaced. Use of this definition requires that both the min and max structure fields be greater than zero.

This is an int field.

EXAMPLES

The following is an example of a fully functional PIDF scan binning information block. The entries are shown within the overall PIDF definition braces which would occur only once within the PIDF file.

EXAMPLE 1

pidf v2_RPDP {
$*********************************************************************
    int num_bin_sets = 2;                              $$ no. bin sets
    struct Bin0 {                                      $$ bin def 0
        int method = 2;                                $$ bin method
        float min = -100.0;                            $$ bin beg/end
        float max = 100.0;                             $$ bin beg/end
        int bin_scaling = 1;                           $$ bin type
        int num_bins = 256;                            $$ no. of bins
    };
    struct Bin1 {                                      $$ bin def 1
        int method = 2;                                $$ bin method
        float min = 1.0;                               $$ bin beg/end
        float max = 100.0;                             $$ bin beg/end
        int bin_scaling = 2;                           $$ bin type
        int num_bins = 256;                            $$ no. of bins
    };
$*********************************************************************
};

&larr Previous TOC HOME Next &rarr
Group Block Image Block