New algorithm can produce better images to study ultracold atoms that exhibit quantum mechanics governed properties