Coder Social home page Coder Social logo

Improve Bruker format readers about dxtbx HOT 6 OPEN

cctbx avatar cctbx commented on August 30, 2024
Improve Bruker format readers

from dxtbx.

Comments (6)

dagewa avatar dagewa commented on August 30, 2024

Here are some additional questions and answers from Arnaud and Bruker, specifically about the Photon II:

How is the beam center dealt with? It seems that in the header only the offsets of the beam center at 2theta=0 are saved. Could you explain?

The CENTER is the pixel value that corresponds to the values on ANGLES. RAW and UNWARP values are on this line. For a detector that doesn’t need a spatial correction, he values are h same.

Could you explain as well how works the "Adaptive oversampling"? I guess this is to increase the dynamic range to 163810?

I believe that "Adaptive oversampling" refers to the retake images that was done on CCD detectors. Doesn’t apply to CMOS. CMOS frames have 16381 dynamic range and we read ten images per frame.

If the pixel values are coded in 2 bytes how come the max value is 163810?

With 10 images of 16-bits, the final frame is 19-bits. Round it up to 2 bytes.

from dxtbx.

graeme-winter avatar graeme-winter commented on August 30, 2024

Did Arnaud send an example set?

from dxtbx.

dagewa avatar dagewa commented on August 30, 2024

We have the sources for FrmUtility now from Bruker (email to dials-support). From the readme:

Getting Started:

A good place to start is with these source files and routines:

FrmRoutines.cpp: see ReadFrameFile() and SaveFrameFile() routines.
Frm2Frm\frm_lib.c & frm_lib.h: see basically the entire files.

And some general documentation for the Bruker Frame File format is:

help\BISFrameFileFormats.rtf

from dxtbx.

dagewa avatar dagewa commented on August 30, 2024

"One caveat. FrmUtility was written before Bruker supported double frame data. Double frame data is either multiplied by 10 or 1000 and written as integers. I would convert all frames to doubles (apply LINEAR and baseline). See PDF file sent earlier."

from dxtbx.

dagewa avatar dagewa commented on August 30, 2024

I have some more example images from a Photon II detector from Andrew Purkiss, shared here with permission. PhotonII_images.tar.gz

The image matrix_01_0001.sfrm hangs dials.image_viewer or dxtbx.print_header, whilst LT1_CRUK006_10_01_0001.sfrm is fine. It seems this is due to the BrukerImage class, which sets the detectorbase for this format:
https://github.com/cctbx/cctbx_project/blob/master/dxtbx/format/FormatBrukerPhotonII.py#L70

FormatBrukerPhotonII works around deficiencies in FormatBruker (as discussed above), in such a way that the BrukerImage code is not needed (at least not required for get_raw_data). If the detectorbase line is removed, images from this detector can be processed.

However, that would be masking the problem. The real issue is that FormatBruker and BrukerImage cannot support the Photon II, at the very least because they hardcode the assumption of 1024*1024 pixel images. I had a look at the code, but haven't worked out how to fix it yet. This might need input from @nksauter. I think we have enough information now about the Bruker format (see zip file linked to above) to implement complete support for Bruker detectors, in either "86" or "100" format.

from dxtbx.

dagewa avatar dagewa commented on August 30, 2024

I should note, this is not time critical, but we do want to keep this on the radar. It seems to be possible to process most Photon II images fine. These matrix_*sfrm images are collected as part of the indexing procedure rather than full data collection.

from dxtbx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.