A bare-bones guide for turning on the LPL and making a custom pulse shape – please add whatever notes/pictures you want to flesh things out to your liking!

Step-by-step guide

  1. Begin a terminal session on mec-laser, mec-monitor, or mec-daq (either by sitting down at one of those machines or by tunneling to them via ssh mec-las for example)
  2. Begin a hutch Python session by typing mecpython and waiting for everything to load
  3. Import the MEC laser Python package by entering import meclas
    1. You can also import using IPython magic functions to load all the meclas functions straight into the session's namespace (thus allowing you to avoid typing meclas. over and over again) by entering %run /reg/g/pcds/pyps/apps/hutch-python/mec/mec/macros/meclas.py
  4. Turn on the MEC LPL by typing meclas.LPL.On() and wait for the sequence to finish
    1. It's best to wait for the heads to warm up, which may take 15-30min
    2. You can check the shape of the YFE waveform using meclas.YFE.Trace()
    3. You can check the energy of the YFE by using meclas.EMeters.EGall()
  5. Load or view a new pulse recipe using meclas.LPL.psmenu()
  6. Set the new parameters desired for the new recipe:
    1. set the target output shape with LPL._Psns_set() and LPL._SSs_set() 
    2. set the target YFE shape with LPL._YSSs_set()
      1. This is the tricky part!! At the moment, you can guess at these with context (e.g. previous recipe hints, visible by viewing the waveform using LPL.psmenu() or that kind of thing); in the future, the hope is to calculate a guess using SCALLOPS
  7. Converge the YFE output to the prescribed goal using LPL.psefc10Hz() (or LPL.psrefrwvfm()). You might want to increase the step-size to AQQ = 0.1 for faster convergence.
  8. Once satisfied, use op.single_shot. This takes a shot without running the DAQ and is a good way to test the laser. Alternatively, prepare for taking a full-energy shot using LPL.pspreshot(). Charge and fire the laser. Acquire the latest shot data using LPL.pspostshot(save_flag=False, display=True).
  9. Choose what to do next based on the quality of your shot:
    1. if the shot was satisfactory, save the shot using LPL.pssavewvfm()
    2. if the shot was not satisfactory, make adjustments to the target YFE shape with LPL._YSSs_set(), re-converge to the shape with LPL.psefc10Hz(), etc. and then repeat until you get something satisfactory or you try more troubleshooting


The pulse recipes are in /cds/home/opr/mecopr/mecpython/pulseshaping/recipes.


A word on pulse shape naming conventions and terminology

To create an arbitrary temporal waveform at the output of a high-energy laser amplifier, the temporal waveform of the low-energy input pulse must be shaped to pre-compensate for temporal distortions caused by gain saturation (i.e. the fact that the leading edge of a pulse experiences high amplification than the trailing edge of the pulse due to depletion of available stored energy). The difficulty of pulse shaping is determining the appropriate amount and character of pre-compensation needed.

To make the problem of specifying the output shape easier, in MEC we typically boil down the desired targeted output waveform to two parameters:

  • the temporal length of a pulse segment, specified through the parameter Psns (standing for Pulse segments in ns)
    • due to the Highland, these segments must be specified in increments of 0.25ns
    • to satisfy users, total pulse lengths are usually specified 0.25ns longer than requested in order to fill out the full requested temporal duration; this is usually added on to the last specified segment duration; for example:
      • a 10ns pulse has a specified length parameter of Psns=[10.25]
      • a 15ns pulse has a specified length parameter of Psns=[15.25]
      • a 20ns pulse with two equal-duration steps (separated by an amplitude discontinuity) has a specified length parameter of Psns=[10, 10.25]
        • note: if two adjacent steps are continuous in amplitude at their boundary rather than discontinuous, one point will be deleted automatically to avoid having a repeated point in the middle of the pulse; because of this deletion, the first of the two pulse must be specified one point (0.25ns) longer than desired in order to compensate; for example:
          • a 20ns ramp pulse with four equal-duration segments with continuous amplitude boundaries has a specified length parameter of Psns=[5.25, 5.25, 5.25, 5.25]
          • if the pulse above contained a discontinuity instead between just the second and third segments, the specified length parameter would instead be Psns=[5.25, 5, 5.25, 5.25]
  • the heights at the endpoints of each segment, specified through the parameter SSs (standing for Start/Stop (heights) of segments)
    • this is specified as a percentage of the maximum amplitude
    • because users typically tolerate positive-gradient slopes better than negative-gradient slopes, percentages of the Start/Stop segment heights are often adjusted by 1-2% for segments meant to have a 0% gradient in order to give some cushion against the much-disliked negative-gradient situation
    • each pulse segment needs its own specified Stop/Stop segment heights; for example,
      • a 10ns flat-top pulse with 0% gradient has a Start/Stop segment heights parameter of SSs=[[98, 100]] (note the additional 2% to avoid the negative-gradient situation)
      • a 15ns quasi-flat-top pulse with 15% gradient has a Start/Stop segment heights parameter of SSs=[[85, 100]]
      • a 20ns step pulse, with a 4:1 amplitude ratio between flat-top steps each with 0% gradient, has a Start/Stop segment heights parameter of SSs=[[24,25],[98,100]]
      • a 25ns ramp pulse with five equal-duration segments with continuous amplitude boundaries might specify the exact shape of its ramp using a Start/Stop segment heights parameter of SSs=[[10, 15], [15, 25], [25, 40], [40, 90], [90, 100]]

