Skip to content

Commit

Permalink
Fix JUNGFRAU raw vs proc keys in mock data
Browse files Browse the repository at this point in the history
  • Loading branch information
takluyver committed Dec 1, 2023
1 parent 5ca44f2 commit d7af253
Showing 1 changed file with 17 additions and 8 deletions.
25 changes: 17 additions & 8 deletions extra_data/tests/mockdata/jungfrau.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,23 @@
class JUNGFRAUModule(DeviceBase):
output_channels = ('daqOutput/data',)

instrument_keys = [
('adc', 'u2', (16, 512, 1024)),
('frameNumber', 'u8', (16,)),
('gain', 'u1', (16, 512, 1024)),
('mask', 'u2', (16, 512, 1024)),
('memoryCell', 'u1', (16,)),
('timestamp', 'f8', (16,)),
]
def __init__(self, device_id, nsamples=None, raw=False):
super().__init__(device_id, nsamples)
self.raw = raw

@property
def instrument_keys(self):
return [
('frameNumber', 'u8', (16,)),
('gain', 'u1', (16, 512, 1024)),
('memoryCell', 'u1', (16,)),
('timestamp', 'f8', (16,)),
] + ([
('adc', 'u2', (16, 512, 1024)),
] if self.raw else [
('adc', 'f4', (16, 512, 1024)),
('mask', 'u4', (16, 512, 1024)),
])

class JUNGFRAUControl(DeviceBase):
control_keys = [
Expand Down

0 comments on commit d7af253

Please sign in to comment.