Exemple #1
0
def scanRoutine():
    "This is the scan routine"
    # Print scan info
    pvscan2.printScanInfo(exp1, scanPv1, scanPv2)
    pvscan2.printMsg("Starting")
    sleep(0.5)  # Collect some initial data first
    # Open all shutters, but only if enabled from PV.
    shutterGroup1.open(1)
    # shutter1.openCheck()
    # Scan delay stage and grab images...
    pvscan2.pvNDScan(exp1, scanPv1, scanPv2, grab1, shutter1, shutter2, shutter3)
    # Close all shutters, but only if enabled from PV.
    shutterGroup1.close(0)
Exemple #2
0
if __name__ == "__main__":
    "Do scan routine; log PV data to file as a separate thread if enabled"
    try:
        args = "PV_PREFIX"

        def show_usage():
            "Prints usage"
            print "Usage: %s %s" % (sys.argv[0], args)

        if len(sys.argv) != 2:
            show_usage()
            sys.exit(1)
        pid = os.getpid()
        pvscan2.pidPV.put(pid)
        if dataLog1.dataEnable:
            # Start logging data
            dataLog1.start()
        scanRoutine()
        sleep(1)  # Log data for a little longer
    finally:
        # Stop logging data
        dataLog1.stop()
        pvscan2.printMsg("Done")


### End ##########################################################################


exit