Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MNT: BITS structure cleanup #47

Open
wants to merge 29 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
01d880a
set up is in 2 steps so RE no longer crashes stuff
MDecarabas Mar 6, 2025
1a0c9e9
fixed issue with error logging magics
MDecarabas Mar 6, 2025
fd9eb39
make devices works no error
MDecarabas Mar 6, 2025
107f5c1
organizing factory device
MDecarabas Mar 7, 2025
28d7d71
Merge branch 'main' into switch_case_organization
ravescovi Mar 8, 2025
eff48dd
fix tests
ravescovi Mar 8, 2025
cf85fe6
Merge branch 'switch_case_organization' of https://github.com/BCDA-AP…
ravescovi Mar 8, 2025
4c54b5c
Update README.md
prjemian Mar 8, 2025
edd1f7c
Merge branch 'main' into switch_case_organization
prjemian Mar 9, 2025
9fd1744
added features to iconfig
MDecarabas Mar 10, 2025
dfbf7f2
rebase
MDecarabas Mar 10, 2025
ab38d00
make devices works no error
MDecarabas Mar 6, 2025
e125b66
rebase
MDecarabas Mar 10, 2025
232c542
MNT #37 following repo rename
prjemian Feb 10, 2025
8e584ee
always enabled
ravescovi Mar 8, 2025
4da36b9
Merge branch 'main' into switch_case_organization
MDecarabas Mar 10, 2025
954fb1f
readded file
MDecarabas Mar 10, 2025
e639a94
finished iconfig cleanup ...for nbow
MDecarabas Mar 11, 2025
dfb0118
pre-commited
MDecarabas Mar 11, 2025
f800268
will not fix but interesting to observe
MDecarabas Mar 11, 2025
36177a3
hot fix since startup is being imported at top of test and we are tes…
MDecarabas Mar 11, 2025
b6546d0
WIP test
MDecarabas Mar 11, 2025
b5900e7
WIP test
MDecarabas Mar 11, 2025
f414b1e
test wip
MDecarabas Mar 11, 2025
b3f7df3
IS_ON = Enable
MDecarabas Mar 11, 2025
3b00fcc
cleaned up readme due to suggestions
MDecarabas Mar 11, 2025
4dfe5d2
added caproto
MDecarabas Mar 11, 2025
93d1664
Update src/instrument/callbacks/spec_data_file_writer.py
MDecarabas Mar 11, 2025
75b466f
removed comment
MDecarabas Mar 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 5 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,31 +23,25 @@ conda activate $ENV_NAME
pip install -e ."[all]"
```

## IPython console
## IPython console & Jupyter notebook

To start the bluesky instrument session in a ipython execute the next command in a terminal:

```bash
ipython
```

Inside the ipython console execute:

```py
from instrument.startup import *
```

## Jupyter notebook

## Jupyter Notebook
Start JupyterLab, a Jupyter notebook server, or a notebook, VSCode.

Start the data acquisition:
## Starting the BITS Package

```py
from instrument.startup import *
RE(make_devices()) # create all the ophyd-style control devices
```

## Sim Plan Demo
## Running Sim Plan Demo

To run some simulated plans that ensure the installation worked as expected
please run the next commands inside an ipython session or a jupyter notebook
Expand Down
2 changes: 1 addition & 1 deletion src/instrument/configs/devices.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Guarneri-style device YAML configuration

instrument.devices.factories.predefined_device:
instrument.utils.sim_creator.predefined_device:
- {creator: ophyd.sim.motor, name: sim_motor}
- {creator: ophyd.sim.noisy_det, name: sim_det}

Expand Down
15 changes: 8 additions & 7 deletions src/instrument/configs/iconfig.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,26 +27,27 @@ RUN_ENGINE:

### The progress bar is nice to see,
### except when it clutters the output in Jupyter notebooks.
### Default: True
### Default: False
USE_PROGRESS_BAR: false

# Command-line tools, such as %wa, %ct, ...
USE_BLUESKY_MAGICS: True
USE_BLUESKY_MAGICS: true

### Best Effort Callback Configurations
### Defaults: all true (except no plots in queueserver)
# BEC:
# BASELINE: false
# HEADING: false
# PLOTS: false
# TABLE: false
BEC:
BASELINE: true
HEADING: true
PLOTS: true
TABLE: true

### Support for known output file formats.
### Uncomment to use. If undefined, will not write that type of file.
### Each callback should apply its configuration from here.
# NEXUS_DATA_FILES:
# FILE_EXTENSION: hdf
# WARN_MISSING_CONTENT: true

SPEC_DATA_FILES:
FILE_EXTENSION: dat

Expand Down
1 change: 0 additions & 1 deletion src/instrument/startup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
from .core.catalog_init import cat # noqa: F401
from .core.run_engine_init import RE # noqa: F401
from .core.run_engine_init import sd # noqa: F401
from .devices import * # noqa: F403
from .plans import * # noqa: F403

# Bluesky data acquisition setup
Expand Down
4 changes: 2 additions & 2 deletions src/instrument/tests/test_device_factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import pytest

from ..devices.factories import motors
from ..devices.factories import predefined_device
from ..utils.sim_creator import motors
from ..utils.sim_creator import predefined_device


@pytest.mark.parametrize(
Expand Down