readmhdufits IDL Task

Name

readmhdufits.pro

Purpose

Given a multi-HDU FITS file, this routine will assemble the various components into a single array based on the header keywords describing the layout.

Calling Sequence

array = readmhdufits(filename)

Inputs

filename = name of the multi-HDU FITS file to read

Optional Input Keyword Parameters

NOTRIM
if set, do not trim pre- and post-scan columns
NOBIAS
if set, do not perform overscan subtraction
LINEBIAS
if set, remove overscan line by line [default = use scalar value]
GAINDATA
if set to a structure with gain for each amp, make gain correction
VERBOSE
if set, give feedback

Optional Output Keyword Parameters

HEADER
retrieve the header from the primary HDU and return it as a string array

Outputs

This function will return a 2-D floating-point array representing the assembled image.

Requirements

Examples

  1. Read in a FITS file, with trimming and bias removal, returning the data as "array" and the header as "header":
    array = readmhdufits( 'lred0001.fits', header=header) 
  2. Read in a FITS file, without trimming or bias removal, returning the data as "array" and the header as "header":
    array = readmhdufits( 'lred0001.fits', /notrim, /nobias, header=header)
  3. Perform gain correction and use line-by-line bias determination:
                  gain = [1.,2.,3.,4] for vidInp1,2,3,4
                  gaindata = build_gaindata(gain)
                  array = readmhdufits( 'lred0001.fits', /linebias, gaindata=gaindata)

Procedure

  • Uses the fits keyword in the header extentions
    DETSEC  = '[4096:3073,1:4096]' / NOAO mosaic detector section for ds9
    to piece the mosiac together.

Author

Marc Kassis, W. M. Keck Obseravtory
Last modified: 08/07/2012 18:47
Send questions or comments to:LRIS Support

The information on this page is the property of the W. M. Keck Observatory. The contents of this page or any part thereof shall not be copied or otherwise reproduced or transferred to other documents or used or disclosed to others for any purpose other than observing support at the W. M. Keck Observatory and the subsequent analysis and publication of scientific data obtained from observations conducted at the W. M. Keck Observatory. All rights reserved. © W. M. Keck Observatory.