Comments (13)
Abandon hope all ye who enter here
from dxtbx.
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.
Oh π€¬
This could be a problem
from dxtbx.
Looks like less of a problem because in my case it is masked
from dxtbx.
Suggest add PR to clarify definitions to imgCIF dictionary to
https://github.com/COMCIFS/imgCIF/blob/master/cif_img.dic
from dxtbx.
Then suggest here at Diamond we modify the file writing to also add an underload value to be exactly 0
from dxtbx.
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.
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.
Data are being correctly masked (still) because of the explicit pixel mask
from dxtbx.
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.
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.
TODO check this with data from Bruker imgCIF format
from dxtbx.
Also, CBF writers should continue to write undefined_value as before, adding underload, to not disrupt other software suites.
from dxtbx.
Related Issues (20)
- EIGER X 16M at SPring-8 BL41XU HOT 9
- [3.17] seems incompatible with Python 3.12 HOT 5
- [3.17] error: βuint32_tβ does not name a type HOT 2
- [3.17] : DeprecationWarning: SelectableGroups dict interface is deprecated.
- [3.17] PytestUnknownMarkWarning: Unknown pytest.mark.regression
- Support for Rigaku Arc detectors HOT 5
- Generalise support for dynamic shadowing in dxtbx HOT 1
- NXmx bugs
- `FormatEigerNXmxFilewriter.get_raw_data` fails when number of linked data files is large HOT 3
- dxtbx.format.FormatNXmxDLS16M.FormatNXmxDLS16M no longer supports legacy data without VDS
- `FormatSMVADSCmlfsom` is too promiscuous HOT 1
- dlsnxs2cbf: produces invalid files from i04-1 Eiger 9M HOT 10
- More general support for handling of hit indices
- Define what we mean by array range HOT 11
- Treat everything internally as count-from-zero
- Figure out what is needed to remove image range
- Rename get_array_range -> get_z_range HOT 1
- Create branches in dxtbx and dials to explore impacts of removing image range etc. HOT 1
- Setting `geometry.goniometer.axis=` for a multi-axis goniometer should be disallowed
- FullCBFWriter shuffles multiple panels HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dxtbx.