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.66.84.34 with SMTP id v2mr468628pay.38.1350984577668;
        Tue, 23 Oct 2012 02:29:37 -0700 (PDT)
Received: by 10.68.230.33 with SMTP id sv1mr3386418pbc.18.1350984577653; Tue,
 23 Oct 2012 02:29:37 -0700 (PDT)
Path: s9ni23372pbb.0!nntp.google.com!kr7no8105970pbb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
Newsgroups: comp.lang.idl-pvwave
Date: Tue, 23 Oct 2012 02:29:37 -0700 (PDT)
In-Reply-To: <6628c2d8-270c-46b0-b00b-6339699e3f95@googlegroups.com>
Complaints-To: groups-abuse@google.com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=124.30.128.132;
 posting-account=F_h8PgoAAAByyz8kjnBLgC1wUma36yQB
NNTP-Posting-Host: 124.30.128.132
References: <b5c45bad-73ef-4d70-920a-18c0d1dcca0b@googlegroups.com> <6628c2d8-270c-46b0-b00b-6339699e3f95@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <5ade04fc-e48a-492d-8067-f2b3e3d84389@googlegroups.com>
Subject: Re: XDR format files
From: sid <gunvicsi...@gmail.com>
Injection-Date: Tue, 23 Oct 2012 09:29:37 +0000
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

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

Hello sir,
         The file which I am having is XDR(external data representation) fi=
les. Please let me know how to open this kid of file.
thank you
sid