MCPcopy Create free account
hub / github.com/NSLS2/PyXRF / swap_axes

Function swap_axes

pyxrf/model/load_data_from_db.py:2116–2131  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2114 sclr[1::2, :, :] = sclr[1::2, ::-1, :]
2115
2116 def swap_axes():
2117 nonlocal pos_name, pos_pos, d_xs, d_xs_sum, d_xs2, d_xs2_sum, sclr
2118 # Need to swapaxes on pos_pos, d_xs, d_xs_sum, sclr
2119 pos_name = pos_name[::-1]
2120 pos_pos = np.swapaxes(pos_pos, 1, 2)
2121 if "xs" in dets or "xs4" in dets:
2122 if d_xs.size:
2123 d_xs = np.swapaxes(d_xs, 0, 1)
2124 if d_xs_sum.size:
2125 d_xs_sum = np.swapaxes(d_xs_sum, 0, 1)
2126 if "xs2" in dets:
2127 if d_xs2.size:
2128 d_xs2 = np.swapaxes(d_xs2, 0, 1)
2129 if d_xs2_sum.size:
2130 d_xs2_sum = np.swapaxes(d_xs2_sum, 0, 1)
2131 sclr = np.swapaxes(sclr, 0, 1)
2132
2133 if scan_doc["type"] == "XRF_FLY":
2134 if fast_motor in ("nano_stage_sy", "nano_stage_y"):

Callers 2

map_data2D_srx_newFunction · 0.85
map_data2D_srx_new_tiledFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected