https://github.com/siwill22/atom_utils/blob/master/reconstruct_atom_rasters.py