Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 09/02/2022 in all areas

  1. I tried this on R54.1.4 and came across a similar error but fixed it by appending .toString() to $seq. Below is the updated formula code. //creates a condition for 1 minute of time encompassing 30 seconds on either side of a transition $Transition = $CompressorStage.toCondition().beforeStart(0.5min).afterStart(1min) //Assigns the mode on both sides of the step change to a concatenated string that is a property of the capsule. $Transition .transform( $cap -> $cap.setProperty('StartModeEndMode', $CompressorStage.toCondition() .toGroup($cap, CAPSULEBOUNDARY.INTERSECT) .reduce("", ($seq, $stepCap) -> $seq.toString() + $stepCap.getProperty('Value') //Changes the format of the stage names for more clear de-lineation as a property in the capsules pane. .replace('STAGE 1','-STAGE1-').replace('STAGE 2','-STAGE2-').replace('TRANSITION','-TRANSITION-').replace('OFF','-OFF-') )))
    1 point
  2. xyTable does return a table. According to the error though, the Formula tool cannot. It looks to me like the functions that return Tables are mainly used underneath the hood to create histograms. But I agree, I'm not sure why formula can't return a table either.
    1 point
  3. Summary Chain View enables a nice visual of all the time periods stacked side-by-side; however, sometimes it is useful to create a new signal from all these capsules that has been scrunched together. This avoids the maximum limit of how many capsules can be shown in Chain View. Note this is different from "time warping" which realigns the samples by some amount. Signal scrunching keeps the relative sample alignment the same within each capsule - but it does move each "snippet" of the signal next to each other. Steps Here is a screenshot of all the signals and conditions needed for this analysis. Add signal to the display with the specified time range. Create the time periods, condition capsules, of interest. Using the Custom Condition tool, create a new capsule that surrounds all the capsules containing the data for the new signal. Note, the signal will start at the beginning of this capsule. Create Inverse of the time periods of interest that occurs within the 'Condition for New Signal'. This will be used to calculate the time lag between the capsules in the 'Condition for Time Periods of Interest'. $cftp.inverse().removeLongerThan(1wk).intersect($cfns) Create the signal snippets that occur only within the 'Condition for Time Periods of Interest' and the 'Condition for New Signal'. $t.within($cftp.intersect($cfns)) Create a new signal to calculate the delay between each of the 'Condition for Time Periods of Interest' capsules. 1.toSignal().aggregate(totalized(), $icfc, startKey()).convertUnits('h').toStep() Create a running sum of the delay - this will be used to shift all the snippets to the beginning of the 'Condition for New Signal' capsule. $dbtp.runningSum($cfns) Scrunch the signal. $ts.delay(0-$rsod, 1wk)
    1 point
This leaderboard is set to Los Angeles/GMT-07:00
×
×
  • Create New...