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

Home » Public Forums » archive » Plot difference
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: Plot difference [message #66344 is a reply to message #66246] Thu, 30 April 2009 18:56 Go to previous messageGo to previous message
Kenneth P. Bowman is currently offline  Kenneth P. Bowman
Messages: 585
Registered: May 2000
Senior Member
In article
<14231450-66e4-4a9b-837f-b3335d8be661@y33g2000prg.googlegroups.com>,
Jeremy Bailin <astroconst@gmail.com> wrote:

> On Apr 30, 5:24�pm, Paolo <pgri...@gmail.com> wrote:
>> On Apr 27, 3:32�pm, Giorgio <giorgiol...@gmail.com> wrote:
>>
>>
>>
>>> Hi,
>>> �From 10 measurements of a CCD camera with a size of (1293 x 840)
>>> points I calculate the mean and the standard deviation. I get
>>> different plots if I plot just the 2D data or if I rebin to make a 1D
>>> vector.
>>> Let's say that my 2D arrays for the mean is called average and the
>>> standard deviation is standard. Then the results are different if I
>>> do:
>>
>>> plot, average, standard, psym = 4
>>
>>> and
>>
>>> plot, rebin(average, N_Elements(average)), rebin(standard, n_elements
>>> (standard)), psym = 4
>>
>>> Any hint why is that?
>>
>> I don't understand what the problem is.
>>
>> a=randomn(seed,100000L) & print,total(abs(a-rebin(a,n_elements(a))))
>> shows that a and rebin(a,n_elements(a)) are identical (as they should
>> be).
>>
>> Ciao,
>> Paolo
>>
>>
>>
>>> Thanks,
>>
>>> Giorgio
>>
>>
>
> OP said it's a 2D array...
>
> IDL> seed=43l
> IDL> a = randomn(seed,100l,100l)
> IDL> b = rebin(a,n_elements(a))
> IDL> print, a[0:5]
> -0.908351 -0.440050 -0.200080 -0.260391 0.113894
> -0.456169
> IDL> print, b[0:5]
> -0.204416 -0.201433 -0.198449 -0.195465 -0.192481
> -0.189497
>
> -Jeremy.

It doesn't matter whether the arrays are 2-D or 1-D as far
as PLOT is concerned.

If you really need to make the array 1-D, use REFORM, not REBIN.
(REBIN will work if you set the /SAMPLE keyword, but that really
isn't the right tool for the job.)

Ken Bowman
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: About ‘Widget_base’
Next Topic: slope_intercept

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

Current Time: Fri Oct 10 17:08:46 PDT 2025

Total time taken to generate the page: 1.12142 seconds