Jump to content

Ivan Berry

Members
  • Posts

    18
  • Joined

  • Last visited

Posts posted by Ivan Berry

  1. Is there anyway to turn on lane labels and the background grid when building a display as part of a spy.Assets class?

    I have been able to achieve this previously with the workbooks class by pulling in the worksheet via spy.workbooks.search and modifying the sqTrendStore, but that is an extra step that I would like to avoid if possible.

     

     

        

  2. Quote

    (400) Bad Request - Samples must be ordered by their keys! Sample (2023-04-22T22:19:40.083999600Z, 2.1432340145111084ppm) is followed by (2023-04-22T22:19:40.083999488Z, 2.1432340145111084ppm)

    When adding properties to capsules I sometimes get this error, it is fairly random across many different PI tags in different servers. I believe it may be related to seeq version R61.1.6 as I have only just started seeing it. It is consistent for the tag and time period that the error occurs for.

    This is the offending seeq formula. The signals in question trend just fine in Seeq.

    $condition.setProperty('CO (minimum)', $co, minValue())
                            .setProperty('CO (maximum)', $co, maxValue())
                            .setProperty('O2 (minimum)', $o2, minValue())
                            .setProperty('O2 (maximum)', $o2, maxValue())      

    I am sure there is something that needs to be fixed here in Seeq or PI to resolve this correctly, but I am looking for a crafty workaround I can use in the short term while our IT support figures this out.

    Any ideas much appreciated!

  3. Hi,

    I'm having a bit of trouble pushing a description for metrics, it doesn't seem to take effect:

                           {
                                'Type': 'Metric',
                                'Name': row["Name"],
                                'Measured Item': {'ID': row["ID"]},
                                'Statistic': None,
                                "Description": row["Description"], 
                                'Thresholds': {
                                    'Lo':  row["Low Limit"],
                                    'Hi': row["High Limit"]
                                }
                           }

    Is there some special structure to use to specify the description?

    Regards,

    Ivan

  4. Thanks Teddy.

    As a follow up question, are there any potential ways to make the prediction tool fit faster? 

    One idea I had is to resample the target variable to 10mins data as we are not that interested in high frequency predictions, wondering if I also need to bother resampling all the input predictor variables, or does the regressionModelOLS function automatically do that?

    $target.resample(10mins).regressionModelOLS($condition.toGroup(capsule("2022-01-01T14:32:00.000Z", "2022-06-01T20:32:00.000Z"), CapsuleBoundary.Intersect), false, $a,$a^2,$a^3,$b,$b^2,$b^3,$c,$c^2,$c^3,$d,$d^2,$d^3,$a*$b,$a*$c,$a*$d,$b*$c,$b*$d,$c*$d).predict($a,$a^2,$a^3,$b,$b^2,$b^3,$c,$c^2,$c^3,$d,$d^2,$d^3,$a*$b,$a*$c,$a*$d,$b*$c,$b*$d,$c*$d)

     

  5. I am currently testing the idea to run a prediction for a large number of signals, generated from an Asset Tree.

    Are there any performance traps to be careful of? Are there any events that can cause the prediction model to be refit (other than updating the training window or inputs)?

    This is the function we are looking at using.

    $target.regressionModelOLS($training,
            false,
            $signal)
        .predict($signal)


    These signals will be used to generate treemaps, organizer topics and potentially Odata endpoints.

  6. I am running into an issue when we push a signal to a workbook that exists in a folder.

    One of the signals has security applied, that doesn't necessarily match the parent permissions of the folder and workbook.

    The error we get on spy.push is:

    Quote

    Failed to write item in batch request: The property 'Permission Inheritance Disabled' is malformed or its value 'true' is invalid. May not modify the property directly: Permission Inheritance Disabled.

    I tried both enabling and disabling permission inheritance for the workbook we are pushing to, that didn't resolve the error, is there any other permission inheritance to consider?

    image.png

    image.png

  7. This is what I am currently doing to get the enumeration value from an enum type return:

        enum_tagdata = spy.pull(raw_signals[raw_signals['Source Value Unit Of Measure'] =='string'],
                 start=batchstart,
                 end=batchend,         
                 grid='15min')
        enum_tagdata = enum_tagdata.replace(regex=r'^ENUM{{', value='')
        enum_tagdata= enum_tagdata.replace(regex=r'\|[a-zA-z].*}}', value='')
        enum_tagdata =enum_tagdata.apply(pd.to_numeric, errors='coerce', axis=1,downcast='integer')
     
    Is there a way in the call to seeq to ask for just the string or just the value to be returned? Or is there a more elegant or crafty way of handling enums in python?
     
    Thanks!
    Ivan
  8. I need to add signals together that have missing values, if some values are missing in one of the signals, the rest should sum together, and the missing signal is zero.

    This link below was a helpful discussion, essentially I would like to do the same thing, but with a sum, instead of a max.

    Thanks for any pointers.

     

×
×
  • Create New...