Signed and unsigned integer problem [message #10037] |
Tue, 07 October 1997 00:00  |
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> </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  |
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  |
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
|
|
|