学 点 新 知--做 点 事 情分享 http://blog.sciencenet.cn/u/dabing 平时多记点,东西就多了...

博文

fits 提取头文件信息

已有 5732 次阅读 2014-12-17 15:38 |个人分类:LINUX&IRAF|系统分类:科研笔记

3.3 EXAMINING THE HEADERS


There was discussion earlier concerning the use of generic  image  taskswith  the  NOAO  Mosaic  data.  The tasks IMHEADER and HSELECT fall intothis category.  The two important points to keep in mind  are  that  youmust  specify  either  an  extension  name or the extension position andthat the headers of an extension  are  the  combination  of  the  global

header and the extension headers.


Often  one does not need to list all the headers for all the extensions.The image title and many keywords of interest  are  common  to  all  theextensions.   Thus  one  of the following commands will be sufficient toget header information about an exposure or set of exposures:    ms> imhead obj*[1] l-                       # Title listing    ms> imhead obj123[1] l+ | page              # Paged long listing    ms> hselect obj*[1] $I,filter,exptime,obstime yes If you need to list header information from all the extensions then  youneed  to  take the additional step of creating an @file or using MSCCMD.

For example to get the default read noise and gain values for each CCD:


   ms> imextensions obj123 > list123

   ms> hselect @list123 $I,rdnoise,gain yes

           or

   ms> msccmd "hselect $input $I,rdnoise,gain yes" input=obj123


The CCDLIST task in the MSCRED package is  specialized  for  the  mosaicdata.   It  provides  a  compact  description  of the name, title, pixeltype, filter, amplifier, and processing flags.  The "extname"  parametermay  be  used  to select a particular extension, a set of extensions, orall extensions.  Because all extensions should generally be at the  samestate  of  reduction  it  may  be  desirable  to  list  only  the  first extension.  Like most of the CCD reduction tasks  you  can  also  selectonly  a certain type of exposure for listing.  Examples of the two modes

are:


   # Summary for all exposures    ms> ccdlist *.fits extname=im1    # Summary for all object exposures    ms> ccdlist *.fits extname=im1 ccdtype=object    # List of all extensions.    ms> ccdlist obj123 extname=""



进入IRAF后到数据目录下提取fits头文件的关键字

ecl>hselect *.fits $I, key1,key2,key3 yes > 存储为文件名


我的实例

从光谱fits里面提取所用的信息,存为对应的日期(5022)

ecl> hselect spec-56780-KP185111N464417V01_sp*.fits $I,PLANID,OBJNAME,RA,DEC,MAGTYPE,MAG1,MAG2,MAG3,MAG4,MAG5,MAG6,MAG7,SN_R yes > 5022


ecl> hselect spec-56096-kepler08B56096_2_sp*.fits $I,PLANID,RA,DEC,OBJTYPE,OBJSOURC,T_INFO,T_FROM,FIBERTYP,VERSPIPE,CLASS,SUBCLASS,MAGTYPE,MAG1,MAG2,MAG3,MAG4,MAG5,MAG6,MAG7,SN_R yes >1405

^_^_____________________________________

更多详情请ecl> help hselect

http://iraf.net/irafdocs/mscguide.php

2014-12-17于BNU



https://blog.sciencenet.cn/blog-287062-851783.html

上一篇:Python 学习网站
下一篇:IDL8.2 win7 32位破解版
收藏 IP: 59.64.32.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-4-19 19:45

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部