File indexing completed on 2026-04-09 07:48:53
0001
0002
0003 import logging
0004 log = logging.getLogger(__name__)
0005 import numpy as np
0006 from opticks.ana.fold import Fold
0007
0008 import matplotlib.pyplot as mp
0009 from opticks.sysrap.sframe import sframe , X, Y, Z
0010 from opticks.ana.pvplt import mpplt_simtrace_selection_line, mpplt_hist
0011
0012
0013
0014 if __name__ == '__main__':
0015 logging.basicConfig(level=logging.INFO)
0016 s = Fold.Load(symbol="s")
0017 print(repr(s))
0018
0019 s_simtrace = s.simtrace.reshape(-1,4,4)
0020 s_geom = os.environ.get("GEOM", "geom")
0021
0022 fr = sframe.FakeXZ(e=11)
0023
0024 fig, ax = fr.mp_subplots(mp)
0025
0026 if not s is None:
0027 s_hit = s_simtrace[:,0,3]>0
0028 s_pos = s_simtrace[s_hit][:,1,:3]
0029 fr.mp_scatter(s_pos, label="%s" % s_geom, s=1 )
0030 pass
0031
0032 if not "NOLEGEND" in os.environ:
0033 ax.legend()
0034 pass
0035 fig.show()
0036