Streamvis project is a webserver and a collection of apps for visualization of data streams. It is based on bokeh and generally works with zmq streams.
An example of user application:
The build is triggered upon pushing a tag into a master
branch and involves running the Github Actions script, which builds a package and uploads it to paulscherrerinstitute
anaconda channel. A tagged release commit can be created with make_release.py
script.
To build a local conda package without uploading it to the anaconda channel:
$ conda build ./conda-recipe
A docker image can be built from the latest version on paulscherrerinstitute
anaconda channel:
$ docker build ./docker
The default installation procedure:
$ conda install -c paulscherrerinstitute streamvis
If a package was built locally:
$ conda install --use-local streamvis
$ streamvis <app_name> [--opt-params]
Navigate to http://localhost:5006/ in your browser to start using the streamvis application.
To get a general help, a list of available applications and optional parameters:
$ streamvis -h
Required metadata entries:
type: str
- image data type, e.g. "uint16", or "float32"shape: Iterable[int]
- image shape in pixels
Optional jungfrau-related metadata entries:
detector_name: str
- detector name (e.g. "JF01T03V01"), required for adc->keV conversion and geometrygain_file: str
- path to a gain file, required for adc->keV conversionpedestal_file: str
- path to a pedestal file, required for adc->keV conversion and maskdaq_rec: int
- a last bit is used to determine whether detector is in a highgain modemodule_map: Iterable[int]
- a mapping between data regions and detector module positions (e.g. [0, -1, 1] - a second module is switched off)mask: bool
- superseed a user GUI selection for maskgap_pixels: bool
- superseed a user GUI selection for gap_pixelsgeometry: bool
- superseed a user GUI selection for geometrydouble_pixels: str
- superseed a user GUI selection for double_pixels, can be "keep", "mask", or "interp"
Statistics tab:
pulse_id: int
- is required for statistics to be collected, data is grouped into runs based on this valueis_good_frame: bool
- causes a metadata issue if not True, increments a number in "Bad Frames" columnsaturated_pixels: int
- causes a metadata issue if not 0, increments a number in "Sat pix frames" columnlaser_on: bool
- is used to split statistics between laser_on/laser_off columns, those columns are hidden if this key is not presentis_hit_frame: bool
- increments a number in "Laser ON/OFF frames" columns (those columns are hidden if laser_on is not present)
Hitrate tab:
pulse_id: int
- is required for statistics to be collected, determines which point along x-axis is updatedis_hit_frame: bool
- determines whether it's a hit (also whether the data may be displayed when "Show Only Hits" button is toggled)
Radial Profile tab:
pulse_id: int
- is required for statistics to be collected, the corresponding data is ignored if values is not within "Pulse ID Window" from the most recent pulse_id receivedradint_q: Iterable[float]
- a vector of q values (x-axis)radint_I: Iterable[float]
- a vector of intensity values (y-axis)laser_on: bool
- determines which graph from "Frames laser on/off" is being updated
ROI intensities tab / Intensity ROIs overlay:
roi_x1: Iterable[float]
- a vector of intensity ROI left bordersroi_x2: Iterable[float]
- a vector of intensity ROI right bordersroi_y1: Iterable[float]
- a vector of intensity ROI bottom bordersroi_y2: Iterable[float]
- a vector of intensity ROI top bordersroi_intensities_normalised: Iterable[float]
- a vector of corresponding ROI intensities
Saturated Pixels overlay:
saturated_pixels_x: Iterable[float]
- x-coordinates of saturated pixels (attempt to derive if not present in case of raw data (uint16))saturated_pixels_y: Iterable[float]
- y-coordinates of saturated pixels (attempt to derive if not present in case of raw data (uint16))saturated_pixels: int
- a number of saturated pixels (attempt to derive if not present in case of raw data (uint16))
Spots overlay:
spot_x: Iterable[float]
- x-coordinates of spotsspot_y: Iterable[float]
- y-coordinates of spotsnumber_of_spots: int
- should be equal to a length of both, spot_x and spot_y
Resolution Rings overlay:
detector_distance: float
- distance to detector in metersbeam_energy: float
- beam energy in eVbeam_center_x: float
- beam x-coordinatebeam_center_y: float
- beam y-coordinate
Disabled Modules overlay (requires a valid detector_name
):
disabled_modules: Iterable[int]
- indexes of modules to display as disabled
Aggregated images:
aggregated_images: int
- in case of aggregation, treat a received image as a sum of that number of images