with automation.Manager.connect(port=10430) as manager:
device_config = automation.LogicDeviceConfiguration(enabled_analog_channels=[0],analog_sample_rate=3_125_000)
capture_config = automation.CaptureConfiguration(capture_mode=automation.TimedCaptureMode(duration_seconds=0.00025))
with manager.start_capture(device_id='F4241',device_configuration=device_config,capture_configuration=capture_config) as capture:
capture.wait()
output_dir = os.path.join(os.getcwd(), f'output-{datetime.now().strftime("%Y-%m-%d_%H-%M-%S")}')
os.makedirs(output_dir)
capture.export_raw_data_csv(directory=output_dir, analog_channels=[0])
Hi, I am trying to capture 250uS at 3.125MS/s analog signal using the python api on the logic pro 16. I’m following the getting started guide and using the demo device to export a csv but the csv has 218449 entries and the time data goes up to 69.92ms. Also there seems to be multiple amplitude data points per time. Is there a minimum amount of time you must record? I am trying to keep the file size small.
I saw there is a 100ms minimum in the gui so I tried changing TimedCaptureMode(duration_seconds=0.1) but it is still giving me too many samples. The new csv was 436905 samples * 1/3125000 = 0.1398096 seconds