-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #315 from dmgav/use-tiled
Support for Tiled at SRX beamline
- Loading branch information
Showing
7 changed files
with
577 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
class CatalogInfo: | ||
def __init__(self): | ||
self._name = None | ||
|
||
@property | ||
def name(self): | ||
return self._name | ||
|
||
def set_name(self, name): | ||
self._name = name | ||
|
||
|
||
catalog_info = CatalogInfo() | ||
|
||
|
||
def get_catalog(catalog_name): | ||
import databroker | ||
from packaging import version | ||
|
||
db_version_major = version.parse(databroker.__version__).major == 1 | ||
if db_version_major == 1: | ||
raise ValueError("Non-tiled version of Databroker is installed") | ||
|
||
from tiled.client import from_uri | ||
|
||
c = from_uri("https://tiled.nsls2.bnl.gov") | ||
return c[catalog_name.lower()]["raw"] |
Oops, something went wrong.