def redox_map(posname, scanname, datafile=None, energies=[5460, 5467.5, 5469, 5485.9, 5493.3, 5600]): """ repeat a scan or map at multiple energies Parameters: posname (string): position name scanname (string): scan name energies (list of floats): list of energies (in eV) to run map scan at Example: redox_map('MyMap', 'sampleX', energies=[5450, 5465, 5500]) Note: output files will named <scanname>_<energy>eV.001 for the example above, the files will be named 'MyMap_sampleX_5450.0eV.001', 'MyMap_sampleX_5465.0eV.001', 'MyMap_sampleX_5500.0eV.001', """ move_samplestage(posname, wait=True) if datafile is None: datafile = '%s_%s.001' % (scanname, posname) #endif for en in energies: move_energy(en) dfile = '%s_%.1feV.001' % (datafile, en) print "Start Map ", scanname, " Filename ", dfile do_scan(scanname, filename=dfile) if check_scan_abort(): return
def scan_at_energy(scanname, posname, energy): move_energy(energy) move_samplestage(posname, wait=True) fname = '%s_%s_%ieV.001' % (posname, scanname, energy) do_scan(scanname, filename=fname)