Skip to content

Updates to support rogue 6 - #485

Open
tristpinsm wants to merge 22 commits into
masterfrom
tpm/rogue6
Open

tristpinsm wants to merge 22 commits into
masterfrom
tpm/rogue6

Conversation

@tristpinsm

Copy link
Copy Markdown
Contributor

Tested on SLAC system

@tristpinsm

Copy link
Copy Markdown
Contributor Author

This should be ready for review and merge now

@tristpinsm
tristpinsm requested review from BrianJKoopman and dpdutcher and removed request for BrianJKoopman July 28, 2026 20:24
@tristpinsm
tristpinsm force-pushed the tpm/rogue6 branch 4 times, most recently from 77b88b3 to 45d974c Compare September 4, 2026 01:50

@BrianJKoopman BrianJKoopman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me, with the caveat that I'm not really familiar enough with the epics/zmq details and inner pysmurf stuff to really comment on the changes in the operations. My comments focus on the packaging, and I'm wondering about the epics dependency.

Comment thread sodetlib/hammers/jackhammer.py
Comment thread requirements.txt
Comment thread sodetlib/__init__.py

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commenting here for lack of a better place -- does this PR totally eliminate the epics dependency?

If so, there are a couple of lingering spots it's mentioned/used:

$ git grep -e 'epics'
docs/det_config.rst:DetConfig object will automaticlly determine the epics root and set the
scripts/resonator_fitting.py:   parser.add_argument('--epics-root', default='smurf_server_s2')
scripts/resonator_fitting.py:                   epics_root = args.epics_root,
scripts/restart_rssi.py:import epics
scripts/restart_rssi.py:ipbyeng=[epics.PV(name).get(as_string=True) for name in [client_remote_ip0.format(iudpe) for iudpe in range(nudpe)]]
scripts/restart_rssi.py:    validcntpv=epics.PV(rssi_validcnt.format(slots[slot]['engine']))
scripts/restart_rssi.py:    restartconnpv=epics.PV(rssi_restartconn.format(slots[slot]['engine']))
scripts/set_stream.py:    parser.add_argument('--epics-root', type=str, default=None)
scripts/set_stream.py:        dump_configs=args.dump_configs, epics_root=args.epics_root,
sodetlib/util.py:    existing pysmurf function so we can set both PV's in a single epics call,
tests/input/pysmurf.cfg:"epics_root" : "test_epics",
tests/test_jackhammer.py:                    f"connection to {epics_server}"

I think at least tests/test_jackhammer.py, the description in sodetlib/util.py, and the docs in docs/det_config.rst should probably be addressed. The scripts/ directory I'm less sure what to do about. If dropping epics in those scripts is straight forward, let's do that too.

tests/input/pysmurf.cfg and generally the tests/test_det_config.py file looks like it needs attention -- it's not passing for me on a fresh install from master or from this branch. That doesn't have to happen in this PR though.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's a good point -- the scripts directory slipped by me. Shouldn't be too hard to adapt those. Are those tests configured to run? I haven't seen them in CI.

Thanks for taking a look!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, I think there are some cases where the scripts/ are still used -- though I'd be happy to be wrong about that. (They're sort of awkward here, since they're not really a part of the package that gets published to PyPI, but last I looked I think jackhammer interacted with that directory in some way.)

Also, no, there's no CI to run those tests (which is probably why the breakage went without anyone noticing). If you want to set that up (either here or in a new PR), I'd be happy to review that too. There aren't many tests in this repo, so I think motivation was low.

tristpinsm and others added 13 commits September 29, 2026 14:33
For a reason I don't understand, setting a default of
opt_args={} was being ignored and populated with parameter
values.
Two timeouts:
- An overall timeout for checking on the server
- A timeout for individual ping attempts. Also enforce this
  wait between attempts.
S.get_eta_phase_array returns radians, but the 'eta_phase' key of a
resonance dict is degrees. run_grad_descent_and_eta_scan wrote the
radians value into res['eta_phase'] with update_tune=True, so the
resulting tune file held radians under a degrees key and every phase
came back ~57x too small when reloaded. plot_channel_resonance made the
opposite mistake, converting the already-radians array with np.deg2rad
before rotating the response, so the circle plot was drawn at the wrong
angle.

In get_full_band_sweep, restore the eta magnitude before the phase. Eta
is stored in firmware as Cartesian etaI/etaQ and each setter recomputes
from the other's current value, so setting the phase while the magnitude
is zero writes (0, 0) and drops the phase.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
N.B. I suspect these scripts may be broken for other
reasons and I haven't attempted to fix them.
Deprecated in favour of the RestartRssi
command added to pysmurf in the meantime.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants