Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-release > by-pkgid > 73dd547d5caadaeb8b3d57f3c04940ca > files > 406

python-drizzlepac-1.1.8-8.mga5.i586.rpm

<!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>Step 1: Process Input &mdash; drizzlepac 1.1.8(06-Feb-2013) 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:     '1.1.8(06-Feb-2013)',
        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="drizzlepac 1.1.8(06-Feb-2013) documentation" href="index.html" />
    <link rel="next" title="Step 2: Generate a Static Mask" href="static.html" />
    <link rel="prev" title="WFPC2 ImageObjects" href="wfpc2objects.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="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="static.html" title="Step 2: Generate a Static Mask"
             accesskey="N">next</a> |</li>
        <li class="right" >
          <a href="wfpc2objects.html" title="WFPC2 ImageObjects"
             accesskey="P">previous</a> |</li>
        <li><a href="index.html">drizzlepac 1.1.8(06-Feb-2013) documentation</a> &raquo;</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="#">Step 1: Process Input</a><ul>
<li><a class="reference internal" href="#resetbits-update-of-input">ResetBits Update of Input</a><ul>
<li><a class="reference internal" href="#parameters">PARAMETERS</a></li>
<li><a class="reference internal" href="#optional-parameters">Optional Parameters</a></li>
<li><a class="reference internal" href="#notes">NOTES</a></li>
<li><a class="reference internal" href="#usage">Usage</a></li>
<li><a class="reference internal" href="#examples">EXAMPLES</a></li>
</ul>
</li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="wfpc2objects.html"
                        title="previous chapter">WFPC2 ImageObjects</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="static.html"
                        title="next chapter">Step 2: Generate a Static Mask</a></p>
  <h3>This Page</h3>
  <ul class="this-page-menu">
    <li><a href="_sources/process.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="step-1-process-input">
