:
| Dataset | Dimensions | Size (MB) | Load time (s) | Memory (MB) | 3D FPS | |---------|------------|-----------|---------------|-------------|---------| | Au(111) surface | 1024×1024 | 4.2 | 0.28 | 18 | 60 | | Graphene on SiO₂ | 2048×2048 | 16.8 | 0.91 | 42 | 58 | | High-res Si(111) | 8192×8192 | 268.4 | 1.32* | 86** | 42 | stm file viewer
def parse_binary_stm(filepath): with open(filepath, 'rb') as f: magic = struct.unpack('<I', f.read(4))[0] if magic != 0x4D5453: raise ValueError("Not an STM file") w, h = struct.unpack('<II', f.read(8)) xstep, ystep = struct.unpack('<ff', f.read(8)) bdepth = struct.unpack('<H', f.read(2))[0] f.read(2) # endianness flag data = np.frombuffer(f.read(), dtype=np.dtype(f'<ubdepth')) data = data.reshape(h, w).astype(np.float32) # convert to physical units data *= xstep # example scaling return data, (xstep, ystep) : memory mapping for files >200 MB using numpy.memmap . 5. Experimental Evaluation We tested the viewer on three real STM datasets: : | Dataset | Dimensions | Size (MB)
*with memory mapping enabled **peak working set 'rb') as f: magic = struct.unpack('<
By continuing to use the site, you agree to the use of cookies. More Information...
The cookie settings on this website are set to "Allow Cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings, or you click "Accept" below, then you are consenting to this. For further information, please see our Terms and Conditions, Cookie Policy and Privacy Policy.