Skip to content

Commit

Permalink
deploy: 89b71b2
Browse files Browse the repository at this point in the history
  • Loading branch information
prjemian committed Feb 26, 2024
1 parent e044c2d commit fb6e099
Show file tree
Hide file tree
Showing 133 changed files with 596 additions and 577 deletions.
Binary file modified .doctrees/changes.doctree
Binary file not shown.
Binary file modified .doctrees/environment.pickle
Binary file not shown.
Binary file modified .doctrees/example/_export_bluesky_data.doctree
Binary file not shown.
Binary file modified .doctrees/example/_xafs_scan.doctree
Binary file not shown.
Binary file modified .doctrees/howto/_basic_aps_info.doctree
Binary file not shown.
Binary file modified .doctrees/howto/_basic_motor_scaler_scan.doctree
Binary file not shown.
Binary file modified .doctrees/howto/_count_scaler.doctree
Binary file not shown.
Binary file modified .doctrees/howto/_custom_heater_positioner.doctree
Binary file not shown.
Binary file modified .doctrees/howto/_custom_plan.doctree
Binary file not shown.
Binary file modified .doctrees/howto/_dynamic_limits_2motor.doctree
Binary file not shown.
Binary file modified .doctrees/howto/_images_darks_flats.doctree
Binary file not shown.
Binary file modified .doctrees/howto/_synapps_sscan_1d_flyer.doctree
Binary file not shown.
Binary file modified .doctrees/index.doctree
Binary file not shown.
Binary file modified .doctrees/instrument/_configure_bluesky_instrument.doctree
Binary file not shown.
Binary file modified .doctrees/instrument/_configure_databroker.doctree
Binary file not shown.
Binary file modified .doctrees/instrument/_get_spec_config.doctree
Binary file not shown.
Binary file modified .doctrees/instrument/_install_new_instrument.doctree
Binary file not shown.
Binary file modified .doctrees/instrument/_test_new_instrument.doctree
Binary file not shown.
Binary file modified .doctrees/instrument/describe_instrument.doctree
Binary file not shown.
Binary file modified .doctrees/instrument/guide.doctree
Binary file not shown.
4 changes: 2 additions & 2 deletions .doctrees/nbsphinx/example/_xafs_scan.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@
"\n",
"XAFS scans measure signals from two or more detectors as the incident X-ray energy is varied. One method is to step the energy where the step size is different depending on the region of the scan. Steps could be in constant units of energy or _k_ (see above).\n",
"\n",
"We define here a default list of four regions (known here as `segments`), each showing a different feature of units or count time weighting. This default list is used in the `xafs()` scan below if the caller chooses. The `get_energies_and_times()` function parses the supplied list of segments and returns a list of `(energy_keV, count_time)` pairs for use in a [`bluesky`](https://blueskyproject.io/bluesky/).[`plans`](https://blueskyproject.io/bluesky/plans.html).[`list_scan()`](https://blueskyproject.io/bluesky/generated/bluesky.plans.list_scan.html#bluesky.plans.list_scan)."
"We define here a default list of four regions (known here as `segments`), each showing a different feature of units or count time weighting. This default list is used in the `xafs()` scan below if the caller chooses. The `get_energies_and_times()` function parses the supplied list of segments and returns a list of `(energy_keV, count_time)` pairs for use in a [bluesky](https://blueskyproject.io/bluesky/).[plans](https://blueskyproject.io/bluesky/plans.html).[list_scan()](https://blueskyproject.io/bluesky/generated/bluesky.plans.list_scan.html#bluesky.plans.list_scan)."
]
},
{
Expand Down Expand Up @@ -385,7 +385,7 @@
"source": [
"## `xafs()` plan\n",
"\n",
"With all the pieces defined, it is time to write a plan to measure the XAFS. The caller must provide the absorption edge energy (in keV). A list of segments is optional (will default to `DEFAULT_XAFS_SCAN_SEGMENTS` as defined above) so only the absorption edge energy is required. Once the inputs are checked for correctness, the absorption calculation is setup in an EPICS userCalc ([`SwaitRecord`](https://apstools.readthedocs.io/en/latest/source/synApps/_swait.html#synapps-swait-record)). Finally, the 1-D step scan is run by calling [`bp.list_scan()`](https://blueskyproject.io/bluesky/generated/bluesky.plans.list_scan.html#bluesky.plans.list_scan) with lists of energy and count time values for each step."
"With all the pieces defined, it is time to write a plan to measure the XAFS. The caller must provide the absorption edge energy (in keV). A list of segments is optional (will default to `DEFAULT_XAFS_SCAN_SEGMENTS` as defined above) so only the absorption edge energy is required. Once the inputs are checked for correctness, the absorption calculation is setup in an EPICS userCalc ([SwaitRecord](https://apstools.readthedocs.io/en/latest/source/synApps/_swait.html#synapps-swait-record)). Finally, the 1-D step scan is run by calling [bp.list_scan()](https://blueskyproject.io/bluesky/generated/bluesky.plans.list_scan.html#bluesky.plans.list_scan) with lists of energy and count time values for each step."
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion .doctrees/nbsphinx/howto/_basic_aps_info.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The `aps` object is an instance of [`apstools.devices.ApsMachineParametersDevice`](https://bcda-aps.github.io/apstools/latest/api/_devices.html#apstools.devices.aps_machine.ApsMachineParametersDevice)."
"The `aps` object is an instance of [apstools.devices.ApsMachineParametersDevice](https://bcda-aps.github.io/apstools/latest/api/_devices.html#apstools.devices.aps_machine.ApsMachineParametersDevice)."
]
},
{
Expand Down
12 changes: 6 additions & 6 deletions .doctrees/nbsphinx/howto/_basic_motor_scaler_scan.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"source": [
"## Connect the motor\n",
"\n",
"First, import the [`ophyd.EpicsMotor`](https://blueskyproject.io/ophyd/generated/ophyd.epics_motor.EpicsMotor.html?highlight=epicsmotor#ophyd.epics_motor.EpicsMotor) (class) definition. This Python class from `ophyd` is the best representation of the synApps [motor](https://github.com/epics-modules/motor) record."
"First, import the [ophyd.EpicsMotor](https://blueskyproject.io/ophyd/generated/ophyd.epics_motor.EpicsMotor.html?highlight=epicsmotor#ophyd.epics_motor.EpicsMotor) (class) definition. This Python class from `ophyd` is the best representation of the synApps [motor](https://github.com/epics-modules/motor) record."
]
},
{
Expand Down Expand Up @@ -231,7 +231,7 @@
"source": [
"## Connect the scaler\n",
"\n",
"The `ophyd` package provides two representations of the synApps [scaler](https://github.com/epics-modules/scaler) record ([`EpicsScaler`](https://blueskyproject.io/ophyd/reference/builtin-devices.html#epicsscaler) and [`ScalerCH`](https://blueskyproject.io/ophyd/reference/builtin-devices.html#scalerch)). My _opinion_ is that the `ScalerCH` class provides the representation most compatible with use at the APS.\n",
"The `ophyd` package provides two representations of the synApps [scaler](https://github.com/epics-modules/scaler) record ([EpicsScaler](https://blueskyproject.io/ophyd/reference/builtin-devices.html#epicsscaler) and [ScalerCH](https://blueskyproject.io/ophyd/reference/builtin-devices.html#scalerch)). My _opinion_ is that the `ScalerCH` class provides the representation most compatible with use at the APS.\n",
"\n",
"As before, import the ophyd class:"
]
Expand Down Expand Up @@ -843,7 +843,7 @@
"source": [
"## First scan\n",
"\n",
"The standard plans provided in [`bluesky.plans`](https://blueskyproject.io/bluesky/plans.html#pre-assembled-plans) are sufficient for many needs, so import them and, in the same command, give the package a short name (`bp`) since it is used frequently."
"The standard plans provided in [bluesky.plans](https://blueskyproject.io/bluesky/plans.html#pre-assembled-plans) are sufficient for many needs, so import them and, in the same command, give the package a short name (`bp`) since it is used frequently."
]
},
{
Expand All @@ -861,7 +861,7 @@
"id": "c3c753bb",
"metadata": {},
"source": [
"The [`scan()`](https://blueskyproject.io/bluesky/generated/bluesky.plans.scan.html#bluesky.plans.scan) plan is flexible and will be used here to scan scaler *vs.* motor. The first argument is the *list* of detectors to be recorded. Here, we give the scaler object `vsc16`. The next argument is the positioner object, then start and end positions, finally, the number of points to be collected.\n",
"The [scan()](https://blueskyproject.io/bluesky/generated/bluesky.plans.scan.html#bluesky.plans.scan) plan is flexible and will be used here to scan scaler *vs.* motor. The first argument is the *list* of detectors to be recorded. Here, we give the scaler object `vsc16`. The next argument is the positioner object, then start and end positions, finally, the number of points to be collected.\n",
"\n",
"Observe that we do not run the scan directly, but rather give the scan to the `RE()` object. The `RE()` object will run the scan, performing each of the actions defined by the scan, but also handle the additional tasks of managing the data acquisition process, publishing data to all subscribers (here: databroker and BestEffortCallback) and checking for updates from EPICS and checking if the run must be interrupted either by user request or some other observation. (We have not configured any of those other observations in this simple example.)"
]
Expand Down Expand Up @@ -1347,11 +1347,11 @@
"\n",
" _Hint_: `logger.info(\"text: %s value: %g\", s1, v2, ...)`\n",
"\n",
" Consider examples as used in [`peak_finder_example.py`](instrument/plans/peak_finder_example.py).\n",
" Consider examples as used in `instrument/plans/peak_finder_example.py`.\n",
" See the [Python logging tutorial](https://docs.python.org/3/howto/logging.html) for more information.\n",
"1. Write a custom plan that accepts user-provided metadata.\n",
"\n",
" _Hint_: [`bp.scan()`](https://blueskyproject.io/bluesky/generated/bluesky.plans.scan.html#bluesky.plans.scan) has the `md` keyword argument (_kwarg_) that accepts a dictionary of _key: value_ pairs as the metadata when the plan is run. Your custom plan should accept the same kwarg and pass this to `bp.scan(md=the_dictionary)`, possibly after adding some of its own keys to the metadata."
" _Hint_: [bp.scan()](https://blueskyproject.io/bluesky/generated/bluesky.plans.scan.html#bluesky.plans.scan) has the `md` keyword argument (_kwarg_) that accepts a dictionary of _key: value_ pairs as the metadata when the plan is run. Your custom plan should accept the same kwarg and pass this to `bp.scan(md=the_dictionary)`, possibly after adding some of its own keys to the metadata."
]
}
],
Expand Down
6 changes: 3 additions & 3 deletions .doctrees/nbsphinx/howto/_count_scaler.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
"id": "7cc70fa9",
"metadata": {},
"source": [
"The _easiest_ way to count the `scaler` object is to use the [`%ct`](https://blueskyproject.io/bluesky/magics.html?highlight=label#taking-a-reading-using-ct-post-v1-3-0) bluesky magic command, which counts all objects with the `detectors` label.\n",
"The _easiest_ way to count the `scaler` object is to use the [%ct](https://blueskyproject.io/bluesky/magics.html?highlight=label#taking-a-reading-using-ct-post-v1-3-0) bluesky magic command, which counts all objects with the `detectors` label.\n",
"\n",
"Note that the various magic commands are only available from the command line, not for use in a bluesky plan function."
]
Expand Down Expand Up @@ -427,7 +427,7 @@
"source": [
"### use bluesky (the package) to count the scaler\n",
"\n",
"Now, use the bluesky [RunEngine](https://blueskyproject.io/bluesky/generated/bluesky.run_engine.RunEngine.html?highlight=runengine#bluesky.run_engine.RunEngine) (`RE`) to count `scaler1`. We'll use the bluesky plan ([`bp`](https://blueskyproject.io/bluesky/plans.html?highlight=count#pre-assembled-plans)) called [`count()`](https://blueskyproject.io/bluesky/generated/bluesky.plans.count.html#bluesky.plans.count). To be consistent with the result returned from `%ct`, we'll include the `noisy` detector."
"Now, use the bluesky [RunEngine](https://blueskyproject.io/bluesky/generated/bluesky.run_engine.RunEngine.html?highlight=runengine#bluesky.run_engine.RunEngine) (`RE`) to count `scaler1`. We'll use the bluesky plan ([bp](https://blueskyproject.io/bluesky/plans.html?highlight=count#pre-assembled-plans)) called [count()](https://blueskyproject.io/bluesky/generated/bluesky.plans.count.html#bluesky.plans.count). To be consistent with the result returned from `%ct`, we'll include the `noisy` detector."
]
},
{
Expand Down Expand Up @@ -887,7 +887,7 @@
"id": "94e8851a",
"metadata": {},
"source": [
"As a last action in this section, use the [`listruns()`](https://bcda-aps.github.io/apstools/latest/api/_utils.html#apstools.utils.list_runs.listruns) command from *apstools* to show the (default: 20) most recent runs in the database. The table shows a short version of the run's unique identifier (`short_uid`), and other more obvious columns of information, truncated to avoid lengthy output. The name of the [databroker *catalog*](https://blueskyproject.io/databroker/index.html) (`class_2021_03`) is shown before the table."
"As a last action in this section, use the [listruns()](https://bcda-aps.github.io/apstools/latest/api/_utils.html#apstools.utils.list_runs.listruns) command from *apstools* to show the (default: 20) most recent runs in the database. The table shows a short version of the run's unique identifier (`short_uid`), and other more obvious columns of information, truncated to avoid lengthy output. The name of the [databroker *catalog*](https://blueskyproject.io/databroker/index.html) (`class_2021_03`) is shown before the table."
]
},
{
Expand Down
14 changes: 7 additions & 7 deletions .doctrees/nbsphinx/howto/_custom_heater_positioner.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"\n",
"Simulate a temperature controller with heater and cooling features. Use it as a positioner.\n",
"\n",
"A temperature sensor can be [simulated](https://github.com/epics-modules/optics/blob/fdf5bc3c2731ba6769b62e71628fe3018c8245e3/opticsApp/Db/fb_epid.db#L236-L270) with a single synApps [`swait`](https://htmlpreview.github.io/?https://raw.githubusercontent.com/epics-modules/calc/R3-6-1/documentation/swaitRecord.html) record. The `swait` record has 16 fields for input values, either as constants or values from other EPICS PVs. Via a custom calculation [expression](https://github.com/epics-modules/optics/blob/fdf5bc3c2731ba6769b62e71628fe3018c8245e3/opticsApp/Db/fb_epid.db#L262), a simulated temperature sensor value is computed.\n",
"A temperature sensor can be [simulated](https://github.com/epics-modules/optics/blob/fdf5bc3c2731ba6769b62e71628fe3018c8245e3/opticsApp/Db/fb_epid.db#L236-L270) with a single synApps [swait](https://htmlpreview.github.io/?https://raw.githubusercontent.com/epics-modules/calc/R3-6-1/documentation/swaitRecord.html) record. The `swait` record has 16 fields for input values, either as constants or values from other EPICS PVs. Via a custom calculation [expression](https://github.com/epics-modules/optics/blob/fdf5bc3c2731ba6769b62e71628fe3018c8245e3/opticsApp/Db/fb_epid.db#L262), a simulated temperature sensor value is computed.\n",
"\n",
"<details>\n",
"\n",
Expand All @@ -48,9 +48,9 @@
"\n",
"## Overview\n",
"\n",
"A _PID_ loop (see below) has been [paired](https://github.com/epics-modules/optics/blob/master/opticsApp/Db/fb_epid.db) with the simulated temperature using the synApps [`epid`](https://epics.anl.gov/bcda/synApps/std/epidRecord.html) record, to update the operating power of the heater so that the temperature reaches a desired value.\n",
"A _PID_ loop (see below) has been [paired](https://github.com/epics-modules/optics/blob/master/opticsApp/Db/fb_epid.db) with the simulated temperature using the synApps [epid](https://epics.anl.gov/bcda/synApps/std/epidRecord.html) record, to update the operating power of the heater so that the temperature reaches a desired value.\n",
"\n",
"Significant _additional_ **realism is added to the simulation** by switching to the synApps [`transform`](https://htmlpreview.github.io/?https://raw.githubusercontent.com/epics-modules/calc/R3-6-1/documentation/transformRecord.html) record. The `transform` record also has 16 fields for values plus additional features:\n",
"Significant _additional_ **realism is added to the simulation** by switching to the synApps [transform](https://htmlpreview.github.io/?https://raw.githubusercontent.com/epics-modules/calc/R3-6-1/documentation/transformRecord.html) record. The `transform` record also has 16 fields for values plus additional features:\n",
"\n",
"- value (same as `swait` record)\n",
"- (optional) input PV link (same as `swait` record)\n",
Expand Down Expand Up @@ -82,7 +82,7 @@
"\n",
"Certain fields of this `transform` record are linked to fields in an `epid` record. When the `transform` record is [evaluated](https://docs.epics-controls.org/en/latest/guides/EPICS_Process_Database_Concepts.html) (_processed_, in EPICS terms), the `epid` is then _processed_. The `epid` record computes a new value (of _power_fraction_, the fraction of total heater power) for the next computation of the temperature signal.\n",
"\n",
"The simulated temperature is re-computed (processed) [periodically](https://docs.epics-controls.org/en/latest/guides/EPICS_Process_Database_Concepts.html#scanning-specification), as configured by the `transform` record's [`.SCAN`](https://docs.epics-controls.org/en/latest/guides/EPICS_Process_Database_Concepts.html?highlight=.SCAN#periodic-scanning) field.\n",
"The simulated temperature is re-computed (processed) [periodically](https://docs.epics-controls.org/en/latest/guides/EPICS_Process_Database_Concepts.html#scanning-specification), as configured by the `transform` record's [.SCAN](https://docs.epics-controls.org/en/latest/guides/EPICS_Process_Database_Concepts.html?highlight=.SCAN#periodic-scanning) field.\n",
"When `transform` is processed, it first pulls the _power_fraction_ from `epid` (the output of the PID loop calculation) for the next simulated temperature.\n",
"\n",
"Once `transform` processing is complete, the `epid` record is told to process itself by configuring the `transform` record's [forward link](https://docs.epics-controls.org/en/latest/guides/EPICS_Process_Database_Concepts.html#forward-links) (.`FLNK`) field. The _setpoint_ is pushed from `transform` to `epid`_ while `epid` pulls the current _temperature_ (readback) from `transform`.\n",
Expand All @@ -106,12 +106,12 @@
"source": [
"## ophyd interface\n",
"\n",
"This notebook will configure both `transform` and `epid` records using `ophyd` Python tools within the [Bluesky](https://blueskyproject.io/) framework. GUI screens from the [`caQtDM`](https://caqtdm.github.io/) application will show the summary settings of each record.\n",
"This notebook will configure both `transform` and `epid` records using `ophyd` Python tools within the [Bluesky](https://blueskyproject.io/) framework. GUI screens from the [caQtDM](https://caqtdm.github.io/) application will show the summary settings of each record.\n",
"\n",
"record | EPICS PV | Python object | ophyd support\n",
"--- | --- | --- | ---\n",
"`transform` | `\"gp:userTran1\"` | `heater` | [`apstools.synApps.TransformRecord`](https://bcda-aps.github.io/apstools/latest/api/synApps/_transform.html)\n",
"`epid` | `\"gp:epid1\"` | `pid` | [`apstools.synApps.EpidRecord`](https://bcda-aps.github.io/apstools/latest/api/synApps/_epid.html)"
"`transform` | `\"gp:userTran1\"` | `heater` | [apstools.synApps.TransformRecord](https://bcda-aps.github.io/apstools/latest/api/synApps/_transform.html)\n",
"`epid` | `\"gp:epid1\"` | `pid` | [apstools.synApps.EpidRecord](https://bcda-aps.github.io/apstools/latest/api/synApps/_epid.html)"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion .doctrees/nbsphinx/howto/_custom_plan.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@
"\n",
" _Hint_: `logger.info(\"text: %s value: %g\", s1, v2, ...)`\n",
"\n",
" Consider examples as used in [`peak_finder_example.py`](instrument/plans/peak_finder_example.py).\n",
" Consider examples as used in `instrument/plans/peak_finder_example.py`.\n",
" See the [Python logging tutorial](https://docs.python.org/3/howto/logging.html) for more information.\n",
"1. Control the `shutter` (hint: `yield from bps.mv(shutter, \"open\")` or `close`)\n",
"1. Change the temperature before *up* scan and then before *down* scan. (hint: `yield from bps.mv(temperature, value)`)"
Expand Down
Loading

0 comments on commit fb6e099

Please sign in to comment.