Welcome to iraf.net Saturday, April 27 2024 @ 08:16 PM GMT
mv1612 |
07/13/2007 07:56PM (Read 4014 times)
|
|
|
Status: offline
Registered: 05/31/2006
Posts: 5
|
Hi,
I'm fitting single line profiles by gaussians (k keystroke in SPLOT). Now, for a certain reason, after the fitting I need to [u:0bb51f721f]replace the profile by the fit[/u:0bb51f721f], not to subtract the fit. I can't find any way to do it. Maybe it's simple... just don't find anything about replacing by the fit, only about subtracting the fit...
Thanks.
|
|
|
|
fitz |
07/13/2007 07:56PM
|
|
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
Frank is of course the authority, but a quick idea worth trying (I think anyway) is to use FITPROFS to do the profile fitting and save the fit to an output file. Then you can use e.g. IMEXPR to write a new image using either the non-zero pixels indicating the fitted regions or the pixels from the original spectrum, e.g.[code:1:3f50c99474]cl> imexpr "(a ? a : b)" newspec.fits a=fitted.fits b=original.fits[/code:1:3f50c99474]The reference image should probably be set to the original spectrum to preserve the WCS. There may also be something clever you could do with SARITH as well.-Mike
|
|
|
|
mv1612 |
07/13/2007 07:56PM
|
|
|
Status: offline
Registered: 05/31/2006
Posts: 5
|
Thank you, I will try.
Virgil.
|
|
|
|
mv1612 |
07/13/2007 07:56PM
|
|
|
Status: offline
Registered: 05/31/2006
Posts: 5
|
Hi,Thanks for mentioning FITPROFS, I solved my problem taking the fitting parameters from splot, constructing the gaussian with fitprofs and then doing the spectra manipulation in sarith. Much appreciated.Now I would have another question. I'm working with WR stars which give emission lines instead of the usual absorbtion lines. I have very often two emission lines that are close and partially blended, or I could have an absorbtion line over an emission line, if my WR star is in a binary. Could I make a fit in IRAF using two gaussians simultaneously? That would ease my work considerably... Thanks, Virgil.
|
|
|
|
fitz |
07/13/2007 07:56PM
|
|
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
See the 'd' command for deblending multiple gaussians. I *think* it will work on emission lines, I'm not sure about deblending a absorption and emission at the same time though.-Mike
|
|
|
|
| |
|
Content generated in: 0.15 seconds |
|