Giter VIP home page Giter VIP logo

Comments (13)

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

Abandon hope all ye who enter here

from dxtbx.

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

Chatting with @phyy-nx about this now

I note from some data from Pilatus on i19-2

loop_
_array_intensities.array_id
_array_intensities.binary_id
_array_intensities.linearity
_array_intensities.gain
_array_intensities.gain_esd
_array_intensities.overload
_array_intensities.undefined_value
ARRAY1 1 linear 1.0 . 118028 -1

from dxtbx.

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

Oh 🀬

This could be a problem

from dxtbx.

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

Screenshot 2022-09-23 at 16 15 31

Looks like less of a problem because in my case it is masked

from dxtbx.

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

Suggest add PR to clarify definitions to imgCIF dictionary to

https://github.com/COMCIFS/imgCIF/blob/master/cif_img.dic

from dxtbx.

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

Then suggest here at Diamond we modify the file writing to also add an underload value to be exactly 0

from dxtbx.

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

Aha! Mask above exists because

def determine_pilatus_mask(xdetector):
    """Return an appropriate pixel mask for a Pilatus detector."""

    size = xdetector[0].get_image_size()

    # Hardcoded module size and gap size
    detector = _DetectorDatabase["Pilatus"]

    # Edge dead areas not included, only gaps between modules matter
    n_fast, remainder = divmod(size[0], detector.module_size_fast)
    assert (n_fast - 1) * detector.gap_fast == remainder

    n_slow, remainder = divmod(size[1], detector.module_size_slow)
    assert (n_slow - 1) * detector.gap_slow == remainder

    # Specify the dead areas between the modules, i.e. the rows and columns
    # where there are no active pixels
    mask = []
    for i_fast in range(n_fast - 1):
        mask.append(
            [
                (i_fast + 1) * detector.module_size_fast
                + i_fast * detector.gap_fast
                + 1,
                (i_fast + 1) * detector.module_size_fast
                + i_fast * detector.gap_fast
                + detector.gap_fast,
                1,
                size[1],
            ]
        )
    for i_slow in range(n_slow - 1):
        mask.append(
            [
                1,
                size[0],
                (i_slow + 1) * detector.module_size_slow
                + i_slow * detector.gap_slow
                + 1,
                (i_slow + 1) * detector.module_size_slow
                + i_slow * detector.gap_slow
                + detector.gap_slow,
            ]
        )

    return mask

from dxtbx.

phyy-nx avatar phyy-nx commented on August 30, 2024

Then suggest here at Diamond we modify the file writing to also add an underload value to be exactly 0

Agree, and considering the same for writing images in cbf_writer.py

from dxtbx.

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

Screenshot 2022-09-23 at 16 26 26

Data are being correctly masked (still) because of the explicit pixel mask

from dxtbx.

phyy-nx avatar phyy-nx commented on August 30, 2024

Searching shows that function used in these format classes:
FormatCBFMiniPilatus.py
FormatCBFMiniADSCHF4M.py
FormatCBFFullPilatus.py
Presumably anything derived from those classes. So anything else deriving from FormatCBFFull will be affected.

from dxtbx.

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

Propose:

  • patch imgCIF dictionary
  • add putative function to fetch it
  • fail gracefully as suggested by @phyy-nx
  • GW add to Diamond imgCIF templates

from dxtbx.

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

TODO check this with data from Bruker imgCIF format

from dxtbx.

phyy-nx avatar phyy-nx commented on August 30, 2024

Also, CBF writers should continue to write undefined_value as before, adding underload, to not disrupt other software suites.

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.