Welcome to iraf.net Thursday, March 28 2024 @ 12:22 PM GMT


 Forum Index > Help Desk > General IRAF New Topic Post Reply
 Getting selective information from header files
   
rohit
 06/18/2007 08:06PM (Read 4191 times)  
++++-
Regular Member

Status: offline


Registered: 06/01/2006
Posts: 86
I have 130 files and I need to create and print a list of selective information from their header file. When I do the following: ls *.fits > list I get the names of every file. Instead I also would like to have the "Object name" and the "comment" for all files. They would be printed in column. How do I do that? I tried : ls *.fits 'OBJECT', 'COMMENT' > object but that ONLY prints the filename but not the OBJECT and COMMENT. Thanks!

 
Profile Email
 Quote
emiliano
 06/18/2007 08:06PM  
+++--
Chatty

Status: offline


Registered: 12/05/2005
Posts: 38
hello Trillian,
maybe the task "hselect" could be useful. From its manual page: [quote:e34462dcf8]
NAME
hselect - select a subset of images satisfying a boolean expression


USAGE
hselect images fields expr
[/quote:e34462dcf8]it prints the required header keywords (field) only for the images for which the expression is true. Here is an example from the manual: [quote:e34462dcf8]
cl> hselect n1.* $I,naxis[12],title 'naxis == 2'
n1.0001 512 512 quartz
n1.0002 512 512 "dome flat"
n1.0005 384 800 "ngc 3127 at 45 degrees"
cl>
[/quote:e34462dcf8]Cheers,
Emiliano.

 
Profile Email
 Quote
rohit
 06/18/2007 08:06PM  
++++-
Regular Member

Status: offline


Registered: 06/01/2006
Posts: 86
Thanks for your help. I tried working on it but it does not work. I am not choosing some of the files which have certain names, but I want certain information from the header files and print it. Suppose I have three files: 24nos0012
24nos0013
24nos0014Each header file has RA, DEC, OBJECT, COMMENT...Suppose of all this information, I would like to choose OBJECT and COMMENT only and print out in a tabular form like: 24nos0012 neon arclamp
24nos0013 HD8720 bright object
......How do I do this?

 
Profile Email
 Quote
rohit
 06/18/2007 08:06PM  
++++-
Regular Member

Status: offline


Registered: 06/01/2006
Posts: 86
Sorry for my previous post. It works! Here is how I did it: (for others to see) hselect 24* $I, OBJECT, COMMENT > infoThis will print ONLY the object and comment information onto a file I called 'info'.Molto Grazie Emiliano!! :-)

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