Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.naic.edu/~astro/spectral_line/handbook_old/node24.html
Дата изменения: Thu May 31 22:52:08 2001
Дата индексирования: Sat Dec 22 22:16:58 2007
Кодировка:

Поисковые слова: внешние рмбоефщ
More Analyz Stuff next up previous contents
Next: Some Useful Routines for Up: DATA ANALYSIS Previous: Getting Started in Analyz

More Analyz Stuff

Listing a function: If you can't remember what a function does typing ``listf <function_name> '' gives a quick listing of the function and any documentation that was attached to it. If you really want to know the painful details of a function, typing ``trace <function_name>'' shows you both the function details and the details of all the sub-functions called by that function.

Writing your own functions: One of the bonuses (there are a couple) of Analyz is the ease with which anyone can write their own Analyz functions. This is done by placing a series of Analyz commands together on one line (each separated by a semicolon), and then following that by a colon and a function name. Once you hit return Analyz will ask you to give some sort of documentation to your function (you can just hit return if you don't want any) and then presto - you have created an Analyz function.

As a simple example, say you find yourself typing ``rcl 200;han 5;rcl 8;plotxy" repeatedly. You can save yourself some effort by making a function. Now, just type
``rcl 200;han 5;rcl 8;plotxy:myplot"
Then the next time you want to ``rcl 200;han 5;rcl 8;plotxy", you just have to type ``myplot" and Analyz will do all that typing for you.

For a more complicated example, let's say you want to run the above command, but you want to be able to choose what register your data is in. In this case, you need to rely on the ``pr" variables - variables which obtain their values from user input. (There are seven pr variable - pr1 - pr7.) In this case, your function will look like this: ``rcl pr1;han 5;rcl 8;plotx:myplot", and to run it you have to type ``myplot <register_number>".

One thing to keep in mind when writing functions is that Analyz was written for a Harris computer. This means it cannot deal with lines longer than 80 characters in length. If you have a really long function, you need to break it into sub-functions. This can make things get really complicated, but if you have a long observing run, it'll give you something to play with at 3 a.m.


next up previous contents
Next: Some Useful Routines for Up: DATA ANALYSIS Previous: Getting Started in Analyz

koneil@naic.edu