#include <bn.h>
Data Fields | |
long | magic |
int | nx |
fastf_t | x [1] |
array of nx+1 wavelengths, dynamically sized |
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 exmple, 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.
See Also - spectrum.h, spectrum.c
Definition at line 1397 of file bn.h.
|
|
|
|
array of nx+1 wavelengths, dynamically sized
Definition at line 1400 of file bn.h. Referenced by bn_ck_table(), bn_pr_table(), bn_print_table_and_tabdata(), bn_tabdata_area2(), bn_tabdata_freq_shift(), bn_tabdata_from_array(), bn_tabdata_mk_linear_filter(), bn_tabdata_mul_area2(), bn_tabdata_resample_avg(), bn_tabdata_resample_max(), bn_tabdata_to_tcl(), bn_table_delete_sample_pts(), bn_table_find_x(), bn_table_interval_num_samples(), bn_table_lin_interp(), bn_table_make_uniform(), bn_table_merge2(), bn_table_read(), bn_table_scale(), bn_table_write(), rt_spect_black_body(), rt_spect_black_body_fast(), rt_spect_black_body_points(), rt_spect_make_CIE_XYZ(), and rt_spect_reflectance_rgb(). |