Re: interpolating flux [message #82918] |
Thu, 24 January 2013 11:41 |
Russell Ryan
Messages: 122 Registered: May 2012
|
Senior Member |
|
|
I think you misunderstood Craig, if I can speak for him.
If you're working with a *TRUE* blackbody spectrum, then you know an exact analytic answer for the spectrum as a function of both temperature and wavelength. Why, then, do you want to interpolate? Instead of simply evaluating that *KNOWN* analytical expression at whatever temperatures and wavelengths you think are useful or compelling? For example, the planck() function in the astro library is probably what you want.
Russell
On Wednesday, January 23, 2013 3:26:03 PM UTC-5, idlhelp wrote:
> On Wednesday, January 23, 2013 5:15:12 PM UTC+1, Craig Markwardt wrote:
>
>> On Wednesday, January 23, 2013 7:06:51 AM UTC-5, idlhelp wrote:
>
>>
>
>>> Dear All,
>
>>
>
>>>
>
>>
>
>>> 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.
>
>>
>
>>
>
>>
>
>> If it's a true black body spectrum, then consider that the spectrum can be computed exactly without interpolation.
>
>>
>
>> http://en.wikipedia.org/wiki/Planck%27s_law
>
>>
>
>>
>
>>
>
>> If you really want to use interpolation, I would recommend computing the ALOG10(flux) of your gridded spectra, interpolating those log-values, then converting back to flux.
>
>>
>
>>
>
>>
>
>> Craig
>
>
>
> thanks Craig, I didn't you properly, but my question is that how can I interpolate flux of two different synthetic spectra between two different temperature for e.g 1000K and 200K at a step of 50K i.e i want to create a new synthetic spectra at temperature 150K
|
|
|
|
Re: interpolating flux [message #82928 is a reply to message #82927] |
Wed, 23 January 2013 13:49  |
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
|
|
|
Re: interpolating flux [message #82930 is a reply to message #82928] |
Wed, 23 January 2013 12:27  |
abc
Messages: 46 Registered: March 2011
|
Member |
|
|
On Wednesday, January 23, 2013 5:44:19 PM UTC+1, Jeremy Bailin wrote:
> On 1/23/13 6:06 AM, idlhelp wrote:
>
>> Dear All,
>
>> 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.
>
>>
>
>> thanks
>
>>
>
>>
>
>
>
> Have you tried using INTERPOLATE?
>
>
>
> -Jeremy.
Hi Jeremy, I know that routine in IDL but how I can interpolate flux at 50K step
|
|
|
Re: interpolating flux [message #82931 is a reply to message #82930] |
Wed, 23 January 2013 12:26  |
abc
Messages: 46 Registered: March 2011
|
Member |
|
|
On Wednesday, January 23, 2013 5:15:12 PM UTC+1, Craig Markwardt wrote:
> On Wednesday, January 23, 2013 7:06:51 AM UTC-5, idlhelp wrote:
>
>> Dear All,
>
>>
>
>> 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.
>
>
>
> If it's a true black body spectrum, then consider that the spectrum can be computed exactly without interpolation.
>
> http://en.wikipedia.org/wiki/Planck%27s_law
>
>
>
> If you really want to use interpolation, I would recommend computing the ALOG10(flux) of your gridded spectra, interpolating those log-values, then converting back to flux.
>
>
>
> Craig
thanks Craig, I didn't you properly, but my question is that how can I interpolate flux of two different synthetic spectra between two different temperature for e.g 1000K and 200K at a step of 50K i.e i want to create a new synthetic spectra at temperature 150K
|
|
|
Re: interpolating flux [message #82936 is a reply to message #82931] |
Wed, 23 January 2013 08:44  |
Jeremy Bailin
Messages: 618 Registered: April 2008
|
Senior Member |
|
|
On 1/23/13 6:06 AM, idlhelp wrote:
> Dear All,
> 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.
>
> thanks
>
>
Have you tried using INTERPOLATE?
-Jeremy.
|
|
|
Re: interpolating flux [message #82938 is a reply to message #82936] |
Wed, 23 January 2013 08:15  |
Craig Markwardt
Messages: 1869 Registered: November 1996
|
Senior Member |
|
|
On Wednesday, January 23, 2013 7:06:51 AM UTC-5, idlhelp wrote:
> Dear All,
>
> 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.
If it's a true black body spectrum, then consider that the spectrum can be computed exactly without interpolation.
http://en.wikipedia.org/wiki/Planck%27s_law
If you really want to use interpolation, I would recommend computing the ALOG10(flux) of your gridded spectra, interpolating those log-values, then converting back to flux.
Craig
|
|
|