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


 Forum Index > Help Desk > Applications New Topic Post Reply
 gethead
   
cosmologist
 04/01/2009 07:16PM (Read 10567 times)  
++++-
Regular Member

Status: offline


Registered: 03/30/2009
Posts: 117
I am trying to use gethead command in my xgterm , but it always give me an error message: "task gethead not found"! Cry
Any idea why?

 
Profile Email
 Quote
fitz
 04/01/2009 07:16PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
'Gethead' is a task in the WCSTOOLS package of host commands. IF you're trying to use this within IRAF you need to declare it as a foreign command and have it installed on your machine, the command you may be looking for instead in the IMHEADER task.-Mike

 
Profile Email
 Quote
cosmologist
 04/01/2009 07:16PM  
++++-
Regular Member

Status: offline


Registered: 03/30/2009
Posts: 117
Does that apply to "sethead" as well? Frown

 
Profile Email
 Quote
fitz
 04/01/2009 07:16PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
Yup. HEDIT is the equivalent task, but if you're going to be using the wcstools tasks you don't even need to be in IRAF.

 
Profile Email
 Quote
cosmologist
 04/01/2009 07:16PM  
++++-
Regular Member

Status: offline


Registered: 03/30/2009
Posts: 117
But how can I check if I have it on my machine? (or I guess because of the error messages, I should assume that i don't have it) right?

 
Profile Email
 Quote
fitz
 04/01/2009 07:16PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
At the unix prompt you can say e.g. "which sethead". A 'command not found' message may simply mean your path doesn't include the directory where the commands were installed, but if you didn't explicitly install wcstools yourself, and you don't have a sysadmin who would've done it for you, then most likely it isn't installed.

 
Profile Email
 Quote
cosmologist
 04/01/2009 07:16PM  
++++-
Regular Member

Status: offline


Registered: 03/30/2009
Posts: 117
In this thread you told me that IMHEAD can take the place of GETHEAD ...
I am trying to "translate" the following GETHEAD command into an INHEAD one, but it doesn't work... what am I doing wrong?- gethead d*ms.fits OBJECT EXPTIME AIRMASS | grep eg274I used: imhead d*ms.fits OBJECT EXPTIME AIRMASS | grep eg274but I can error! Cry Cry Any idea why?

 
Profile Email
 Quote
cosmologist
 04/01/2009 07:16PM  
++++-
Regular Member

Status: offline


Registered: 03/30/2009
Posts: 117
Does my question make sense? Please let me know if you need more explanation. Thanks

 
Profile Email
 Quote
fitz
 04/01/2009 07:16PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
I think the command you are looking for is[code:1:08683f82d7]cl> hselect d*ms.fits OBJECT,EXPTIME,AIRMASS "object ?= 'eg274'"[/code:1:08683f82d7]The IMHEAD task dumps the entire header with the 'long' option, but HSELECT is used to print only certain header fields. In this case we give it a list of images to search, the keywords to print out, and a conditional expression that must be true to print the value (in this case only print when the OBJECT keyword is 'eg274', the "?=' is a string-comparison operator). See the help page for HSELECT (and HEDIT) for additional details.-Mike

 
Profile Email
 Quote
cosmologist
 04/01/2009 07:16PM  
++++-
Regular Member

Status: offline


Registered: 03/30/2009
Posts: 117
[quote:a7c0ae3730="fitz"]I think the command you are looking for is[code:1:a7c0ae3730]cl> hselect d*ms.fits OBJECT,EXPTIME,AIRMASS "object ?= 'eg274'"[/code:1:a7c0ae3730]The IMHEAD task dumps the entire header with the 'long' option, but HSELECT is used to print only certain header fields. In this case we give it a list of images to search, the keywords to print out, and a conditional expression that must be true to print the value (in this case only print when the OBJECT keyword is 'eg274', the "?=' is a string-comparison operator). See the help page for HSELECT (and HEDIT) for additional details.-Mike[/quote:a7c0ae3730]
Thanks for your reply, I used the command you suggested but I didn't get any output. Does that mean that I have no object with keyword eg274? :shock:

 
Profile Email
 Quote
fitz
 04/01/2009 07:16PM  
AAAAA
Admin

Status: offline


Registered: 09/30/2005
Posts: 4040
Could be. You can check using a command like[code:1:0c9b2efb46]cl> hselect *.fits $I,OBJECT yes[/code:1:0c9b2efb46]This will print out the image name and OBJECT keyword value for all FITS images in the current directory. Perhaps the object name is capitalized or has a space?-Mike

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