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

pass error dict to output_dict and flag there #61

Open
github-actions bot opened this issue Nov 19, 2022 · 0 comments
Open

pass error dict to output_dict and flag there #61

github-actions bot opened this issue Nov 19, 2022 · 0 comments
Labels
help wanted Extra attention is needed todo

Comments

@github-actions
Copy link

WIRE:*:XRMS and *:YRMS PVs are updated.

# TODO: pass error dict to output_dict and flag there

                   path=savepaths['raw_saves']
                   )
    
    if multiwire:
        # Check that we have enough data 
        len_data = sum(error_dict.values())
        if len_data < 3:
            print("Less than 3 data points successful.")
            print("Do not trust results.")

    # These are now lists
    # TODO: pass error dict to output_dict and flag there
    return xrms, yrms, xrms_err, yrms_err


def get_beamsize(online, scan_pv):
    error = {}
    for wire_pv in scan_pv:
        # Track faults
        error[f"{wire_pv}"] = False
        
        # When measurement is done, associated
        # WIRE:*:XRMS and *:YRMS PVs are updated.
        if online:
            if scan_pv.get() != 0:
                raise NotImplementedError(f"WS {scan_pv} not ready for running.")
            scan_pv.put(1)
            time.sleep(1)  

            status = scan_pv.get()
            if status == 2:
                while scan_pv.get()!= 0:
                    time.sleep(5) 
                time.sleep(3)  # to not break the wire scanner
            elif status == 0:
                print(f"WS {wire_pv} acquired successfully.")
            else: 
                print(f"WS {wire_pv} did not run. Status {status}.")
                error[f"{wire_pv}"] = True
                
    return error
                
@github-actions github-actions bot added the todo label Nov 19, 2022
@pluflou pluflou added help wanted Extra attention is needed todo and removed todo labels Nov 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed todo
Projects
None yet
Development

No branches or pull requests

1 participant