scan_test.set_thresholds(thresholds)
        scan_test.set_fixed_baseline(744)
        #scan_test.set_scan_type("baseline_scan")
        #scan_test.set_fixed_threshold(fixed_threshold)

        eventReader.hitmap_show()
        #scan through each val while keeping all other vals at config specs
        system.root.ReadConfig(configFile)
        print("Loading config file")
        scan_test.scan(system, eventReader, val_fields)

    # Run gui
    appTop.exec_()

    # Stop mesh after gui exits
    system.stop()

    return hists


if __name__ == '__main__':
    rogue.Logging.setFilter('pyrogue.SrpV3', rogue.Logging.Debug)
    if len(sys.argv) == 1:
        c2_hists = gui()
    elif len(sys.argv) == 3:
        #allow ip and configFile to be overwritten via commandline args
        c2_hists = gui(ip=sys.argv[1], configFile=sys.argv[2])
    else:
        raise (
            "USAGE: python3 FebScriptTest_testing.py <board ip> <configFile>")
Exemplo n.º 2
0
                    chargeInjectionEnbled=chargeInjectionEnbled)
                # save file
                np.savetxt("chess2_scan_QinjDelay_07272017_run_" + str(run) +
                           "_chargeInjectionEnbled_" +
                           str(chargeInjectionEnbled) + "_thN_" +
                           str(hex(value)) + ".csv",
                           hists,
                           fmt="%s",
                           delimiter=",",
                           header=headerText)


#   values = [0xf2e, 0xe2e, 0xd2e, 0xc2e, 0xb2e, 0xa2e, 0x92e, 0x82e, 0x72e, 0x62e, 0x52e, 0x42e, 0x32e, 0x22e, 0x12e]
#   for value in values:
#       print("system.feb.dac.dacBLRaw", hex(value) )
#       system.feb.dac.dacBLRaw.set(value)
#hists = makeSCurve( system, nCounts=2, thresholdCuts = thresholds, pixels=[ (i,i) for i in range(0,1) ], histFileName="scurve_test_sleep.root" )
#        hists = makeSCurve( system, nCounts=2, thresholdCuts = thresholds, pixels=[ (127,31) ], histFileName="scurve_test_sleep.root" )
#        np.savetxt("chess2_scan_test_trim15"+str(hex(value))+".csv", np.asarray(hists,dtype=np.float32),fmt = "%s", delimiter=",", header="system.feb.dac.dacBLRaw:,"+str(hex(value)))

# Run gui
    appTop.exec_()

    # Stop mesh after gui exits
    system.stop()

    return hists

if __name__ == '__main__':
    c2_hists = gui(arg=sys.argv[1], configFile=sys.argv[2])
Exemplo n.º 3
0
                                          trimI=7)
    print("finish configure the pixels")
    #   system.dataWriter.dataFile.set("test1.dat")
    #   system.dataWriter._setOpen(system.dataWriter,system.dataWriter.open,True,1)
    #system.runControl._setRunRate(system.runControl.runRate,'1 Hz',1)
    #system.runControl._setRunState(system.runControl.runState,'Running',1)
    if (START_VIEWER):
        viewer = vi.Window(system)
        viewer.eventReaderMonitoring.frameIndex = 0
        pyrogue.streamTap(ethLink.application(1), viewer.eventReaderMonitoring)

# system.dataWriter._setBufferSize(system.dataWriter,system.dataWriter.bufferSize,10000)
# system.dataWriter._setMaxFileSize(system.dataWriter,system.dataWriter.maxFileSize,100000)
# while 1:
#    if (system.dataWriter._getFrameCount(system.dataWriter,system.dataWriter._getFrameCount))>1000:
#        system.feb.sysReg.timingMode.set(3)
#        print("get 1000 frame")

# Run gui
    appTop.exec_()

    # Stop mesh after gui exits
    system.stop()

    return hists

if __name__ == '__main__':
    rogue.Logging.setFilter('pyrogue.SrpV3', rogue.Logging.Debug)

    c2_hists = gui(sys.argv[1])