<span id="processinput"></span><h1>Step 1: Process Input<a class="headerlink" href="#step-1-process-input" title="Permalink to this headline">¶</a></h1>
<p>This module supports the interpretation and initial verification of all the input files specified by the user. These functions:</p>
<blockquote>
<div><ul class="simple">
<li>reads in parameter values from MDRIZTAB reference file and merges those merges those values in with the rest of the parameters from the GUI/configObj, if use of MDRIZTAB was specified</li>
<li>insure that all input files are multi-extension FITS files and converts them if they are not</li>
<li>updates all input WCS&#8217;s to be consistent with IDCTAB, if specified</li>
<li>generates the ImageObject instances for each input file</li>
<li>resets the DQ bits if specified by the user</li>
<li>adds info about any user-provided IVM files to the ImageObjects</li>
<li>generates the output WCS based on user inputs</li>
</ul>
</div></blockquote>
<span class="target" id="module-drizzlepac.processInput"></span><p>Process input to MultiDrizzle/PyDrizzle.</p>
<p>The input can be one of:</p>
<blockquote>
<div><ul class="simple">
<li>a python list of files</li>
<li>a comma separated string of filenames (including wild card characters)</li>
<li>an association table</li>
<li>an &#64;file (can have a second column with names of ivm files)</li>
</ul>
</div></blockquote>
<p>No mixture of instruments is allowed.
No mixture of association tables, &#64;files and regular fits files is allowed.
Files can be in GEIS or MEF format (but not waiver fits).</p>
<p>Runs some sanity checks on the input files.
If necessary converts files to MEF format (this should not be left to makewcs
because &#8216;updatewcs&#8217; may be False).
Runs makewcs.
The function &#8216;process_input&#8217; returns an association table, ivmlist, output name</p>
<p>The common interface interpreter for MultiDrizzle tasks, &#8216;processCommonInput()&#8217;,
not only runs &#8216;process_input()&#8217; but &#8216;createImageObject()&#8217; and &#8216;defineOutput()&#8217;
as well to fully setup all inputs for use with the rest of the MultiDrizzle
steps either as stand-alone tasks or internally to MultiDrizzle itself.</p>
<dl class="function">
<dt id="drizzlepac.processInput.addIVMInputs">
<tt class="descclassname">drizzlepac.processInput.</tt><tt class="descname">addIVMInputs</tt><big>(</big><em>imageObjectList</em>, <em>ivmlist</em><big>)</big><a class="headerlink" href="#drizzlepac.processInput.addIVMInputs" title="Permalink to this definition">¶</a></dt>
<dd><p>Add IVM filenames provided by user to outputNames dictionary for each input imageObject.</p>
</dd></dl>

<dl class="function">
<dt id="drizzlepac.processInput.applyContextPar">
<tt class="descclassname">drizzlepac.processInput.</tt><tt class="descname">applyContextPar</tt><big>(</big><em>imageObjectList</em>, <em>contextpar</em><big>)</big><a class="headerlink" href="#drizzlepac.processInput.applyContextPar" title="Permalink to this definition">¶</a></dt>
<dd><p>Apply the value of the parameter <em class="xref py py-obj">context</em> to the input list, setting
the name of the output context image to None if <em class="xref py py-obj">context</em> is False</p>
</dd></dl>

<dl class="function">
<dt id="drizzlepac.processInput.buildASNList">
<tt class="descclassname">drizzlepac.processInput.</tt><tt class="descname">buildASNList</tt><big>(</big><em>rootnames</em>, <em>asnname</em><big>)</big><a class="headerlink" href="#drizzlepac.processInput.buildASNList" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the list of filenames for a given set of rootnames</p>
</dd></dl>

<dl class="function">
<dt id="drizzlepac.processInput.buildEmptyDRZ">
<tt class="descclassname">drizzlepac.processInput.</tt><tt class="descname">buildEmptyDRZ</tt><big>(</big><em>input</em>, <em>output</em><big>)</big><a class="headerlink" href="#drizzlepac.processInput.buildEmptyDRZ" title="Permalink to this definition">¶</a></dt>
<dd><p>Create an empty DRZ file.</p>
<p>This module creates an empty DRZ file in a valid FITS format so that the HST
pipeline can handle the Multidrizzle zero expossure time exception
where all data has been excluded from processing.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name" colspan="2">Parameters:</th></tr>
<tr class="field-odd field"><td>&nbsp;</td><td class="field-body"><p class="first"><strong id="input">input</strong> : str</p>
<blockquote>
<div><p>filename of the initial input to process_input</p>
</div></blockquote>
<p><strong id="output">output</strong> : str</p>
<blockquote class="last">
<div><p>filename of the default empty _drz.fits file to be generated</p>
</div></blockquote>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="drizzlepac.processInput.buildFileList">
<tt class="descclassname">drizzlepac.processInput.</tt><tt class="descname">buildFileList</tt><big>(</big><em>input</em>, <em>output=None</em>, <em>ivmlist=None</em>, <em>wcskey=None</em>, <em>updatewcs=True</em>, <em>**workinplace</em><big>)</big><a class="headerlink" href="#drizzlepac.processInput.buildFileList" title="Permalink to this definition">¶</a></dt>
<dd><p>Builds a file list which has undergone various instrument-specific
checks for input to MultiDrizzle, including splitting STIS associations.</p>
</dd></dl>

<dl class="function">
<dt id="drizzlepac.processInput.changeSuffixinASN">
<tt class="descclassname">drizzlepac.processInput.</tt><tt class="descname">changeSuffixinASN</tt><big>(</big><em>asnfile</em>, <em>suffix</em><big>)</big><a class="headerlink" href="#drizzlepac.processInput.changeSuffixinASN" title="Permalink to this definition">¶</a></dt>
<dd><p>Create a copy of the original asn file and change the name of all members
to include the suffix.</p>
</dd></dl>

<dl class="function">
<dt id="drizzlepac.processInput.checkDGEOFile">
<tt class="descclassname">drizzlepac.processInput.</tt><tt class="descname">checkDGEOFile</tt><big>(</big><em>filenames</em><big>)</big><a class="headerlink" href="#drizzlepac.processInput.checkDGEOFile" title="Permalink to this definition">¶</a></dt>
<dd><p>Verify that input file has been updated with NPOLFILE</p>
<p>This function checks for the presence of &#8216;NPOLFILE&#8217; kw in the primary header
when &#8216;DGEOFILE&#8217; kw is present and valid (i.e. &#8216;DGEOFILE&#8217; is not blank or &#8216;N/A&#8217;).
It handles the case of science files downloaded from the archive before the new
software was installed there.
If &#8216;DGEOFILE&#8217; is present and &#8216;NPOLFILE&#8217; is missing, print a message and let the user
choose whether to (q)uit and update the headers or (c)ontinue and run astrodrizzle
without the non-polynomial correction.
&#8216;NPOLFILE&#8217; will be populated in the pipeline before astrodrizzle is run.</p>
<p>In the case of WFPC2 the old style dgeo files are used to create detector to image
correction at runtime.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name" colspan="2">Parameters:</th></tr>
<tr class="field-odd field"><td>&nbsp;</td><td class="field-body"><p class="first"><strong id="filenames">filenames</strong> : list of str</p>
<blockquote class="last">
<div><p>file names of all images to be checked</p>
</div></blockquote>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="drizzlepac.processInput.checkForDuplicateInputs">
<tt class="descclassname">drizzlepac.processInput.</tt><tt class="descname">checkForDuplicateInputs</tt><big>(</big><em>rootnames</em><big>)</big><a class="headerlink" href="#drizzlepac.processInput.checkForDuplicateInputs" title="Permalink to this definition">¶</a></dt>
<dd><p>Check input files specified in ASN table for duplicate versions with
multiple valid suffixes (_flt and _flc, for example).</p>
</dd></dl>

<dl class="function">
<dt id="drizzlepac.processInput.checkMultipleFiles">
<tt class="descclassname">drizzlepac.processInput.</tt><tt class="descname">checkMultipleFiles</tt><big>(</big><em>input</em><big>)</big><a class="headerlink" href="#drizzlepac.processInput.checkMultipleFiles" title="Permalink to this definition">¶</a></dt>
<dd><p>Evaluates the input to determine whether there is 1 or more than 1 valid input file.</p>
</dd></dl>

<dl class="function">
<dt id="drizzlepac.processInput.convert_dgeo_to_d2im">
<tt class="descclassname">drizzlepac.processInput.</tt><tt class="descname">convert_dgeo_to_d2im</tt><big>(</big><em>dgeofile</em>, <em>output</em>, <em>clobber=True</em><big>)</big><a class="headerlink" href="#drizzlepac.processInput.convert_dgeo_to_d2im" title="Permalink to this definition">¶</a></dt>
<dd><p>Routine that converts the WFPC2 DGEOFILE into a D2IMFILE.</p>
</dd></dl>

<dl class="function">
<dt id="drizzlepac.processInput.createImageObjectList">
<tt class="descclassname">drizzlepac.processInput.</tt><tt class="descname">createImageObjectList</tt><big>(</big><em>files</em>, <em>instrpars</em>, <em>group=None</em>, <em>undistort=True</em>, <em>inmemory=False</em><big>)</big><a class="headerlink" href="#drizzlepac.processInput.createImageObjectList" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns a list of imageObject instances, 1 for each input image in the list of input filenames.</p>
</dd></dl>

<dl class="function">
<dt id="drizzlepac.processInput.getMdriztabPars">
<tt class="descclassname">drizzlepac.processInput.</tt><tt class="descname">getMdriztabPars</tt><big>(</big><em>input</em><big>)</big><a class="headerlink" href="#drizzlepac.processInput.getMdriztabPars" title="Permalink to this definition">¶</a></dt>
<dd><p>High-level function for getting the parameters from MDRIZTAB</p>
<p>Used primarily for TEAL interface.</p>
</dd></dl>

<dl class="function">
<dt id="drizzlepac.processInput.manageInputCopies">
<tt class="descclassname">drizzlepac.processInput.</tt><tt class="descname">manageInputCopies</tt><big>(</big><em>filelist</em>, <em>**workinplace</em><big>)</big><a class="headerlink" href="#drizzlepac.processInput.manageInputCopies" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates copies of all input images in a sub-directory.</p>
<p>The copies are made prior to any processing being done to the images at all,
including updating the WCS keywords. If there are already copies present,
they will NOT be overwritten, but instead will be used to over-write the
current working copies.</p>
</dd></dl>

<dl class="function">
<dt id="drizzlepac.processInput.processFilenames">
<tt class="descclassname">drizzlepac.processInput.</tt><tt class="descname">processFilenames</tt><big>(</big><em>input=None</em>, <em>output=None</em>, <em>infilesOnly=False</em><big>)</big><a class="headerlink" href="#drizzlepac.processInput.processFilenames" title="Permalink to this definition">¶</a></dt>
<dd><p>Process the input string which contains the input file information and
return a filelist,output</p>
</dd></dl>

<dl class="function">
<dt id="drizzlepac.processInput.process_input">
<tt class="descclassname">drizzlepac.processInput.</tt><tt class="descname">process_input</tt><big>(</big><em>input</em>, <em>output=None</em>, <em>ivmlist=None</em>, <em>updatewcs=True</em>, <em>prodonly=False</em>, <em>wcskey=None</em>, <em>**workinplace</em><big>)</big><a class="headerlink" href="#drizzlepac.processInput.process_input" title="Permalink to this definition">¶</a></dt>
<dd><p>Create the full input list of filenames after verifying and converting
files as needed.</p>
</dd></dl>

<dl class="function">
<dt id="drizzlepac.processInput.reportResourceUsage">
<tt class="descclassname">drizzlepac.processInput.</tt><tt class="descname">reportResourceUsage</tt><big>(</big><em>imageObjectList</em>, <em>outwcs</em>, <em>num_cores</em>, <em>interactive=False</em><big>)</big><a class="headerlink" href="#drizzlepac.processInput.reportResourceUsage" title="Permalink to this definition">¶</a></dt>
<dd><p>Provide some information to the user on the estimated resource
usage (primarily memory) for this run.</p>
</dd></dl>

<dl class="function">
<dt id="drizzlepac.processInput.resetDQBits">
<tt class="descclassname">drizzlepac.processInput.</tt><tt class="descname">resetDQBits</tt><big>(</big><em>imageObjectList</em>, <em>cr_bits_value=4096</em><big>)</big><a class="headerlink" href="#drizzlepac.processInput.resetDQBits" title="Permalink to this definition">¶</a></dt>
<dd><p>Reset the CR bit in each input image&#8217;s DQ array</p>
</dd></dl>

<dl class="function">
<dt id="drizzlepac.processInput.runmakewcs">
<tt class="descclassname">drizzlepac.processInput.</tt><tt class="descname">runmakewcs</tt><big>(</big><em>input</em><big>)</big><a class="headerlink" href="#drizzlepac.processInput.runmakewcs" title="Permalink to this definition">¶</a></dt>
<dd><p>Runs make wcs and recomputes the WCS keywords</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name" colspan="2">Parameters:</th></tr>
<tr class="field-odd field"><td>&nbsp;</td><td class="field-body"><p class="first"><strong id="input">input</strong> : str or list of str</p>
<blockquote>
<div><p>a list of files</p>
</div></blockquote>
</td>
</tr>
<tr class="field-even field"><th class="field-name" colspan="2">Returns:</th></tr>
<tr class="field-even field"><td>&nbsp;</td><td class="field-body"><p class="first"><strong>output</strong> : list of str</p>
<blockquote class="last">
<div><p>returns a list of names of the modified files
(For GEIS files returns the translated names.)</p>
</div></blockquote>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="drizzlepac.processInput.setCommonInput">
<tt class="descclassname">drizzlepac.processInput.</tt><tt class="descname">setCommonInput</tt><big>(</big><em>configObj</em>, <em>createOutwcs=True</em><big>)</big><a class="headerlink" href="#drizzlepac.processInput.setCommonInput" title="Permalink to this definition">¶</a></dt>
<dd><p>The common interface interpreter for MultiDrizzle tasks which not only runs
&#8216;process_input()&#8217; but &#8216;createImageObject()&#8217; and &#8216;defineOutput()&#8217; as well to
fully setup all inputs for use with the rest of the MultiDrizzle steps either
as stand-alone tasks or internally to MultiDrizzle itself.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name" colspan="2">Parameters:</th></tr>
<tr class="field-odd field"><td>&nbsp;</td><td class="field-body"><p class="first"><strong id="configObj">configObj</strong> : object</p>
<blockquote>
<div><p>configObj instance or simple dictionary of input parameters</p>
</div></blockquote>
<p><strong id="imageObjectList">imageObjectList</strong> : list of imageObject objects</p>
<blockquote>
<div><p>list of imageObject instances, 1 for each input exposure</p>
</div></blockquote>
<p><strong id="outwcs">outwcs</strong> : object</p>
<blockquote class="last">
<div><p>imageObject instance defining the final output frame</p>
</div></blockquote>
</td>
</tr>
</tbody>
</table>
<p class="rubric">Notes</p>
<dl class="docutils">
<dt>At a minimum, the configObj instance (dictionary) should contain:</dt>
<dd><dl class="first last docutils">
<dt>configObj = {&#8216;input&#8217;:None,&#8217;output&#8217;:None,</dt>
<dd>&#8216;updatewcs&#8217;:None}</dd>
</dl>
</dd>
</dl>
<p>If provided, the configObj should contain the values of all the multidrizzle parameters
as set by the user with TEAL. If no configObj is given, it will retrieve
the default values automatically.  In either case, the values from the input_dict
will be merged in with the configObj before being used by the rest of the
code.</p>
<p class="rubric">Examples</p>
<p>You can set <em>createOutwcs=False</em> for the cases where you only want the
images processed and no output wcs information in necessary; as in:</p>
<p>&gt;&gt;&gt;imageObjectList,outwcs = processInput.processCommonInput(configObj)</p>
</dd></dl>

<dl class="function">
<dt id="drizzlepac.processInput.update_member_names">
<tt class="descclassname">drizzlepac.processInput.</tt><tt class="descname">update_member_names</tt><big>(</big><em>oldasndict</em>, <em>pydr_input</em><big>)</big><a class="headerlink" href="#drizzlepac.processInput.update_member_names" title="Permalink to this definition">¶</a></dt>
<dd><p>Update names in a member dictionary.</p>
<p>Given an association dictionary with rootnames and a list of full
file names, it will update the names in the member dictionary to
contain &#8216;_*&#8217; extension. For example a rootname of &#8216;u9600201m&#8217; will
be replaced by &#8216;u9600201m_c0h&#8217; making sure that a MEf file is passed
as an input and not the corresponding GEIS file.</p>
</dd></dl>

<dl class="function">
<dt id="drizzlepac.processInput.update_wfpc2_d2geofile">
<tt class="descclassname">drizzlepac.processInput.</tt><tt class="descname">update_wfpc2_d2geofile</tt><big>(</big><em>filename</em>, <em>fhdu=None</em><big>)</big><a class="headerlink" href="#drizzlepac.processInput.update_wfpc2_d2geofile" title="Permalink to this definition">¶</a></dt>
<dd><p>Creates a D2IMFILE from the DGEOFILE for a WFPC2 image (input), and
modifies the header to reflect the new usage.</p>
</dd></dl>

<dl class="function">
<dt id="drizzlepac.processInput.userStop">
<tt class="descclassname">drizzlepac.processInput.</tt><tt class="descname">userStop</tt><big>(</big><em>message</em><big>)</big><a class="headerlink" href="#drizzlepac.processInput.userStop" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<div class="section" id="resetbits-update-of-input">
<h2>ResetBits Update of Input<a class="headerlink" href="#resetbits-update-of-input" title="Permalink to this headline">¶</a></h2>
<p>This module provides the capability to set a specific set of bit values in the input DQ arrays to zero. This allows a user to reset pixels previously erroneously flagged as cosmic-rays to good for reprocessing with improved alignment or detection parameters.</p>
<span class="target" id="module-drizzlepac.resetbits"></span><p>resetbits - A module to set the value of specified array pixels to zero</p>
<p>This module allows a user to reset the pixel values of any integer array,
such as the DQ array from an HST image, to zero.</p>
<dl class="docutils">
<dt>License::</dt>
<dd><a class="reference external" href="http://www.stsci.edu/resources/software_hardware/pyraf/LICENSE">http://www.stsci.edu/resources/software_hardware/pyraf/LICENSE</a></dd>
</dl>
<div class="section" id="parameters">
<h3>PARAMETERS<a class="headerlink" href="#parameters" title="Permalink to this headline">¶</a></h3>
<dl class="docutils">
<dt>filename <span class="classifier-delimiter">:</span> <span class="classifier">str</span></dt>
<dd>full filename with path</dd>
<dt>bits <span class="classifier-delimiter">:</span> <span class="classifier">str</span></dt>
<dd>sum or list of integers corresponding to all the bits to be reset</dd>
</dl>
</div>
<div class="section" id="optional-parameters">
<h3>Optional Parameters<a class="headerlink" href="#optional-parameters" title="Permalink to this headline">¶</a></h3>
<dl class="docutils">
<dt>extver <span class="classifier-delimiter">:</span> <span class="classifier">int, optional</span></dt>
<dd>List of version numbers of the arrays to be corrected
(default: None, will reset all matching arrays)</dd>
<dt>extname <span class="classifier-delimiter">:</span> <span class="classifier">str, optional</span></dt>
<dd>EXTNAME of the arrays in the FITS files to be reset
(default: &#8216;dq&#8217;)</dd>
</dl>
</div>
<div class="section" id="notes">
<h3>NOTES<a class="headerlink" href="#notes" title="Permalink to this headline">¶</a></h3>
<p>This module performs a simple bitwise-and on all the pixels in the specified
array and the integer value provided as input using the operation (array &amp; ~bits).</p>
</div>
<div class="section" id="usage">
<h3>Usage<a class="headerlink" href="#usage" title="Permalink to this headline">¶</a></h3>
<p>It can be called not only from within Python, but also from the host-level
operating system command line using the syntax:</p>
<div class="highlight-python"><div class="highlight"><pre>resetbits filename bits [extver [extname]]
</pre></div>
</div>
</div>
<div class="section" id="examples">
<h3>EXAMPLES<a class="headerlink" href="#examples" title="Permalink to this headline">¶</a></h3>
<ol class="arabic">
<li><p class="first">The following command will reset the 4096 bits in all
the DQ arrays of the file &#8216;input_flt.fits&#8217;:</p>
<div class="highlight-python"><div class="highlight"><pre>resetbits input_flt.fits 4096
</pre></div>
</div>
<p>or from the Python command line:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="kn">import</span> <span class="nn">resetbits</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">resetbits</span><span class="o">.</span><span class="n">reset_dq_bits</span><span class="p">(</span><span class="s">&quot;input_file_flt.fits&quot;</span><span class="p">,</span> <span class="mi">4096</span><span class="p">)</span>
</pre></div>
</div>
</li>
<li><p class="first">To reset the 2,32,64 and 4096 (sum of 4194) bits in the
second DQ array, specified as &#8216;dq,2&#8217;, in the file &#8216;input_flt.fits&#8217;:</p>
<div class="highlight-python"><div class="highlight"><pre>resetbits input_flt.fits 4194 2
</pre></div>
</div>
<p>or from the Python command line:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="gp">&gt;&gt;&gt; </span><span class="kn">import</span> <span class="nn">resetbits</span>
<span class="gp">&gt;&gt;&gt; </span><span class="n">resetbits</span><span class="o">.</span><span class="n">reset_dq_bits</span><span class="p">(</span><span class="s">&quot;input_file_flt.fits&quot;</span><span class="p">,</span> <span class="mi">2</span><span class="o">+</span><span class="mi">32</span><span class="o">+</span><span class="mi">64</span><span class="o">+</span><span class="mi">4096</span><span class="p">,</span> <span class="n">extver</span><span class="o">=</span><span class="mi">2</span><span class="p">)</span>
</pre></div>
</div>
</li>
</ol>
<dl class="function">
<dt id="drizzlepac.resetbits.help">
<tt class="descclassname">drizzlepac.resetbits.</tt><tt class="descname">help</tt><big>(</big><em>file=None</em><big>)</big><a class="headerlink" href="#drizzlepac.resetbits.help" title="Permalink to this definition">¶</a></dt>
<dd><p>Print out syntax help for running resetbits</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name" colspan="2">Parameters:</th></tr>
<tr class="field-odd field"><td>&nbsp;</td><td class="field-body"><p class="first"><strong id="file">file</strong> : str (Default = None)</p>
<blockquote class="last">
<div><p>If given, write out help to the filename specified by this parameter
Any previously existing file with this name will be deleted before
writing out the help.</p>
</div></blockquote>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="function">
<dt id="drizzlepac.resetbits.reset_dq_bits">
<tt class="descclassname">drizzlepac.resetbits.</tt><tt class="descname">reset_dq_bits</tt><big>(</big><em>input</em>, <em>bits</em>, <em>extver=None</em>, <em>extname='dq'</em><big>)</big><a class="headerlink" href="#drizzlepac.resetbits.reset_dq_bits" title="Permalink to this definition">¶</a></dt>
<dd><p>This function resets bits in the integer array(s) of a FITS file.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name" colspan="2">Parameters:</th></tr>
<tr class="field-odd field"><td>&nbsp;</td><td class="field-body"><p class="first"><strong id="filename">filename</strong> : str</p>
<blockquote>
<div><p>full filename with path</p>
</div></blockquote>
<p><strong id="bits">bits</strong> : str</p>
<blockquote>
<div><p>sum or list of integers corresponding to all the bits to be reset</p>
</div></blockquote>
<p><strong id="extver">extver</strong> : int, optional</p>
<blockquote>
<div><p>List of version numbers of the DQ arrays
to be corrected [Default Value: None, will do all]</p>
</div></blockquote>
<p><strong id="extname">extname</strong> : str, optional</p>
<blockquote class="last">
<div><p>EXTNAME of the DQ arrays in the FITS file
[Default Value: &#8216;dq&#8217;]</p>
</div></blockquote>
</td>
</tr>
</tbody>
</table>
<p class="rubric">Notes</p>
<p>The default value of None for the &#8216;extver&#8217; parameter specifies that all
extensions with EXTNAME matching &#8216;dq&#8217; (as specified by the &#8216;extname&#8217;
parameter) will have their bits reset.</p>
<p class="rubric">Examples</p>
<ol class="arabic">
<li><p class="first">The following command will reset the 4096 bits in all
the DQ arrays of the file input_file_flt.fits:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">reset_dq_bits</span><span class="p">(</span><span class="s">&quot;input_file_flt.fits&quot;</span><span class="p">,</span> <span class="mi">4096</span><span class="p">)</span>
</pre></div>
</div>
</li>
<li><p class="first">To reset the 2,32,64 and 4096 bits in the second DQ array,
specified as &#8216;dq,2&#8217;, in the file input_file_flt.fits:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">reset_dq_bits</span><span class="p">(</span><span class="s">&quot;input_file_flt.fits&quot;</span><span class="p">,</span> <span class="s">&quot;2,32,64,4096&quot;</span><span class="p">,</span> <span class="n">extver</span><span class="o">=</span><span class="mi">2</span><span class="p">)</span>
</pre></div>
</div>
</li>
</ol>
</dd></dl>

<dl class="function">
<dt id="drizzlepac.resetbits.run">
<tt class="descclassname">drizzlepac.resetbits.</tt><tt class="descname">run</tt><big>(</big><em>configobj=None</em><big>)</big><a class="headerlink" href="#drizzlepac.resetbits.run" title="Permalink to this definition">¶</a></dt>
<dd><p>Teal interface for running this code.</p>
</dd></dl>

</div>
</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="py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li class="right" >
          <a href="static.html" title="Step 2: Generate a Static Mask"
             >next</a> |</li>
        <li class="right" >
          <a href="wfpc2objects.html" title="WFPC2 ImageObjects"
             >previous</a> |</li>
        <li><a href="index.html">drizzlepac 1.1.8(06-Feb-2013) documentation</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2012, Warren Hack, Nadia Dencheva, Chris Sontag, Megan Sosey, Michael Droettboom.
      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
    </div>
  </body>
</html>