Jump to content

Ryan Patet

Members
  • Posts

    4
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Ryan Patet

  1. I have used DataLab to create and push Conditions in a Workbook based on signal properties. I am not pushing this in as a formula, but rather using Start and End times calculated in DataLab.

    In developing my code, I've ended up with multiple Conditions with the same name. I can ultimately find the correct one which I pushed in, but would like to "Delete" or "Archive" those incorrect Conditions.

    I have been able to achieve this with Signals by setting the Archived parameter to True. I would like to do the equivalent for my conditions. My attempt, which does not seem to be working, is as follows:

    condition_df = spy.search('worksheet_url')
    condition_df.set_index('Name', inplace=True, drop=False)
    condition_df['Maximum Duration'] = '1mo'
    condition_df['Archived'] = True

    spy.push(metadata=condition_df,
             replace={'Start': start_time, 'End':  end_time},
             workbook=workbook_id)

    This deletes all capsules in my date range, but if I search for my conditions in the Data tab, the attempt to archive these conditions does not seem to have worked.

  2. I am using Seeq DataLab to pull in data from multiple processing units running in parallel. I am assessing the states of each of these units, and building a set of capsules for when each individual unit is running. I then am pushing these capsules as a condition back into a workbook.

    I am able to successfully achieve this using a for loop and using separate data pushes for each unit. I find that the time for the data to push back to the Workbook takes the longest, and was curious to see if I could do one large push of Conditions for all unit ops at once, rather than having to do separate pushes for each unit? I have done this for multiple Signals in the past, but cannot find documentation for a way to do it with multiple Conditions.

    Below is a concatenated version of the code I am currently running using the for loops:

    for index in range(len(state)):

    ...
         capsule_bounds = pd.DataFrame({'Capsule Start': start_list, 'Capsule End': end_list, 'Batch ID': batch_id_list})

         spy.push(data=capsule_bounds,
                         metadata=pd.DataFrame([{
                                           'Name': 'Unit '+[index]+' Condition',
                                           'Type': 'Condition',
                                           'Maximum Duration': max_dur}]),
                         replace={'Start': start_time, 'End':  end_time},
                         workbook=workbook_id)

×
×
  • Create New...