X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 14 Mar 2006 12:04 PM by  anon
Data shows up as flat line in WIDGET_DRAW item
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
14 Mar 2006 12:04 PM
    I have a WIDGET_DRAW item that is defined by: top = Widget_Draw(profiles, xs=560, ys=135) When plotting data that has 32768 items or less the data plots fine. When plotting data that has 32769 items or greater the data just appears as a flat line. The data is of type short(dont know if this matters). Is 32768 a magic number that has something to do with the size of a short int? How can I fix this?

    Deleted User



    New Member


    Posts:
    New Member


    --
    14 Mar 2006 12:04 PM
    I think you will see the way your plot is interpreting your data if you type at your IDL command prompt: IDL> PRINT, FIX(32769) ; convert 32769L to a signed short integer You will see that many, if not all, of your data values > 32768 are interpreted as negative numbers. (And, in all cases, they would be values mush smaller than the value you would expect.) I do not know how you have set up your IDL program to acquire and store this NON-short-integer data. However, if the data values are bigger than what would fit in a 16-bit integer "short" (the IDL "default" for integer data), then you should take steps to store it in a larger datatype. Your INT's should be LONGs, your INTARR's then should preferably be initialized as LONARR's, and any conversion function you use should be LONG( ) instead of FIX ( ). James Jones
    You are not authorized to post a reply.