comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: interpolating flux
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: interpolating flux [message #82928 is a reply to message #82927] Wed, 23 January 2013 13:49 Go to previous messageGo to previous message
Matthew is currently offline  Matthew
Messages: 18
Registered: February 2006
Junior Member
> I have two black body spectra at different temperature i.e at 5000K and 5200K. Does anyone know How I can interpolate the flux of black body spectra between 5000K 5200K at a step of 50K.

It won't work very well because you only have two data points. This is just one attempt. There are probably better ways (i.e. interpolating over a grid with INTERPOLATE).

nNewSpectra = 10
mySpectra5000 = randomu(3, 1, nNewSpectra)
mySpectra5200 = randomu(3, 1, nNewSpectra)
myT = [5000, 5200]

wantedT = findgen(nNewSpectra) / (nNewSpectra - 1.0D) * (5200 - 5000) + 5200

newSpectra = fltarr(nT, nNewSpectra)
for i = 0, nNewSpectra-1 do begin
newSpectra[i,*] = interpol([mySpectra5000[i], mySpectra5200[i]], myT, wantedT)
endfor

end
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: FFT phase?
Next Topic: 2D array as colour dot image

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:03:30 PDT 2025

Total time taken to generate the page: 0.00220 seconds