File indexing completed on 2026-04-09 07:49:22
0001
0002
0003 import numpy as np
0004 from opticks.ana.fold import Fold
0005 from opticks.ana.pvplt import *
0006
0007 if __name__ == '__main__':
0008 f = Fold.Load(symbol="f")
0009 print(repr(f))
0010
0011 gs = f.gs
0012 se = f.se
0013 ph = f.ph
0014
0015
0016 lim = slice(0,1000)
0017
0018 print(" ph %s lim %s " % ( str(ph.shape), str(lim)) )
0019 pos = ph[:,0,:3]
0020 mom = ph[:,1,:3]
0021 pol = ph[:,2,:3]
0022
0023 expr = "np.sum(pol*mom,axis=1).max() # check transverse "
0024 print(expr)
0025 print(eval(expr))
0026
0027
0028 pl = pvplt_plotter()
0029
0030
0031
0032 pvplt_polarized(pl, pos[lim], mom[lim], pol[lim], factor=20 )
0033
0034
0035
0036
0037 pl.show()
0038
0039
0040