Welcome to iraf.net Saturday, January 20 2018 @ 10:56 PM GMT

 Forum Index > Help Desk > Applications New Topic Post Reply
 how to interpolate a spectrum from an ascii file into fits with log-linear dispersion?
 10/24/2016 06:08PM (Read 664 times)  

Status: offline

Registered: 03/09/2006
Posts: 18
I've been using sinterp and rspectext to convert a spectrum in ascii format into a fits one for more time that i care to remember. Lately, several times I wanted the output FITS file to have a log-linear instead of linear wavelength dispersion. As far as I know, sinterp and rspectext interpolate to linear dispersion only (or?).

How can I read a 2-columns ascii file (wavelength, flux) and interpolate the spectrum into a FITS spectrum where the dispersion is log-linear? (given that I provide the desired CRVAL1 and CDELT1 of the output FITS in log).

thanks in advance.

Profile Email
 11/14/2016 05:54PM  

Status: offline

Registered: 09/30/2005
Posts: 3991
The DISPCOR task is what's normally used to rebin spectra to a log dispersion, so the brute force approach is to use something like RSPECTEXT to convert your ascii tables and then DISPCOR toset the desired log dispersion, e.g. by wrapping this up in a small CL script command. There is, however, a new SPTABLE package that allows you to deal with tabular spectra directly -- I haven't tried it but the package does include a modified ONEDSPEC package and so the DISPCOR task in there might be able to do the conversion directly.

Profile Email
Content generated in: 0.11 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