add margins to compute_model_image and change test_specter_io