Profile fitting in crowded astronomical images