Skip to content

Add automatic data analysis (COM, Gaussian fit, 1st/2nd derivatives) after scans complete. #407

Open

Description

@Relm-Arrowny

It is extremely useful to have these simple data analysis data available during alignment or in script when tracking peak, edges or sample.
For example this can be use to track beamcentre or slit COM.

Goals

Acceptance criteria : What journeys should the user be able to complete to consider your feature done Be as specific as you can, check them off once they work. Issue should only be considered done after all of them are checked

  • Users can easily calculate the Center of Mass (COM) and perform a Gaussian fit on their collected scan data.
  • Users can compute and visualize the 1st and 2nd derivatives of their data.
  • These calculations can be triggered automatically at the end of a scan, or manually via IPython shell (e.g., fit_scan(scan_id, guess)).
  • The InteractivePlotWindow can overlay the fitted curves or derivative lines on top of the raw raw data.

Tasks

Base on the goals, deduce the tasks required. check them off once they're done

  • Implement `fit_gaussian(x, y, guess=None)
  • Compute derived quantities.
  • Implement fit_scan(scan_id=None, x=None, y=None, guess=None) method on BlueAPISession
  • Auto-detect primary motor (X) and detector (Y) channels if omitted.
  • Expose fit_scan, calculate_com, and calculate_derivatives in the interactive IPython shell.
  • Add an auto_analyse: bool session toggle flag.
  • Automatically calculate and log/print fit and COM upon scan completion.
  • Update InteractivePlotWindow to store and manage active analysis overlays for 1D mode.
  • Add UI controls in the 1D control panel
  • Render smooth fitted Gaussian curve line over the raw data points.
  • Ensure overlays refresh reactively when new data points or scans are submitted, or when fit_scan() is invoked.

Activity

  1. changed the title [-]Add automatic data analysis (COM, Gaussian fit, 1st/2nd derivatives) after scans complete. etc etc..[/-] [+]Add automatic data analysis (COM, Gaussian fit, 1st/2nd derivatives) after scans complete.[/+] on Oct 7, 2026
  2. self-assigned this
    on Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions