[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Reply to: [list | sender only]
Re: [Imgcif-l] Reading CBF files from Python
- To: The Crystallographic Binary File and its imgCIF application to image data <imgcif-l@iucr.org>
- Subject: Re: [Imgcif-l] Reading CBF files from Python
- From: "Nicholas K. Sauter" <nksauter@lbl.gov>
- Date: Wed, 23 Jun 2010 11:13:54 -0700
- In-Reply-To: <4854F2500EA8C4478A508D2D92973E5207CD5958@EXCHANGE25.fed.cclrc.ac.uk>
- References: <4854F2500EA8C4478A508D2D92973E5206D6B5F9@EXCHANGE25.fed.cclrc.ac.uk><4C1F2B5C.30400@esrf.fr><4854F2500EA8C4478A508D2D92973E5206D6B5FA@EXCHANGE25.fed.cclrc.ac.uk><4C1F8A65.2020504@lbl.gov><4854F2500EA8C4478A508D2D92973E5206D6B604@EXCHANGE25.fed.cclrc.ac.uk><4C20DB8C.8020507@lbl.gov><4854F2500EA8C4478A508D2D92973E5207CD5958@EXCHANGE25.fed.cclrc.ac.uk>
Graeme, Just found this myself. The trick is adding the following line to the top of the file: from scitbx.array_family import flex Note to self: reorganize the cbflib_adaptbx so that this import is done transparently. Nick Graeme.Winter@Diamond.ac.uk wrote: > Hi Nick, > > Not sure I have things built quite right then: > > [gw56@ws050 tmp]$ labelit.python > Python 2.6.5 (r265_cci:79063, Jun 2 2010, 06:13:15) > [GCC 4.1.2 20080704 (Red Hat 4.1.2-48)] on linux2 > Type "help", "copyright", "credits" or "license" for more information. > >>>> from cbflib_ext import MiniCBFAdaptor >>>> a = MiniCBFAdaptor("image.cbf") >>>> r = a.optimized_read_data(3072, 3072) >>>> > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > TypeError: No to_python (by-value) converter found for C++ type: scitbx::af::versa<int, scitbx::af::flex_grid<scitbx::af::small<long, 10u> > > > > However, API's such as this would be just the ticket. The tricky thing about the compression will of course be constructing all of the rest of the CBF structure around it.... > > Best wishes, > > Graeme > _______________________________________________ imgcif-l mailing list imgcif-l@iucr.org http://scripts.iucr.org/mailman/listinfo/imgcif-l
Reply to: [list | sender only]
- References:
- [Imgcif-l] Reading CBF files from Python (Graeme.Winter)
- Re: [Imgcif-l] Reading CBF files from Python (Jon Wright)
- Re: [Imgcif-l] Reading CBF files from Python (Graeme.Winter)
- Re: [Imgcif-l] Reading CBF files from Python (Nicholas K. Sauter)
- Re: [Imgcif-l] Reading CBF files from Python (Graeme.Winter)
- Re: [Imgcif-l] Reading CBF files from Python (Nicholas K. Sauter)
- Re: [Imgcif-l] Reading CBF files from Python (Graeme.Winter)
- Prev by Date: Re: [Imgcif-l] Reading CBF files from Python
- Next by Date: [Imgcif-l] Updates to CBFlib 0.9.0
- Prev by thread: Re: [Imgcif-l] Reading CBF files from Python
- Next by thread: Re: [Imgcif-l] Reading CBF files from Python
- Index(es):