def plot_current_sequence(self, cxn): from common.okfpgaservers.pulser.pulse_sequences.plot_sequence import SequencePlotter dds = cxn.pulser.human_readable_dds() ttl = cxn.pulser.human_readable_ttl() channels = cxn.pulser.get_channels() sp = SequencePlotter(ttl, dds.aslist, channels) sp.makePlot()
def run(self, cxn, context): p = self.parameters.Dephasing_Pulses self.data_vault_new_trace() self.setup_sequence_parameters() for i, interaction_duration in enumerate(self.scan_t): second_pulse_dur = min(self.max_second_pulse, interaction_duration) ramsey_time = max(WithUnit(0, 'us'), interaction_duration - self.max_second_pulse) p.evolution_ramsey_time = ramsey_time p.evolution_pulses_duration = second_pulse_dur N = int(p.analysis_ion_number) # index from 0 print N #-------------------- Phase loop submission = [interaction_duration['us']] #This is the time phase_list = [] for j, interaction_phase in enumerate(self.scan_phi): should_stop = self.pause_or_stop() if should_stop: return False p.evolution_pulses_phase = interaction_phase #added for the phase steps self.excite.set_parameters(self.parameters) excitation, readout = self.excite.run(cxn, context) # excitation looks like [ion1 excit, ion2 ex, ... ] # pull out just the ion readout we care about with excitation[N] phase_list.append( excitation[N] ) # only look at the excitation for the ion we readout submission.extend( phase_list ) # The excitation is attached to the time now in a second column (?) self.dv.add( submission, context=self.data_save_context ) #Saving to data file where submission now includes the time and excitation # now have submitted raw data, save contrast for online analysis try: contrast = (max(phase_list) - min(phase_list)) / ( max(phase_list) + min(phase_list) ) # will fail with 0 excitation except: contrast = 0 # in case there's no excitation contrast_submission = [interaction_duration['us'], contrast] self.dv.add(contrast_submission, context=self.contrast_save_context) self.update_progress(i) self.save_parameters(self.dv, cxn, self.cxnlab, self.data_save_context) ####### PULSE SEQUENCE PLOTTING ######### ttl = self.cxn.pulser.human_readable_ttl() dds = self.cxn.pulser.human_readable_dds() channels = self.cxn.pulser.get_channels().asarray sp = SequencePlotter(ttl.asarray, dds.aslist, channels) sp.makePlot() ############################################ return True
def plot_current_sequence(self, cxn): # Bypass creating pulse sequence plot if self.parameters_dict.global_scan_options.quick_finish: return #t0 = time.time() from common.okfpgaservers.pulser.pulse_sequences.plot_sequence import SequencePlotter dds = cxn.pulser.human_readable_dds() ttl = cxn.pulser.human_readable_ttl() channels = cxn.pulser.get_channels() #sp = SequencePlotter(ttl, dds.aslist, channels) sp = SequencePlotter(ttl, dds, channels) sp.makePDF()
def run(self, cxn, context): self.setup_data_vault() self.setup_sequence_parameters() self.pulser.switch_auto('397mod') self.pulser.switch_auto('parametric_modulation') for i, duration in enumerate(self.scan): should_stop = self.pause_or_stop() if should_stop: break self.parameters[ 'ParametricCoupling.parametric_coupling_duration'] = duration self.excite.set_parameters(self.parameters) excitation = self.excite.run(cxn, context) self.dv.add((duration, excitation), context=self.mode_coupling_save_context) self.update_progress(i) dds = self.cxn.pulser.human_readable_dds() ttl = self.cxn.pulser.human_readable_ttl() channels = self.cxn.pulser.get_channels().asarray sp = SequencePlotter(ttl.asarray, dds.aslist, channels) sp.makePlot()
['0.00962008', '00000000000000000000000000000000'], ['0.00982', '00000000000000000010000000000000'], ['0.00982008', '00000000000000000000000000000000'], ['0.01002', '00000000000000000010000000000000'], ['0.01002008', '00000000000000000000000000000000'], ['0.010026', '00000000000000000010000000000000'], ['0.01002608', '00000000000000000000000000000000'], ['0.010226', '00000000000000000010000000000000'], ['0.01022608', '00000000000000000000000000000000'], ['0.010276', '00001000000000000010000000000000'], ['0.01027608', '00001000000000000000000000000000'], ['0.010376', '00000000000000000010000000000000'], ['0.01037608', '00000000000000000000000000000000'], ['0.010381', '00000000000000000010000000000000'], ['0.01038108', '00000000000000000000000000000000'], ['0.010431', '00000000000000000010000000000000'], ['0.01043108', '00000000000000000000000000000000'], ['0.010631', '00000000000000000010100000000000'], ['0.01063108', '00000000000000000000100000000000'], ['0.013631', '00000000000000000010000000000000'], ['0.01363108', '00000000000000000000000000000000'], ['0.013731', '00000000000000000010000000000000'], ['0.01373108', '00000000000000000001000000000000'], ['0.01373116', '00000000000000000000000000000000'], ['0.0', '00000000000000000000000000000000']] readout = cxn.pulser.get_readout_counts().asarray print readout channels = cxn.pulser.get_channels().asarray sp = SequencePlotter(ttl.asarray, dds.aslist, channels) sp.makePlot()