The names from these pulses are also based on these parameters:

  • for pulses with 1-2 main segments, the duration of each segment (rounded to the nearest ns) is included first
    • e.g. '10ns' for a single-segment 10ns pulse or '05ns05ns' for a dual-segmented 10ns pulse with two 5ns steps
  • for pulses with 2 main segments (i.e. step pulses), the ratio between the ending amplitudes of each segment is included next
    • e.g. '050to100step' (for a step with a 2:1 amplitude ratio) or '020to100step' (for a step with a 5:1 amplitude ratio)
  • the percent gradient of each individual segment is included last
    • e.g. '00grad' for a 0% (flat-top) gradient or '15grad' for a 15% (quasi-flat-top) gradient

Let's go over a few examples below to help clarify:

Pulse shapePulse namePulse segment durations in ns (Psns)

Start/Stop segment heights in %age (SSs)

'10ns00grad'[10.25][[98, 100]]

'10ns20grad'[10.25][[80, 100]]

'20ns50grad'[20.25][[50, 100]]

'05ns05ns025to100step' (may or may not also include '00grad00grad' at the end)[5, 5.25][[24, 25], [98, 100]]

'15ns15ns040to100step00grad60grad'[15.25, 15.25][[39, 40], [40, 100]]

'UserPulse0' (pulses with more than two segments are usually highly individualized and thus often named after the PI)[5.25, 5, 5.25, 5.25][[10, 12], [12, 25], [40, 60], [60, 100]]

'UserPulse1' (pulses with more than two segments are usually highly individualized and thus often named after the PI)[5.25, 5.25, 5.25, 5.25, 5.25][[10, 15], [15, 25], [25, 40], [40, 90], [90, 100]]


To make the problem of specifying the input shape easier, in MEC we also boil down the desired input waveform:

  • the temporal length of a pulse segment is the same for the output waveform as for the input waveform; therefore, no new parameter is needed and reusing the specified segment length parameter Psns is sufficient
  • the heights at the endpoints of each segment, specified through the parameter YSSs (standing for YFE Start/Stop (heights) of segments)
    • this is completely analogous to the use of SSs above except that the units are not specified as a percentage of the maximum amplitude but rather as the voltage level of the fast photodiode measuring the temporal waveform of the 10Hz YFE laser system as measured by a networked oscilloscope
    • as with SSs, each pulse segment needs its own specified YFE Stop/Stop segment heights; for example,
      • a 10ns flat-top pulse with 0% gradient may have a YFE Start/Stop segment heights parameter of YSSs=[[0.02, 0.114]] 
      • a 15ns quasi-flat-top pulse with 15% gradient may have a YFE Start/Stop segment heights parameter of YSSs=[[0.0158, 0.133]] 
      • a 20ns step pulse, with a 2:1 amplitude ratio between flat-top steps each with 0% gradient, may have a YFE Start/Stop segment heights parameter of YSSs=[[0.0075, 0.0165], [0.0275, 0.115]] 
      • a 15ns ramp pulse with ten equal-duration segments with continuous amplitude boundaries might specify the exact shape of its ramp using a YFE Start/Stop segment heights parameter of YSSs=[[0.00001, 0.00025], [0.00025, 0.00091], [0.00091, 0.00211], [0.00211, 0.00444], [0.00444, 0.00806], [0.00806, 0.01624], [0.01624, 0.02977], [0.02977, 0.04322], [0.04322, 0.05686], [0.05686, 0.0729]]

Here are the examples from above shown in graphical form to hopefully give a better picture:

Goal for input pulse shape...YSSsGoal of corresponding desired output pulse shapeSSs

[[0.02, 0.114]]


(with Psns = [10.25])

→ 

[[98, 100]]

[[0.0158, 0.133]]


(with Psns = [15.25])

[[85, 100]]

[[0.0075, 0.0165], [0.0275, 0.115]] 


(with Psns = [10, 10.25])

[[48, 50], [98, 100]]

[[0.00001, 0.00025], [0.00025, 0.00091], [0.00091, 0.00211], [0.00211, 0.00444], [0.00444, 0.00806], [0.00806, 0.01624], [0.01624, 0.02977], [0.02977, 0.04322], [0.04322, 0.05686], [0.05686, 0.0729]]

(with Psns = [1.75, 1.75, 1.75, 1.75, 1.75, 1.75, 1.75, 1.75, 1.75, 1.75])

[[5.028, 6.355], [6.355, 8.834], [8.834, 13.429], [13.429, 20.141], [20.141, 31.433], [31.433, 50.059], [50.059, 78.878], [78.876, 91.350], [91.350, 96.155],  [96.155, 100.0]]

(digitized from a crazy request)


1 Comment