Welcome to iraf.net Thursday, May 02 2024 @ 05:13 AM GMT


 Forum Index > Archives > Sitemail Archives
 Overplotting with `splot'
   
Anonymous: Guest
 04/27/2005 06:15PM (Read 10484 times)  



Dear IRAF Helper,I am producing many plots of 5 or more superposed spectra over a small wave-
length range, like the attached plot of the H+K lines, using: splot spn1c001_01_133 xmin=3900 xmax=4100 ymin=0 ymax=2.5e-16 opt="wr"and then interactively typing: o g spn1c001_01_134
o g spn1c001_01_141
o g spn1c001_01_143
o g spn1c001_01_144
The five plotted spectra are uniquely defined by "spn1c001_01_1??.fits".To save myself all this interactive typing, I would like to simply type: splot spn1c001_01_1??.fits xmin=3900 xmax=4100 ymin=0 ymax=2.5e-16 opt="wr,o"and then four times interactively type "q". As I understand the help file for
`splot', this should produce the same graph ("o" in options for overplot).
However, when I do this, each new spectrum appears by itself, and I have been
unable to achieve overplotting in this mode? How do I prevent the erasing of
the previously plotted spectra? Is there a way to achieve it?Will be grateful for any help or pointer you may provide, since I am producing
dozens of such superposition plots in the first, inefficient way.Cheers,
Francois

 
Anonymous: Guest
 04/27/2005 06:15PM  



Hi Francois,The cycling through images which are specified as the input list and
using 'q' to go to the next spectrum does not work the way you want.
It is equivalent to doing SPLOT separately on each input. The option
setting you tried with the 'o' specification is to avoid having to type
'o' before every 'g'. It does not apply to a 'q' as you found.The answer to what you want to do is to use the task SPECPLOT. This
task was specifically designed for overplotting types of work which is
common with spectra. It has a number of options, including scaling and
color coding. It may take you a short while to learn how to use this
and the cursor and colon commands but it is worth learning.To do a batch type of graphics with colors and plotting types use
a cursor input file in place of the interactive cursor. For example:on> type cursor.dat
0 0 1 :ptype[1] 1
0 0 1 :ptype[2] 2
0 0 1 :ptype[3] 3
0 0 1 :color[1] 1
0 0 1 :color[2] 2
0 0 1 :color[3] 3
r
q
on> specplot test* xmin=6000 xmax=6250 cursor=cursor.datNote that you must put the "0 0 1" on the colon command lines to workaround
a bug which will be fixed in the next release. You also need the 'r' to
get the plot to redraw.You can redirect the graphics to a printer or metacode file if you want.
See BPLOT for some help on how to use cursor input redirection in IRAF
tasks.Another reference is that the SPECTOOL graphical tool has many sophisticated
options for stacking, etc. It is a separate add-on package. You may
or may not want to investigate this new tool as alternatives to
SPLOT, SPECPLOT, and other ONEDSPEC tasks.Cheers,
FrankPS You might think BPLOT could do what you want. But because the
spectrum name specified for the 'g' option comes from a parameter
rather than the cursor input you can't use cursor input redirection for
this purpose.

 
Anonymous: Guest
 04/27/2005 06:15PM  



>From schweizer@ociw.edu Tue May 3 12:15:45 2005
Date: Tue, 03 May 2005 12:15:24 -0700
From: Francois Schweizer <schweizer@ociw.edu>
To: Frank Valdes <valdes@noao.edu>
Subject: Re: Overplotting with `splot'Hi Frank,Thank you so much for your most helpful answer and, especially, for taking
the time to spell out some of the details.I had seen the availability of `specplot', but had wrongly concluded that it
wouldn't do what I wanted. I appreciate especially your giving me an example
of a cursor input file, which I couldn't have figured out by myself.Now, equipped with your info and a cursor input file, I can superposition
plot 5 or 6 spectra each in its own color and line type. This is so useful
that I am taking the time to write a script that will cover the most frequent
options of stacked or superposed plotting that I need for efficient work.Many thanks again for going well beyond the call of duty in helping me!Cheers,
Francois

 
Anonymous: Guest
 04/27/2005 06:15PM  



