Jump to content

Pulling data from several capsules within a specified time frame


Recommended Posts

Posted (edited)

Hi,

I'm trying to configure a pull with specified time bounds and that has several capsules of interest. Ideally I'd like to only pull data within the capsule instead of pulling the capsule/condition value and my signal of interest (as samples) then filtering when the condition is met. Is there a straightforward way to do this? Thanks

 

For reference my pull currently/generically looks like this:

data = spy.pull(Signal_and_Condition,
         start=StartTime_tmp, end=EndTime_tmp,
         header='Name', grid='1s',quiet = True)

 

And the return, as expected, is a dataframe of samples with columns for my signal (data) and condition (boolean)

Edited by Matt Kiesz
  • Seeq Team
Posted

The simplest way to achieve this with SPy is as you're doing it now -- pull both at the same time, and then filter using the condition column that's returned.

Your two other options would be to:

  • Pull the condition first, and then do individual pulls on ranges given by the capsules
  • Use formula to do $signal.within($condition), and then pull the filtered signal

What's your primary driver? Simplicity or performance?

Posted

the primary is performance. The data might have several dozen - ~100 capsules, so the first alternative option is probably prohibitive, but the second might work. Will try. Thanks

  • 2 months later...
Posted

I also had this problem and what I do is first apply a filter in workbook using the within formula:

// Step 1: Filter the signal to keep only data within the condition
$filtered_signal = $signal.within($condition)

// Output
return $filtered_signal

 

 

by asking this to the AI assistant when all your relevant signals are selected it's just a matter of giving it a few minutes.

The output will be simply pulling this signal over the entire period of time, the good thing is it will only pull data when you have a condition.
To me this looks like a much better solution, especially if we are talking about 3 hours of data across a period of 1 year for example.

 

but I also vote for a feature request where you can just identify the condition where you want to pull the signal data from to avoid unnecessary load 🙂

 

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...