Skip to content

Instantly share code, notes, and snippets.

@tjlane
Created July 17, 2018 21:25
Show Gist options
  • Select an option

  • Save tjlane/ef268e5b9c5f56952e1f39ecb56f11cb to your computer and use it in GitHub Desktop.

Select an option

Save tjlane/ef268e5b9c5f56952e1f39ecb56f11cb to your computer and use it in GitHub Desktop.
pull the processed ROI from the XTCAV OPAL
import psana
from xtcav2.LasingOnCharacterization import *
import numpy as np
from matplotlib import pyplot as plt
data_source = psana.DataSource("exp=amox23616:run=74")
XTCAVRetrieval = LasingOnCharacterization()
for evt in data_source.events():
try:
XTCAVRetrieval.processEvent(evt)
roi = XTCAVRetrieval.processedXTCAVImage()
print(XTCAVRetrieval.physicalUnits())
plt.imshow(roi[0])
plt.show()
except:
print "issue finding pulse"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment