Exemplo n.º 1
0
def set_safe_states(iDevIdx,iSlotID):
	sepia.laser_soft_lock_on(iDevIdx,iSlotID)	## turns the laser soft lock on 
	sepia.set_laser_intensity(0,iDevIdx)          #sets the intensity to 0%
	## TODO: Need to fix the frequencies in safepysepia and also need to check the numbers for internal and external triggers. 
	sepia.set_laser_frequency(6,iDevIdx) 		##sets the frequency to external trigger need to check this
	rs.SetRSChannel(0)			        ##sets the relay box to channel 0 (default channel)
	sepia.close(iDevIdx)
	rs.Execute()                                    ##executes the relay switch channel
Exemplo n.º 2
0
iDevIdx,iModuleType,iSlotID = sepia.initialise() #Initialise the Sepia 2 box
## TODO: Need to check the relay switch here

## TODO: Need to check connections and error status and send to ORCA

set_safe_states(iDevIdx,iSlotID)	        ##sets all the laser components to their safe states print here
iDevIdx,iModuleType,iSlotID = sepia.initialise() #Initialise the Sepia 2 box
sepia.laser_soft_lock_on(iDevIdx,iSlotID)
print "here"
check_safe_states(iDevIdx,iSlotID)		##checks all devices are in their safe states 
print "here check safe states"

#setting up the relay box

rs.SetRSChannel(4)				##sets the relay channel to 1
sepia.close(iDevIdx)
rs.Execute()                                    ##executes the relay switch channel
iDevIdx,iModuleType,iSlotID = sepia.initialise() #Initialise the Sepia 2 box
sepia.laser_soft_lock_on(iDevIdx,iSlotID)


##set parameters stage
## these numbers need to integers 
input_intensity = 100
input_frequency = 4		                ##I think this corresponds to 5Hz
#input_rs_channel = 1
#input_fs_channel = 1  
sepia.set_laser_intensity(input_intensity,iDevIdx)	##sets the intensity to 100%
print "here1"
sepia.set_laser_frequency(input_frequency,iDevIdx)		##sets the frequency
print "here2"
Exemplo n.º 3
0
#total_data = numpy.zeros((1,), dtype=numpy.float64)
iDevIdx, iModuleType, iSlotID = sepia.initialise()
for i in range(0, 12):
    intensity = int(100 - i * 3)
    sepia.set_laser_intensity(intensity, iDevIdx)

    DAQmxStartTask(AItaskHandle)
    DAQmxStartTask(AOtaskHandle)
    time.sleep(4.0)
    #raw_input('Acquiring samples continuously. Press Enter to interrupt\n')
    DAQmxStopTask(AItaskHandle)
    DAQmxStopTask(AOtaskHandle)

    temp_data = get_callbackdata_from_id(id_a)
    #total_data = total_data.append(temp_data)
    offset = 1
    peak_length = 2
    threshold = 0.3
    time.sleep(3.0)

    #DAQmxClearTask(AItaskHandle)
    #DAQmxClearTask(AOtaskHandle)
    #time.sleep(12.0)

sepia.close(iDevIdx)
prune_data(temp_data, 5000, threshold, offset, peak_length)
reformat(temp_data)

DAQmxClearTask(AItaskHandle)
DAQmxClearTask(AOtaskHandle)