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

Home » Public Forums » archive » How to average every nth data?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
How to average every nth data? [message #73400] Thu, 04 November 2010 10:53 Go to next message
beardown911 is currently offline  beardown911
Messages: 21
Registered: March 2007
Junior Member
Dear Gurus,

Hope someone will help me how to figure this out.
I've been keep trying to do some spectral resampling (just simple
average) with ASD data.
ASD data is a two dimensional array;

wavelength data
350 0.001146
351 0.001176
352 0.001147
. .
. .
. .
2500 0.0004311

What I've been trying to do is averaging every nth data values and
rewrite into a new array.
For example, if I want to average every 3rd data values, the resulting
array will be

350 0.001150
353 0.001147
and so on.

MS excel seems to be able to handle it, but it wouldn't be a good idea
for processing several hundres files.

I really appreciate if someone could give me tip(s).

Thanks,
Kim
Re: How to average every nth data? [message #73451 is a reply to message #73400] Sat, 06 November 2010 06:37 Go to previous message
MC is currently offline  MC
Messages: 50
Registered: September 1996
Member
Just a thought, is there an aliasing risk in the resulting decimated
spectrum (decimation can break the Nyquist sampling theorem)? If you
just want to reduce data size/spectral resolution, rebin (or congrid)
could be used which will also reduce noise.

Cheers

On Nov 5, 6:53 am, go cats <beardown...@gmail.com> wrote:
> Dear Gurus,
>
> Hope someone will help me how to figure this out.
> I've been keep trying to do some spectral resampling (just simple
> average) with ASD data.
> ASD data is a two dimensional array;
>
> wavelength    data
> 350             0.001146
> 351             0.001176
> 352             0.001147
>   .                      .
>   .                      .
>   .                      .
> 2500           0.0004311
>
> What I've been trying to do is averaging every nth data values and
> rewrite into a new array.
> For example, if I want to average every 3rd data values, the resulting
> array will be
>
> 350            0.001150
> 353            0.001147
> and so on.
>
> MS excel seems to be able to handle it, but it wouldn't be a good idea
> for processing several hundres files.
>
> I really appreciate if someone could give me tip(s).
>
> Thanks,
> Kim
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: ARROW in IDL 8.0.1
Next Topic: UK and US dollars earn in simple way

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

Current Time: Wed Oct 08 11:32:37 PDT 2025

Total time taken to generate the page: 0.00454 seconds