Sidh |
06/15/2015 08:47PM (Read 1477 times)
|
|
|
Status: offline
Registered: 06/15/2015
Posts: 4
|
Hi everyone,
I am a new IRAF user, and I have some problem with the splot command.
I try to use it to save some informations in a .log file but there is no .log file registered at the end of the operation.
Here is the line I use ;
PHP Formatted Code splot (nb ,cursor =data_dir +'/txt/curBFp.txt', save_file =data_dir +'/log/splotb.log')
After some research and test, I think that the cursor file is the problem (someone made it for me).
0 0 1 t
0 0 1 -
6448 0 1 s
6528 0 1 s
6603 0 1 s
6683 0 1 s
0 0 1 f
0 0 1 q
0 0 1 w
6463 -5e-16 1 e
6663 5e-16 1 e
I saw that, by deleting the line : ' 0 0 1 w ', the code seems to work, but I would like to know how it works.
Can anyone link me a tutorial on cursor files or help me fix this one ?
Thank you !
|
|
|
|
fitz |
06/15/2015 08:57PM
|
|
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
To answer your first question, see "help cursors" and "help gtools" for more information about cursor files and the special windowing commands.
From your cursor file it was clear whether you intended the last two 'e' keystrokes to be the positions used to mark the new window started by the 'w' command, or if these were the endpoints for the SPLOT 'e' command to measure the eq. width. Did you think the 'w' did something else?
|
|
|
|
Sidh |
06/16/2015 12:43AM
|
|
|
Status: offline
Registered: 06/15/2015
Posts: 4
|
I am discovering the cursor files, so I did not know what the 'w' do.
And yes, the 'e' command purpose is to measure the width.
But my major problem is that : when I run the script, this part should output a splotb.log document that I can use afterward. But here, if I let the ' 0 0 1 w' ligne, this .log file is not created.
And, I don't really understand why ..
|
|
|
|
fitz |
06/16/2015 01:13AM
|
|
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
The 'w' keystroke is a "window" command and expects to be followed by two 'e' keystrokes to set the corners. Try using "0 0 1 :write" to instead use the ":write" command to write the logfile.
|
|
|
|
Sidh |
06/16/2015 08:13PM
|
|
|
Status: offline
Registered: 06/15/2015
Posts: 4
|
As I told you, I don't use the command but I am running a python script.
So I can't use the ' 0 0 1 :write ' command ..
I have one more question as I now have a better understanding of the file :
There are 4 lines with the 's' command. I know that they are used to set a range for the substraction, but as they work 2 by 2, do I need to make a 'f' command after the two first ?
Or do the 'f' command understand that there are 2 operations to do ?
Thank you again for your help
|
|
|
|
fitz |
06/16/2015 10:25PM
|
|
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
As I told you, I don't use the command but I am running a python script.
So I can't use the ' 0 0 1 :write ' command ..
Just replace the "0 0 1 w" in the cursor file with "0 0 1 :write" to do this.
I have one more question as I now have a better understanding of the file :
There are 4 lines with the 's' command. I know that they are used to set a range for the substraction, but as they work 2 by 2, do I need to make a 'f' command after the two first ?
The 's' keystroke commands do a smoothing by some specified value (see the help page). So your cursor command file first subtracts a fit to the spectrum (the 't' and '-' on first two lines), does 4 's' commands to smooth (presumably you would interactively respond to the prompt for the boxcar size), then enters function mode (the 'f') and immediately quits (the 'q'). Lastly it does a 'w' to window using the positions specified by the two 'e' keystrokes.
|
|
|
|
Sidh |
06/19/2015 07:16PM
|
|
|
Status: offline
Registered: 06/15/2015
Posts: 4
|
Thank you for your help Fitz.
The person that made the cursor for me finally contacted me back, telling me that it was the wrong cursor, so it couldn't be working really well ...
Anyways, I now understand what I am working on, thank you again !
|
|
|
|