Mec producer cleanup, XTCAV & droplet additions#275
Mec producer cleanup, XTCAV & droplet additions#275silkenelson wants to merge 5 commits intomasterfrom
Conversation
…nothing that needs user files to exist!
| def __init__(self, det, env, run, **kwargs): | ||
| super(CameraObject, self).__init__(det, env, run, **kwargs) | ||
| self._common_mode_list = [0, -1, 30] # none, raw, calib | ||
| self._common_mode_list = [0, -1, 30, 40] # none, raw, calib |
There was a problem hiding this comment.
Can we add some doc on what these are, in particular the new 40?
I generally don't like these seemingly random number for this, but I guess this is historical at this point...
There was a problem hiding this comment.
40 means you will provide the cmpars for det.calib. Originally the single numbers were there to combined hand-written modes with modes that use the standard code with particular cmpars. Not sure what else should have been done here (or maybe also in the future????)
| return f"{directory}{background}" | ||
|
|
||
|
|
||
| def duration(x, interval): |
There was a problem hiding this comment.
Add a little documentation on what this does exactly. It is not very clear what x is expected to be
| dur = np.cumsum(x) | ||
| dur = dur / dur[-1] | ||
| idxlow = abs(np.argmin(abs(dur - interval[0]))) | ||
| idxhigh = abs(np.argmin(abs(dur - interval[1]))) |
There was a problem hiding this comment.
Why is "abs" needed? argmin will always return a positive number
There was a problem hiding this comment.
Good point. I think this is user code that I just shoved in here.
| try: | ||
| self.statusMask = self.det.mask(self.run, status=True) | ||
| self.mask = self.det.mask( | ||
| self.statusMask = self.det.mask_v2(self.run, status=True) |
There was a problem hiding this comment.
Can you tell more about the new mask format in the PR?
clean up of MEC producer
add XTCAV duration calculation
add fill fraction of event to droplet
add sparsified saving of pixels for 2-threshold photon to droplet