casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables
task_importfits.py
Go to the documentation of this file.
00001 import os
00002 from taskinit import *
00003 
00004 def importfits(fitsimage,imagename,whichrep,whichhdu,zeroblanks,overwrite):
00005         """Convert an image FITS file into a CASA image:
00006 
00007         Keyword arguments:
00008         fitsimage -- Name of input image FITS file
00009                 default: none; example='3C273XC1.fits'
00010         imagename -- Name of output CASA image
00011                 default: none; example: imagename='3C273XC1.image'
00012         whichrep -- If fits image has multiple coordinate reps,
00013                 choose one.
00014                 default: 0 means first; example: whichrep=1
00015         whichhdu -- If fits file contains multiple images,
00016                 choose this one
00017                 default=0 mean first; example: whichhdu=1
00018         zeroblanks -- Set blanked pixels to zero (not NaN)
00019                 default=True; example: zeroblanks=True
00020         overwrite -- Overwrite pre-existing imagename
00021                 default=False; example: overwrite=True
00022 
00023         """
00024 
00025         #Python script
00026         casalog.origin('importfits')
00027         ia.fromfits(imagename,fitsimage,whichrep,whichhdu,zeroblanks,overwrite)
00028         ia.close()
00029