Welcome to iraf.net Friday, April 26 2024 @ 07:34 AM GMT


 Forum Index > Help Desk > General IRAF New Topic Post Reply
 Problems with identify/reidentify
   
grayro
 04/06/2017 03:46PM (Read 896 times)  
++---
Junior

Status: offline


Registered: 03/15/2014
Posts: 23
Hi, I am writing an IRAF script for an observational spectroscopy course that I am teaching which takes a previous wavelength solution and applies it to comparison spectra for stars taken that night. I have written and used scripts like this many times, all of which are working, but for some reason reidentify is not writing ec and id files to the database. Here is the relevant portion of the script:

noao
onedspec
twodspec
apextract
string list1
string s4=""
list1 = ""
list = ""
list = "reduce.lst"
apextract.dispaxis=1
while(fscan(list,s1,k,s2,s4) != EOF) {
print("\n")
print(s1)
for(i=1; i <= k;i+=1) {
j = fscan(list,s3)
list1 = list1//s3//".ms"
if(i != k) list1 = list1//","
apall(input=s2,format="multispec",references=s3,recenter=no,trace=no,
background=no,interactive=no)
apall(input=s4,format="multispec",references=s3,recenter=no,trace=no,
background=no,interactive=no)

print("point A"Wink

if(i == 1){
reidentify(reference="refcp3",images=s2//".ms",interac=yes,overrid=yes,coordli="linelists$rsoAr.dat",threshold=30.,refit=yes)
reidentify(reference="refcp3",images=s4//".ms",interac=yes,overrid=yes,coordli="linelists$rsoAr.dat",threshold=30.,refit=yes)
}

if(i > 1){
reidentify(reference="refcp3",images=s2//".ms",interac=no,overrid=no,coordli="linelists$rsoAr.dat",threshold=30.,refit=no)
reidentify(reference="refcp3",images=s4//".ms",interac=no,overrid=no,coordli="linelists$rsoAr.dat",threshold=30.,refit=no)
}

print("point B")

hedit(images=s3//".ms.fits",fields="REFSPEC1",value=s2//".ms",
add=yes,show=yes,verify=no)
hedit(images=s3//".ms.fits",fields="REFSPEC2",value=s4//".ms",
add=yes,show=yes,verify=no)

print("point C")

dispcor(input=s3//".ms",output=s3//".ms",linearize=no)

print("point D")

.....

The script is written so that the user checks the wavelength solution before that wavelength solution is applied to all the spectra taken for a particular star. Images s2 and s4 are the arc spectra taken before and after the stellar spectra. s3 are the stellar spectra. At point C, the script issues an error that looks like:

point C
Warning: Cannot open file (database/ecComp_Zet_Leo1.ms)
Warning: Cannot open file (database/idComp_Zet_Leo1.ms)
Warning: ZetaLeo4DSF.ms: Dispersion data not found
point D

where Comp_Zet_Leo1 is the first arc spectrum. The ec and id files are NOT in the database, so dispcor cannot find them, and the script fails. The initial solution (in "refcp3") was created in another script. idrefcp3 is in the database, and contains the wavelength solution. I am certain I am overlooking something simple. Can you help?

Richard

 
Profile Email
 Quote
grayro
 04/07/2017 12:30AM  
++---
Junior

Status: offline


Registered: 03/15/2014
Posts: 23
I have solved it. I was getting my references mixed up.

Richard

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