Skip to content

Conversation

philsmt
Copy link
Collaborator

@philsmt philsmt commented Apr 25, 2025

I was discussing with @bermudei how to deal with arbitrary shutter blocking pulses in a pulse pattern, as occuring at FXE as well as SQS.

This is a proof-of-principle how one could integrate such support directly into PumpProbePulses via optional fel_shutter/ppl_shutter arguments that expect an extra_data.KeyData object (either directly or via alias). With this, one could do:

run = open_run(<some-FEL-only-run>)
ppp = PumpProbePulses(
    run, pulse_offset=0,
    fel_shutter=run.alias['fel-shutter'],
    ppl_shutter=run.alias['ppl-shutter'])

As an extra bonus, this can avoid the "cannot infer PPL pulse position from FEL pulses" for PPL-only runs as long as the FEL was blocked and is not without pulses, which is generally often the case for such runs.

FYI @takluyver

Copy link

codecov bot commented Apr 25, 2025

Codecov Report

Attention: Patch coverage is 54.54545% with 10 lines in your changes missing coverage. Please review.

Project coverage is 57.35%. Comparing base (64bcadd) to head (34bf819).

Files with missing lines Patch % Lines
src/extra/components/pulses.py 54.54% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #326      +/-   ##
==========================================
- Coverage   57.36%   57.35%   -0.02%     
==========================================
  Files          30       30              
  Lines        4539     4561      +22     
==========================================
+ Hits         2604     2616      +12     
- Misses       1935     1945      +10     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@takluyver
Copy link
Member

Thanks, this looks like a neat extension. Unfortunately I suspect the shutter state is not normally saved, so we'd have to try to push them to include it in the DAQ.

I'm unsure if this would work when people use fast shutter manipulation to do train-alternating pump-probe, as happened in one experiment; I think that was also with a different laser from normal. But it would still be useful to know when the PP laser is blocked entirely.

I think there's also >1 shutter which can block each laser, although there's probably a specific one in each case that's normally used for that purpose, so we can avoid having to deal with that.

@philsmt
Copy link
Collaborator Author

philsmt commented Jun 17, 2025

I'm unsure if this would work when people use fast shutter manipulation to do train-alternating pump-probe, as happened in one experiment; I think that was also with a different laser from normal. But it would still be useful to know when the PP laser is blocked entirely.

That will depend on the implementation, though something changing every train will likely include some form of chopper wheel. At least the one I'm familiar with (HED's PPU) does not simply have a boolean key for its stage per train.

Anything implemented via some form of PLC switch should work though.

I think there's also >1 shutter which can block each laser, although there's probably a specific one in each case that's normally used for that purpose, so we can avoid having to deal with that.

We could turn this into a list...

Alternatively, either one creates a custom FXE-specific version of PumpProbePulses that knows about the details, or we have a component managing shutter state with a suitable interface like KeyData.

@philsmt
Copy link
Collaborator Author

philsmt commented Jun 17, 2025

Apart from future ideas, is this current implementation of any operational use? Then I would finish it up by adding tests.

@bermudei
Copy link
Collaborator

Definitely useful! Just need to tell them to save that source in the DAQ at FXE :'). IIRC we don't have data with it yet.

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.

3 participants