I am working on a script to automate the capturing process. Is there a way to export a saved digital measurement to csv file? Instead of calculating the duty cycle, frequency and all that on my own for a exported csv file, it would be wonderful if Python API has similar functionality that would expedite my analysis process.
Hi Jay, thanks for the great question - and welcome!
Is this right?
- automatically take a capture
- automatically compute frequency and duty cycle (over many cycles)
- automatically save this in a file
This is an important set of use cases we’ll want to comprehensively cover in the next generation software.
Given the 1.X API, I’m not immediately sure if it’s possible - as soon as Mark gets in I’ll have him reply here as well.
Thank you for reviewing my question.
What I was able to do so far utilizing your Python 1.X API:
- Start capturing of a trace to a file with given script arguments
- Export raw data to a csv file
What I wondering is does the API have the capability of exporting the saved instantaneous measurements? I looked through but couldn’t find anything in API but I am not sure whether I missed it. The boxed measurement is what I am referring to as a saved instantaneous measurement.
Thank you very much,
Good suggestion. We don’t currently have the feature to add or export measurements from the 1.x software, and we haven’t started working on the APIs for the new software yet.
What interface would you like in this case?
The last thing we added to the 1.x API was the ability to query the range of data recorded, and then control the viewport coordinates (pan and zoom level) with other API functions.
My original thought with the old software’s API is that any analysis of the recorded data would probably be done by automating the export so that users could perform their own calculations directly on the exported data.
Would your preference be to instead provide API control over all of the software main features, so that interactions like adding a measurement over a specific time range and channel could be automated?
We’re still discussing here at Saleae weather the new software should have a similar “UI layer” automation like the old app (socket commands basically triggered UI controls) or if we should have a simpler CLI like tool that just covered the basics (record, export, analyzers, etc) without the UI or any of its features.
Hi Mark, thank you for the reply. I will try out those API functions that you mentioned in the post.
I would not mine regarding UI layer automation as I don’t see a big chuck of memory being used by it even if I have a captured trace opened up. I really appreciate your current API support as is and excited to try out 2.x.
Thank you for your support!