-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add merlin detector mask #61
Comments
Sure, I have no idea what merlin detector mask looks like. Can you provide me with the associated mask? |
i just added it as following (the gap are eliminated automatically in my data)
|
Hi, do you mean that when you give the path to your mask that you made during the experiment, it does not work ? |
class MerlinSixS(Detector):
"""Implementation of the Merlin detector for SixS."""
def __init__(self, name, **kwargs):
super().__init__(name=name, **kwargs)
self.saturation_threshold = 1e6
def _mask_gaps(self, data, mask):
"""
Mask the gaps between sensors in the detector.
:param data: a 2D numpy array
:param mask: a 2D numpy array of the same shape as data
:return:
- the masked data
- the updated mask
"""
valid.valid_ndarray(
(data, mask), ndim=2, shape=self.unbinned_pixel_number, fix_shape=True
)
data[:, 254:257] = 0
data[254:257, :] = 0
mask[:, 254:257] = 1
mask[254:257, :] = 1
return data, mask
@property
def unbinned_pixel_number(self):
"""
Define the number of pixels of the unbinned detector.
Convention: (vertical, horizontal)
"""
return 512, 512
@property
def unbinned_pixel_size(self):
"""Pixel size (vertical, horizontal) of the unbinned detector in meters."""
return 55e-06, 55e-06 see this code for used for the bcdi package, it's a specific Merlin configuration |
In both case if the mask given ior not it do get_mask function where the mask is defined list of detectors. The snipped code must do the job. |
Done. |
The merlin detector of SixS is not in the list.
https://github.com/clatlan/cdiutils/blob/8f573d2d47cbbb508c4f228afcece7caa4d494ef/cdiutils/load/loader.py#L232C1-L232C72
The text was updated successfully, but these errors were encountered: