Skip to content

Commit

Permalink
Merge branch 'main' into modify_for_site_wiregrid_actuator
Browse files Browse the repository at this point in the history
  • Loading branch information
sadachi5 committed Nov 16, 2023
2 parents 1c573d4 + f17859d commit f0e1932
Show file tree
Hide file tree
Showing 20 changed files with 1,558 additions and 34 deletions.
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,16 @@

version: 2
updates:
- package-ecosystem: "docker"
directory: "/"
schedule:
interval: "daily"
reviewers:
- "BrianJKoopman"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
reviewers:
- "BrianJKoopman"
1 change: 1 addition & 0 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
- '.flake8'
- '.pre-commit-config.yaml'
- '.readthedocs.yaml'
- '.github/dependabot.yml'

jobs:
test:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- '.flake8'
- '.pre-commit-config.yaml'
- '.readthedocs.yaml'
- '.github/dependabot.yml'
workflow_call:

jobs:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/skipped-pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- '.flake8'
- '.pre-commit-config.yaml'
- '.readthedocs.yaml'
- '.github/dependabot.yml'

jobs:
test:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/skipped-test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- '.flake8'
- '.pre-commit-config.yaml'
- '.readthedocs.yaml'
- '.github/dependabot.yml'

jobs:
build:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- '.flake8'
- '.pre-commit-config.yaml'
- '.readthedocs.yaml'
- '.github/dependabot.yml'

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# A container setup with an installation of socs.

# Use the ocs image as a base
FROM simonsobs/ocs:v0.10.2
FROM simonsobs/ocs:v0.10.3

# Set up the cryo/smurf user and group so this can run on smurf-servers
# See link for how all other smurf-containers are set up:
Expand Down
2 changes: 1 addition & 1 deletion docker/pysmurf_controller/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM simonsobs/sodetlib:v0.5.2
FROM simonsobs/sodetlib:v0.5.2-3-ge0aa529

ENV OCS_CONFIG_DIR /config

Expand Down
70 changes: 70 additions & 0 deletions docs/agents/acu_agent.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ installed to use this Agent. This can be installed via:
$ pip install 'soaculib @ git+https://github.com/simonsobs/soaculib.git@master'
Additionally, ``socs`` should be installed with the ``acu`` group:

.. code-block:: bash
$ pip install -U socs[acu]
Configuration File Examples
---------------------------
Below are configuration examples for the ocs config file and for soaculib.
Expand Down Expand Up @@ -88,6 +94,61 @@ example configuration block is below::
}


Sun Avoidance
-------------

The Sun's position, and the potential danger of the Sun to the
equipment, is monitored and reported by the ``monitor_sun`` Process.
If enabled to do so, this Process can trigger the ``escape_sun_now``
Task, which will cause the platform to move to a Sun-safe position.

The parameters used by an Agent instance for Sun Avoidance are
determined like this:

- Default parameters for each platform (LAT and SATP) are in the Agent
code.
- On start-up the default parameters for platform are modified
according to any command-line parameters passed in by the user.
- Some parameters can be altered using the command line.

The avoidance policy is defined by a few key parameters and concepts;
please see the descriptions of ``sun_dist``, ``sun_time``,
``exclusion_radius``, and more in the :mod:`socs.agents.acu.avoidance`
module documentation.

The ``exclusion_radius`` can be configured from the Agent command
line, and also through the ``update_sun`` Task.

When Sun Avoidance is active (``active_avoidance`` is ``True``), the
following will be enforced:

- When a user initiates the ``go_to`` Task, the target point of the
motion will be checked. If it is not Sun-safe, the Task will exit
immediately with an error. If the Task cannot find a set of moves
that are Sun-safe and that do not violate other requirements
(azimuth and elevation limits; the ``el_dodging`` policy), then the
Task will exit with error. The move may be executed as a series of
separate legs (e.g. the Task may move first to an intermediate
elevation, then slew in azimuth, then continue to the final
elevation) rather than simulataneously commanding az and el motion.
- When a user starts the ``generate_scan`` Process, the sweep of the
scan will be checked for Sun-safety, and the Process will exit with
error if it is not. Furthermore, any movement required prior to
starting the scan will be checked in the same way as for the
``go_to`` Task.
- If the platform, at any time, enters a position that is not
Sun-safe, then an Escape will be Initiated. During an Escape, any
running ``go_to`` or ``generate_scan`` operations will be cancelled,
and further motions are blocked. The platform will be driven to a
position at due North or due South. The current elevation of the
platform will be preserved, unless that is not Sun-safe (in which
case lower elevations will be attempted). The Escape feature is
active, even when motions are not in progress, as long as the
``monitor_sun`` Process is running. However -- the Escape operation
requires that the platform be in Remote operation mode, with no
persistent faults.


Exercisor Mode
--------------

Expand Down Expand Up @@ -149,5 +210,14 @@ acquisition processes are running::
Supporting APIs
---------------

drivers (Scanning support)
``````````````````````````

.. automodule:: socs.agents.acu.drivers
:members:

avoidance (Sun Avoidance)
`````````````````````````

.. automodule:: socs.agents.acu.avoidance
:members:
2 changes: 2 additions & 0 deletions docs/user/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ The different groups, and the agents they provide dependencies for are:
- Supporting Agents
* - ``all``
- All Agents
* - ``acu``
- ACU Agent
* - ``labjack``
- Labjack Agent
* - ``magpie``
Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ pyyaml

# acu agent
soaculib @ git+https://github.com/simonsobs/soaculib.git@master
so3g
pixell

# holography agent - python 3.8 only!
# -r requirements/holography.txt
Expand Down
15 changes: 9 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@

# Optional Dependencies
# ACU Agent
# acu_deps = ['soaculib @ git+https://github.com/simonsobs/soaculib.git@master']
acu_deps = [
# 'soaculib @ git+https://github.com/simonsobs/soaculib.git@master',
'pixell',
'so3g',
]

# Holography FPGA and Synthesizer Agents
# holography_deps = [ # Note: supports python 3.8 only!
Expand Down Expand Up @@ -53,10 +57,9 @@
# 'xy_stage_control @ git+https://github.com/kmharrington/xy_stage_control.git@main',
# ]

# Note: Not including the holograph deps, which are Python 3.8 only
# all_deps = acu_deps + labjack_deps + magpie_deps + pfeiffer_deps + \
# pysmurf_deps + smurf_sim_deps + synacc_deps + xy_stage_deps
all_deps = labjack_deps + magpie_deps + pfeiffer_deps + \
# Note: Not including the holograph deps, which are Python 3.8 only. Also not
# including any dependencies with only direct references.
all_deps = acu_deps + labjack_deps + magpie_deps + pfeiffer_deps + \
smurf_sim_deps + synacc_deps + timing_master_deps
all_deps = list(set(all_deps))

Expand Down Expand Up @@ -111,7 +114,7 @@
],
extras_require={
'all': all_deps,
# 'acu': acu_deps,
'acu': acu_deps,
# 'holography': holography_deps,
'labjack': labjack_deps,
'magpie': magpie_deps,
Expand Down
Loading

0 comments on commit f0e1932

Please sign in to comment.