diff --git a/docs/source/example/_export_bluesky_data.md b/docs/source/example/_export_bluesky_data.md index 7605f7ce..239f526e 100644 --- a/docs/source/example/_export_bluesky_data.md +++ b/docs/source/example/_export_bluesky_data.md @@ -13,9 +13,9 @@ First, you have some choices: - _one-time_: learn a set of Python commands - _occasional_: build Python command (or _callback_) to expedite the steps _for your users_. - _always_: write file as data is acquired using a Bluesky - [`callback`](https://blueskyproject.io/bluesky/callbacks.html?highlight=callback#overview-of-callbacks) (to the bluesky `RunEngine`) + [callback](https://blueskyproject.io/bluesky/callbacks.html?highlight=callback#overview-of-callbacks) (to the bluesky `RunEngine`) - What tool(s) will the user(s) be using to **_read_** the data received? - - _python_: [`databroker`](https://blueskyproject.io/databroker/) + - _python_: [databroker](https://blueskyproject.io/databroker/) - _file(s)_: What file format to use? - _text_: [CSV](https://docs.python.org/3/library/csv.html), @@ -29,12 +29,12 @@ First, you have some choices: - _network_: - _[globus](https://www.globus.org/data-transfer)_: high-performance data transfers between systems within and across organizations - - _[`tiled`](https://blueskyproject.io/tiled/)_: + - _[tiled](https://blueskyproject.io/tiled/)_: Bluesky **data access** service for data-aware portals and data science tools. ## databroker-pack -The [`databroker-pack`](https://blueskyproject.io/databroker-pack/) package +The [databroker-pack](https://blueskyproject.io/databroker-pack/) package is used as part of the process to move a subset of a databroker catalog (or the entire catalog). > The utility `databroker-pack` boxes up Bluesky Runs as a directory of @@ -157,7 +157,7 @@ Since `md` is a dictionary structure, it is not so easy to write into a CSV file #### JSON While Python provides a -[`json`](https://docs.python.org/3/library/json.html) package to +[json](https://docs.python.org/3/library/json.html) package to read/write a JSON file, it may be easier to use the `xarray` structure returned by the `databroker` from `run.primary.read()` (where `primary` is the name of the document stream named _primary_). Export the data to @@ -186,7 +186,7 @@ can be set to `false` if you wish to disable this. ### HDF5 files Python support for the HDF5 format is usally provided through use of the -[`h5py`](https://www.h5py.org/) package. NeXus is an example of a specific +[h5py](https://www.h5py.org/) package. NeXus is an example of a specific #### raw @@ -220,7 +220,7 @@ data according to the terms of the file format. ### apstools The -[`apstools`](https://bcda-aps.github.io/apstools/source/_filewriters.html) +[apstools](https://bcda-aps.github.io/apstools/source/_filewriters.html) package supports automatic data export to NeXus or SPEC data files via callbacks. The support is provided in python `class` definitions that handle each of the document types from the `RunEngine`. diff --git a/docs/source/example/_xafs_scan.ipynb b/docs/source/example/_xafs_scan.ipynb index d08ba926..b8848deb 100644 --- a/docs/source/example/_xafs_scan.ipynb +++ b/docs/source/example/_xafs_scan.ipynb @@ -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)." ] }, { @@ -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." ] }, { diff --git a/docs/source/howto/_basic_aps_info.ipynb b/docs/source/howto/_basic_aps_info.ipynb index 9a52d1f8..da0a9fd9 100644 --- a/docs/source/howto/_basic_aps_info.ipynb +++ b/docs/source/howto/_basic_aps_info.ipynb @@ -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)." ] }, { diff --git a/docs/source/howto/_basic_motor_scaler_scan.ipynb b/docs/source/howto/_basic_motor_scaler_scan.ipynb index 743617d8..fce3211a 100644 --- a/docs/source/howto/_basic_motor_scaler_scan.ipynb +++ b/docs/source/howto/_basic_motor_scaler_scan.ipynb @@ -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." ] }, { @@ -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:" ] @@ -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." ] }, { @@ -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.)" ] @@ -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." ] } ], diff --git a/docs/source/howto/_count_scaler.ipynb b/docs/source/howto/_count_scaler.ipynb index d4b4f7a9..6e7e302b 100644 --- a/docs/source/howto/_count_scaler.ipynb +++ b/docs/source/howto/_count_scaler.ipynb @@ -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." ] @@ -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." ] }, { @@ -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." ] }, { diff --git a/docs/source/howto/_custom_heater_positioner.ipynb b/docs/source/howto/_custom_heater_positioner.ipynb index 2645f17e..0675516c 100644 --- a/docs/source/howto/_custom_heater_positioner.ipynb +++ b/docs/source/howto/_custom_heater_positioner.ipynb @@ -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", "
\n", "\n", @@ -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", @@ -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", @@ -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)" ] }, { diff --git a/docs/source/howto/_custom_plan.ipynb b/docs/source/howto/_custom_plan.ipynb index 60d4094d..57ebb168 100644 --- a/docs/source/howto/_custom_plan.ipynb +++ b/docs/source/howto/_custom_plan.ipynb @@ -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)`)" diff --git a/docs/source/howto/_dynamic_limits_2motor.ipynb b/docs/source/howto/_dynamic_limits_2motor.ipynb index ac6d806f..27c4ccd6 100644 --- a/docs/source/howto/_dynamic_limits_2motor.ipynb +++ b/docs/source/howto/_dynamic_limits_2motor.ipynb @@ -21,7 +21,7 @@ "\n", "To prevent the collision *in this case*, the $2\\theta$ axis must be at least $\\delta$ degrees above the $\\theta$ axis. Empirically, $\\delta$ of 3 degrees is sufficient protection.\n", "\n", - "From a controls safety view, we provide an EPICS PV calculation that is zero when the move is not permitted and one when: ($2\\theta - \\theta) \\ge \\delta$. We'll monitor that PV in Bluesky to add a [suspender](https://blueskyproject.io/bluesky/state-machine.html#automated-suspension) that can interrupt the scan (via the [`bluesky.RunEngine`](https://blueskyproject.io/bluesky/run_engine_api.html?highlight=runengine)) if the permit is removed. When the RunEngine handles an interruption involving [*movable devices*](https://blueskyproject.io/bluesky/hardware.html?highlight=movables#settable-movable-device), it sends a stop to each of the movables involved. Thus, when the dynamic limit permit is removed, both motors are stopped and the scan pauses, waiting for external interaction to clear the condition.\n", + "From a controls safety view, we provide an EPICS PV calculation that is zero when the move is not permitted and one when: ($2\\theta - \\theta) \\ge \\delta$. We'll monitor that PV in Bluesky to add a [suspender](https://blueskyproject.io/bluesky/state-machine.html#automated-suspension) that can interrupt the scan (via the [bluesky.RunEngine](https://blueskyproject.io/bluesky/run_engine_api.html?highlight=runengine)) if the permit is removed. When the RunEngine handles an interruption involving [*movable devices*](https://blueskyproject.io/bluesky/hardware.html?highlight=movables#settable-movable-device), it sends a stop to each of the movables involved. Thus, when the dynamic limit permit is removed, both motors are stopped and the scan pauses, waiting for external interaction to clear the condition.\n", "\n", "
\n", "[Here](https://github.com/bluesky/bluesky/blob/4fab894bddbd4a563f28852ea3171b87140ae7b9/bluesky/run_engine.py#L1034-L1036) is where bluesky tells the motors to stop:\n", @@ -67,7 +67,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "We start with two motor axes defined in EPICS. Here, we run the docker image [`prjemian/synApps`](https://hub.docker.com/r/prjemian/synapps) to make the [EPICS IOC simulator run in a docker container](https://github.com/prjemian/epics-docker/#custom-synappshttps://github.com/prjemian/epics-docker/#custom-synapps) with IOC prefix `gp:`. These are motor PVs: `gp:m1` and `gp:m2` as shown.\n", + "We start with two motor axes defined in EPICS. Here, we run the docker image [prjemian/synApps](https://hub.docker.com/r/prjemian/synapps) to make the [EPICS IOC simulator run in a docker container](https://github.com/prjemian/epics-docker/#custom-synappshttps://github.com/prjemian/epics-docker/#custom-synapps) with IOC prefix `gp:`. These are motor PVs: `gp:m1` and `gp:m2` as shown.\n", "\n", "![EPICS motor GUI screens](/_static/demo_dynamic_limits_motors.png)" ] diff --git a/docs/source/howto/_images_darks_flats.ipynb b/docs/source/howto/_images_darks_flats.ipynb index 5a6817a0..06a91c3e 100644 --- a/docs/source/howto/_images_darks_flats.ipynb +++ b/docs/source/howto/_images_darks_flats.ipynb @@ -41,7 +41,7 @@ "(`$(P):cam1:FrameType` and `$(P):cam1:FrameType_RBV`).\n", "\n", "In NeXus, detector data is stored within the\n", - "[`instrument`](https://manual.nexusformat.org/classes/base_classes/NXinstrument.html#nxinstrument-detector-group)\n", + "[instrument](https://manual.nexusformat.org/classes/base_classes/NXinstrument.html#nxinstrument-detector-group)\n", "group, traditionally at `/entry/instrument/detector/`. We then hard link the\n", "field `data`, `dark`, and `white` fields to the `/entry/data/` group. The hard\n", "links provide a shorter HDF5 address. We use this shorter address in EPICS, to\n", diff --git a/docs/source/howto/_synapps_sscan_1d_flyer.ipynb b/docs/source/howto/_synapps_sscan_1d_flyer.ipynb index 4dba613f..b9b7d539 100644 --- a/docs/source/howto/_synapps_sscan_1d_flyer.ipynb +++ b/docs/source/howto/_synapps_sscan_1d_flyer.ipynb @@ -39,7 +39,7 @@ "\n", "Suggest the _noisy *v* m1_ scan, done as 1-D step scan with `sscan` record, where `noisy` is the [*swait*](https://htmlpreview.github.io/?https://raw.githubusercontent.com/epics-modules/calc/R3-6-1/documentation/swaitRecord.html) record calculating a Lorentzian peak based on `m1` (EPICS [*motor*]([*swait*](https://epics.anl.gov/bcda/synApps/motor/motorRecord.html)) record) position.\n", "\n", - "We'll build a custom Python class, from [`apstools.synApps.SscanRecord`](https://apstools.readthedocs.io/en/latest/source/synApps/_sscan.html) (a subclass of [`ophyd.Device`](https://blueskyproject.io/ophyd/tutorials/device.html#define-a-custom-device)), that supports the EPICS [*sscan*](https://epics.anl.gov/bcda/synApps/sscan/sscanRecord.html) record and add the [`ophyd.FlyerInterface`](https://blueskyproject.io/ophyd/architecture.html#fly-able-interface) to that class. A class method will configure the Device staging to setup the sscan record for a 1-D step scan using the [`m1`](https://github.com/BCDA-APS/bluesky_training/blob/711baca0e4fcdffc97fb4d05ee73d4b5b93fcc3a/bluesky/instrument/devices/motors.py#L25) positioner and the [`noisy`](https://github.com/BCDA-APS/bluesky_training/blob/711baca0e4fcdffc97fb4d05ee73d4b5b93fcc3a/bluesky/instrument/devices/noisy_detector.py#L42) detector. `noisy` is implemented as an EPICS [*swait*](https://htmlpreview.github.io/?https://raw.githubusercontent.com/epics-modules/calc/R3-6-1/documentation/swaitRecord.html) record configured to recalculate a Lorentzian profile when the `m1` readback value changes. The center, width, and height are [set randomly](https://github.com/BCDA-APS/bluesky_training/blob/711baca0e4fcdffc97fb4d05ee73d4b5b93fcc3a/bluesky/instrument/devices/noisy_detector.py#L24-L38) as this bluesky instrument package is loaded. The center of the simulated peak will be defined somewhere between [+/- 1](https://github.com/BCDA-APS/bluesky_training/blob/711baca0e4fcdffc97fb4d05ee73d4b5b93fcc3a/bluesky/instrument/devices/noisy_detector.py#L34)." + "We'll build a custom Python class, from [apstools.synApps.SscanRecord](https://apstools.readthedocs.io/en/latest/source/synApps/_sscan.html) (a subclass of [ophyd.Device](https://blueskyproject.io/ophyd/tutorials/device.html#define-a-custom-device)), that supports the EPICS [*sscan*](https://epics.anl.gov/bcda/synApps/sscan/sscanRecord.html) record and add the [ophyd.FlyerInterface](https://blueskyproject.io/ophyd/architecture.html#fly-able-interface) to that class. A class method will configure the Device staging to setup the sscan record for a 1-D step scan using the [m1](https://github.com/BCDA-APS/bluesky_training/blob/711baca0e4fcdffc97fb4d05ee73d4b5b93fcc3a/bluesky/instrument/devices/motors.py#L25) positioner and the [noisy](https://github.com/BCDA-APS/bluesky_training/blob/711baca0e4fcdffc97fb4d05ee73d4b5b93fcc3a/bluesky/instrument/devices/noisy_detector.py#L42) detector. `noisy` is implemented as an EPICS [*swait*](https://htmlpreview.github.io/?https://raw.githubusercontent.com/epics-modules/calc/R3-6-1/documentation/swaitRecord.html) record configured to recalculate a Lorentzian profile when the `m1` readback value changes. The center, width, and height are [set randomly](https://github.com/BCDA-APS/bluesky_training/blob/711baca0e4fcdffc97fb4d05ee73d4b5b93fcc3a/bluesky/instrument/devices/noisy_detector.py#L24-L38) as this bluesky instrument package is loaded. The center of the simulated peak will be defined somewhere between [+/- 1](https://github.com/BCDA-APS/bluesky_training/blob/711baca0e4fcdffc97fb4d05ee73d4b5b93fcc3a/bluesky/instrument/devices/noisy_detector.py#L34)." ] }, { diff --git a/docs/source/instrument/_configure_bluesky_instrument.md b/docs/source/instrument/_configure_bluesky_instrument.md index 6151335c..54925e03 100644 --- a/docs/source/instrument/_configure_bluesky_instrument.md +++ b/docs/source/instrument/_configure_bluesky_instrument.md @@ -92,7 +92,7 @@ NeXus files using a [callback](https://github.com/APS-USAXS/usaxs-bluesky/blob/master/instrument/callbacks/nxwriter.py). The order of file loading is controlled by the lines in the -[`__init__.py`](./_about_init_files.md) file. In some cases, the sequence of +[__init__.py](./_about_init_files.md) file. In some cases, the sequence of loading is important. ### Devices @@ -109,7 +109,7 @@ hardware. These files are leftovers as used in the bluesky training examples and provide ideas for what is possible with your instrument. The order of file loading is controlled by the lines in the -[`__init__.py`](./_about_init_files.md) file. In some cases, the sequence of +[__init__.py](./_about_init_files.md) file. In some cases, the sequence of loading is important. **Note**: A major principle is that any activities on startup **should not @@ -118,7 +118,7 @@ EPICS will not be affected just beacuse a Bluesky session was started. (This is why you changed `ALLOW_AREA_DETECTOR_WARMUP` to `false` above.) **Tip**: SPEC users: -[`spec2ophyd`](https://bcda-aps.github.io/apstools/latest/applications/spec2ophyd.html#spec2ophyd) +[spec2ophyd](https://bcda-aps.github.io/apstools/latest/applications/spec2ophyd.html#spec2ophyd) can translate much of your SPEC config file into content for the Devices directory. @@ -128,7 +128,7 @@ The `instrument/plans/` directory contains Python files that define the custom Bluesky plans for your instrument. The existing files serve as examples. The order of file loading is controlled by the lines in the -[`__init__.py`](./_about_init_files.md) file. In some cases, the sequence of +[__init__.py](./_about_init_files.md) file. In some cases, the sequence of loading is important. ### Utils @@ -138,5 +138,5 @@ classified as Callbacks, Devices, or Plans. For example, standard analytical routines might be best placed in Utils. The order of file loading is controlled by the lines in the -[`__init__.py`](./_about_init_files.md) file. In some cases, the sequence of +[__init__.py](./_about_init_files.md) file. In some cases, the sequence of loading is important. diff --git a/docs/source/instrument/_configure_databroker.md b/docs/source/instrument/_configure_databroker.md index bc263468..bbba35e9 100644 --- a/docs/source/instrument/_configure_databroker.md +++ b/docs/source/instrument/_configure_databroker.md @@ -5,7 +5,7 @@ with some location where data is stored, typically a MongoDB collection. This is called a catalog configuration file. The catalog configuration file must be placed in a directory where -[`databroker`](https://blueskyproject.io/databroker/how-to/mongo-backed-catalog.html) +[databroker](https://blueskyproject.io/databroker/how-to/mongo-backed-catalog.html) expects to find it. Run this snippet to find the list of paths where it looks on your system:
diff --git a/docs/source/instrument/_get_spec_config.md b/docs/source/instrument/_get_spec_config.md
index bd601b56..0411e30c 100644
--- a/docs/source/instrument/_get_spec_config.md
+++ b/docs/source/instrument/_get_spec_config.md
@@ -1,6 +1,6 @@
 # Translate Previous SPEC Configuration
 
-The [`apstools`](https://bcda-aps.github.io/apstools/latest/) package has an application that will translate most
+The [apstools](https://bcda-aps.github.io/apstools/latest/) package has an application that will translate most
 of the SPEC config file into ophyd commands.  The output is to the
 console.  Use a pipe to direct the output to a new file:
 
diff --git a/docs/source/instrument/bluesky_class.yml b/docs/source/instrument/bluesky_class.yml
new file mode 100644
index 00000000..67eb968a
--- /dev/null
+++ b/docs/source/instrument/bluesky_class.yml
@@ -0,0 +1,13 @@
+# file: bluesky_class.yml
+# purpose: Configuration file to connect Bluesky databroker with MongoDB
+# For 2021-03 Python Training at APS
+
+# Copy to: ~/.local/share/intake/bluesky_class.yml
+# Create subdirectories as needed
+
+sources:
+  class_2021_03:
+    args:
+      asset_registry_db: mongodb://localhost:27017/class_2021_03-bluesky
+      metadatastore_db: mongodb://localhost:27017/class_2021_03-bluesky
+    driver: bluesky-mongo-normalized-catalog
diff --git a/docs/source/instrument/describe_instrument.ipynb b/docs/source/instrument/describe_instrument.ipynb
index 0cac8df9..6b095114 100644
--- a/docs/source/instrument/describe_instrument.ipynb
+++ b/docs/source/instrument/describe_instrument.ipynb
@@ -33,8 +33,8 @@
     "\n",
     "prefix | description | docker image | documentation\n",
     ":--- | :--- | :--- | :---\n",
-    "`ad:` | area detector IOC | [`prjemian/custom-synapps-6.2-ad-3.10`](https://hub.docker.com/r/prjemian/custom-synapps-6.2-ad-3.10) | https://github.com/prjemian/epics-docker/tree/main/v1.1/n6_custom_areaDetector\n",
-    "`gp:` | general purpose IOC | [`prjemian/prjemian/custom-synapps-6.2`](https://hub.docker.com/r/prjemian/custom-synapps-6.2) | https://github.com/prjemian/epics-docker/tree/main/v1.1/n5_custom_synApps\n",
+    "`ad:` | area detector IOC | [prjemian/custom-synapps-6.2-ad-3.10](https://hub.docker.com/r/prjemian/custom-synapps-6.2-ad-3.10) | https://github.com/prjemian/epics-docker/tree/main/v1.1/n6_custom_areaDetector\n",
+    "`gp:` | general purpose IOC | [prjemian/prjemian/custom-synapps-6.2](https://hub.docker.com/r/prjemian/custom-synapps-6.2) | https://github.com/prjemian/epics-docker/tree/main/v1.1/n5_custom_synApps\n",
     "\n",
     "
" ] @@ -193,7 +193,7 @@ "id": "ff54948c", "metadata": {}, "source": [ - "The EPICS Area Detector ADSimDetector is included with this instrument as `adsimdet`. The detector is a monochrome 1k x 1k frame. The image is written to an HDF5 file and made available to the [`databroker`](#databroker) via a shared volume from the docker container. `adsimdet` can be used as a detector.\n", + "The EPICS Area Detector ADSimDetector is included with this instrument as `adsimdet`. The detector is a monochrome 1k x 1k frame. The image is written to an HDF5 file and made available to the [databroker](#databroker) via a shared volume from the docker container. `adsimdet` can be used as a detector.\n", "\n", "The image is a simulated diffraction spot with center randomly-chosen between 100..900 on both axes. The width is also random as is the peak intensity and noise level. Furthermore, to simulate realistic conditions, the center position of both axes is adjusted by a few pixels using a pair of *swait* records (`gp:userCalc9` & `gp:userCalc10`) updating from random numbers." ] @@ -733,7 +733,7 @@ "source": [ "There are 16 soft motor channels: `gp:m1` .. `gp:m16`. Any motor can be used as a detector **and** as a positioner.\n", "\n", - "The first motor, `gp:m1`, is used to compute a simulated 1-D diffraction peak ([`noisy`](#noisy)) using `gp:userCalc1`.\n", + "The first motor, `gp:m1`, is used to compute a simulated 1-D diffraction peak ([noisy](#noisy)) using `gp:userCalc1`.\n", "\n", "To make it easier to change the motor step size, a custom `MyEpicsMotor` class was made, subclassing from `ophyd.EpicsMotor` and adding a component to access the motor's `.SREV` (steps/revolution) field. The default motor step size is 0.01 (with SREV=200). For only `m1`, the step size has been changed to 0.001 by setting SREV=2000.\n", "\n", @@ -1032,7 +1032,7 @@ "source": [ "## SPEC data files\n", "\n", - "A [SPEC](https://certif.com) data file records a copy of the scan data (area detector images are not stored in SPEC files). By default, the file is created in the present working directory using a name constructed from the date and time with a `.dat` file extension. Unlike SPEC, new data is written *at the end of a scan*. It is also possible to use the [`SpecWriterCallback`](https://apstools.readthedocs.io/en/latest/source/_filewriters.html#apstools.filewriters.SpecWriterCallback) to write data extracted from the database after the experiment is done.\n", + "A [SPEC](https://certif.com) data file records a copy of the scan data (area detector images are not stored in SPEC files). By default, the file is created in the present working directory using a name constructed from the date and time with a `.dat` file extension. Unlike SPEC, new data is written *at the end of a scan*. It is also possible to use the [SpecWriterCallback](https://apstools.readthedocs.io/en/latest/source/_filewriters.html#apstools.filewriters.SpecWriterCallback) to write data extracted from the database after the experiment is done.\n", "\n", "The 2021-03 training does not cover the use of these files. You are free to examine them yourselves.\n", "\n", @@ -1222,7 +1222,7 @@ "\n", "A common request from instruments is to allow the user to write some python code that can be loaded into the current session. Since development of this *user code* is often iterative, it must be possible to reload the code without requiring the session to exit and restart.\n", "\n", - "The local file [`quick_hello.py`](../../../bluesky/user/quick_hello.py) provides an example of such a user code file. Load this file with the command:\n", + "The local file `user/quick_hello.py` provides an example of such a user code file. Load this file with the command:\n", "\n", " %run -im user.quick_hello\n", "\n", @@ -1230,7 +1230,7 @@ "\n", "The `%run` is an [IPython Magic](https://ipython.readthedocs.io/en/stable/interactive/magics.html) command. _Magic_ commands are only available from the _interactive_ IPython command line (either in a console or Jupyter notebook). You can't use them in your Python files, functions, classes, etc.\n", "\n", - "The `user/` directory must be on the import path, which we did as part of starting the `instrument` package (above). Also, `user/` _must_ contain a file named [`__init__.py`](./_about_init_files.md) so that `user` is an importable Python package.\n", + "The `user/` directory must be on the import path, which we did as part of starting the `instrument` package (above). Also, `user/` _must_ contain a file named [__init__.py](./_about_init_files.md) so that `user` is an importable Python package.\n", "\n", "The `m` (as module) command option was added so it is not necessary to give the Python extension `.py`.\n", "\n", @@ -1308,12 +1308,12 @@ "source": [ "## databroker\n", "\n", - "The [`databroker`](https://blueskyproject.io/databroker) package provides \n", + "The [databroker](https://blueskyproject.io/databroker) package provides \n", "a Python interface to the database with the experiment data, including \n", "references to the large file content such as area detector images. A \n", "[YAML](https://yaml.org) configuration file connects databroker with a \n", "specific repository in the MongoDB database server. In the example here \n", - "([`bluesky_class.yml`](./bluesky_class.yml)), the name of the *catalog* entry\n", + "([bluesky_class.yml](./bluesky_class.yml)), the name of the *catalog* entry\n", "in this file is `class_2021_03`. It makes two connections to a MongoDB server\n", "running on the same workstation `localhost`. Both connections are to the \n", "same MongoDB collection: `class_2021_03-bluesky`. The name of the file\n", @@ -1369,7 +1369,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.11" + "version": "3.10.4" } }, "nbformat": 4, diff --git a/docs/source/instrument/guide.md b/docs/source/instrument/guide.md index b5b7deb4..3aa7da6f 100644 --- a/docs/source/instrument/guide.md +++ b/docs/source/instrument/guide.md @@ -30,13 +30,13 @@ instrument/ <-- all aspects of the equipment iconfig.yml <-- instrument configuration settings for you to customize ``` -Each directory has a [`__init__.py`](./_about_init_files.md) file (which _can_ be empty). The very +Each directory has a [__init__.py](./_about_init_files.md) file (which _can_ be empty). The very existence of this file informs Python that the directory is a Python *package* which means that it can be imported. The `__init__.py` file can be used to control what is imported and the order in which that import is sequenced. In any of the Python files, the -[`__all__`](https://stackoverflow.com/questions/44834) symbol is a Python list +[__all__](https://stackoverflow.com/questions/44834) symbol is a Python list that identifies which Python symbols from that file will be imported by default. (Any Python symbol may be imported by name, this just controls the more general case.) @@ -70,13 +70,13 @@ convention, the `name=` keyword has the same value as the LHS. The keyword [tuple](https://docs.python.org/3/library/stdtypes.html?highlight=tuple#sequence-types-list-tuple-range). When the `motor` value is added to the tuple, then this motor will show up in the report provided by the -[`%wa`](https://blueskyproject.io/bluesky/magics.html?highlight=magic#listing-available-motors-using-wa-post-v1-3-0) +[%wa](https://blueskyproject.io/bluesky/magics.html?highlight=magic#listing-available-motors-using-wa-post-v1-3-0) (bluesky IPython) magic command. CAUTION: Avoid certain names such as -[`del`](https://docs.python.org/3/reference/simple_stmts.html?highlight=del#the-del-statement) +[del](https://docs.python.org/3/reference/simple_stmts.html?highlight=del#the-del-statement) and -[`lambda`](https://docs.python.org/3/reference/expressions.html?highlight=lambda#lambda) +[lambda](https://docs.python.org/3/reference/expressions.html?highlight=lambda#lambda) since these are reserved Python names with very important meanings. Be sure to add this new motor symbol to the `__all__` list near the top of the file. @@ -270,8 +270,8 @@ Sometimes, a user may need experiment-specific code that is not for general inclusion in the instrument package. Components from the `instrument` package may be imported from such custom user code by writing a file in the working directory with the support. The file can be loaded and run in an IPython -session with the [`%run -i -filename.py`](https://ipython.org/ipython-doc/3/interactive/magics.html#magic-run) +session with the [%run -i +filename.py](https://ipython.org/ipython-doc/3/interactive/magics.html#magic-run) magic command.
diff --git a/docs/source/tutor/_aps101_notes.md b/docs/source/tutor/_aps101_notes.md index cdd4cc77..dbaad055 100644 --- a/docs/source/tutor/_aps101_notes.md +++ b/docs/source/tutor/_aps101_notes.md @@ -82,9 +82,9 @@ graphical text editors, MongoDB database server, and Python infrastructure. - Are there other tutorials available online? [Yes!](https://blueskyproject.io/tutorials/README.html) - [How to access data from previous measurements?](https://nbviewer.jupyter.org/github/BCDA-APS/bluesky_training/blob/main/after_measurement.ipynb) - [How to plot data from previous scans?](https://nbviewer.jupyter.org/github/BCDA-APS/bluesky_training/blob/main/plot_x_y_databroker.ipynb) -- How to use [EPICS area detectors](https://areadetector.github.io)? ([setup](https://apstools.readthedocs.io/en/latest/examples/_ad__pilatus.html), [measure](https://nbviewer.jupyter.org/github/BCDA-APS/bluesky_training/blob/main/locate_image_peak.ipynb), [analyze from `databroker`](https://nbviewer.jupyter.org/github/BCDA-APS/bluesky_training/blob/main/bluesky/databroker_analysis.ipynb)) +- How to use [EPICS area detectors](https://areadetector.github.io)? ([setup](https://apstools.readthedocs.io/en/latest/examples/_ad__pilatus.html), [measure](https://nbviewer.jupyter.org/github/BCDA-APS/bluesky_training/blob/main/locate_image_peak.ipynb), [analyze from databroker](https://nbviewer.jupyter.org/github/BCDA-APS/bluesky_training/blob/main/bluesky/databroker_analysis.ipynb)) - How to support complex [devices](https://blueskyproject.io/ophyd/tutorials/device.html?highlight=device)? -- How does [`databroker`](https://blueskyproject.io/databroker/) store the data? +- How does [databroker](https://blueskyproject.io/databroker/) store the data? - What is [MongoDB](https://www.mongodb.com/)? - [How to execute Linux command from Bluesky?](https://nbviewer.jupyter.org/github/BCDA-APS/bluesky_training/blob/main/demo_doodle.ipynb) - [How to setup and use a diffractometer with Bluesky?](https://blueskyproject.io/hklpy/examples/index.html) @@ -107,5 +107,5 @@ Links to the videos from the training sessions of 2021 August and September are - [References from Bluesky Tutorials](https://blueskyproject.io/tutorials/README.html#references) - [Jupyter Lab](https://jupyterlab.readthedocs.io) - [EPICS](https://epics-controls.org/) ([old web site](https://epics.anl.gov/)) -- [More on `EpicsSignal`](https://nbviewer.jupyter.org/github/BCDA-APS/bluesky_training/blob/main/connect_epics.ipynb) including `ophyd.Device` +- [More on EpicsSignal](https://nbviewer.jupyter.org/github/BCDA-APS/bluesky_training/blob/main/connect_epics.ipynb) including `ophyd.Device` - For more about Juypter, see the Bluesky [Hello Python and Jupyter](https://blueskyproject.io/tutorials/Hello%20Python%20and%20Jupyter.html) Tutorial. diff --git a/docs/source/tutor/_basic_a.ipynb b/docs/source/tutor/_basic_a.ipynb index bd9f0349..f51289c8 100644 --- a/docs/source/tutor/_basic_a.ipynb +++ b/docs/source/tutor/_basic_a.ipynb @@ -270,7 +270,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "`scaler.preset_time` is an [`EpicsSignal`](https://github.com/bluesky/ophyd/blob/7612b2c9de9d5bc16cf28eea79ba5c12553f3cc2/ophyd/signal.py#L1615). All such [Signal](https://blueskyproject.io/ophyd/signals.html) objects have a `.get()` method which returns the Signal's value." + "`scaler.preset_time` is an [EpicsSignal](https://github.com/bluesky/ophyd/blob/7612b2c9de9d5bc16cf28eea79ba5c12553f3cc2/ophyd/signal.py#L1615). All such [Signal](https://blueskyproject.io/ophyd/signals.html) objects have a `.get()` method which returns the Signal's value." ] }, { @@ -388,7 +388,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Next, we'll load a library with many [predefined plans](https://blueskyproject.io/bluesky/plans.html#summary). The first plan we want to use is [`count()`](https://blueskyproject.io/bluesky/generated/bluesky.plans.count.html#bluesky.plans.count). By the way, we'll use a python feature to rename `bluesky.plans` to the shorter `bp` since it will be used a lot." + "Next, we'll load a library with many [predefined plans](https://blueskyproject.io/bluesky/plans.html#summary). The first plan we want to use is [count()](https://blueskyproject.io/bluesky/generated/bluesky.plans.count.html#bluesky.plans.count). By the way, we'll use a python feature to rename `bluesky.plans` to the shorter `bp` since it will be used a lot." ] }, { diff --git a/docs/source/tutor/_command_review.ipynb b/docs/source/tutor/_command_review.ipynb index d94d72b4..64b13c0a 100644 --- a/docs/source/tutor/_command_review.ipynb +++ b/docs/source/tutor/_command_review.ipynb @@ -252,7 +252,7 @@ "id": "f47d2f44", "metadata": {}, "source": [ - "Might be a good idea to know now what ophyd symbols are available. The [apstools](https://bcda-aps.github.io/apstools/latest/) package provides a [`listobjects()`](https://bcda-aps.github.io/apstools/latest/api/_utils.html#apstools.utils.misc.listobjects) command that prints a table of all the known objects (in the global namespace of the session). The columns provide the ophyd name (the name you use to call this in Python), the name of the ophyd structure, the EPICS PV (if relevant), and any labels (as used in `%wa` above)." + "Might be a good idea to know now what ophyd symbols are available. The [apstools](https://bcda-aps.github.io/apstools/latest/) package provides a [listobjects()](https://bcda-aps.github.io/apstools/latest/api/_utils.html#apstools.utils.misc.listobjects) command that prints a table of all the known objects (in the global namespace of the session). The columns provide the ophyd name (the name you use to call this in Python), the name of the ophyd structure, the EPICS PV (if relevant), and any labels (as used in `%wa` above)." ] }, { diff --git a/docs/source/tutor/_lesson1.ipynb b/docs/source/tutor/_lesson1.ipynb index c9c5392e..3c4ababa 100644 --- a/docs/source/tutor/_lesson1.ipynb +++ b/docs/source/tutor/_lesson1.ipynb @@ -12,7 +12,7 @@ "First, we'll show how to start a Jupyter notebook. Next, we'll connect with an EPICS scaler (using [ophyd](https://blueskyproject.io/ophyd/)), and then use the Bluesky software to count from the scaler.\n", "\n", "\n", - "**note**: This tutorial expects to find an EPICS IOC on the local network configured as a synApps [`xxx`](https://github.com/epics-modules/xxx) IOC with prefix `sky:`. A docker container is available to provide this IOC. See this URL for instructions: https://github.com/prjemian/epics-docker/blob/master/n3_synApps/README.md\n", + "**note**: This tutorial expects to find an EPICS IOC on the local network configured as a synApps [xxx](https://github.com/epics-modules/xxx) IOC with prefix `sky:`. A docker container is available to provide this IOC. See this URL for instructions: https://github.com/prjemian/epics-docker/blob/master/n3_synApps/README.md\n", "\n", "\n", "## Starting this session in a Jupyter notebook\n", @@ -53,7 +53,7 @@ "\n", "I have a synApps (v6.1) *XXX*-style IOC with the prefix `sky:`. It has a [scaler](https://htmlpreview.github.io/?https://raw.githubusercontent.com/epics-modules/std/R3-4-1/documentation/scalerRecord.html), 16 soft channel [motor](https://github.com/epics-modules/motor)s, and some other support we'll ignore in lesson 1.\n", "\n", - "The scaler is `sky:scaler1`. We'll connect to that first. To make the connection, we need to import the [`ScalerCH`](https://blueskyproject.io/ophyd/builtin-devices.html#epicsscaler) device from the [`ophyd.scaler`](https://blueskyproject.io/ophyd/) library." + "The scaler is `sky:scaler1`. We'll connect to that first. To make the connection, we need to import the [ScalerCH](https://blueskyproject.io/ophyd/builtin-devices.html#epicsscaler) device from the [ophyd.scaler](https://blueskyproject.io/ophyd/) library." ] }, { @@ -120,7 +120,7 @@ "source": [ "By default, the ophyd `ScalerCH` object shows data for only the channels with names defined in EPICS. Except for one channel (probably a bug in the `ScalerCH` code). To fix that, we'll load another support library. (Loading additional support as we need it will be a common theme in these lessons. Rather than loading all the libraries first, as is common in python code files, we'll load support code as the need arises.)\n", "\n", - "The new support code is `use_EPICS_scaler_channels` from [`apstools.devices`](https://bcda-aps.github.io/apstools/latest/api/_devices.html#apstools.devices.scaler_support.use_EPICS_scaler_channels)." + "The new support code is `use_EPICS_scaler_channels` from [apstools.devices](https://bcda-aps.github.io/apstools/latest/api/_devices.html#apstools.devices.scaler_support.use_EPICS_scaler_channels)." ] }, { @@ -198,7 +198,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Since `scaler.preset_time` is an [`EpicsSignal`](https://github.com/NSLS-II/ophyd/blob/master/ophyd/signal.py#L647), ([Signal](https://blueskyproject.io/ophyd/signals.html) is a fundamental ophyd structure), we print its `.value`." + "Since `scaler.preset_time` is an [EpicsSignal](https://github.com/NSLS-II/ophyd/blob/master/ophyd/signal.py#L647), ([Signal](https://blueskyproject.io/ophyd/signals.html) is a fundamental ophyd structure), we print its `.value`." ] }, { @@ -283,7 +283,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Next, we'll load a library with many [predefined plans](https://blueskyproject.io/bluesky/plans.html#summary). The first plan we want to use is [`count()`](https://blueskyproject.io/bluesky/generated/bluesky.plans.count.html#bluesky.plans.count). By the way, we'll use a python feature to rename `bluesky.plans` to the shorter `bp` since it will be used a lot." + "Next, we'll load a library with many [predefined plans](https://blueskyproject.io/bluesky/plans.html#summary). The first plan we want to use is [count()](https://blueskyproject.io/bluesky/generated/bluesky.plans.count.html#bluesky.plans.count). By the way, we'll use a python feature to rename `bluesky.plans` to the shorter `bp` since it will be used a lot." ] }, { diff --git a/docs/source/tutor/_lesson2.ipynb b/docs/source/tutor/_lesson2.ipynb index 0117eaaf..0b6d7554 100644 --- a/docs/source/tutor/_lesson2.ipynb +++ b/docs/source/tutor/_lesson2.ipynb @@ -13,7 +13,7 @@ "\n", "Load `ophyd` device support for the `EpicsMotor` and connect with one EPICS motor channel. We have a synApps (v6.1) XXX-style IOC with the prefix `sky:`. It has a scaler, 16 soft channel motors, and some other support we'll ignore in this lesson.\n", "\n", - "**note**: This tutorial expects to find an EPICS IOC on the local network configured as a synApps [`xxx`](https://github.com/epics-modules/xxx) IOC with prefix `sky:`. A docker container is available to provide this IOC. See this URL for instructions: https://github.com/prjemian/epics-docker/blob/master/n3_synApps/README.md" + "**note**: This tutorial expects to find an EPICS IOC on the local network configured as a synApps [xxx](https://github.com/epics-modules/xxx) IOC with prefix `sky:`. A docker container is available to provide this IOC. See this URL for instructions: https://github.com/prjemian/epics-docker/blob/master/n3_synApps/README.md" ] }, { diff --git a/docs/source/tutor/_lesson3a.ipynb b/docs/source/tutor/_lesson3a.ipynb index 8fb4b384..522dd39d 100644 --- a/docs/source/tutor/_lesson3a.ipynb +++ b/docs/source/tutor/_lesson3a.ipynb @@ -13,7 +13,7 @@ "\n", "-------\n", "\n", - "**note**: This tutorial expects to find an EPICS IOC on the local network configured as a synApps [`xxx`](https://github.com/epics-modules/xxx) IOC with prefix `sky:`. A docker container is available to provide this IOC. See this URL for instructions: https://github.com/prjemian/epics-docker/blob/master/n3_synApps/README.md\n", + "**note**: This tutorial expects to find an EPICS IOC on the local network configured as a synApps [xxx](https://github.com/epics-modules/xxx) IOC with prefix `sky:`. A docker container is available to provide this IOC. See this URL for instructions: https://github.com/prjemian/epics-docker/blob/master/n3_synApps/README.md\n", "\n", "Starting with the configuration from lessons 1 and 2, we first group the `import`s together as is common Python practice:" ] diff --git a/docs/source/tutor/_lesson3b.ipynb b/docs/source/tutor/_lesson3b.ipynb index 7a1163bf..3475ff77 100644 --- a/docs/source/tutor/_lesson3b.ipynb +++ b/docs/source/tutor/_lesson3b.ipynb @@ -9,7 +9,7 @@ "\n", "[Lesson 3](https://bcda-aps.github.io/bluesky_training/tutor/_lesson3a.html) demonstrated how bluesky can show data as it is acquired. This notebook provides a concise summary, which should be a good general starting point for users.\n", "\n", - "**note**: This tutorial expects to find an EPICS IOC on the local network configured as a synApps [`xxx`](https://github.com/epics-modules/xxx) IOC with prefix `sky:`. A docker container is available to provide this IOC. See this URL for instructions: https://github.com/prjemian/epics-docker/blob/master/n3_synApps/README.md" + "**note**: This tutorial expects to find an EPICS IOC on the local network configured as a synApps [xxx](https://github.com/epics-modules/xxx) IOC with prefix `sky:`. A docker container is available to provide this IOC. See this URL for instructions: https://github.com/prjemian/epics-docker/blob/master/n3_synApps/README.md" ] }, { diff --git a/docs/source/tutor/_lesson5a.ipynb b/docs/source/tutor/_lesson5a.ipynb index 0e5e85d7..7e9a068d 100644 --- a/docs/source/tutor/_lesson5a.ipynb +++ b/docs/source/tutor/_lesson5a.ipynb @@ -419,7 +419,7 @@ "source": [ "We need to tell the detector to acquire data. To acquire data, our simulator will re-compute its value based on the motor position (as with a real detector, the value does not update without something that compels this computation), since that may have changed since the last computation.\n", "\n", - "For interactive use with ophyd Devices, the command to call is [`%ct`](https://blueskyproject.io/bluesky/magics.html#taking-a-reading-using-ct-post-v1-3-0). We labeled the `noisy` object as `detectors` so it will be counted when `%ct` is called.\n", + "For interactive use with ophyd Devices, the command to call is [%ct](https://blueskyproject.io/bluesky/magics.html#taking-a-reading-using-ct-post-v1-3-0). We labeled the `noisy` object as `detectors` so it will be counted when `%ct` is called.\n", "\n", "TODO: improve the labels explanation here." ] diff --git a/docs/source/tutor/_lesson6.ipynb b/docs/source/tutor/_lesson6.ipynb index 2eb1ec2a..d6a6fea2 100644 --- a/docs/source/tutor/_lesson6.ipynb +++ b/docs/source/tutor/_lesson6.ipynb @@ -43,7 +43,7 @@ "\n", "**note**: This tutorial expects to find an EPICS IOC \n", "on the local network configured as an EPICS AreaDetector \n", - "[`ADSimDetector`](https://github.com/areaDetector/ADSimDetector) \n", + "[ADSimDetector](https://github.com/areaDetector/ADSimDetector) \n", "IOC with prefix `adsky:`. A docker container is available \n", "to provide this IOC. See this URL for instructions: \n", "https://github.com/prjemian/epics-docker/blob/master/n4_areaDetector/README.md\n", diff --git a/docs/source/tutor/_lesson7.ipynb b/docs/source/tutor/_lesson7.ipynb index f7fffae9..c0a5252e 100644 --- a/docs/source/tutor/_lesson7.ipynb +++ b/docs/source/tutor/_lesson7.ipynb @@ -107,7 +107,7 @@ "source": [ "Next, import the desired diffractometer geometry from the\n", "[*hklpy*](https://github.com/bluesky/hklpy) package. We pick\n", - "[`E4CV`](https://people.debian.org/~picca/hkl/hkl.html#orge78e5c4)\n", + "[E4CV](https://people.debian.org/~picca/hkl/hkl.html#orge78e5c4)\n", "(Eulerian 4-Circle with Vertical scattering geometry)\n", "as is typical at synchrotron beamlines." ] @@ -1069,11 +1069,6 @@ "are presented as a python list which may be empty if there are\n", "no solutions.\n", "\n", - "The [`DiffractometerMixin`](???) (FIXME: Not in apstools, maybe hklpy?)\n", - "provides a helper to print the possible forward solutions for a\n", - "list of *hkl* reflections. (Each reflection is provided as a\n", - "python tuple or list.)\n", - "\n", "Show default solution for a few reflections (*100*), (*010*) and (*001*):" ] }, @@ -1383,9 +1378,9 @@ "metadata": {}, "source": [ "The value is a\n", - "[`Constraint`](???) object. (FIXME: Not in apstools, maybe hklpy?)\n", + "[Constraints](https://blueskyproject.io/hklpy/constraints.html#constraints) object.\n", "\n", - "`Constraint` Arguments\n", + "`Constraints` Arguments\n", "\n", "* low_limit (*number*) :\n", " Limit solutions for this axis to no less than `low_limit` when `fit=True`.\n", @@ -1397,8 +1392,7 @@ " Calculate with axis = `value` when `fit=False`.\n", "\n", "* fit (*bool*) :\n", - " When `True`, calculate new values for this axis.\n", - " When `False`, keep this axis fixed at `value`.\n", + " Not used.\n", "\n", "In the dictionary, it is only necessary to define the axis constraints to be changed.\n", "The other (commented out) constraints will not be changed." diff --git a/docs/source/tutor/connect_epics.ipynb b/docs/source/tutor/connect_epics.ipynb index 8ce1abbc..b544d7f5 100644 --- a/docs/source/tutor/connect_epics.ipynb +++ b/docs/source/tutor/connect_epics.ipynb @@ -19,7 +19,7 @@ "source": [ "## Fundamentals\n", "\n", - "In Bluesky, the [ophyd](https://blueskyproject.io/ophyd) package is used to connect with the underlying control system (EPICS, in this case). The fundamental structure is the [`EpicsSignal`](https://blueskyproject.io/ophyd/tutorials/single-PV.html#connect-to-a-pv-from-ophyd) which connects a single EPICS Process Variable (PV) with a single python object. Behind the scenes, the connection is made using the [PyEpics](https://cars9.uchicago.edu/software/python/pyepics3/) package and the EPICS Channel Access protocol. Other information, when available (such as units, limits, displayed precision, data type, enumeration labels), is obtained from EPICS.\n", + "In Bluesky, the [ophyd](https://blueskyproject.io/ophyd) package is used to connect with the underlying control system (EPICS, in this case). The fundamental structure is the [EpicsSignal](https://blueskyproject.io/ophyd/tutorials/single-PV.html#connect-to-a-pv-from-ophyd) which connects a single EPICS Process Variable (PV) with a single python object. Behind the scenes, the connection is made using the [PyEpics](https://cars9.uchicago.edu/software/python/pyepics3/) package and the EPICS Channel Access protocol. Other information, when available (such as units, limits, displayed precision, data type, enumeration labels), is obtained from EPICS.\n", "\n", "ophyd class | description\n", "--- | ---\n",