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

Home » Public Forums » archive » Signed and unsigned integer problem
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
Signed and unsigned integer problem [message #10037] Tue, 07 October 1997 00:00 Go to next message
Alexei Chirokikh is currently offline  Alexei Chirokikh
Messages: 4
Registered: September 1997
Junior Member
This is a multi-part message in MIME format.

------=_NextPart_000_000F_01BCD336.752C8D40
Content-Type: text/plain;
charset="koi8-r"
Content-Transfer-Encoding: quoted-printable

Hi, all
I have data file which is in unsigned integer format. How can I properly =
read in PV-Wave?

--
AC

------=_NextPart_000_000F_01BCD336.752C8D40
Content-Type: text/html;
charset="koi8-r"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD W3 HTML//EN">
<HTML>
<HEAD>

<META content=3Dtext/html;charset=3Dkoi8-r http-equiv=3DContent-Type>
<META content=3D'"MSHTML 4.71.1712.3"' name=3DGENERATOR>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT color=3D#000000 size=3D2>Hi, all</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>I have data file which is in =
unsigned integer=20
format. How can I properly read in PV-Wave?</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT color=3D#000000 size=3D2>--</FONT></DIV>
<DIV><FONT color=3D#000000 size=3D2>AC</FONT></DIV></BODY></HTML>

------=_NextPart_000_000F_01BCD336.752C8D40--
Re: Signed and unsigned integer problem [message #10168 is a reply to message #10037] Thu, 09 October 1997 00:00 Go to previous message
Alexei Chirokikh is currently offline  Alexei Chirokikh
Messages: 4
Registered: September 1997
Junior Member
Thanks a lot. It works.

Bernd Aberle wrote in message <343CA459.7D25@dfd.dlr.de>...
> Alexei Chirokikh wrote:
>>
>> Hi, all
>> I have data file which is in unsigned integer format. How can I
>> properly read in PV-Wave?
>>
>> --
>> AC
>
> I don't have PV-Wave, but in IDL you could read the data as signed
> integer and convert all data to long, but like this :
> data_long = long(data_short and '0000ffff'X)
> so that the long data is positiv.
>
> E.g.:
> IDL> print,long(-1 and '0000ffff'X)
> 65535
Re: Signed and unsigned integer problem [message #10171 is a reply to message #10037] Thu, 09 October 1997 00:00 Go to previous message
Bernd Aberle is currently offline  Bernd Aberle
Messages: 2
Registered: September 1997
Junior Member
Alexei Chirokikh wrote:
>
> Hi, all
> I have data file which is in unsigned integer format. How can I
> properly read in PV-Wave?
>
> --
> AC

I don't have PV-Wave, but in IDL you could read the data as signed
integer and convert all data to long, but like this :
data_long = long(data_short and '0000ffff'X)
so that the long data is positiv.

E.g.:
IDL> print,long(-1 and '0000ffff'X)
65535
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: GMT generated netCDF grid files and IDL
Next Topic: running IDL/ENVI on Apple PowerBook 3400c?

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

Current Time: Wed Oct 08 18:13:37 PDT 2025

Total time taken to generate the page: 0.00517 seconds