Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion XDR format files

Received: by 10.224.97.199 with SMTP id m7mr2775063qan.5.1350997268154;
        Tue, 23 Oct 2012 06:01:08 -0700 (PDT)
Received: by 10.52.91.168 with SMTP id cf8mr1940990vdb.6.1350997268089; Tue,
 23 Oct 2012 06:01:08 -0700 (PDT)
Path: r17ni57592152qap.0!nntp.google.com!x14no5406521qar.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups: comp.lang.idl-pvwave
Date: Tue, 23 Oct 2012 06:01:07 -0700 (PDT)
In-Reply-To: <5ade04fc-e48a-492d-8067-f2b3e3d84389@googlegroups.com>
Complaints-To: groups-abuse@google.com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=108.45.112.170;
 posting-account=xaPT4goAAACPFOMdsGRF4C3DoVQEk4xk
NNTP-Posting-Host: 108.45.112.170
References: <b5c45bad-73ef-4d70-920a-18c0d1dcca0b@googlegroups.com>
 <6628c2d8-270c-46b0-b00b-6339699e3f95@googlegroups.com> <5ade04fc-e48a-492d-8067-f2b3e3d84389@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <ad1a7a11-dce8-411a-af6f-c124de3335c5@googlegroups.com>
Subject: Re: XDR format files
From: wlandsman <wlands...@gmail.com>
Injection-Date: Tue, 23 Oct 2012 13:01:08 +0000
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

You can open it using the /XDR keyword to OPENU

But XDR merely specifies the byte order (big endian but using a minimum of =
4 bytes for every data type).    It doesn't tell you anything about how the=
 file is organized, or what its contents are.      You need to know (or tel=
l us) more about the file to read it.        --Wayne


On Tuesday, October 23, 2012 5:29:37 AM UTC-4, sid wrote:
> On Monday, October 22, 2012 2:49:58 PM UTC+5:30, Helder wrote:
>=20
> > On Monday, October 22, 2012 10:50:09 AM UTC+2, sid wrote:
>=20
> >=20
>=20
> > > Hi all,
>=20
> >=20
>=20
> > >=20
>=20
> >=20
>=20
> > >       Please let me know how to open a xdr format file.
>=20
> >=20
>=20
> > >=20
>=20
> >=20
>=20
> > > I dont know the data type and size of the file. So I couldnt use the =
READU command.
>=20
> >=20
>=20
> > >=20
>=20
> >=20
>=20
> > > Please do help out in this regard.
>=20
> >=20
>=20
> > >=20
>=20
> >=20
>=20
> > > thanking you in advance.
>=20
> >=20
>=20
> > >=20
>=20
> >=20
>=20
> > > sid
>=20
> >=20
>=20
> >=20
>=20
> >=20
>=20
> > Hi,
>=20
> >=20
>=20
> > as far as I could see, xrd file are ascii files for x-ray diffraction w=
ith a header and the last line contains the "0 0 0" reflection.
>=20
> >=20
>=20
> > Then you have at least two options:
>=20
> >=20
>=20
> > 1) you loop until you find the end line or the end of the file. The hea=
der lines start with a "[" and the data lines are composed of four numbers:=
 hkl (Miller indices) and intensity. After you define the Line variable as =
a string (line=3D''), you may read each line with the command:
>=20
> >=20
>=20
> > readf, Lun, Line
>=20
> >=20
>=20
> > Then check for the "[" character. If present, then it's header, otherwi=
se not.
>=20
> >=20
>=20
> >=20
>=20
> >=20
>=20
> > 2) The other option is to cound the number of header lines and the numb=
er of lines in the file by using the FILE_LINES(FileName) function. Then yo=
u can create an array or structure with the correct dimensions. Something l=
ike:
>=20
> >=20
>=20
> > Reflex =3D REPLICATE({h:0,k:0,l:0,Intensity:0.0},FILE_LINES(XRD_FileNam=
e)-nHeaderLines-1)
>=20
> >=20
>=20
> > And then you fill in the values.
>=20
> >=20
>=20
> >=20
>=20
> >=20
>=20
> > Once you read a line, you can use the STRSPLIT(Line, /EXTRACT) function=
 to get an array of four elements where the first three are Miller indices =
and the fourth is an intensity.
>=20
> >=20
>=20
> >=20
>=20
> >=20
>=20
> > I hope this helps.
>=20
> >=20
>=20
> >=20
>=20
> >=20
>=20
> > Cheers,
>=20
> >=20
>=20
> > Helder
>=20
>=20
>=20
> Hello sir,
>=20
>          The file which I am having is XDR(external data representation) =
files. Please let me know how to open this kid of file.
>=20
> thank you
>=20
> sid