Skip to content

fix plotting for multiwire #66

Description

@github-actions

# TODO: fix plotting for multiwire

def plot_multiwire(sizes, sizes_err, locations, save_plot=False):
    # Plot the data
    try:
        plt.figure(figsize=(5, 3.5))

        plt.errorbar(locations, np.asarray(sizes)/1e-6, yerr=np.asarray(sizes_err)/1e-6, fmt='o', label=f'Measurements')

        # Model prediction
        # TODO: add plotting of model sigma propagation to locations

        plt.xlabel('Position (m)')
        plt.ylabel(r'Beam Size ($\mu$m)')
        plt.legend()

        if save_plot:
            import datetime
            plt.tight_layout()
            timestamp = (datetime.datetime.now()).strftime("%Y-%m-%d_%H-%M-%S-%f")
            plt.savefig(f"emit_fit_{timestamp}.png", dpi=300)
        plt.show()
        plt.close()
    except:
        print("Plotting not implemented yet.")
        # TODO: fix plotting for multiwire

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions