[Imgcif-l] Reading CBF file headers from Python with PyCifRW

James Hester jamesrhester at gmail.com
Wed Jul 14 14:10:14 BST 2010


I'm glad you like PyCifRW...but at the moment it won't play well with cbf,
as it is expecting pure ASCII for all tokens.  I'll look into graceful
handling of syntax errors, so you at least get back anything that has been
successfully parsed.

I once thought it might be nice if PyCIFRW could deal with imgCIF and CBF
files, but quickly realised that I would need to be using a C library for
speed and would thus have issues distributing it in a uniform cross-platform
manner.

On Wed, Jul 14, 2010 at 5:49 PM, <Graeme.Winter at diamond.ac.uk> wrote:

> Hi Folks,
>
> Has anyone tried reading cbf files with PyCifRW? It appears to cope fine
> with the "real" cif at the top but then chokes when it hits the binary
> data. I'd like to be able to just read the cif describing the
> experiment, so in theory there should be a way to do this. If I copy out
> just the cif into another file it works fine.
>
> Thing is, I don't want to copy the cif out to read it when I want to
> parse every header in a data set :o) - has anyone a workaround for this?
>
>
> I like PyCifRW as it's included in cctbx and works just fine. The pycbf
> isn't built by default :o(
>
> Thanks,
>
> Graeme
>
>
>
> Dr. Graeme Winter
> Software and MX Support Scientist
> Diamond Light Source
>
> +44 1235 778091 (work)
> +44 7786 662784 (work mobile)
>
>
>
>
>
> --
>
> This e-mail and any attachments may contain confidential, copyright and or
> privileged material, and are for the use of the intended addressee only. If
> you are not the intended addressee or an authorised recipient of the
> addressee please notify us of receipt by returning the e-mail and do not
> use, copy, retain, distribute or disclose the information in or attached to
> the e-mail.
>
> Any opinions expressed within this e-mail are those of the individual and
> not necessarily of Diamond Light Source Ltd.
>
> Diamond Light Source Ltd. cannot guarantee that this e-mail or any
> attachments are free from viruses and we cannot accept liability for any
> damage which you may sustain as a result of software viruses which may be
> transmitted in or with the message.
>
> Diamond Light Source Limited (company no. 4375679). Registered in England
> and Wales with its registered office at Diamond House, Harwell Science and
> Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom
>
>
>
>
>
>
>
>
>
> _______________________________________________
> imgcif-l mailing list
> imgcif-l at iucr.org
> http://scripts.iucr.org/mailman/listinfo/imgcif-l
>



-- 
T +61 (02) 9717 9907
F +61 (02) 9717 3145
M +61 (04) 0249 4148


More information about the imgcif-l mailing list