A simple viewer application for data stored in a Blueksy-Tiled database.
Project description
NBS Viewer
NBS Viewer is a simple viewer application designed to visualize and interact with data stored in a Tiled database with Databroker formatted runs. It is optimized for the viewing of 1-d or 2-d data.
Usage
Installing and opening the application using Anaconda on a personal machine
- Open the Anaconda prompt and activate a suitable environment.
- Install the following packages:
conda install pyqtpip install nbs-viewer
Connecting to a Tiled Database
- Start the Application: Run the
nbs-viewercommand. - Select Data Source: In the application, select the data source you want to connect to. You can choose from various options such as tiled URIs, or tiled profiles stored on your local machine. As a test, try selecting the Tiled URI, and pointing at https://tiled-demo.blueskyproject.io and loading the BMM example catalog.
- For rsoxs, enter URI: https://tiled.nsls2.bnl.gov and Profile: rsoxs. This may request a username and password to be typed in the message-box. A 2-factor push may be required. Then select the raw profile.
- Visualize Data: Once connected, you can browse and the runs available in the Tiled database, filtered by time. Additional filtering based on the data in each row is available via Regular Expressions. The default lookback time is 1 month. The tiled-demo example catalogs have a date of 2022, so be sure to adjust the time range if you are trying them out. "Reverse Data" will reverse the time order. Note, the data may take some time to load especially if the viewer is being used on a local machine.
- Add Data to a Plot: Selected runs will be added to the plot area via. The data in these runs can then be inspected, and X-Y data can be added to the plot by selecting the appropriate checkboxes. Selected runs can be added to a new tab via a right-click context menu.
- View Images: Images can be viewed by using the dimension controls to switch the plot to 2D. An image viewed in 1D will have a slider to step through the extra dimensions. Data which is 3D or higher can be added to an image grid tab, where multiple 2D images can be plotted at the same time in a grid.
Useful Features
- It is possible to enter regular expressions to filter the catalog run list. Select the desired column to filter on, and then enter a regular expression in the text box.
- The "transform" checkbox in the X-Y data selection panel will enable arbitrary math functions to be run on the "y" data, using the
astevalpackage. The y data may be referenced as 'y', and the most common numpy functions are automatically imported with no need for the np prefix. ** For example, enter 'log(y)' (with no quotes), to plot the log of the y data. Or enter 'y/mean(y)' to normalize the data to its average value. ** Transforms are applied to all currently-selected data. - The 'normalize' column is used to divide all the plotted y data by a single channel. For spectroscopy, this is usually a channel called 'i0'. When using transform, the already-normalized y-data is used, if a normalization channel is selected.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nbs_viewer-0.3.0.tar.gz.
File metadata
- Download URL: nbs_viewer-0.3.0.tar.gz
- Upload date:
- Size: 106.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67c738daca64512ce87a38cc31ce738dd8095d9b9601f4ec2fc4a8c0916a8de5
|
|
| MD5 |
3ed868b82e7e8a1d59f05febc505fa6c
|
|
| BLAKE2b-256 |
732451fd619a5e67596ce496309ccc59113a5995f90bf5b19782ef65711989b9
|
Provenance
The following attestation bundles were made for nbs_viewer-0.3.0.tar.gz:
Publisher:
python-publish.yml on xraygui/nbs-viewer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nbs_viewer-0.3.0.tar.gz -
Subject digest:
67c738daca64512ce87a38cc31ce738dd8095d9b9601f4ec2fc4a8c0916a8de5 - Sigstore transparency entry: 423119822
- Sigstore integration time:
-
Permalink:
xraygui/nbs-viewer@6b45a96103fe6aecf33bd92ce9ff0d8facf1bc37 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/xraygui
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@6b45a96103fe6aecf33bd92ce9ff0d8facf1bc37 -
Trigger Event:
release
-
Statement type:
File details
Details for the file nbs_viewer-0.3.0-py3-none-any.whl.
File metadata
- Download URL: nbs_viewer-0.3.0-py3-none-any.whl
- Upload date:
- Size: 129.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
47b7d4d4ba9e5f816b4b0d2dd24082cf8263be061fa1132c21312e1ab3626a60
|
|
| MD5 |
dbc07b348bef9a5d3c327ca2f7c197f3
|
|
| BLAKE2b-256 |
8182f609cb190cf5a575c79ef946873ac0c7cbc538ae976d6ef50645427cfaf1
|
Provenance
The following attestation bundles were made for nbs_viewer-0.3.0-py3-none-any.whl:
Publisher:
python-publish.yml on xraygui/nbs-viewer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nbs_viewer-0.3.0-py3-none-any.whl -
Subject digest:
47b7d4d4ba9e5f816b4b0d2dd24082cf8263be061fa1132c21312e1ab3626a60 - Sigstore transparency entry: 423119824
- Sigstore integration time:
-
Permalink:
xraygui/nbs-viewer@6b45a96103fe6aecf33bd92ce9ff0d8facf1bc37 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/xraygui
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@6b45a96103fe6aecf33bd92ce9ff0d8facf1bc37 -
Trigger Event:
release
-
Statement type: