Welcome to iraf.net Sunday, April 28 2024 @ 03:49 AM GMT


 Forum Index > Help Desk > Applications New Topic Post Reply
 FXCOR: INDEF Velocities
   
Prabhani
 07/12/2018 06:04AM (Read 2081 times)  
+----
Newbie

Status: offline


Registered: 07/12/2018
Posts: 3
Hi!
I am trying to calculate radial velocities using FXCOR. I am testing with two fits files. I do not get velocity values; except I get all the velocities as INDEF. Could you please help me figure out what's wrong?
Thanks in advance!
-Prabhani

This is how my rv.log looks like:

Description of Fit to CCF Peak and Cross-Correlation
NOAO/IRAF V2.16 ****** Thu 01:37:50 12-Jul-2018

Obj = ` aperture_19.fits[19]' star = `'
Temp = ` temp.0182.fits[19]' star = `'
Deltav = INDEF Km/sec Tempvel = INDEF Km/sec

Fit Parameters:
Function = `gaussian' Width = INDEF
Height = 0. Minwidth = 3.
Peak = no Maxwidth = 21.
Weights = YES Background = 0.
Wincenter = INDEF Window = INDEF

Number of points fit = 21
Number of iterations = 4
Number of coeffs fit = 1 - 3
Chi Squared of fit = 9.238E-5
Fit Coefficients:
c[1] = 0.2691 +/- 0.4598 # Amplitude
c[2] = -0.1959 +/- 15.799 # Center
c[3] = 35.7311 +/- 261.15 # Sigma^2
c[4] = 0.0000 (fixed) # Background

Mean Residual = 0.0057840
Sigma of Residuals = 0.0166981
Maximum of cross-correlation is in bin = -1.
Variance of cross-correlation = 0.009574991
HJD of observation = INDEF MJD = INDEF
Object sample used in correlation = `*'
Template sample used in correlation = `*'
Tonry&Davis R value = 19.87068

Velocity Results:
Shift of peak = -0.1959 pixels
Correlation height = 0.269
FWHM of peak = INDEF Km/sec (=14.07606 pixels)

Velocity computed from shift = INDEF Km/sec
Observed velocity = INDEF Km/sec
Heliocentric velocity = INDEF +/- INDEF Km/sec


 
Profile Email
 Quote
fitz
 07/18/2018 06:58PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
It's hard to tell what's going wrong without seeing the image header or a plot of the correlation peak fit. INDEF values typically mean there is some information missing from the header (e.g. dispersion keywords, date of observation) or the peak fit did not converge properly. normally, missing keywords would be listed as errors in the log file, but zero values or values that couldn't be parsed might not.

Please post the image header, my suspicion is that there is some error with the dispersion keywords (e.g. a missing DC-FLAG, W0 or WPC, etc).

 
Profile Email
 Quote
Prabhani
 07/20/2018 12:52AM  
+----
Newbie

Status: offline


Registered: 07/12/2018
Posts: 3
Thank you for the quick reply!

This is the headers of the object (aperture_19.pro):

SIMPLE = T / Fits standard
BITPIX = -32 / Bits per pixel
NAXIS = 1 / Number of axes
NAXIS1 = 4334 / Axis length
EXTEND = T / File may contain extensions
ORIGIN = 'NOAO-IRAF FITS Image Kernel July 2003' / FITS file originator
DATE = '2018-07-06T03:27:36' / Date FITS file was generated
IRAF-TLM= '2018-07-06T03:27:36' / Time of last modification
CTYPE1 = 'LINEAR ' /
CRVAL1 = 3900 /
CRPIX1 = 1 /
CDELT1 = 1.20000 /
CD_1 = 1.20000 /
CD_2 = 1 /
WAT0_001= 'system=equispec' /
WAT1_001= 'wtype=linear label=wavelength units=angstroms' /
APNUM1 = '19 19 ' /
WCSDIM = 1
CD1_1 = 1.2
LTM1_1 = 1.

And, this is the header of the template (temp.0182.fits):

SIMPLE = T / Fits standard
BITPIX = -32 / Bits per pixel
NAXIS = 1 / Number of axes
NAXIS1 = 4334 / Axis length
EXTEND = T / File may contain extensions
ORIGIN = 'NOAO-IRAF FITS Image Kernel July 2003' / FITS file originator
DATE = '2018-07-12T04:37:19' / Date FITS file was generated
IRAF-TLM= '2018-07-12T04:37:19' / Time of last modification
CTYPE1 = 'LINEAR ' /
CRVAL1 = 3900 /
CRPIX1 = 1 /
CDELT1 = 1.20000 /
CD_1 = 1.20000 /
CD_2 = 1 /
WAT0_001= 'system=equispec' /
WAT1_001= 'wtype=linear label=wavelength units=angstroms' /
APNUM1 = '182 182 ' /
WCSDIM = 1
CD1_1 = 1.2
LTM1_1 = 1.
--------------------------------------------
I used scopy to create these 1D spectra. I am not sure if I made a mistake when I run scopy.
--> scopy m33-iraf.fits[0] temp aperture='19' format='onedspec'

The header of the initial file (m33-iraf.fits) was:

SIMPLE = T / Fits standard
BITPIX = -32 / Bits per pixel
NAXIS = 2 / Number of axes
NAXIS1 = 4334 / Axis length
NAXIS2 = 300 / Axis length
EXTEND = T / File may contain extensions
ORIGIN = 'NOAO-IRAF FITS Image Kernel July 2003' / FITS file originator
DATE = '2018-07-13T16:17:09' / Date FITS file was generated
IRAF-TLM= '2018-07-13T16:17:25' / Time of last modification
CTYPE1 = 'LINEAR ' /
CRVAL1 = 3900 /
CRPIX1 = 1 /
CDELT1 = 1.20000 /
CDELT2 = 1 /
CD_1 = 1.20000 /
CD_2 = 1 /
WAT0_001= 'system=equispec' /
WAT1_001= 'wtype=linear label=wavelength units=angstroms' /
WAT2_001= 'wtype=linear' /
APNUM1 = '0 0 ' /
APNUM2 = '1 1 ' /
APNUM3 = '2 2 ' /
APNUM4 = '3 3 ' /
APNUM5 = '4 4 ' /
APNUM6 = '5 5 ' /
APNUM7 = '6 6 ' /
APNUM8 = '7 7 ' /
APNUM9 = '8 8 ' /
APNUM10 = '9 9 ' /
APNUM11 = '10 10 ' /
APNUM12 = '11 11 ' /
APNUM13 = '12 12 ' /
APNUM14 = '13 13 ' /
APNUM15 = '14 14 ' /
APNUM16 = '15 15 ' /
:
:
APNUM300= '299 299 ' /

-Prabhani

 
Profile Email
 Quote
fitz
 08/01/2018 07:07PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
The spectra appear to be missing the W0, WPC and DC-FLAG keywords that tells IRAF how to interpret the WCS. For both your object and templates you should have DC-FLAG=0, and W0=, and WPC=. You can do this with command such as

cl\$this->_split2($m[0]) hedit DC-FLAG 0 add+ # add the DC-FLAG keyword
cl\$this->_split2($m[0]) type cmds # create a 'cmds' file to add W0/WPC keywords
w0 = crval1
wpc = cdelt1
cl\$this->_split2($m[0]) asthedit cmds # add W0/WPC using asthedit task

 
Profile Email
 Quote
Prabhani
 08/07/2018 07:46PM  
+----
Newbie

Status: offline


Registered: 07/12/2018
Posts: 3
Thanks a lot!!

It started working somewhat. I get these Comments on the log file when I'm referring the same aperture as the temp file (I am using a 1-D spec extracted from the spectrum), but otherwise, I still get the same INDEF (velocities and uncertainties) and no comments.

Velocity Results:
Shift of peak = 327.9466 pixels
Correlation height = 0.317
FWHM of peak = 1237.362 Km/sec (=21.1082 pixels)

Velocity computed from shift = 19853.9844 Km/sec
Observed velocity = INDEF Km/sec
Heliocentric velocity = INDEF +/- 56.275 Km/sec

Comments:
WARNING: Using template velocity of 0 km/s.
ERROR: Error getting 'DATE-OBS' from temp image header.
ERROR: Error getting 'RA' from temp image header.
ERROR: Error getting 'DEC' from temp image header.
ERROR: Missing EPOCH keyword.
ERROR: Missing exposure time keyword.

I am trying to find the values and see if it works. I would like to have if you've got any suggestions!

And, I have one more question if you don't mind:
My inputs and outputs are as bellow. I am not sure if this is correct (extracting an aperture from a 1-D spectrum??).

E.g.:
Input file names and apertures on the parameter editor:
Objects m33-iraf.fits[0]
templates temp.0142.fits
(apertures) "19"

Output (extracted from the log file):
Obj = ` m33-iraf.fits[0][19]' star = `'
Temp = ` temp.0142.fits[19]' star = `'

