Skip to content

pass error dict to output_dict and flag there #61

@github-actions

Description

@github-actions

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
                

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions