Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Analysis reduction to Mantid Algorithm #132

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Commits on Sep 10, 2024

  1. Set properties of algorithm

    Set main properties for the input arguments
    GuiMacielPereira committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    7257f65 View commit details
    Browse the repository at this point in the history
  2. Declare property for profiles table ws

    This change is to starting point to pass the profile
    inputs as a table workspace
    GuiMacielPereira committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    e5e61f2 View commit details
    Browse the repository at this point in the history
  3. Use table of profiles passed as an argument

    Previously the profiles were accessed through a list of bespoke dataclass
    objects called NeutronComptonProfile.
    Made the change to use a table workspace instead, to conform with the new
    input argument.
    Still need to change the way the Joint routine links profiles together.
    GuiMacielPereira committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    d2a0dd0 View commit details
    Browse the repository at this point in the history
  4. Clean comments and functions

    Cleaned some unused comments from previous changes to the code.
    Made tests use routine object directly without having to go through
    the AlgorithmManager, this makes sure we can access results from a
    public method.
    GuiMacielPereira committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    06d2ca1 View commit details
    Browse the repository at this point in the history
  5. Put set up of fit parameters in class methods

    Initialize fit parameters and bounds when setting up the class.
    This makes it easier to keep track of the order in which the masses are
    getting into the parameters array and makes it easier to change it in the
    future.
    
    Made self._masses method because it is used several times across the routine.
    GuiMacielPereira committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    18a3c9e View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    0229f13 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    3cf8de5 View commit details
    Browse the repository at this point in the history
  8. Fix rebase conflicts and relax test tolerance

    System tests are sliglty off so I increase the tolerance to have them pass.
    GuiMacielPereira committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    b0991a0 View commit details
    Browse the repository at this point in the history
  9. Add unit tests for calculate h ratio

    Added unit tests and removed old comments
    GuiMacielPereira committed Sep 10, 2024
    Configuration menu
    Copy the full SHA
    1ffa208 View commit details
    Browse the repository at this point in the history

Commits on Sep 11, 2024

  1. Create function to update input profiles table

    Transformed existing function to create a function that takes
    in an outputs table containing the means at the end of the routine and
    passes these to the inputs profiles table as the initial parameters.
    The lightest mass is always unfixed (bounds are relaxed).
    The h ratio is used depending on whether the sample contains hydrogen.
    GuiMacielPereira committed Sep 11, 2024
    Configuration menu
    Copy the full SHA
    61da79d View commit details
    Browse the repository at this point in the history

Commits on Sep 12, 2024

  1. Refactor joint algorithm

    Refactored joint algorithm to fit new approach of using
    profiles table as inputs to the AnalysisReduction algorithm.
    GuiMacielPereira committed Sep 12, 2024
    Configuration menu
    Copy the full SHA
    d4e116c View commit details
    Browse the repository at this point in the history

Commits on Sep 13, 2024

  1. Change naming of workspaces

    For consistency sake, I changed all of the suffixes of the
    workspaces to lower case and abreviated longer terms where possible.
    This makes the workspaces easier to read and looks a bit tidier.
    GuiMacielPereira committed Sep 13, 2024
    Configuration menu
    Copy the full SHA
    4ee1b15 View commit details
    Browse the repository at this point in the history
  2. Refactor routine for estimating h ratio

    When h ratio is not provided and hydrogen is present in the sample,
    the routine for estimating the h ratio to the lowest mass is triggered.
    Had to update this routine with the changes from converting vesuvio analysis into
    a mantid algorithm.
    GuiMacielPereira committed Sep 13, 2024
    Configuration menu
    Copy the full SHA
    15556a0 View commit details
    Browse the repository at this point in the history
  3. Replace print statements with logging

    Used logging instead of print, also formatted the logging statements better.
    GuiMacielPereira committed Sep 13, 2024
    Configuration menu
    Copy the full SHA
    62b388d View commit details
    Browse the repository at this point in the history

Commits on Sep 16, 2024

  1. Implement passing constraints as arg

    Previously the constraints argument was disabled because
    I did not find a way to pass Python objects (tuple of dictionaries) into
    the mantid algorithm.
    
    This workaround converts the tuple of dictionaries into a byte string
    using the dill library which can then be converted to a normal string and
    passed into the mantid algorithm as an argument.
    When the algorithm executes, the string is converted into byte string again
    though eval() and then into the tuple of dicts of lambdas by the dill library.
    
    A better solution might be implemented in the future but this will suffice for now.
    GuiMacielPereira committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    0657f7d View commit details
    Browse the repository at this point in the history
  2. Fix import error

    GuiMacielPereira committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    c5e0db6 View commit details
    Browse the repository at this point in the history
  3. Fix analysis fitting

    The fittnig routine was failing due to the naming conventions having
    changed. Updated routine so that it finds the correct ncp workspaces.
    Updated the system tests.
    GuiMacielPereira committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    fad0c77 View commit details
    Browse the repository at this point in the history

Commits on Sep 17, 2024

  1. Fix system tests

    GuiMacielPereira committed Sep 17, 2024
    Configuration menu
    Copy the full SHA
    605aa58 View commit details
    Browse the repository at this point in the history
  2. Removed unused comments from development

    Cleaned up some comments, and introduced some others for clarity.
    GuiMacielPereira committed Sep 17, 2024
    Configuration menu
    Copy the full SHA
    fa00881 View commit details
    Browse the repository at this point in the history