View on GitHub

IRAF Community Distribution

IRAF maintained by the community

Home | Installation | Packages | X11IRAF | PyRAF | Forum

sarith giving me a flat spectrum

elscott wrote on Mar 11, 2009

I've been trying to multiply an Echelle spectrum (2D) by a 2D weighting function using sarith. The problem is that the output spectrum comes out completely flat with a value of 0. I've checked the input spectra and the weighting function and they're both fine, and I've been using parameters from a script that worked on previous occasions. Can anyone tell me what's wrong?

Francisco Valdes wrote on Mar 11, 2009

If you will post the parameters, from an lpar listing, and the command line you type, as well as any output I might be able to help you.

Yours,
Frank Valdes

elscott wrote on Mar 11, 2009

input1=@allobj.list
op="*"
input2="refs/weight_ftn_183dc.ec.fits"
output=weighted//@allobj.list
w1=INDEF
w2=INDEF
apertures="*"
bands=""
beams=""
apmodulus=0
reverse=no
ignoreaps=no
format="multispec"
renumber=no
offset=0
clobber=yes
merge=no
rebin=yes
errval=0.
verbose=yes

I start by doing epar sarith at the command line, and change to these parameters if it isn't set there already. I'm using the sarith in noao/onedspec. Hope that helps.

Francisco Valdes wrote on Mar 11, 2009

Hi,

Could you post the result of

imstat @allobj.list,refs/weight_ftn_183dc.ec.fits


Frank

elscott wrote on Mar 11, 2009

    IMAGE|||||||||||||||||||||||||| NPIX|||| MEAN||| STDDEV| MIN|||| MAX
    cor_sumBPTau.fits||||||||||||| 219136| 1.883||| 40.87||| -1187.|| 16770.
    cor_sumCYTau.fits||||||||||||| 219136| 2.219||| 19.65||| -3816.|| 4013.
    cor_sumDGTau.fits|||||||||||| 219136|| 1.744||| 22.1|||| -7759.|| 1931.
    cor_sumGJ273.fits||||||||||||| 219136| 1.136||| 35.46||| -10042.| 5902.
    cor_sumGMAur.fits|||||||||||| 219136|| 1.528||| 3.495||| -231.7|| 730.6
    cor_sumLkCa5.fits||||||||||||| 219136| 2.463||| 18.2|||| -4117.||| 3187.
    cor_sumV1023Tau.fits|||||||| 219136|| 1.768||| 26.65||| -10726.| 2917.
    refs/weight_ftn_183dc.ec.fits 219136|| 751573. 1.066E6 0.|||||||| 3.9

Francisco Valdes wrote on Mar 11, 2009

There appears to be something odd about your weights file. A standard deviation of a million? And I can understand why the min/max is 0/3.9 where the mean and deviation are so large? So I think the file is either corrupted or the data values were not created properly. How was this file created? Did you move between machines where there might be a byte swapping issue?

So please look over how you came up with your weight file. If you want me to look at the file you could attach it to a mail to valdes@noao.edu or put it some place where I could retrieve it by http or ftp.

Until I understand the numbers in this file it is premature to investigate the behavior of sarith with this data.

Frank

elscott wrote on Mar 11, 2009

It seems as if the max is actually 3.965E6; I think it got cut off somewhere.

Francisco Valdes wrote on Mar 11, 2009

I also reread your first email where you say you checked the data. I don't see anything wrong with your parameters. I am not aware of a bug with sarith. At this point the only thing I can do is to reproduce the problem with your data. So as I mentioned earlier, you can mail me directly and either attach or put the data at some web or ftp site.

Frank

Last post on Mar 11, 2009