Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1556
News FAQ
Search Home


next up previous contents index
Next: functionfitter.setdata - Function Up: functionfitter - Tool Previous: functionfitter.plot - Function


functionfitter.setcoordsys - Function



Package utility
Module fitting
Tool functionfitter


Set a new Coordinate System


Synopsis
setcoordsys(csys, axis)


Arguments

csys in The Coordinate System
    Allowed: Coordsys tool
axis in The axis of the Coordinate System that we are plotting
    Allowed: Integer
    Default: 1


Returns
T or fail



Description

By default, when you set data into the Functionfitter tool (with functions setdata or setdatafromtable) a tabular Coordinate System is created internally. This maps between pixel index and the x world value (with units specified in the above function calls). This Coordinate System is used by the plotting function plot.

This function allows you to set a diffferent Coordinate System. For example, if the units of the x-data are frequency, then, rather than using the internal Tabular Coordinate System, you could set a Spectral Coordinate System and then you will be able to convert to and from velocity units with the plotting interface. You would need to correctly fill in the Spectral Coordinate System with funtions from the coordsys tool.

Note that at this point, the plotting interface has no impact on the x-space in which the fit is done. The fitting is always done in with the original x (abcissa) vector that you set.



Example
- include 'functionfitter.g'
- ff := functionfitter()
- x := 1:10
- y := 3 + 2*x
- ff.setdata (x,y)
- ff.setfunction ('p0+p1*x')
- ff.fit()
- ff.plot()                            # Plots a linear axis
- 
- include 'coordsys.g'
- cs := coordsys(spectral=T)           # Default spectral coordinate
- ff.setcoordsys(cs)
- ff.plot()                            # Plots a spectral axis with velocity conversions





next up previous contents index
Next: functionfitter.setdata - Function Up: functionfitter - Tool Previous: functionfitter.plot - Function   Contents   Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-10-15