<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Appendix 3 - D2IMFILE Example — SSB TSR 2012-01 documentation</title> <link rel="stylesheet" href="_static/stsci_sphinx.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> <script type="text/javascript"> var DOCUMENTATION_OPTIONS = { URL_ROOT: '', VERSION: 'TSR 2012-01', COLLAPSE_INDEX: false, FILE_SUFFIX: '.html', HAS_SOURCE: true }; </script> <script type="text/javascript" src="_static/jquery.js"></script> <script type="text/javascript" src="_static/underscore.js"></script> <script type="text/javascript" src="_static/doctools.js"></script> <link rel="top" title="SSB TSR 2012-01 documentation" href="index.html" /> <link rel="prev" title="Appendix 2 - NPOLFILE Example" href="appendix2.html" /> </head> <body> <div class="related"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="genindex.html" title="General Index" accesskey="I">index</a></li> <li class="right" > <a href="appendix2.html" title="Appendix 2 - NPOLFILE Example" accesskey="P">previous</a> |</li> <li><a href="index.html">SSB TSR 2012-01 documentation</a> »</li> </ul> </div> <div class="sphinxsidebar"> <div class="sphinxsidebarwrapper"> <p class="logo"><a href="index.html"> <img class="logo" src="_static/stsci_logo.png" alt="Logo"/> </a></p> <h3><a href="index.html">Table Of Contents</a></h3> <ul> <li><a class="reference internal" href="#">Appendix 3 - D2IMFILE Example</a><ul> <li><a class="reference internal" href="#fits-file-extensions">FITS File Extensions</a></li> <li><a class="reference internal" href="#primary-header">PRIMARY Header</a></li> <li><a class="reference internal" href="#data-extension-header">Data Extension Header</a></li> </ul> </li> </ul> <h4>Previous topic</h4> <p class="topless"><a href="appendix2.html" title="previous chapter">Appendix 2 - NPOLFILE Example</a></p> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="_sources/appendix3.txt" rel="nofollow">Show Source</a></li> </ul> <div id="searchbox" style="display: none"> <h3>Quick search</h3> <form class="search" action="search.html" method="get"> <input type="text" name="q" /> <input type="submit" value="Go" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> <p class="searchtip" style="font-size: 90%"> Enter search terms or a module, class or function name. </p> </div> <script type="text/javascript">$('#searchbox').show(0);</script> </div> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body"> <div class="section" id="appendix-3-d2imfile-example"> <span id="appendix3"></span><h1>Appendix 3 - D2IMFILE Example<a class="headerlink" href="#appendix-3-d2imfile-example" title="Permalink to this headline">¶</a></h1> <p>The D2IMFILE reference file only contains a single 1-D array that should correct the column (row) values based on the value of the ‘AXISCORR’ keyword in the SCI header.</p> <div class="section" id="fits-file-extensions"> <h2>FITS File Extensions<a class="headerlink" href="#fits-file-extensions" title="Permalink to this headline">¶</a></h2> <p>This simple reference file, therefore, contains only 2 extensions; namely,</p> <div class="highlight-python"><pre>Filename: /grp/hst/cdbs/jref/v971826mj_d2i.fits No. Name Type Cards Dimensions Format 0 PRIMARY PrimaryHDU 35 () int16 1 DX ImageHDU 18 (4096,) float32</pre> </div> </div> <div class="section" id="primary-header"> <h2>PRIMARY Header<a class="headerlink" href="#primary-header" title="Permalink to this headline">¶</a></h2> <p>The PRIMARY header only needs to contain information on what detector this file corrects, along with any available information on how this file was generated. The ACS/WFC D2IMFILE PRIMARY header only includes:</p> <div class="highlight-python"><pre>SIMPLE = T / Fits standard BITPIX = 16 / Bits per pixel NAXIS = 0 / Number of axes EXTEND = T / File may contain extensions ORIGIN = 'NOAO-IRAF FITS Image Kernel July 2003' / FITS file originator DATE = '2010-02-01T20:19:11' / Date FITS file was generated IRAF-TLM= '2011-09-02T13:04:07' / Time of last modification NEXTEND = 1 / number of extensions in file FILENAME= 'v971826mj_d2i.fits' / name of file FILETYPE= 'WFC D2I FILE' / type of data found in data file OBSTYPE = 'IMAGING ' / type of observation TELESCOP= 'HST' / telescope used to acquire data INSTRUME= 'ACS ' / identifier for instrument used to acquire data DETECTOR= 'WFC ' USEAFTER= 'Mar 01 2002 00:00:00' COMMENT = 'D2I calibration file created by Warren Hack 29 APR 2010' DESCRIP = 'Column-width correction file for WFC images------------------------' PEDIGREE= 'INFLIGHT 11/11/2002 11/11/2002' HISTORY HISTORY Fixed column (or row) width correction file. This is applied HISTORY as a correction to the input pixel position and the output of HISTORY this correction is to be used as input to the polynomial and HISTORY non-polynomial distortion corrections. HISTORY HISTORY For ACS WFC data, the correction is stored as an image extension HISTORY (D2IMARR) with one row. Each element in the row specifies the HISTORY correction in pixels for every pixel in the column (or row) in HISTORY the science extension; for ACS WFC, the correction is in the X HISTORY direction. HISTORY HISTORY For a more in-depth explanation of this file, please see the HISTORY draft writeup at: HISTORY http://stsdas.stsci.edu/stsci_python_epydoc/stwcs/fits_conventions.html HISTORY wfc_ref68col_d2i.fits renamed to v961506lj_d2i.fits on Sep 6 2011 HISTORY v961506lj_d2i.fits renamed to v971826mj_d2i.fits on Sep 7 2011</pre> </div> <p>In this case, most of the keywords not required by FITS describe how this file was computed while also describing how it should be applied.</p> </div> <div class="section" id="data-extension-header"> <h2>Data Extension Header<a class="headerlink" href="#data-extension-header" title="Permalink to this headline">¶</a></h2> <p>The header keywords for the actual DX array simply needs to provide the information necessary to apply the values to the data; namely,</p> <div class="highlight-python"><pre>XTENSION= 'IMAGE ' / Image extension BITPIX = -32 / Bits per pixel NAXIS = 1 / Number of axes NAXIS1 = 4096 / Axis length PCOUNT = 0 / No 'random' parameters GCOUNT = 1 / Only one group EXTNAME = 'DX ' / Extension name EXTVER = 11 / Extension version ORIGIN = 'NOAO-IRAF FITS Image Kernel July 2003' / FITS file originator INHERIT = F / Inherits global header DATE = '2009-03-18T19:28:09' / Date FITS file was generated IRAF-TLM= '16:05:02 (18/03/2009)' / Time of last modification CRPIX1 = 0 / Distortion array reference pixel CDELT1 = 0 / Grid step size in first coordinate CRVAL1 = 0 / Image array pixel coordinate CRPIX2 = 0 / Distortion array reference pixel CDELT2 = 0 / Grid step size in second coordinate CRVAL2 = 0 / Image array pixel coordinate</pre> </div> <p>The fact that these values get applied without interpolation to each pixel in a row, in this case, means that no translation terms are needed in the header, making for a very simple header and very simple application to the data.</p> <table class="docutils citation" frame="void" id="distortionpaper" rules="none"> <colgroup><col class="label" /><col /></colgroup> <tbody valign="top"> <tr><td class="label">[DistortionPaper]</td><td>Calabretta M. R., Valdes F. G., Greisen E. W., and Allen S. L., 2004, “Representations of distortions in FITS world coordinate systems”,[cited 2012 Sept 18], Available from: <a class="reference external" href="http://www.atnf.csiro.au/people/mcalabre/WCS/dcs_20040422.pdf">http://www.atnf.csiro.au/people/mcalabre/WCS/dcs_20040422.pdf</a></td></tr> </tbody> </table> <table class="docutils citation" frame="void" id="sipconvention" rules="none"> <colgroup><col class="label" /><col /></colgroup> <tbody valign="top"> <tr><td class="label">[SIPConvention]</td><td>Shupe D.L., Hook R.N., 2008, “The SIP Convention for Representing Distortion in FITS Image Headers”, [cited 2012 Sept 18], Available from: <a class="reference external" href="http://fits.gsfc.nasa.gov/registry/sip.html">http://fits.gsfc.nasa.gov/registry/sip.html</a></td></tr> </tbody> </table> </div> </div> </div> </div> </div> <div class="clearer"></div> </div> <div class="related"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="genindex.html" title="General Index" >index</a></li> <li class="right" > <a href="appendix2.html" title="Appendix 2 - NPOLFILE Example" >previous</a> |</li> <li><a href="index.html">SSB TSR 2012-01 documentation</a> »</li> </ul> </div> <div class="footer"> © Copyright 2012, Nadia Dencheva, Warren Hack. Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3. </div> </body> </html>