Could you please help me with this?

Thank you for your time!

Best,
Prabhani


 
Profile Email
 Quote
SpectralDude
 10/22/2018 05:36PM  
+----
Newbie

Status: offline


Registered: 10/22/2018
Posts: 1
Hey guys,

Just wanted to follow up on this, as I have the same INDEF velocity issue, and no suggestions I have encountered worked for me.

My template files are generated via rspectext from text files, with the first column containing wavelength values 3000, 3001, 3002, ..., 10000, and the second containing the flux values. Afterwards I add a set of headers. My headers currently look like this:

rv\$this->_split2($m[0]) imhead J024010.8-141630_temp.fits longheader=yes
J024010.8-141630_temp.fits[7001][real]:
No bad pixels, min=0., max=0. (old)
Line storage mode, physdim [7001], length of user area 1256 s.u.
Created Mon 13:13:08 22-Oct-2018, Last modified Mon 13:13:08 22-Oct-2018
Pixel file "J024010.8-141630_temp.fits" [ok]
EXTEND = F / File may contain extensions
ORIGIN = 'NOAO-IRAF FITS Image Kernel July 2003' / FITS file originator
DATE = '2018-10-18T15:32:57' / Date FITS file was generated
IRAF-TLM= '2018-10-22T17:13:08' / Time of last modification
DC-FLAG = 0
CRPIX1 = 1.
CRVAL1 = 3000
CDELT1 = 1.
DATE-OBS= '1993-03-17T04:56:38.0'
RA = 12.
DEC = 12.
EPOCH = 1993.
OBSERVAT= 'KPNO '
VHELIO = 0.
W0 = 3000
WPC = 1.
CUNIT1 = 'angstroms'
CTYPE1 = 'LINEAR '


