User Tools

Site Tools


GUI Tips & Tricks

Change of all scan names

Open iPython console and write commands.

To see temperature in legend of charts:

  for aa in D:
       if hasattr(aa, 'data'):

To put some parameter to all scan titles (in this example it is parameter gamma):

  for aa in D:
       if hasattr(aa, 'data'):
  += ', stt=%0.2f' %

Fit curve from the file

It is possible to have a spectrum/background stored as a xy points in ASCII datafile. This command will load that file, interpolate between the loaded values and then fit the scale of such model. Just add this line to the Model definition:

   Custom('MyBg', 'scale', "(lambda data: scipy.interpolate.interp1d(data[0], data[1], kind='cubic')(x) * scale)(numpy.loadtxt('C:\bg.txt').T)")

Replace C:\bg.txt with path to your ASCII file. MyBg can be also changed - this is just name of your model.

ufit/help/tips.txt · Last modified: 2017/10/24 07:28 by pcermak