Open sodamodo opened 9 years ago
The size of bins will effect the outcome of the histogram creation, there is preset optimum bin size so the bin size will be dictated by a function.
The function will take a starting wave length and a width(in nm) as parameters and return a list of tuples which contains a list of tuples containing starting and stopping wavelengths. Maybe there will a preset hard upper wavelength that bin creation stops at?
bin(start_lambda, width) -> [(start_lambda, stop_lambda)...etc]
Regardless of where the upper limit on band creation is, there will be a number of bins for which there are bins which contain no data(1400nm? 2000nm?). These must be filtered out
validate_bins(bins, materials) --> lists of only bins which contain data for a given material
psuedocode: for bin in bins: if sense(bin, material) == 0: bins.remove(bin)
notes: no data return value should probably changed from 0 as not to conflict with areas of 0 reflectance, investigation of materials necessary to see if there are areas of true zero reflectance.
This issue has been addressed except for the ability to plot the histogram on a graph. The plotting function will use the matplotlib; see link below for how to plot a bar graph.
Need to create a function which accepts a material as a parameter and then breaks the spectrum up into same size chunks(or buckets) and plots a histogram of the amount of reflectance in each bucket. This will require the histogram plotting function from matplotlib.