Welcome to iraf.net Tuesday, April 30 2024 @ 01:15 PM GMT


 Forum Index > Help Desk > General IRAF New Topic Post Reply
 splot Gaussian Fit--higher precision--
   
rohit
 11/24/2008 06:52PM (Read 4208 times)  
++++-
Regular Member

Status: offline


Registered: 06/01/2006
Posts: 86
I am using SPLOT to identify the wavelenghts of telluric lines by fitting a Gaussian (using the key "k" ). IRAF gives the wavelength value to 5th decimal point. I would like IRAF to give me to 7th decimal point. The telluric lines that I have plotted are precised to 11th decimal point. How do ask IRAF to do that? Thanks!

 
Profile Email
 Quote
fitz
 11/24/2008 06:52PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
To get more precision you would need to modify the code and recompile, however the Gaussian fitting appears to be done in single precision floating-point so I'm not sure printing out any more decimals would be meaningful without more extensive changes anyway. As an alternative you might look at using the WSPECTEXT task to write the spectrum out as a (wavelength,flux) list and use 'wformat' for higher precision, the use a task like NGAUSSFIT (in the STSDAS.FITTING package) to fit it. Off hand, I'm not sure whether NGAUSSFIT gives you any more precision. I'm sure Frank will comment if he has additional ideas.-Mike

 
Profile Email
 Quote
rohit
 11/24/2008 06:52PM  
++++-
Regular Member

Status: offline


Registered: 06/01/2006
Posts: 86
Thanks Mike for your response. I was able to get to 6 decimal places by looking at the splot.log file. But I suppose one needs to compare. It will be good to see if Frank has any ideas. Thanks again! Rohit

 
Profile Email
 Quote
valdes
 11/24/2008 06:52PM  
+++++
Active Member

Status: offline


Registered: 11/11/2005
Posts: 728
Hello Rohit,Mike is correct that the number of places of precision in the terminal output and the log output is fixed and cannot be changed at runtime. The choice of the number of places was made to fit output to a particular line length and also, as Mike also mentioned, because things are being done in real precision in this ancient task. If we were to revise it we would probably want to do things in double precision.The main suggestion I would make is to convert the plot to some other units, say pixels, before doing the fit. This may get you the precision you want. In particular, doing the fitting in pixels would get you the position in pixel to the limits of the fitting method. You could then convert the pixel coordinate to wavelength either by knowing your wavelength scale or possibly with wcsctran.Yours,
Frank Valdes

 
Profile Email
 Quote
   
Content generated in: 0.08 seconds
New Topic Post Reply

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