Jupyter QtConsole 5.5.2

Current ChimeraX session available as 'session'.

Python 3.11.4 (tags/v3.11.4:d2340ef, Jun  7 2023, 05:45:37) [MSC v.1934 64 bit (AMD64)]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.26.0 -- An enhanced Interactive Python. Type '?' for help.

import mrcfile

path_to_map = 'C:\Users\luod\Downloads\emd_40589.map'
  Cell In[2], line 1
    path_to_map = 'C:\Users\luod\Downloads\emd_40589.map'
                                                         ^
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape


path_to_map = r'C:\Users\luod\Downloads\emd_40589.map'

path_to_map = r'C:\Users\luod\Downloads\emd_40589.map\emd_40589.map'

try:
    with mrcfile.open(path_to_map, mode='r') as mrc:
        print("Header info:", mrc.header)
        print("Data shape:", mrc.data.shape)
except Exception as e:
    print("Caught exception:", e)
    
Header info: (400, 400, 400, 2, 0, 0, 0, 400, 400, 400, (334., 334., 334.), (90., 90., 90.), 1, 2, 3, -14.0112505, 21.881187, 0.01375722, 1, 0, b'\x00\x00\x00\x00\x00\x00\x00\x00', b'', 0, b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', (0., 0., 0.), b'MAP ', [68, 65,  0,  0], 0.38660434, 1, [b'::::EMDATABANK.org::::EMD-40589::::                                             ', b'                                                                                ', b'                                                                                ', b'                                                                                ', b'                                                                                ', b'                                                                                ', b'                                                                                ', b'                                                                                ', b'                                                                                ', b'                                                                                '])
Data shape: (400, 400, 400)

path_to_map = '"C:\Users\luod\Downloads\emd_40589.map\emd_40589.map'
  Cell In[6], line 1
    path_to_map = '"C:\Users\luod\Downloads\emd_40589.map\emd_40589.map'
                                                                        ^
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 3-4: truncated \UXXXXXXXX escape


path_to_map = '"C:\\Users\\luod\\Downloads\\emd_40589.map\\emd_40589.map'

try:
    with mrcfile.open(path_to_map, mode='r') as mrc:
        print("Header info:", mrc.header)
        print("Data shape:", mrc.data.shape)
except Exception as e:
    print("Caught exception:", e)
    
Caught exception: [Errno 22] Invalid argument: '"C:\\Users\\luod\\Downloads\\emd_40589.map\\emd_40589.map'

path_to_map = '"C:\\Users\\luod\\Downloads\\emd_40589.map\\emd_40589.map"'

try:
    with mrcfile.open(path_to_map, mode='r') as mrc:
        print("Header info:", mrc.header)
        print("Data shape:", mrc.data.shape)
except Exception as e:
    print("Caught exception:", e)
    
Caught exception: [Errno 22] Invalid argument: '"C:\\Users\\luod\\Downloads\\emd_40589.map\\emd_40589.map"'

path_to_map = "C:\\Users\\luod\\Downloads\\emd_40589.map\\emd_40589.map"

try:
    with mrcfile.open(path_to_map, mode='r') as mrc:
        print("Header info:", mrc.header)
        print("Data shape:", mrc.data.shape)
except Exception as e:
    print("Caught exception:", e)
    
Header info: (400, 400, 400, 2, 0, 0, 0, 400, 400, 400, (334., 334., 334.), (90., 90., 90.), 1, 2, 3, -14.0112505, 21.881187, 0.01375722, 1, 0, b'\x00\x00\x00\x00\x00\x00\x00\x00', b'', 0, b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00', (0., 0., 0.), b'MAP ', [68, 65,  0,  0], 0.38660434, 1, [b'::::EMDATABANK.org::::EMD-40589::::                                             ', b'                                                                                ', b'                                                                                ', b'                                                                                ', b'                                                                                ', b'                                                                                ', b'                                                                                ', b'                                                                                ', b'                                                                                ', b'                                                                                '])
Data shape: (400, 400, 400)