device.magnets_probes module¶
- class device.magnets_probes.MagnetsProbes(buses, **kwargs)[source]¶
Bases:
HardwareBaseSet of 8 Arduino based measuring instruments (magnets experiment).
- Parameters:
list (buses) – specify the 8 names (str) of serial buses where Arduinos are connected, e.g.
/dev/ttyUSB0
Communication:
serial interface to 8+1 Arduino devices
this class mainly takes care of measurement sync between the 8+1 probes
- ALL_IDS = ['1', '2', '3', '4', '5', '6', '7', '8', '9']¶
- measure(device_client, duration, dt)[source]¶
Trigger a short synchronized measurement using all probes. Data is saved to file and emitted to server.
Estimated error in time-sync between probes = 0.5ms
Time resolution ~ 0.1ms
Signal resolution ~ 0.0006
- Parameters:
duration (float) – total duration of measurement [s], note that there is an upper limit 20_000 samples
dt (float) – time between two samples [s], minimal is 1ms
- measure_single()[source]¶
Measure one sample on each probe. Returns numpy array containing integrated and raw value for each probe, shape=(8, 2). Order of the probes corresponds to the property
probe_ids.Note
This method is useful mainly for realtime plotting and does not guarantee best precision (time-sync, sampling rate). See measure().
- property probe_ids¶