next up previous contents_motif.gif
Next: 5.4 Output Up: 5 Usage Previous: 5.2 Methods


5.3 Arguments

Nearly all user methods require arguments to be passed. Nevertheless, the methods provide default arguments which thus may be omitted. In this case many methods just supply status information.

Example: The method indir() sets the desired input directory and requires the name as argument:

  indir(''/home/user/data/'')
The directory name is a string argument and has to be passed embedded in double or single quotes. Omitting the argument does not change the input directory and results in the supply of the current directory name:
  indir()

In case an argument has to be typed more often a python variable might be used:

  a='/home/user/data/'
  indir(a)

Some methods require a list as argument. In python a list is embedded in square brackets with a comma as separator. Python provides a variety of functionalities to manipulate lists.

Example: The method signal() plots the time series of the data (flux density or counts versus time). It allows to define the list of channels to be plotted:

  signal([18,19,20])
To create a list you might use the python function range():
  mylist=range(1,163)
  signal(mylist)
or in one line:
  signal(range(1,163))
Even if the list contains only one element the square brackets are mandatory:
  signal([5])

User methods can also be called using keyword arguments of the form keyword = value.

Example: By default, the signal() method plots the signal versus time connecting the datapoints with lines:

  signal()
If you prefer to see the individual datapoints without lines, you can modify the value of the style argument:
  signal(style='p')


next up previous contents_motif.gif
Next: 5.4 Output Up: 5 Usage Previous: 5.2 Methods
Frank Bertoldi 2005-11-10