Skip to main content

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

  1. Open the Anaconda prompt and activate a suitable environment.
  2. Install the following packages:
    • conda install pyqt
    • pip install nbs-viewer

Connecting to a Tiled Database

  1. Start the Application: Run the nbs-viewer command.
  2. 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 (into the Anaconda prompt for local use). Then select the raw profile.
  3. 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.
  4. Add Data to a Plot: Selected runs can be added to the plot area via the "Add Data to Current Plot" button. The data in these runs can then be inspected, and X-Y data can be added to the plot by selecting the appropriate checkboxes and using the "Update Plot" button. Image data is supported, but not optimized. Be careful when trying to plot large images.

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 asteval package. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nbs_viewer-0.2.4.tar.gz (81.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nbs_viewer-0.2.4-py3-none-any.whl (99.9 kB view details)

Uploaded Python 3

File details

Details for the file nbs_viewer-0.2.4.tar.gz.

File metadata

  • Download URL: nbs_viewer-0.2.4.tar.gz
  • Upload date:
  • Size: 81.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for nbs_viewer-0.2.4.tar.gz
Algorithm Hash digest
SHA256 34da2c4dbb4a287d3b3da10678afdee85ed1deb62e5a35b0a31aa42079848658
MD5 d394c33866033ae0f038cfa58c86fda0
BLAKE2b-256 0be55b75db254cc4e726b2ae59a30f926a849aa635c39ea1610fc34d42af8951

See more details on using hashes here.

Provenance

The following attestation bundles were made for nbs_viewer-0.2.4.tar.gz:

Publisher: python-publish.yml on xraygui/nbs-viewer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nbs_viewer-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: nbs_viewer-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 99.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for nbs_viewer-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 e4828ecb589d799bb30714dad6dab830908dc2caf91b31e89d2833d4d737e4f0
MD5 e92a58c79f834beb657de8c6c8ee3b1a
BLAKE2b-256 6fd7d57c9b126e946df94519f27a65cd81d3373d59c828ecdf173dc0da11b658

See more details on using hashes here.

Provenance

The following attestation bundles were made for nbs_viewer-0.2.4-py3-none-any.whl:

Publisher: python-publish.yml on xraygui/nbs-viewer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page