hightower8083 / synchrad

Synchrotron Radiation calculator via openCL
GNU General Public License v3.0
18 stars 11 forks source link

Fix dimensional mismatching between z and t in tracksfromOPMD #33

Closed ronandoherty1 closed 3 weeks ago

ronandoherty1 commented 3 weeks ago

In converters.py, the tracksfromOPMD function has an argument z_is_xi. If set to true, the function tries to add z+c*t, in line 105.

However, sometimes the z array is split according to whether its entries are valid, in split_tracks_by_nan. If any entries are invalid, then z has a different dimension to t. This commit adds a line to split t according to the size of z.

hightower8083 commented 3 weeks ago

thanx for the fix!