[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: Thu, 24 Jun 2010 11:54:03 -0700
- In-Reply-To: <4854F2500EA8C4478A508D2D92973E5206D6B610@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><4C224E02.1060304@lbl.gov><4854F2500EA8C4478A508D2D92973E5206D6B610@EXCHANGE25.fed.cclrc.ac.uk>
Hi Graeme, What would be the overall goal here? Normally within CCTBX, the return values and argument values are Python types, so instead of char * and unsigned short * we use Python string and scitbx.flex_int. It may be possible to wrap raw pointers with Boost Python such that they are treated opaquely by Python, but we don't usually use this procedure. Then again, cctbx::cbflib_adaptbx specializes the byte offset compression (optimized_byte_offset) so that integer arrays can be compressed extra fast, above what is possible with the generic low-level routine. Are we aiming here to compress non-integer types, mixing of multiple types, better performance, or something else? Best, Nick Graeme.Winter@Diamond.ac.uk wrote: > Hi Nick, > > Many thanks - this is rather quicker than my pure Python implementation > (just over two orders of magnitude!) > > Would it be straightforward to boost the lower level compression / > decompression routines? It's not clear from the cbflib docs that these > would be easily extracted - for instance: > > char * compressed = cbf_byte_offset_compress(unsigned short * array, > int nx, int ny) > > - and - > > unsigned short * array = cbf_byte_offset_decompress(char * compressed, > int nx, int ny) > > Are not really exported in a stand alone fashion? > > Still - this is *much* better than what I have right now. > > Best wishes, > > Graeme _______________________________________________ imgcif-l mailing list imgcif-l@iucr.org http://scripts.iucr.org/mailman/listinfo/imgcif-l
Reply to: [list | sender only]
- Follow-Ups:
- Re: [Imgcif-l] Reading CBF files from Python (Graeme.Winter)
- 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: Re: [Imgcif-l] Reading CBF files from Python
- Prev by thread: Re: [Imgcif-l] Reading CBF files from Python
- Next by thread: Re: [Imgcif-l] Reading CBF files from Python
- Index(es):