BRL-CAD
bn_table Struct Reference

#include <tabdata.h>

Data Fields

uint32_t magic
 
size_t nx
 
fastf_t x [1]
 array of nx+1 wavelengths, dynamically sized More...
 

Detailed Description

Data structures to assist with recording many sets of data sampled along the same set of independent variables.

The overall notion is that each sample should be as compact as possible (an array of measurements), with all the context stored in one place.

These structures and support routines apply to any measured "curve" or "function" or "table" with one independent variable and one or more scalar dependent variable(s).

The context is kept in an 'bn_table' structure, and the data for one particular sample are kept in an 'bn_tabdata' structure.

The contents of the sample in val[j] are interpreted in the interval (wavel[j]..wavel[j+1]). This value could be power, albedo, absorption, refractive index, or any other wavelength-specific parameter.

For example, if the val[] array contains power values, then val[j] contains the integral of the power from wavel[j] to wavel[j+1]

As an example, assume nwave=2, wavel[0]=500, wavel[1]=600, wavel[2]=700. Then val[0] would contain data for the 500 to 600nm interval, and val[1] would contain data for the 600 to 700nm interval. There would be no storage allocated for val[2] – don't use it! There are several interpretations of this: 1) val[j] stores the total (integral, area) value for the interval, or 2) val[j] stores the average value across the interval.

The intervals need not be uniformly spaced; it is acceptable to increase wavelength sampling density around "important" frequencies.

Definition at line 73 of file tabdata.h.

Field Documentation

uint32_t magic

Definition at line 74 of file tabdata.h.


The documentation for this struct was generated from the following file: