updated np.mat to np.asmatrix

This commit is contained in:
John Henry Beale
2025-12-11 14:56:21 +01:00
parent c4c5ea6491
commit 637a37b6dd

View File

@@ -300,14 +300,14 @@ class geometry:
# if zoom=None, the last zoom value is used
if zoom is not None:
self.interp_zoom(zoom)
return np.asarray(self._pix2pos*np.mat(p).T).ravel()
return np.asarray(self._pix2pos*np.asmatrix(p).T).ravel()
def pos2pix(self, p, zoom=None):
# returns the pixel p(x,y) of the position m(x,y) in meter relative to the optical center at a given zoom level
# if zoom=None, the last zoom value is used
if zoom is not None:
self.interp_zoom(zoom)
return np.asarray(self._pix2pos.I*np.mat(p).T).ravel()
return np.asarray(self._pix2pos.I*np.asmatrix(p).T).ravel()
def optctr2xray(self):
# returns the vector m(x,y) of the optical center to the xray