pcdshub / pcdshub/hutch-python

Load Additional "Beamlines" into hutch python session

Open
#334 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1
Forks
18
Avg merge
7d 9h
Merged PRs (30d)
1

Description

Expected Behavior

It would be nice to be able to load devices from Happi with a bit more granularity than we currently have.

Current Behavior

Currently hutches pour every device that they would ever want to use either into the happi database under the same "beamline" location. This is sufficient for now, but I can see issues cropping up once hutches have more than one interaction point (e.g. IP1 and IP2).

Possible Solution

Add an "endstation" flag or similar to happi and/or the hutch python CLI. This way, hutches could configure beamline devices shared among endstations as "beamline" devices, and devices specific to endstations as "endstation" devices.

There could be some utility to accepting more than one of these "endstation" or "area" flags (see context below).

I'm open to any other ideas/solutions that would achieve something similar.

Context

I'm trying to provide a way to load the MODS devices into laspython. Currently, each MODS is setup as a separate "beamline" in happi to separate the devices in LUCID screens, e.g. beamline=IP1_MODS, beamline=CRIX_MODS. However, there are also some devices in the las "beamline" that they would want in their python sessions, such as beam transport related devices. In the future I can also see wanting to add devices associated with whatever specific laser source is allocated to the hutch as well. It's trivial to create a laspython session that loads a specific MODS environment, but it would be nice to have a clean way to do this and load the common las devices as well, which I do not see a way to do currently.

Your Environment

laspython

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the hutch-python CLI session-loading flow and how Happi beamline configuration is currently interpreted. Define a design that loads shared beamline devices together with one or more endstation-specific groups, then verify that MODS and common las devices can be selected in the same Python session.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.