Dear IRAF Helper,I am producing many plots of 5 or more superposed spectra over a small wave-
length range, like the attached plot of the H+K lines, using: splot spn1c001_01_133 xmin=3900 xmax=4100 ymin=0 ymax=2.5e-16 opt="wr"and then interactively typing: o g spn1c001_01_134
o g spn1c001_01_141
o g spn1c001_01_143
o g spn1c001_01_144
The five plotted spectra are uniquely defined by "spn1c001_01_1??.fits".To save myself all this interactive typing, I would like to simply type: splot spn1c001_01_1??.fits xmin=3900 xmax=4100 ymin=0 ymax=2.5e-16 opt="wr,o"and then four times interactively type "q". As I understand the help file for
`splot', this should produce the same graph ("o" in options for overplot).
However, when I do this, each new spectrum appears by itself, and I have been
unable to achieve overplotting in this mode? How do I prevent the erasing of
the previously plotted spectra? Is there a way to achieve it?Will be grateful for any help or pointer you may provide, since I am producing
dozens of such superposition plots in the first, inefficient way.Cheers,
Francois

 
Anonymous: Guest
 04/27/2005 06:15PM  



Hi Francois,The cycling through images which are specified as the input list and
using 'q' to go to the next spectrum does not work the way you want.
It is equivalent to doing SPLOT separately on each input. The option
setting you tried with the 'o' specification is to avoid having to type
'o' before every 'g'. It does not apply to a 'q' as you found.The answer to what you want to do is to use the task SPECPLOT. This
task was specifically designed for overplotting types of work which is
common with spectra. It has a number of options, including scaling and
color coding. It may take you a short while to learn how to use this
and the cursor and colon commands but it is worth learning.To do a batch type of graphics with colors and plotting types use
a cursor input file in place of the interactive cursor. For example:on> type cursor.dat
0 0 1 :ptype[1] 1
0 0 1 :ptype[2] 2
0 0 1 :ptype[3] 3
0 0 1 :color[1] 1
0 0 1 :color[2] 2
0 0 1 :color[3] 3
r
q
on> specplot test* xmin=6000 xmax=6250 cursor=cursor.datNote that you must put the "0 0 1" on the colon command lines to workaround
a bug which will be fixed in the next release. You also need the 'r' to
get the plot to redraw.You can redirect the graphics to a printer or metacode file if you want.
See BPLOT for some help on how to use cursor input redirection in IRAF
tasks.Another reference is that the SPECTOOL graphical tool has many sophisticated
options for stacking, etc. It is a separate add-on package. You may
or may not want to investigate this new tool as alternatives to
SPLOT, SPECPLOT, and other ONEDSPEC tasks.Cheers,
FrankPS You might think BPLOT could do what you want. But because the
spectrum name specified for the 'g' option comes from a parameter
rather than the cursor input you can't use cursor input redirection for
this purpose.

 
Anonymous: Guest
 04/27/2005 06:15PM  



>From schweizer@ociw.edu Tue May 3 12:15:45 2005
Date: Tue, 03 May 2005 12:15:24 -0700
From: Francois Schweizer <schweizer@ociw.edu>
To: Frank Valdes <valdes@noao.edu>
Subject: Re: Overplotting with `splot'Hi Frank,Thank you so much for your most helpful answer and, especially, for taking
the time to spell out some of the details.I had seen the availability of `specplot', but had wrongly concluded that it
wouldn't do what I wanted. I appreciate especially your giving me an example
of a cursor input file, which I couldn't have figured out by myself.Now, equipped with your info and a cursor input file, I can superposition
plot 5 or 6 spectra each in its own color and line type. This is so useful
that I am taking the time to write a script that will cover the most frequent
options of stacked or superposed plotting that I need for efficient work.Many thanks again for going well beyond the call of duty in helping me!Cheers,
Francois

 
   

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content 
dog allergies remedies cialis 20 mg chilblain remedies


Privacy Policy
Terms of Use

User Functions

Login