Return to directory of Todd's CASA extensions

Performs linear fit to data from the specified text file, and specified data columns, by using linfit.


au.linfitFromFile(self, filename, xcol, ycol, yerrorcol=None, pinit=[0,0],
                     plot=False, plotfile=None, xlabel=None, ylabel=None,
                     title=None,delimiter=None, residual=False):
  • xcol, ycol: columns to use from the file (starting at 0)
  • yerrorcol: column to use for uncertainties (None -> 1% of ycol)
  • pinit: contains the initial guess of [slope, intercept]
  • plot: whether to generate a plot window
  • plotfile: whether to generate a png file
  • xlabel, ylabel, title: labels for the plot
  • delimiter: column delimitier in your file
  • residual: if True, show the residual of the fit in second panel


CASA <3>: au.linfit().linfitFromFile('',xcol=0,ycol=2,xlabel='Frequency (GHz)',
                           ylabel='Encoder counts',plot=True,plotfile='yigTuningCurve.png',
                            title='MLXM-0818 YIG with FM coil target bias = 1.1V',residual=True)

yigTuningCurve.png -- ToddHunter - 2014-01-15
Topic revision: r1 - 2014-01-15, ToddHunter
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding NRAO Public Wiki? Send feedback