fv scripting
What for?
With an fv script, one can automate some of the interactive procedures in fv. e.g. using an fv script file, one can open a FITS file, and display the header of the third extension, or plot X and Y column in the table on the fourth extension, or do them both.Writing an fv script
Fv scripting is designed in an object-oriented fashion. But you don't have to know much about OO to use it. The only thing you need to know is that you have to create a FITS object first, and then ask the FITS object to do the things you want it to do. All the commands need to be saved in an ASCII file with the ".fv" extension.Creating a FITS object
To create a FITS object, use the command:FVFile object_namewhere object_name is of your choice. The first two things you need to do after that are:
- object_name setFileName file_name
- object_name setFileMode file_mode
ftp://username:password@host.domain/directory/filename
If the remote host is an anonymous ftp site, one can replace the
username and password with "anonymous" and one's email
address.
The values and meaning of file_mode are as follows:
- 0: open pre-existing file as read/write
- 1: open pre-existing file as read only
- 2: create a new FITS file
Available actions
The scripting capability is currently rather limited and is deprecated in preference to a newer, more powerful interface. Right now, you can only do the following- object_name setExtension ext_number
- object_name displayTable
- object_name displayImage
- object_name setXColumn column_name
- object_name setYColumn column_name
- object_name setXErrorColumn column_name
- object_name setYErrorColumn column_name
- object_name plotTable # do the above four commands first (Only setXColumn and setYColumn are required).
Go to About fv.
Pages maintained by Bryan Irby Send bug reports or feature requests via the FTOOLS help desk.
HEASARC Home | Observatories | Archive | Calibration | Software | Tools | Students/Teachers/Public
Last modified: Monday, 28-Jul-2008 16:06:19 EDT
