Skip to content

Add preference to use the 'optimized with last sample' AA postprocessor - #3915

Open
rjwills28 wants to merge 3 commits into
ControlSystemStudio:masterfrom
rjwills28:databrowser_optimLastSample_postprocessor
Open

Add preference to use the 'optimized with last sample' AA postprocessor#3915
rjwills28 wants to merge 3 commits into
ControlSystemStudio:masterfrom
rjwills28:databrowser_optimLastSample_postprocessor

Conversation

@rjwills28

Copy link
Copy Markdown
Contributor

A while back we introduced a new post processor to the Archive Appliance that better represents the data called 'Optimized with last sample'.

The history and detailed discussion of why this pp was required is here: ControlSystemStudio/cs-studio#2483.

In brief, say a PV has a flurry of activity, then goes to a value (say 0) and does not change for some time. With the Optimized PP, you would get the average during this flurry, say 50 and then the next bins will have no events, in which case the Optimized algorithm just returns the mean value of the last bin that had events, e.g. it would return 50. This means that data browser would show the value '50' for the entire duration that the PV does not change, even though the PV's last value was 0.

The optimized with last sample algorithm is based on the optimized one but if a bin does not have any events then it uses the last value in the previous bin that had events and hence in this example would return 0 as desired.

This new post processor was introduce to the CS-Studio data browser as a preference that could be switched on. In this PR I have added a similar preference to use the optimLastSample_ option.

At the moment I have left the default as 'false', i.e. it is not used but I wonder, given that this post processor gives a better representation of the data, whether it should be the default to use (i.e. make the variable true) - thoughts?

Checklist

  • Testing:

    • The feature has automated tests
    • Tests were run
    • If not, explain how you tested your changes
  • Documentation:

    • The feature is documented
    • The documentation is up to date
    • Release notes:
      • Added an entry if the change is breaking or significant
      • Added an entry when adding a new feature

@sonarqubecloud

Copy link
Copy Markdown

@shroffk
shroffk requested review from jacomago and shroffk August 24, 2026 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant