This function will update the data array with the most recently acquired image in any acquisition mode. The data are returned as long integers (32-bit signed integers). The "array" must be exactly the same size as the complete image.
(self, shape)
| 980 | return array.reshape(shape) |
| 981 | |
| 982 | def most_recent_image(self, shape): |
| 983 | """This function will update the data array with the most recently |
| 984 | acquired image in any acquisition mode. The data are returned as long |
| 985 | integers (32-bit signed integers). The "array" must be exactly the same |
| 986 | size as the complete image. |
| 987 | """ |
| 988 | size = np.array(shape).prod() |
| 989 | arr = np.ascontiguousarray(np.zeros(size, dtype=np.int32)) |
| 990 | self.lib.GetMostRecentImage(arr.ctypes.data_as(ct.POINTER(ct.c_int32)), |
| 991 | ct.c_ulong(size)) |
| 992 | return arr.reshape(shape) |
| 993 | |
| 994 | def most_recent_image16(self, shape): |
| 995 | """16-bit version of the GetMostRecentImage function. |