Skip to content

Feature: simple enable/disable elements #413

Description

@gubaidulinvadim

Description, motivation and use case
During many measurements, one needs to have a setup stage where the measurement script checks that some functionality is disabled (like slow orbit feedback (SOFB), fast orbit feedback (FOFB) or the feedforward correction, tune feedback, etc.) This is necessary for many measurements (IDs feedforward tables, measurements with bunch-by-bunch feedback system, etc. It should also be part of response matrix measurement to prevent silly errors when the user is measuring a response with feedback on it).

Proposed solution
As part of the standard way to do measurements, we should have a preparation stage where a list of elements is disabled and enabled back after the measurement is done (including if the measurement throws an error).

Describe alternatives you've considered
The lazy way it is done in MML is that each individual script has if-else statements:

%% CHECK FFWD, SOFB AND FOFB STATE
    dServName = idGetUndDServer(idName);
    if dServName ==-1
        fprintf('IdName ''%s'' is incorrect\n', idName);
        return
    end
    tempStructure=idGetCorrectionStatus(idName);
    fFwdState=tempStructure.ffwd;
    if (fFwdState==1)
        fprintf ('FFWD is active! Desactive it to continue\n')
        return
    end
 
    sOfbIsActive=tempStructure.sofb;
    if (sOfbIsActive==1)
        fprintf ('SOFB is active! Desactive it to continue\n')
        return
    end
    
    fOfbIsActive=tempStructure.fofb;
    if (fOfbIsActive~=-1)
        fprintf ('FOFB is active! Desactive it to continue\n')
        return
    end

Checklist

  • I've assigned this issue to a project
  • I've @-mentioned relevant people

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

    Labels

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions