Skip to content

Latest commit

 

History

History
52 lines (41 loc) · 2.7 KB

File metadata and controls

52 lines (41 loc) · 2.7 KB

README for bokeh data source compression compressionArray

The dat source compression declaration compressionArray is used as an argument in bokehDrawSA to create figure layout

The declarative programming used in bokehDrawSA is a type of coding where developers express the computational logic without having to programme the control flow of each process. This can help simplify coding, as developers only need to describe what they want the programme to achieve, rather than explicitly prescribing the steps or commands required to achieve the desired result.

bokehDrawSA.fromArray(df, None, figureArray, widgetParams, layout=figureLayoutDesc, tooltips=tooltips, parameterArray=parameterArray, widgetLayout=widgetLayoutDesc, sizing_mode="scale_width", nPointRender=300, aliasArray=aliasArray, histogramArray=histoArray,arrayCompression=arrayCompression)

Compression array declaration

see https://github.com/miranov25/RootInteractive/blob/master/RootInteractive/Tools/compressArray.py#L11-L13

The data is compressed on the master and later expanded on the client. Compression is per column and settings can be specified per column with regular expressions. Significant compression can be achieved by lossy compression (absolute or relative rounding) followed by entropy coding (zip). The column is compressed based on the recipe in the first element in arrayCompression corresponding to the regular expression.

arrayCompression

  • variableMask
    • regular expression to select variable
  • compressionArray - optional filter
    • relative
    • absolute
    • code
    • zip
    • base64

For example usage see also Jupyter notebook tutorial file:

Example declaration

arrayCompressionRelative8=[(".*",[("relative",8), ("code", 0), ("zip",0), ("base64",0)])]

Column dependent declaration

arrayCompressionParam=[(".*conv.*Sigma.*",[("relative",7), ("code",0), ("zip",0), ("base64",0)]),
                           (".*delta.*",[("relative",10), ("code",0), ("zip",0), ("base64",0)]),
                           (".*i2.*",[("relative",7), ("code",0), ("zip",0), ("base64",0)]),
                           (".*",[("relative",8), ("code",0), ("zip",0), ("base64",0)])]