Function Name: fits_read Description: Reads a FITS file and stores all header information in a structure array. Usage: [HEADER, IMAGE] = fits_read(FILENAME); Arguments: FILENAME: A character array representing the filename. Returns: HEADER: The fits header as a structure array. IMAGE: The image as a MATLAB array. Type 'mfitsio_license' to display the MFITSIO licensing agreement.
0001 % Function Name: 0002 % fits_read 0003 % 0004 % Description: Reads a FITS file and stores all header information in 0005 % a structure array. 0006 % 0007 % Usage: 0008 % [HEADER, IMAGE] = fits_read(FILENAME); 0009 % 0010 % Arguments: 0011 % FILENAME: A character array representing the filename. 0012 % 0013 % Returns: 0014 % HEADER: The fits header as a structure array. 0015 % IMAGE: The image as a MATLAB array. 0016 % 0017 % Type 'mfitsio_license' to display the MFITSIO licensing agreement. 0018 0019 function [HEADER, IMAGE] = fits_read(filename); 0020 HEADER = fits_read_header(filename); 0021 IMAGE = fits_read_image(filename); 0022 0023 % Author: Damian Eads <eads@lanl.gov> 0024 % 0025 % This software and ancillary information (herein called ``Software'') 0026 % called MFITSIO is made available under the terms described here. The 0027 % SOFTWARE has been approved for release with associated LA-CC number: 0028 % LA-CC-02-085. 0029 % 0030 % This SOFTWARE has been authored by an employee or employees of the 0031 % University of California, operator of the Los Alamos National Laboratory 0032 % under Contract No. W-7405-ENG-36 with the U.S. Department of Energy. 0033 % The U.S. Government has rights to use, reproduce, and distribute this 0034 % SOFTWARE. The public may copy, distribute, prepare derivative works and 0035 % publicly display this SOFTWARE without charge, provided that this Notice 0036 % and any statement of authorship are reproduced on all copies. Neither 0037 % the Government nor the University makes any warranty, express or 0038 % implied, or assumes any liability or responsibility for the use of this 0039 % SOFTWARE. If SOFTWARE is modified to produce derivative works, such 0040 % modified SOFTWARE should be clearly marked, so as not to confuse it with 0041 % the version available from LANL. 0042 % 0043 % Consult the COPYING file for more details on licensing.