No matter what I try to cross-correlate this *.fits file with, I get an INDEF velocity, but not always an INDEF velocity error. For example, if I cross-correlate this template with itself, I get:

rv\$this->_split2($m[0]) fxcor J024010.8-141630_temp.fits J024010.8-141630_temp.fits interactive=no verbose=stxtonly output='test200'
rv\$this->_split2($m[0]) cat test200.txt
#K IRAF = NOAO/IRAF V2.16 version
#K USER = dgudin name
#K HOST = crcfe01.crc.nd.edu computer
#K DATE = 2018-10-22 yyyy-mm-dd
#K TIME = 13:31:33 hh:mm:ss
#K PACKAGE = rv name
#K TASK = fxcor name
#
#T Template ' A' -- Object = '' \*
# Image = 'J024010.8-141630_temp.fits' Vhelio = 0.00
#
# Velocity Dispersion = 51.56 Km/sec/pixel Rebinned WPC = 7.46970E-5
#
#N OBJECT IMAGE REF HJD AP SHIFT FWHM VHELIO VERR
#U name image days pixel km/s km/s
#
J024010.8- A INDEF 1 -0.000 1109.93 INDEF 0.000


My observation spectra are SDSS spectra in the IRAF format, and they work fine when cross-correlated with each other:

rv\$this->_split2($m[0]) fxcor J024010.8-141630_obs_mod.fits J024010.8-141630_obs_mod.fits interactive=no verbose=stxtonly output='test210'
rv\$this->_split2($m[0]) cat test210.txt
#K IRAF = NOAO/IRAF V2.16 version
#K USER = dgudin name
#K HOST = crcfe01.crc.nd.edu computer
#K DATE = 2018-10-22 yyyy-mm-dd
#K TIME = 13:33:34 hh:mm:ss
#K PACKAGE = rv name
#K TASK = fxcor name
#
#T Template ' A' -- Object = 'J024010.8-141630' \*
# Image = 'J024010.8-141630_obs_mod.fits' Vhelio = INDEF
#
# Velocity Dispersion = 92.08 Km/sec/pixel Rebinned WPC = 1.33385E-4
#
#N OBJECT IMAGE REF HJD AP SHIFT FWHM VHELIO VERR
#U name image days pixel km/s km/s
#
J024010.8-1 J024010.8- A 6911.95076 1 -0.000 1896.38 -0.0008 0.000


But, again, cross-correlating them with templates always leads to INDEF:

rv\$this->_split2($m[0]) fxcor J024010.8-141630_obs_mod.fits J024010.8-141630_temp.fits interactive=no verbose=stxtonly output='test220'
rv\$this->_split2($m[0]) cat test220.txt
#K IRAF = NOAO/IRAF V2.16 version
#K USER = dgudin name
#K HOST = crcfe01.crc.nd.edu computer
#K DATE = 2018-10-22 yyyy-mm-dd
#K TIME = 13:34:23 hh:mm:ss
#K PACKAGE = rv name
#K TASK = fxcor name
#
#T Template ' A' -- Object = '' \*
# Image = 'J024010.8-141630_temp.fits' Vhelio = 0.00
#
# Velocity Dispersion = 51.56 Km/sec/pixel Rebinned WPC = 7.46970E-5
#
#N OBJECT IMAGE REF HJD AP SHIFT FWHM VHELIO VERR
#U name image days pixel km/s km/s
#
# Velocity Dispersion = 51.56 Km/sec/pixel Rebinned WPC = 7.46970E-5
J024010.8-1 J024010.8- A INDEF 1 0.629 855.87 INDEF 196.080


What could be causing this?

Thanks a lot!

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