Jump to content
  • To Search the Seeq Knowledgebase:

    button_seeq-knowledgebase.png.ec0acc75c6f5b14c9e2e09a6e4fc8d12.png.4643472239090d47c54cbcd358bd485f.png

Search the Community

Showing results for tags 'spy.pull'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Community Technical Forums
    • Tips & Tricks
    • General Seeq Discussions
    • Seeq Data Lab
    • Seeq Developer Club
    • Seeq Admin Forum
    • Feature Requests

Categories

  • Seeq FAQs
  • Online Manual
    • General Information

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Company


Title


Level of Seeq User

Found 2 results

  1. Hi, I'm having issues pulling raw samples without the default grid. First I create a calculation one one truck. I search for one truck, and do a calculation push() truck1034_signals = spy.search({ "Path": "path >> to >> truck >> G52_TRC1034" }) Payload_resamp_calc = spy.push(metadata=pd.DataFrame([{ 'Type': 'Signal', 'Name': 'Payload Resamp', 'Formula': "$p.resample($c.toNumber()).remove($l2.isNotEqualTo('KR_KID2'))", 'Formula Parameters': { '$c': truck1034_signals[truck1034_signals['Name'] == 'CycleID'], '$p': truck1034_signals[truck1034_signals['Name'] == 'Payload'], '$l2': truck1034_signals[truck1034_signals['Name'] == 'LoadDestination'], } }]), workbook='SPy Documentation Examples >> spy.pull') Then i search for more trucks, in this case just 6 trucks for testing. (In reality its like 60 trucks i want to get.) #this finds 6 trucks truck_assets = spy.search({ "Name": "G52_TRC103", "Path": "path >> to >> truck >> Hauling" }) start=pd.Timestamp("2023-11-17 01:45", tz='CET') end=pd.Timestamp("2023-11-17 03:15", tz='CET') df = spy.pull(truck_assets,start=start, end=end, calculation=Payload_resamp_calc,header='Name') df.head() Running this with default grid works and gives this result: However, i want raw samples, not default grid of 15 min. When I ad the grid=None option to the pull i get this error: df = spy.pull(truck_assets,start=start, end=end, calculation=Payload_resamp_calc,header='Name',grid=None) SPy Error: Pull cannot include conditions when no signals are present with shape='samples' and grid=None Why is it not working without the grid? I tried even for just one truck and still it does not work with the grid=None. Is it due to the calculation in some way?
  2. Hello, Does there exist a method to pull the data with some of them need to be applied with a formula? For example, I want to pull several signals all at once, including "SP", "MODE", "OUT", "PV". For SP and MODE, these attributes are categorical, so there are only four possibilities, for instance, for their values, which are 0, 1, 8, 9. However, with spy.pull() function, these attributes will be interpolated. So I have to pull first the data for "OUT", "PV", and again pull the data for "SP" and "MODE" with a parameter "calculation", as follows: # My current method is with 2 pull functions, but they took too much time for many signals my_pull_1 = spy.pull( my_search.query("Name not in ('MODE', 'SP')"), start=start, end=end, grid=grid, ) my_pull_2 = spy.pull( my_search.query("Name in ('MODE', 'SP')"), start=start, end=end, grid=grid, calculation="$signal.toStep()" ) Since in my_search dataframe, there could be thousands of different "MODE" and "SP" signals, pulling the data twice will be very slow. Is there a way that I can pull only once the data, and apply the function to only part of the signals, like defining the formula parameter for the function? # what I would like to realize is something like this my_pull = spy.pull( my_search, start=start, end=end, grid=grid, formula="$Mode.toStep()", formula_parameters={ "$Mode": my_search[my_search['Name'] == 'MODE'] } ) Thanks in advance, Siqi
×
×
  • Create New...