|Message: Re: Optical Photons Spectrum||Not Logged In (login)|
Click on the Forum title, e.g. on the "Forums by Category" page, to read a sequence of postings to the Forum and its threads all in one page. If you are only interested in one thread or the thread following a specific posting, click the thread or the posting, which takes you to a smaller page, which contains only the part you are interested in and may be easier to navigate.
Messages are "chained" if there are only replies at the first level, i.e. 1/1.html, 1/1/1.html etc. In case of "chained" messages the message number is replaced by the icon and there is no indentation.
Inline: Display the subject line only or also the text of the posting(s); for the choice "All" the "Outline" choices are switched off.
|1||0||1||no text / full text of posting|
|2||1||All||text for level 1 only / text for All postings|
Outline: Choose the depth of the posting thread, successive toggle controls provide increasing detail.
|1||2||1||2 levels / 1 level (original posting)|
|2||3||2||3 levels / 2 levels|
|3||3||All||3 levels / all levels (all postings)|
Just my two cents. For my simulations, I have text files that I read in for each optical property. Each file contains 500 data points, one for each integer wavelength (which I convert to from the energy), in a range from 200 nm to 700 nm (as this is the relevant range for my purposes). I read the files in and store them in an array. This produces very smooth output spectra for me.
On Fri, 21 Jan 2011 23:05:55 GMT, Gumplinger Peter wrote:
> I'll try to explain the photon energy sampling with words although a > simple graph would explain it much better and easier. > > If you have a spectrum that is defined at discrete locations and you > want to sample from this spectrum, you have the two simplest choices: > > (1) You can either brute force sample with the rejection method - slow - > or (2) you can resort to the faster integral method. The integral method > was chosen. > > This means that you need to first integrate the spectrum and make a new > vector which is monotonically increasing and holds the integral of the > spectrum to the left of the bin in question. The (linear) integral of a > spectral bin F(x) is the width of the bin times the average y=f(x) at > the bin's edges. > > During simulation a flat random number is taken from zero to the > integral vector's largest entry: Y_max=F(x_max). For this number (Y) we > now find the corresponding integral vector's left bin, x_i, then sample > x above the bin's lower limit, x_i, by linearly interpolating the > integral vector's entries at the bin edges, F(x_i) and F(x_i+1). > > If you think about it, what that produces is a flat spectrum in x (the > photon energy) within the bin because the line connecting the bin's > edges Y_i=F(x_i) and Y_i+1=F(x_i+1) is a straight line. >
|Inline Depth:||Outline Depth:||Add message:|