Example #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
Example #2
0
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"
#sepia.close(iDevIdx)
#sys.exit("forced exit here")

fs.SetFSChannel(54)				##sets the fibre switch channel to 1 
check_set_states(iDevIdx,iSlotID,input_intensity,input_frequency)

##TODO: Dry test using only the PMT's (this section needs to be put in ) 

##TODO: Send ORCA Parameters 

sepia.laser_soft_lock_off(iDevIdx,iSlotID)		## this function unlocks the laser 
time.sleep(5)						## pulse laser for 10 seconds
sepia.laser_soft_lock_on(iDevIdx,iSlotID)
set_safe_states(iDevIdx,iSlotID)	##sets all the laser components to their safe states