Example Post

Lets see if I can figure out how to make a post with the common elements we might want, and include some how-to steps as I discover them:

  • to insert hyperlinks with different displayed text, first write the display text, then highlight it and either hit ctrl/cmd+k or the link icon at the top of the block.
  • change block type by either hitting the plus sign to the left, or the top left icon at the top of the current block
  • the ‘finesse’ block is called ‘finesse plot’. it’s in the ‘widgets’ category or you can jsut search for it when you hit the plus sign to add a block.
  • re-order blocks using the up/down arrows or drag slider to the left of the block
  • use the backquote key (`) to enter in-line code
  • shift+return adds a line break without
    starting a new block (‘paragraph’ blocks), or
    adding a new item to a list

Now let’s try to make a finesse plot of an FP cavity. I think we’re restricted to pure finesse code here – later we hope to also have a good way to display (but not necessarily auto-run) PyKat examples. Showing my test code here for completeness and so the reader doesn’t have to hunt for it:

l laser 1 0 n0   # Laser (Power = 1 W, wavelength offset = 0)
s s1 1 n0 nc1    # Space (Length = 1 m)

## The cavity ##
m m1 0.7 0.3 0 nc1 nc2  # Mirror  (R = 0.7, T = 0.3, phi = 0)
s sL 4000 nc2 nc3       # Space (Length = 4 km)
m m2 0.8 0.2 0 nc3 nc4  # Mirror  (R = 0.8, T = 0.2, phi = 0)


## Detectors ##

# Photo diodes measureing DC-power
pd refl nc1          # Reflected field
pd circ nc2          # Circulating field
pd tran nc4          # Transmitted field

## Simulation instructions ##
xaxis m1 phi lin -450 90 2000   # Varying tuning of input mirror m1.
yaxis abs                       # Plotting the amplitude of the detector measurements. 

Once you have a ‘finesse plot’ block, click ‘script’ at the bottom, paste your code, then click ‘plot’, then ‘run’ to show the output. It’ll be equivalent to the output of pykat’s out.plot() command (with default arguments).

l laser 1 0 n0   # Laser (Power = 1 W, wavelength offset = 0)
s s1 1 n0 nc1    # Space (Length = 1 m)

## The cavity ##
m m1 0.7 0.3 0 nc1 nc2  # Mirror  (R = 0.7, T = 0.3, phi = 0)
s sL 4000 nc2 nc3       # Space (Length = 4 km)
m m2 0.8 0.2 0 nc3 nc4  # Mirror  (R = 0.8, T = 0.2, phi = 0)


## Detectors ##

# Photo diodes measureing DC-power
pd refl nc1          # Reflected field
pd circ nc2          # Circulating field
pd tran nc4          # Transmitted field

## Simulation instructions ##
xaxis m1 phi lin -450 90 2000   # Varying tuning of input mirror m1.
yaxis abs                       # Plotting the amplitude of the detector measurements. 

When viewing the post, you can toggle between the plot and code using the buttons below the figure.

When viewing the post, you can toggle between the plot and code using the buttons below the figure.

If you like you can also do fun colours and make it look like an illuminated book chapter using the options in the right-hand menu, but you’ll lose the settings you added if you then change to a different block type and back

I could upload the pdf fine using the post editor but it rejected the ipynb. Instead, to add notebooks, go to “Media” in the left-hand menu, and upload the file there. Then come back to the post editor and you can add a link to the notebook like so:

Cross-references

Linked from

History

# Date User Information
448 4 years ago Sean Leavey (current)
38 5 years ago Anna Green
37 5 years ago Anna Green (original)

Leave a Reply