source: sasmodels/api/resolution.html @ 68532f3

gh-pages
Last change on this file since 68532f3 was 68532f3, checked in by ajj, 8 years ago

Adding docs

  • Property mode set to 100644
File size: 85.8 KB
Line 
1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
4
5<html xmlns="http://www.w3.org/1999/xhtml">
6  <head>
7    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8   
9    <title>3.11. 1-D resolution functions &mdash; Sasmodels</title>
10   
11    <link rel="stylesheet" href="../_static/haiku-site.css" type="text/css" />
12    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
13   
14    <script type="text/javascript">
15      var DOCUMENTATION_OPTIONS = {
16        URL_ROOT:    '../',
17        VERSION:     '0.9',
18        COLLAPSE_INDEX: false,
19        FILE_SUFFIX: '.html',
20        HAS_SOURCE:  true
21      };
22    </script>
23    <script type="text/javascript" src="../_static/jquery.js"></script>
24    <script type="text/javascript" src="../_static/underscore.js"></script>
25    <script type="text/javascript" src="../_static/doctools.js"></script>
26    <script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
27    <link rel="top" title="Sasmodels" href="../index.html" />
28    <link rel="up" title="3. Reference" href="index.html" />
29    <link rel="next" title="3.12. 2-D resolution functions" href="resolution2d.html" />
30    <link rel="prev" title="3.10. Unit test support" href="model_test.html" /> 
31  </head>
32  <body>
33      <div class="header"><h1 class="heading"><a href="../index.html">
34          <span>Home</span></a></h1>
35        <h2 class="heading"><span>3.11. 1-D resolution functions</span></h2>
36      </div>
37      <div class="topnav">
38     
39        <p>
40        «&#160;&#160;<a href="model_test.html">3.10. Unit test support</a>
41        &#160;&#160;::&#160;&#160;
42        <a class="uplink" href="../index.html">Contents</a>
43        &#160;&#160;::&#160;&#160;
44        <a href="resolution2d.html">3.12. 2-D resolution functions</a>&#160;&#160;»
45        </p>
46
47      </div>
48      <div class="content">
49       
50       
51  <div class="section" id="d-resolution-functions">
52<h1>3.11. 1-D resolution functions<a class="headerlink" href="#d-resolution-functions" title="Permalink to this headline">¶</a></h1>
53<div class="section" id="module-sasmodels.resolution">
54<span id="sasmodels-resolution"></span><h2>3.11.1. <a class="reference internal" href="#module-sasmodels.resolution" title="sasmodels.resolution"><tt class="xref py py-mod docutils literal"><span class="pre">sasmodels.resolution</span></tt></a><a class="headerlink" href="#module-sasmodels.resolution" title="Permalink to this headline">¶</a></h2>
55<p>Define the resolution functions for the data.</p>
56<p>This defines classes for 1D and 2D resolution calculations.</p>
57<dl class="class">
58<dt id="sasmodels.resolution.IgorComparisonTest">
59<em class="property">class </em><tt class="descclassname">sasmodels.resolution.</tt><tt class="descname">IgorComparisonTest</tt><big>(</big><em>methodName='runTest'</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest" title="Permalink to this definition">¶</a></dt>
60<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">unittest.case.TestCase</span></tt></p>
61<p>Create an instance of the class that will use the named test
62method when executed. Raises a ValueError if the instance does
63not have a method with the specified name.</p>
64<dl class="attribute">
65<dt id="sasmodels.resolution.IgorComparisonTest.failureException">
66<tt class="descname">failureException</tt><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.failureException" title="Permalink to this definition">¶</a></dt>
67<dd><p>alias of <tt class="xref py py-class docutils literal"><span class="pre">AssertionError</span></tt></p>
68</dd></dl>
69
70<dl class="method">
71<dt id="sasmodels.resolution.IgorComparisonTest.Iq_sphere">
72<tt class="descname">Iq_sphere</tt><big>(</big><em>pars</em>, <em>resolution</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.Iq_sphere" title="Permalink to this definition">¶</a></dt>
73<dd></dd></dl>
74
75<dl class="method">
76<dt id="sasmodels.resolution.IgorComparisonTest.addCleanup">
77<tt class="descname">addCleanup</tt><big>(</big><em>function</em>, <em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.addCleanup" title="Permalink to this definition">¶</a></dt>
78<dd><p>Add a function, with arguments, to be called when the test is
79completed. Functions added are called on a LIFO basis and are
80called after tearDown on test failure or success.</p>
81<p>Cleanup items are called even if setUp fails (unlike tearDown).</p>
82</dd></dl>
83
84<dl class="method">
85<dt id="sasmodels.resolution.IgorComparisonTest.addTypeEqualityFunc">
86<tt class="descname">addTypeEqualityFunc</tt><big>(</big><em>typeobj</em>, <em>function</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.addTypeEqualityFunc" title="Permalink to this definition">¶</a></dt>
87<dd><p>Add a type specific assertEqual style function to compare a type.</p>
88<p>This method is for use by TestCase subclasses that need to register
89their own type equality functions to provide nicer error messages.</p>
90<dl class="docutils">
91<dt>Args:</dt>
92<dd><dl class="first last docutils">
93<dt>typeobj: The data type to call this function on when both values</dt>
94<dd>are of the same type in assertEqual().</dd>
95<dt>function: The callable taking two arguments and an optional</dt>
96<dd>msg= argument that raises self.failureException with a
97useful error message when the two arguments are not equal.</dd>
98</dl>
99</dd>
100</dl>
101</dd></dl>
102
103<dl class="method">
104<dt id="sasmodels.resolution.IgorComparisonTest.assertAlmostEqual">
105<tt class="descname">assertAlmostEqual</tt><big>(</big><em>first</em>, <em>second</em>, <em>places=None</em>, <em>msg=None</em>, <em>delta=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.assertAlmostEqual" title="Permalink to this definition">¶</a></dt>
106<dd><p>Fail if the two objects are unequal as determined by their
107difference rounded to the given number of decimal places
108(default 7) and comparing to zero, or by comparing that the
109between the two objects is more than the given delta.</p>
110<p>Note that decimal places (from zero) are usually not the same
111as significant digits (measured from the most signficant digit).</p>
112<p>If the two objects compare equal then they will automatically
113compare almost equal.</p>
114</dd></dl>
115
116<dl class="method">
117<dt id="sasmodels.resolution.IgorComparisonTest.assertAlmostEquals">
118<tt class="descname">assertAlmostEquals</tt><big>(</big><em>first</em>, <em>second</em>, <em>places=None</em>, <em>msg=None</em>, <em>delta=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.assertAlmostEquals" title="Permalink to this definition">¶</a></dt>
119<dd><p>Fail if the two objects are unequal as determined by their
120difference rounded to the given number of decimal places
121(default 7) and comparing to zero, or by comparing that the
122between the two objects is more than the given delta.</p>
123<p>Note that decimal places (from zero) are usually not the same
124as significant digits (measured from the most signficant digit).</p>
125<p>If the two objects compare equal then they will automatically
126compare almost equal.</p>
127</dd></dl>
128
129<dl class="method">
130<dt id="sasmodels.resolution.IgorComparisonTest.assertDictContainsSubset">
131<tt class="descname">assertDictContainsSubset</tt><big>(</big><em>expected</em>, <em>actual</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.assertDictContainsSubset" title="Permalink to this definition">¶</a></dt>
132<dd><p>Checks whether actual is a superset of expected.</p>
133</dd></dl>
134
135<dl class="method">
136<dt id="sasmodels.resolution.IgorComparisonTest.assertDictEqual">
137<tt class="descname">assertDictEqual</tt><big>(</big><em>d1</em>, <em>d2</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.assertDictEqual" title="Permalink to this definition">¶</a></dt>
138<dd></dd></dl>
139
140<dl class="method">
141<dt id="sasmodels.resolution.IgorComparisonTest.assertEqual">
142<tt class="descname">assertEqual</tt><big>(</big><em>first</em>, <em>second</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.assertEqual" title="Permalink to this definition">¶</a></dt>
143<dd><p>Fail if the two objects are unequal as determined by the &#8216;==&#8217;
144operator.</p>
145</dd></dl>
146
147<dl class="method">
148<dt id="sasmodels.resolution.IgorComparisonTest.assertEquals">
149<tt class="descname">assertEquals</tt><big>(</big><em>first</em>, <em>second</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.assertEquals" title="Permalink to this definition">¶</a></dt>
150<dd><p>Fail if the two objects are unequal as determined by the &#8216;==&#8217;
151operator.</p>
152</dd></dl>
153
154<dl class="method">
155<dt id="sasmodels.resolution.IgorComparisonTest.assertFalse">
156<tt class="descname">assertFalse</tt><big>(</big><em>expr</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.assertFalse" title="Permalink to this definition">¶</a></dt>
157<dd><p>Check that the expression is false.</p>
158</dd></dl>
159
160<dl class="method">
161<dt id="sasmodels.resolution.IgorComparisonTest.assertGreater">
162<tt class="descname">assertGreater</tt><big>(</big><em>a</em>, <em>b</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.assertGreater" title="Permalink to this definition">¶</a></dt>
163<dd><p>Just like self.assertTrue(a &gt; b), but with a nicer default message.</p>
164</dd></dl>
165
166<dl class="method">
167<dt id="sasmodels.resolution.IgorComparisonTest.assertGreaterEqual">
168<tt class="descname">assertGreaterEqual</tt><big>(</big><em>a</em>, <em>b</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.assertGreaterEqual" title="Permalink to this definition">¶</a></dt>
169<dd><p>Just like self.assertTrue(a &gt;= b), but with a nicer default message.</p>
170</dd></dl>
171
172<dl class="method">
173<dt id="sasmodels.resolution.IgorComparisonTest.assertIn">
174<tt class="descname">assertIn</tt><big>(</big><em>member</em>, <em>container</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.assertIn" title="Permalink to this definition">¶</a></dt>
175<dd><p>Just like self.assertTrue(a in b), but with a nicer default message.</p>
176</dd></dl>
177
178<dl class="method">
179<dt id="sasmodels.resolution.IgorComparisonTest.assertIs">
180<tt class="descname">assertIs</tt><big>(</big><em>expr1</em>, <em>expr2</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.assertIs" title="Permalink to this definition">¶</a></dt>
181<dd><p>Just like self.assertTrue(a is b), but with a nicer default message.</p>
182</dd></dl>
183
184<dl class="method">
185<dt id="sasmodels.resolution.IgorComparisonTest.assertIsInstance">
186<tt class="descname">assertIsInstance</tt><big>(</big><em>obj</em>, <em>cls</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.assertIsInstance" title="Permalink to this definition">¶</a></dt>
187<dd><p>Same as self.assertTrue(isinstance(obj, cls)), with a nicer
188default message.</p>
189</dd></dl>
190
191<dl class="method">
192<dt id="sasmodels.resolution.IgorComparisonTest.assertIsNone">
193<tt class="descname">assertIsNone</tt><big>(</big><em>obj</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.assertIsNone" title="Permalink to this definition">¶</a></dt>
194<dd><p>Same as self.assertTrue(obj is None), with a nicer default message.</p>
195</dd></dl>
196
197<dl class="method">
198<dt id="sasmodels.resolution.IgorComparisonTest.assertIsNot">
199<tt class="descname">assertIsNot</tt><big>(</big><em>expr1</em>, <em>expr2</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.assertIsNot" title="Permalink to this definition">¶</a></dt>
200<dd><p>Just like self.assertTrue(a is not b), but with a nicer default message.</p>
201</dd></dl>
202
203<dl class="method">
204<dt id="sasmodels.resolution.IgorComparisonTest.assertIsNotNone">
205<tt class="descname">assertIsNotNone</tt><big>(</big><em>obj</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.assertIsNotNone" title="Permalink to this definition">¶</a></dt>
206<dd><p>Included for symmetry with assertIsNone.</p>
207</dd></dl>
208
209<dl class="method">
210<dt id="sasmodels.resolution.IgorComparisonTest.assertItemsEqual">
211<tt class="descname">assertItemsEqual</tt><big>(</big><em>expected_seq</em>, <em>actual_seq</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.assertItemsEqual" title="Permalink to this definition">¶</a></dt>
212<dd><p>An unordered sequence specific comparison. It asserts that
213actual_seq and expected_seq have the same element counts.
214Equivalent to:</p>
215<div class="highlight-python"><div class="highlight"><pre><span class="bp">self</span><span class="o">.</span><span class="n">assertEqual</span><span class="p">(</span><span class="n">Counter</span><span class="p">(</span><span class="nb">iter</span><span class="p">(</span><span class="n">actual_seq</span><span class="p">)),</span>
216                 <span class="n">Counter</span><span class="p">(</span><span class="nb">iter</span><span class="p">(</span><span class="n">expected_seq</span><span class="p">)))</span>
217</pre></div>
218</div>
219<p>Asserts that each element has the same count in both sequences.
220Example:</p>
221<blockquote>
222<div><ul class="simple">
223<li>[0, 1, 1] and [1, 0, 1] compare equal.</li>
224<li>[0, 0, 1] and [0, 1] compare unequal.</li>
225</ul>
226</div></blockquote>
227</dd></dl>
228
229<dl class="method">
230<dt id="sasmodels.resolution.IgorComparisonTest.assertLess">
231<tt class="descname">assertLess</tt><big>(</big><em>a</em>, <em>b</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.assertLess" title="Permalink to this definition">¶</a></dt>
232<dd><p>Just like self.assertTrue(a &lt; b), but with a nicer default message.</p>
233</dd></dl>
234
235<dl class="method">
236<dt id="sasmodels.resolution.IgorComparisonTest.assertLessEqual">
237<tt class="descname">assertLessEqual</tt><big>(</big><em>a</em>, <em>b</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.assertLessEqual" title="Permalink to this definition">¶</a></dt>
238<dd><p>Just like self.assertTrue(a &lt;= b), but with a nicer default message.</p>
239</dd></dl>
240
241<dl class="method">
242<dt id="sasmodels.resolution.IgorComparisonTest.assertListEqual">
243<tt class="descname">assertListEqual</tt><big>(</big><em>list1</em>, <em>list2</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.assertListEqual" title="Permalink to this definition">¶</a></dt>
244<dd><p>A list-specific equality assertion.</p>
245<dl class="docutils">
246<dt>Args:</dt>
247<dd><p class="first">list1: The first list to compare.
248list2: The second list to compare.
249msg: Optional message to use on failure instead of a list of</p>
250<blockquote class="last">
251<div>differences.</div></blockquote>
252</dd>
253</dl>
254</dd></dl>
255
256<dl class="method">
257<dt id="sasmodels.resolution.IgorComparisonTest.assertMultiLineEqual">
258<tt class="descname">assertMultiLineEqual</tt><big>(</big><em>first</em>, <em>second</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.assertMultiLineEqual" title="Permalink to this definition">¶</a></dt>
259<dd><p>Assert that two multi-line strings are equal.</p>
260</dd></dl>
261
262<dl class="method">
263<dt id="sasmodels.resolution.IgorComparisonTest.assertNotAlmostEqual">
264<tt class="descname">assertNotAlmostEqual</tt><big>(</big><em>first</em>, <em>second</em>, <em>places=None</em>, <em>msg=None</em>, <em>delta=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.assertNotAlmostEqual" title="Permalink to this definition">¶</a></dt>
265<dd><p>Fail if the two objects are equal as determined by their
266difference rounded to the given number of decimal places
267(default 7) and comparing to zero, or by comparing that the
268between the two objects is less than the given delta.</p>
269<p>Note that decimal places (from zero) are usually not the same
270as significant digits (measured from the most signficant digit).</p>
271<p>Objects that are equal automatically fail.</p>
272</dd></dl>
273
274<dl class="method">
275<dt id="sasmodels.resolution.IgorComparisonTest.assertNotAlmostEquals">
276<tt class="descname">assertNotAlmostEquals</tt><big>(</big><em>first</em>, <em>second</em>, <em>places=None</em>, <em>msg=None</em>, <em>delta=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.assertNotAlmostEquals" title="Permalink to this definition">¶</a></dt>
277<dd><p>Fail if the two objects are equal as determined by their
278difference rounded to the given number of decimal places
279(default 7) and comparing to zero, or by comparing that the
280between the two objects is less than the given delta.</p>
281<p>Note that decimal places (from zero) are usually not the same
282as significant digits (measured from the most signficant digit).</p>
283<p>Objects that are equal automatically fail.</p>
284</dd></dl>
285
286<dl class="method">
287<dt id="sasmodels.resolution.IgorComparisonTest.assertNotEqual">
288<tt class="descname">assertNotEqual</tt><big>(</big><em>first</em>, <em>second</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.assertNotEqual" title="Permalink to this definition">¶</a></dt>
289<dd><p>Fail if the two objects are equal as determined by the &#8216;!=&#8217;
290operator.</p>
291</dd></dl>
292
293<dl class="method">
294<dt id="sasmodels.resolution.IgorComparisonTest.assertNotEquals">
295<tt class="descname">assertNotEquals</tt><big>(</big><em>first</em>, <em>second</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.assertNotEquals" title="Permalink to this definition">¶</a></dt>
296<dd><p>Fail if the two objects are equal as determined by the &#8216;!=&#8217;
297operator.</p>
298</dd></dl>
299
300<dl class="method">
301<dt id="sasmodels.resolution.IgorComparisonTest.assertNotIn">
302<tt class="descname">assertNotIn</tt><big>(</big><em>member</em>, <em>container</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.assertNotIn" title="Permalink to this definition">¶</a></dt>
303<dd><p>Just like self.assertTrue(a not in b), but with a nicer default message.</p>
304</dd></dl>
305
306<dl class="method">
307<dt id="sasmodels.resolution.IgorComparisonTest.assertNotIsInstance">
308<tt class="descname">assertNotIsInstance</tt><big>(</big><em>obj</em>, <em>cls</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.assertNotIsInstance" title="Permalink to this definition">¶</a></dt>
309<dd><p>Included for symmetry with assertIsInstance.</p>
310</dd></dl>
311
312<dl class="method">
313<dt id="sasmodels.resolution.IgorComparisonTest.assertNotRegexpMatches">
314<tt class="descname">assertNotRegexpMatches</tt><big>(</big><em>text</em>, <em>unexpected_regexp</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.assertNotRegexpMatches" title="Permalink to this definition">¶</a></dt>
315<dd><p>Fail the test if the text matches the regular expression.</p>
316</dd></dl>
317
318<dl class="method">
319<dt id="sasmodels.resolution.IgorComparisonTest.assertRaises">
320<tt class="descname">assertRaises</tt><big>(</big><em>excClass</em>, <em>callableObj=None</em>, <em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.assertRaises" title="Permalink to this definition">¶</a></dt>
321<dd><p>Fail unless an exception of class excClass is raised
322by callableObj when invoked with arguments args and keyword
323arguments kwargs. If a different type of exception is
324raised, it will not be caught, and the test case will be
325deemed to have suffered an error, exactly as for an
326unexpected exception.</p>
327<p>If called with callableObj omitted or None, will return a
328context object used like this:</p>
329<div class="highlight-python"><div class="highlight"><pre><span class="k">with</span> <span class="bp">self</span><span class="o">.</span><span class="n">assertRaises</span><span class="p">(</span><span class="n">SomeException</span><span class="p">):</span>
330    <span class="n">do_something</span><span class="p">()</span>
331</pre></div>
332</div>
333<p>The context manager keeps a reference to the exception as
334the &#8216;exception&#8217; attribute. This allows you to inspect the
335exception after the assertion:</p>
336<div class="highlight-python"><div class="highlight"><pre><span class="k">with</span> <span class="bp">self</span><span class="o">.</span><span class="n">assertRaises</span><span class="p">(</span><span class="n">SomeException</span><span class="p">)</span> <span class="k">as</span> <span class="n">cm</span><span class="p">:</span>
337    <span class="n">do_something</span><span class="p">()</span>
338<span class="n">the_exception</span> <span class="o">=</span> <span class="n">cm</span><span class="o">.</span><span class="n">exception</span>
339<span class="bp">self</span><span class="o">.</span><span class="n">assertEqual</span><span class="p">(</span><span class="n">the_exception</span><span class="o">.</span><span class="n">error_code</span><span class="p">,</span> <span class="mi">3</span><span class="p">)</span>
340</pre></div>
341</div>
342</dd></dl>
343
344<dl class="method">
345<dt id="sasmodels.resolution.IgorComparisonTest.assertRaisesRegexp">
346<tt class="descname">assertRaisesRegexp</tt><big>(</big><em>expected_exception</em>, <em>expected_regexp</em>, <em>callable_obj=None</em>, <em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.assertRaisesRegexp" title="Permalink to this definition">¶</a></dt>
347<dd><p>Asserts that the message in a raised exception matches a regexp.</p>
348<dl class="docutils">
349<dt>Args:</dt>
350<dd><p class="first">expected_exception: Exception class expected to be raised.
351expected_regexp: Regexp (re pattern object or string) expected</p>
352<blockquote>
353<div>to be found in error message.</div></blockquote>
354<p class="last">callable_obj: Function to be called.
355args: Extra args.
356kwargs: Extra kwargs.</p>
357</dd>
358</dl>
359</dd></dl>
360
361<dl class="method">
362<dt id="sasmodels.resolution.IgorComparisonTest.assertRegexpMatches">
363<tt class="descname">assertRegexpMatches</tt><big>(</big><em>text</em>, <em>expected_regexp</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.assertRegexpMatches" title="Permalink to this definition">¶</a></dt>
364<dd><p>Fail the test unless the text matches the regular expression.</p>
365</dd></dl>
366
367<dl class="method">
368<dt id="sasmodels.resolution.IgorComparisonTest.assertSequenceEqual">
369<tt class="descname">assertSequenceEqual</tt><big>(</big><em>seq1</em>, <em>seq2</em>, <em>msg=None</em>, <em>seq_type=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.assertSequenceEqual" title="Permalink to this definition">¶</a></dt>
370<dd><p>An equality assertion for ordered sequences (like lists and tuples).</p>
371<p>For the purposes of this function, a valid ordered sequence type is one
372which can be indexed, has a length, and has an equality operator.</p>
373<dl class="docutils">
374<dt>Args:</dt>
375<dd><p class="first">seq1: The first sequence to compare.
376seq2: The second sequence to compare.
377seq_type: The expected datatype of the sequences, or None if no</p>
378<blockquote>
379<div>datatype should be enforced.</div></blockquote>
380<dl class="last docutils">
381<dt>msg: Optional message to use on failure instead of a list of</dt>
382<dd>differences.</dd>
383</dl>
384</dd>
385</dl>
386</dd></dl>
387
388<dl class="method">
389<dt id="sasmodels.resolution.IgorComparisonTest.assertSetEqual">
390<tt class="descname">assertSetEqual</tt><big>(</big><em>set1</em>, <em>set2</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.assertSetEqual" title="Permalink to this definition">¶</a></dt>
391<dd><p>A set-specific equality assertion.</p>
392<dl class="docutils">
393<dt>Args:</dt>
394<dd><p class="first">set1: The first set to compare.
395set2: The second set to compare.
396msg: Optional message to use on failure instead of a list of</p>
397<blockquote class="last">
398<div>differences.</div></blockquote>
399</dd>
400</dl>
401<p>assertSetEqual uses ducktyping to support different types of sets, and
402is optimized for sets specifically (parameters must support a
403difference method).</p>
404</dd></dl>
405
406<dl class="method">
407<dt id="sasmodels.resolution.IgorComparisonTest.assertTrue">
408<tt class="descname">assertTrue</tt><big>(</big><em>expr</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.assertTrue" title="Permalink to this definition">¶</a></dt>
409<dd><p>Check that the expression is true.</p>
410</dd></dl>
411
412<dl class="method">
413<dt id="sasmodels.resolution.IgorComparisonTest.assertTupleEqual">
414<tt class="descname">assertTupleEqual</tt><big>(</big><em>tuple1</em>, <em>tuple2</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.assertTupleEqual" title="Permalink to this definition">¶</a></dt>
415<dd><p>A tuple-specific equality assertion.</p>
416<dl class="docutils">
417<dt>Args:</dt>
418<dd><p class="first">tuple1: The first tuple to compare.
419tuple2: The second tuple to compare.
420msg: Optional message to use on failure instead of a list of</p>
421<blockquote class="last">
422<div>differences.</div></blockquote>
423</dd>
424</dl>
425</dd></dl>
426
427<dl class="method">
428<dt id="sasmodels.resolution.IgorComparisonTest.assert_">
429<tt class="descname">assert_</tt><big>(</big><em>expr</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.assert_" title="Permalink to this definition">¶</a></dt>
430<dd><p>Check that the expression is true.</p>
431</dd></dl>
432
433<dl class="method">
434<dt id="sasmodels.resolution.IgorComparisonTest.compare">
435<tt class="descname">compare</tt><big>(</big><em>q</em>, <em>output</em>, <em>answer</em>, <em>tolerance</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.compare" title="Permalink to this definition">¶</a></dt>
436<dd></dd></dl>
437
438<dl class="method">
439<dt id="sasmodels.resolution.IgorComparisonTest.countTestCases">
440<tt class="descname">countTestCases</tt><big>(</big><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.countTestCases" title="Permalink to this definition">¶</a></dt>
441<dd></dd></dl>
442
443<dl class="method">
444<dt id="sasmodels.resolution.IgorComparisonTest.debug">
445<tt class="descname">debug</tt><big>(</big><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.debug" title="Permalink to this definition">¶</a></dt>
446<dd><p>Run the test without collecting errors in a TestResult</p>
447</dd></dl>
448
449<dl class="method">
450<dt id="sasmodels.resolution.IgorComparisonTest.defaultTestResult">
451<tt class="descname">defaultTestResult</tt><big>(</big><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.defaultTestResult" title="Permalink to this definition">¶</a></dt>
452<dd></dd></dl>
453
454<dl class="method">
455<dt id="sasmodels.resolution.IgorComparisonTest.doCleanups">
456<tt class="descname">doCleanups</tt><big>(</big><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.doCleanups" title="Permalink to this definition">¶</a></dt>
457<dd><p>Execute all cleanup functions. Normally called for you after
458tearDown.</p>
459</dd></dl>
460
461<dl class="method">
462<dt id="sasmodels.resolution.IgorComparisonTest.fail">
463<tt class="descname">fail</tt><big>(</big><em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.fail" title="Permalink to this definition">¶</a></dt>
464<dd><p>Fail immediately, with the given message.</p>
465</dd></dl>
466
467<dl class="method">
468<dt id="sasmodels.resolution.IgorComparisonTest.failIf">
469<tt class="descname">failIf</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.failIf" title="Permalink to this definition">¶</a></dt>
470<dd></dd></dl>
471
472<dl class="method">
473<dt id="sasmodels.resolution.IgorComparisonTest.failIfAlmostEqual">
474<tt class="descname">failIfAlmostEqual</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.failIfAlmostEqual" title="Permalink to this definition">¶</a></dt>
475<dd></dd></dl>
476
477<dl class="method">
478<dt id="sasmodels.resolution.IgorComparisonTest.failIfEqual">
479<tt class="descname">failIfEqual</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.failIfEqual" title="Permalink to this definition">¶</a></dt>
480<dd></dd></dl>
481
482<dl class="method">
483<dt id="sasmodels.resolution.IgorComparisonTest.failUnless">
484<tt class="descname">failUnless</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.failUnless" title="Permalink to this definition">¶</a></dt>
485<dd></dd></dl>
486
487<dl class="method">
488<dt id="sasmodels.resolution.IgorComparisonTest.failUnlessAlmostEqual">
489<tt class="descname">failUnlessAlmostEqual</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.failUnlessAlmostEqual" title="Permalink to this definition">¶</a></dt>
490<dd></dd></dl>
491
492<dl class="method">
493<dt id="sasmodels.resolution.IgorComparisonTest.failUnlessEqual">
494<tt class="descname">failUnlessEqual</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.failUnlessEqual" title="Permalink to this definition">¶</a></dt>
495<dd></dd></dl>
496
497<dl class="method">
498<dt id="sasmodels.resolution.IgorComparisonTest.failUnlessRaises">
499<tt class="descname">failUnlessRaises</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.failUnlessRaises" title="Permalink to this definition">¶</a></dt>
500<dd></dd></dl>
501
502<dl class="method">
503<dt id="sasmodels.resolution.IgorComparisonTest.id">
504<tt class="descname">id</tt><big>(</big><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.id" title="Permalink to this definition">¶</a></dt>
505<dd></dd></dl>
506
507<dl class="method">
508<dt id="sasmodels.resolution.IgorComparisonTest.run">
509<tt class="descname">run</tt><big>(</big><em>result=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.run" title="Permalink to this definition">¶</a></dt>
510<dd></dd></dl>
511
512<dl class="method">
513<dt id="sasmodels.resolution.IgorComparisonTest.setUp">
514<tt class="descname">setUp</tt><big>(</big><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.setUp" title="Permalink to this definition">¶</a></dt>
515<dd></dd></dl>
516
517<dl class="classmethod">
518<dt id="sasmodels.resolution.IgorComparisonTest.setUpClass">
519<em class="property">classmethod </em><tt class="descname">setUpClass</tt><big>(</big><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.setUpClass" title="Permalink to this definition">¶</a></dt>
520<dd><p>Hook method for setting up class fixture before running tests in the class.</p>
521</dd></dl>
522
523<dl class="method">
524<dt id="sasmodels.resolution.IgorComparisonTest.shortDescription">
525<tt class="descname">shortDescription</tt><big>(</big><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.shortDescription" title="Permalink to this definition">¶</a></dt>
526<dd><p>Returns a one-line description of the test, or None if no
527description has been provided.</p>
528<p>The default implementation of this method returns the first line of
529the specified test method&#8217;s docstring.</p>
530</dd></dl>
531
532<dl class="method">
533<dt id="sasmodels.resolution.IgorComparisonTest.skipTest">
534<tt class="descname">skipTest</tt><big>(</big><em>reason</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.skipTest" title="Permalink to this definition">¶</a></dt>
535<dd><p>Skip this test.</p>
536</dd></dl>
537
538<dl class="method">
539<dt id="sasmodels.resolution.IgorComparisonTest.tearDown">
540<tt class="descname">tearDown</tt><big>(</big><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.tearDown" title="Permalink to this definition">¶</a></dt>
541<dd><p>Hook method for deconstructing the test fixture after testing it.</p>
542</dd></dl>
543
544<dl class="classmethod">
545<dt id="sasmodels.resolution.IgorComparisonTest.tearDownClass">
546<em class="property">classmethod </em><tt class="descname">tearDownClass</tt><big>(</big><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.tearDownClass" title="Permalink to this definition">¶</a></dt>
547<dd><p>Hook method for deconstructing the class fixture after running all tests in the class.</p>
548</dd></dl>
549
550<dl class="method">
551<dt id="sasmodels.resolution.IgorComparisonTest.test_ellipsoid">
552<tt class="descname">test_ellipsoid</tt><big>(</big><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.test_ellipsoid" title="Permalink to this definition">¶</a></dt>
553<dd><p>Compare romberg integration for ellipsoid model.</p>
554</dd></dl>
555
556<dl class="method">
557<dt id="sasmodels.resolution.IgorComparisonTest.test_perfect">
558<tt class="descname">test_perfect</tt><big>(</big><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.test_perfect" title="Permalink to this definition">¶</a></dt>
559<dd><p>Compare sphere model with NIST Igor SANS, no resolution smearing.</p>
560</dd></dl>
561
562<dl class="method">
563<dt id="sasmodels.resolution.IgorComparisonTest.test_pinhole">
564<tt class="descname">test_pinhole</tt><big>(</big><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.test_pinhole" title="Permalink to this definition">¶</a></dt>
565<dd><p>Compare pinhole resolution smearing with NIST Igor SANS</p>
566</dd></dl>
567
568<dl class="method">
569<dt id="sasmodels.resolution.IgorComparisonTest.test_pinhole_romberg">
570<tt class="descname">test_pinhole_romberg</tt><big>(</big><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.test_pinhole_romberg" title="Permalink to this definition">¶</a></dt>
571<dd><p>Compare pinhole resolution smearing with romberg integration result.</p>
572</dd></dl>
573
574<dl class="method">
575<dt id="sasmodels.resolution.IgorComparisonTest.test_pinhole_sparse">
576<tt class="descname">test_pinhole_sparse</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.test_pinhole_sparse" title="Permalink to this definition">¶</a></dt>
577<dd><p>Compare pinhole resolution smearing with NIST Igor SANS on sparse data</p>
578</dd></dl>
579
580<dl class="method">
581<dt id="sasmodels.resolution.IgorComparisonTest.test_slit">
582<tt class="descname">test_slit</tt><big>(</big><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.test_slit" title="Permalink to this definition">¶</a></dt>
583<dd><p>Compare slit resolution smearing with NIST Igor SANS</p>
584</dd></dl>
585
586<dl class="method">
587<dt id="sasmodels.resolution.IgorComparisonTest.test_slit_romberg">
588<tt class="descname">test_slit_romberg</tt><big>(</big><big>)</big><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.test_slit_romberg" title="Permalink to this definition">¶</a></dt>
589<dd><p>Compare slit resolution smearing with romberg integration result.</p>
590</dd></dl>
591
592<dl class="attribute">
593<dt id="sasmodels.resolution.IgorComparisonTest.longMessage">
594<tt class="descname">longMessage</tt><em class="property"> = False</em><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.longMessage" title="Permalink to this definition">¶</a></dt>
595<dd></dd></dl>
596
597<dl class="attribute">
598<dt id="sasmodels.resolution.IgorComparisonTest.maxDiff">
599<tt class="descname">maxDiff</tt><em class="property"> = 640</em><a class="headerlink" href="#sasmodels.resolution.IgorComparisonTest.maxDiff" title="Permalink to this definition">¶</a></dt>
600<dd></dd></dl>
601
602</dd></dl>
603
604<dl class="class">
605<dt id="sasmodels.resolution.Perfect1D">
606<em class="property">class </em><tt class="descclassname">sasmodels.resolution.</tt><tt class="descname">Perfect1D</tt><big>(</big><em>q</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.Perfect1D" title="Permalink to this definition">¶</a></dt>
607<dd><p>Bases: <a class="reference internal" href="#sasmodels.resolution.Resolution" title="sasmodels.resolution.Resolution"><tt class="xref py py-class docutils literal"><span class="pre">sasmodels.resolution.Resolution</span></tt></a></p>
608<p>Resolution function to use when there is no actual resolution smearing
609to be applied.  It has the same interface as the other resolution
610functions, but returns the identity function.</p>
611<dl class="method">
612<dt id="sasmodels.resolution.Perfect1D.apply">
613<tt class="descname">apply</tt><big>(</big><em>theory</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.Perfect1D.apply" title="Permalink to this definition">¶</a></dt>
614<dd></dd></dl>
615
616<dl class="attribute">
617<dt id="sasmodels.resolution.Perfect1D.q">
618<tt class="descname">q</tt><em class="property"> = None</em><a class="headerlink" href="#sasmodels.resolution.Perfect1D.q" title="Permalink to this definition">¶</a></dt>
619<dd></dd></dl>
620
621<dl class="attribute">
622<dt id="sasmodels.resolution.Perfect1D.q_calc">
623<tt class="descname">q_calc</tt><em class="property"> = None</em><a class="headerlink" href="#sasmodels.resolution.Perfect1D.q_calc" title="Permalink to this definition">¶</a></dt>
624<dd></dd></dl>
625
626</dd></dl>
627
628<dl class="class">
629<dt id="sasmodels.resolution.Pinhole1D">
630<em class="property">class </em><tt class="descclassname">sasmodels.resolution.</tt><tt class="descname">Pinhole1D</tt><big>(</big><em>q</em>, <em>q_width</em>, <em>q_calc=None</em>, <em>nsigma=3</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.Pinhole1D" title="Permalink to this definition">¶</a></dt>
631<dd><p>Bases: <a class="reference internal" href="#sasmodels.resolution.Resolution" title="sasmodels.resolution.Resolution"><tt class="xref py py-class docutils literal"><span class="pre">sasmodels.resolution.Resolution</span></tt></a></p>
632<p>Pinhole aperture with q-dependent gaussian resolution.</p>
633<p><em>q</em> points at which the data is measured.</p>
634<p><em>q_width</em> gaussian 1-sigma resolution at each data point.</p>
635<p><em>q_calc</em> is the list of points to calculate, or None if this should
636be estimated from the <em>q</em> and <em>q_width</em>.</p>
637<dl class="method">
638<dt id="sasmodels.resolution.Pinhole1D.apply">
639<tt class="descname">apply</tt><big>(</big><em>theory</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.Pinhole1D.apply" title="Permalink to this definition">¶</a></dt>
640<dd></dd></dl>
641
642<dl class="attribute">
643<dt id="sasmodels.resolution.Pinhole1D.q">
644<tt class="descname">q</tt><em class="property"> = None</em><a class="headerlink" href="#sasmodels.resolution.Pinhole1D.q" title="Permalink to this definition">¶</a></dt>
645<dd></dd></dl>
646
647<dl class="attribute">
648<dt id="sasmodels.resolution.Pinhole1D.q_calc">
649<tt class="descname">q_calc</tt><em class="property"> = None</em><a class="headerlink" href="#sasmodels.resolution.Pinhole1D.q_calc" title="Permalink to this definition">¶</a></dt>
650<dd></dd></dl>
651
652</dd></dl>
653
654<dl class="class">
655<dt id="sasmodels.resolution.Resolution">
656<em class="property">class </em><tt class="descclassname">sasmodels.resolution.</tt><tt class="descname">Resolution</tt><a class="headerlink" href="#sasmodels.resolution.Resolution" title="Permalink to this definition">¶</a></dt>
657<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
658<p>Abstract base class defining a 1D resolution function.</p>
659<p><em>q</em> is the set of q values at which the data is measured.</p>
660<p><em>q_calc</em> is the set of q values at which the theory needs to be evaluated.
661This may extend and interpolate the q values.</p>
662<p><em>apply</em> is the method to call with I(q_calc) to compute the resolution
663smeared theory I(q).</p>
664<dl class="method">
665<dt id="sasmodels.resolution.Resolution.apply">
666<tt class="descname">apply</tt><big>(</big><em>theory</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.Resolution.apply" title="Permalink to this definition">¶</a></dt>
667<dd><p>Smear <em>theory</em> by the resolution function, returning <em>Iq</em>.</p>
668</dd></dl>
669
670<dl class="attribute">
671<dt id="sasmodels.resolution.Resolution.q">
672<tt class="descname">q</tt><em class="property"> = None</em><a class="headerlink" href="#sasmodels.resolution.Resolution.q" title="Permalink to this definition">¶</a></dt>
673<dd></dd></dl>
674
675<dl class="attribute">
676<dt id="sasmodels.resolution.Resolution.q_calc">
677<tt class="descname">q_calc</tt><em class="property"> = None</em><a class="headerlink" href="#sasmodels.resolution.Resolution.q_calc" title="Permalink to this definition">¶</a></dt>
678<dd></dd></dl>
679
680</dd></dl>
681
682<dl class="class">
683<dt id="sasmodels.resolution.ResolutionTest">
684<em class="property">class </em><tt class="descclassname">sasmodels.resolution.</tt><tt class="descname">ResolutionTest</tt><big>(</big><em>methodName='runTest'</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest" title="Permalink to this definition">¶</a></dt>
685<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">unittest.case.TestCase</span></tt></p>
686<p>Create an instance of the class that will use the named test
687method when executed. Raises a ValueError if the instance does
688not have a method with the specified name.</p>
689<dl class="attribute">
690<dt id="sasmodels.resolution.ResolutionTest.failureException">
691<tt class="descname">failureException</tt><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.failureException" title="Permalink to this definition">¶</a></dt>
692<dd><p>alias of <tt class="xref py py-class docutils literal"><span class="pre">AssertionError</span></tt></p>
693</dd></dl>
694
695<dl class="method">
696<dt id="sasmodels.resolution.ResolutionTest.Iq">
697<tt class="descname">Iq</tt><big>(</big><em>q</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.Iq" title="Permalink to this definition">¶</a></dt>
698<dd><p>Linear function for resolution unit test</p>
699</dd></dl>
700
701<dl class="method">
702<dt id="sasmodels.resolution.ResolutionTest.addCleanup">
703<tt class="descname">addCleanup</tt><big>(</big><em>function</em>, <em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.addCleanup" title="Permalink to this definition">¶</a></dt>
704<dd><p>Add a function, with arguments, to be called when the test is
705completed. Functions added are called on a LIFO basis and are
706called after tearDown on test failure or success.</p>
707<p>Cleanup items are called even if setUp fails (unlike tearDown).</p>
708</dd></dl>
709
710<dl class="method">
711<dt id="sasmodels.resolution.ResolutionTest.addTypeEqualityFunc">
712<tt class="descname">addTypeEqualityFunc</tt><big>(</big><em>typeobj</em>, <em>function</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.addTypeEqualityFunc" title="Permalink to this definition">¶</a></dt>
713<dd><p>Add a type specific assertEqual style function to compare a type.</p>
714<p>This method is for use by TestCase subclasses that need to register
715their own type equality functions to provide nicer error messages.</p>
716<dl class="docutils">
717<dt>Args:</dt>
718<dd><dl class="first last docutils">
719<dt>typeobj: The data type to call this function on when both values</dt>
720<dd>are of the same type in assertEqual().</dd>
721<dt>function: The callable taking two arguments and an optional</dt>
722<dd>msg= argument that raises self.failureException with a
723useful error message when the two arguments are not equal.</dd>
724</dl>
725</dd>
726</dl>
727</dd></dl>
728
729<dl class="method">
730<dt id="sasmodels.resolution.ResolutionTest.assertAlmostEqual">
731<tt class="descname">assertAlmostEqual</tt><big>(</big><em>first</em>, <em>second</em>, <em>places=None</em>, <em>msg=None</em>, <em>delta=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.assertAlmostEqual" title="Permalink to this definition">¶</a></dt>
732<dd><p>Fail if the two objects are unequal as determined by their
733difference rounded to the given number of decimal places
734(default 7) and comparing to zero, or by comparing that the
735between the two objects is more than the given delta.</p>
736<p>Note that decimal places (from zero) are usually not the same
737as significant digits (measured from the most signficant digit).</p>
738<p>If the two objects compare equal then they will automatically
739compare almost equal.</p>
740</dd></dl>
741
742<dl class="method">
743<dt id="sasmodels.resolution.ResolutionTest.assertAlmostEquals">
744<tt class="descname">assertAlmostEquals</tt><big>(</big><em>first</em>, <em>second</em>, <em>places=None</em>, <em>msg=None</em>, <em>delta=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.assertAlmostEquals" title="Permalink to this definition">¶</a></dt>
745<dd><p>Fail if the two objects are unequal as determined by their
746difference rounded to the given number of decimal places
747(default 7) and comparing to zero, or by comparing that the
748between the two objects is more than the given delta.</p>
749<p>Note that decimal places (from zero) are usually not the same
750as significant digits (measured from the most signficant digit).</p>
751<p>If the two objects compare equal then they will automatically
752compare almost equal.</p>
753</dd></dl>
754
755<dl class="method">
756<dt id="sasmodels.resolution.ResolutionTest.assertDictContainsSubset">
757<tt class="descname">assertDictContainsSubset</tt><big>(</big><em>expected</em>, <em>actual</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.assertDictContainsSubset" title="Permalink to this definition">¶</a></dt>
758<dd><p>Checks whether actual is a superset of expected.</p>
759</dd></dl>
760
761<dl class="method">
762<dt id="sasmodels.resolution.ResolutionTest.assertDictEqual">
763<tt class="descname">assertDictEqual</tt><big>(</big><em>d1</em>, <em>d2</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.assertDictEqual" title="Permalink to this definition">¶</a></dt>
764<dd></dd></dl>
765
766<dl class="method">
767<dt id="sasmodels.resolution.ResolutionTest.assertEqual">
768<tt class="descname">assertEqual</tt><big>(</big><em>first</em>, <em>second</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.assertEqual" title="Permalink to this definition">¶</a></dt>
769<dd><p>Fail if the two objects are unequal as determined by the &#8216;==&#8217;
770operator.</p>
771</dd></dl>
772
773<dl class="method">
774<dt id="sasmodels.resolution.ResolutionTest.assertEquals">
775<tt class="descname">assertEquals</tt><big>(</big><em>first</em>, <em>second</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.assertEquals" title="Permalink to this definition">¶</a></dt>
776<dd><p>Fail if the two objects are unequal as determined by the &#8216;==&#8217;
777operator.</p>
778</dd></dl>
779
780<dl class="method">
781<dt id="sasmodels.resolution.ResolutionTest.assertFalse">
782<tt class="descname">assertFalse</tt><big>(</big><em>expr</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.assertFalse" title="Permalink to this definition">¶</a></dt>
783<dd><p>Check that the expression is false.</p>
784</dd></dl>
785
786<dl class="method">
787<dt id="sasmodels.resolution.ResolutionTest.assertGreater">
788<tt class="descname">assertGreater</tt><big>(</big><em>a</em>, <em>b</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.assertGreater" title="Permalink to this definition">¶</a></dt>
789<dd><p>Just like self.assertTrue(a &gt; b), but with a nicer default message.</p>
790</dd></dl>
791
792<dl class="method">
793<dt id="sasmodels.resolution.ResolutionTest.assertGreaterEqual">
794<tt class="descname">assertGreaterEqual</tt><big>(</big><em>a</em>, <em>b</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.assertGreaterEqual" title="Permalink to this definition">¶</a></dt>
795<dd><p>Just like self.assertTrue(a &gt;= b), but with a nicer default message.</p>
796</dd></dl>
797
798<dl class="method">
799<dt id="sasmodels.resolution.ResolutionTest.assertIn">
800<tt class="descname">assertIn</tt><big>(</big><em>member</em>, <em>container</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.assertIn" title="Permalink to this definition">¶</a></dt>
801<dd><p>Just like self.assertTrue(a in b), but with a nicer default message.</p>
802</dd></dl>
803
804<dl class="method">
805<dt id="sasmodels.resolution.ResolutionTest.assertIs">
806<tt class="descname">assertIs</tt><big>(</big><em>expr1</em>, <em>expr2</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.assertIs" title="Permalink to this definition">¶</a></dt>
807<dd><p>Just like self.assertTrue(a is b), but with a nicer default message.</p>
808</dd></dl>
809
810<dl class="method">
811<dt id="sasmodels.resolution.ResolutionTest.assertIsInstance">
812<tt class="descname">assertIsInstance</tt><big>(</big><em>obj</em>, <em>cls</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.assertIsInstance" title="Permalink to this definition">¶</a></dt>
813<dd><p>Same as self.assertTrue(isinstance(obj, cls)), with a nicer
814default message.</p>
815</dd></dl>
816
817<dl class="method">
818<dt id="sasmodels.resolution.ResolutionTest.assertIsNone">
819<tt class="descname">assertIsNone</tt><big>(</big><em>obj</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.assertIsNone" title="Permalink to this definition">¶</a></dt>
820<dd><p>Same as self.assertTrue(obj is None), with a nicer default message.</p>
821</dd></dl>
822
823<dl class="method">
824<dt id="sasmodels.resolution.ResolutionTest.assertIsNot">
825<tt class="descname">assertIsNot</tt><big>(</big><em>expr1</em>, <em>expr2</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.assertIsNot" title="Permalink to this definition">¶</a></dt>
826<dd><p>Just like self.assertTrue(a is not b), but with a nicer default message.</p>
827</dd></dl>
828
829<dl class="method">
830<dt id="sasmodels.resolution.ResolutionTest.assertIsNotNone">
831<tt class="descname">assertIsNotNone</tt><big>(</big><em>obj</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.assertIsNotNone" title="Permalink to this definition">¶</a></dt>
832<dd><p>Included for symmetry with assertIsNone.</p>
833</dd></dl>
834
835<dl class="method">
836<dt id="sasmodels.resolution.ResolutionTest.assertItemsEqual">
837<tt class="descname">assertItemsEqual</tt><big>(</big><em>expected_seq</em>, <em>actual_seq</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.assertItemsEqual" title="Permalink to this definition">¶</a></dt>
838<dd><p>An unordered sequence specific comparison. It asserts that
839actual_seq and expected_seq have the same element counts.
840Equivalent to:</p>
841<div class="highlight-python"><div class="highlight"><pre><span class="bp">self</span><span class="o">.</span><span class="n">assertEqual</span><span class="p">(</span><span class="n">Counter</span><span class="p">(</span><span class="nb">iter</span><span class="p">(</span><span class="n">actual_seq</span><span class="p">)),</span>
842                 <span class="n">Counter</span><span class="p">(</span><span class="nb">iter</span><span class="p">(</span><span class="n">expected_seq</span><span class="p">)))</span>
843</pre></div>
844</div>
845<p>Asserts that each element has the same count in both sequences.
846Example:</p>
847<blockquote>
848<div><ul class="simple">
849<li>[0, 1, 1] and [1, 0, 1] compare equal.</li>
850<li>[0, 0, 1] and [0, 1] compare unequal.</li>
851</ul>
852</div></blockquote>
853</dd></dl>
854
855<dl class="method">
856<dt id="sasmodels.resolution.ResolutionTest.assertLess">
857<tt class="descname">assertLess</tt><big>(</big><em>a</em>, <em>b</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.assertLess" title="Permalink to this definition">¶</a></dt>
858<dd><p>Just like self.assertTrue(a &lt; b), but with a nicer default message.</p>
859</dd></dl>
860
861<dl class="method">
862<dt id="sasmodels.resolution.ResolutionTest.assertLessEqual">
863<tt class="descname">assertLessEqual</tt><big>(</big><em>a</em>, <em>b</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.assertLessEqual" title="Permalink to this definition">¶</a></dt>
864<dd><p>Just like self.assertTrue(a &lt;= b), but with a nicer default message.</p>
865</dd></dl>
866
867<dl class="method">
868<dt id="sasmodels.resolution.ResolutionTest.assertListEqual">
869<tt class="descname">assertListEqual</tt><big>(</big><em>list1</em>, <em>list2</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.assertListEqual" title="Permalink to this definition">¶</a></dt>
870<dd><p>A list-specific equality assertion.</p>
871<dl class="docutils">
872<dt>Args:</dt>
873<dd><p class="first">list1: The first list to compare.
874list2: The second list to compare.
875msg: Optional message to use on failure instead of a list of</p>
876<blockquote class="last">
877<div>differences.</div></blockquote>
878</dd>
879</dl>
880</dd></dl>
881
882<dl class="method">
883<dt id="sasmodels.resolution.ResolutionTest.assertMultiLineEqual">
884<tt class="descname">assertMultiLineEqual</tt><big>(</big><em>first</em>, <em>second</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.assertMultiLineEqual" title="Permalink to this definition">¶</a></dt>
885<dd><p>Assert that two multi-line strings are equal.</p>
886</dd></dl>
887
888<dl class="method">
889<dt id="sasmodels.resolution.ResolutionTest.assertNotAlmostEqual">
890<tt class="descname">assertNotAlmostEqual</tt><big>(</big><em>first</em>, <em>second</em>, <em>places=None</em>, <em>msg=None</em>, <em>delta=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.assertNotAlmostEqual" title="Permalink to this definition">¶</a></dt>
891<dd><p>Fail if the two objects are equal as determined by their
892difference rounded to the given number of decimal places
893(default 7) and comparing to zero, or by comparing that the
894between the two objects is less than the given delta.</p>
895<p>Note that decimal places (from zero) are usually not the same
896as significant digits (measured from the most signficant digit).</p>
897<p>Objects that are equal automatically fail.</p>
898</dd></dl>
899
900<dl class="method">
901<dt id="sasmodels.resolution.ResolutionTest.assertNotAlmostEquals">
902<tt class="descname">assertNotAlmostEquals</tt><big>(</big><em>first</em>, <em>second</em>, <em>places=None</em>, <em>msg=None</em>, <em>delta=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.assertNotAlmostEquals" title="Permalink to this definition">¶</a></dt>
903<dd><p>Fail if the two objects are equal as determined by their
904difference rounded to the given number of decimal places
905(default 7) and comparing to zero, or by comparing that the
906between the two objects is less than the given delta.</p>
907<p>Note that decimal places (from zero) are usually not the same
908as significant digits (measured from the most signficant digit).</p>
909<p>Objects that are equal automatically fail.</p>
910</dd></dl>
911
912<dl class="method">
913<dt id="sasmodels.resolution.ResolutionTest.assertNotEqual">
914<tt class="descname">assertNotEqual</tt><big>(</big><em>first</em>, <em>second</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.assertNotEqual" title="Permalink to this definition">¶</a></dt>
915<dd><p>Fail if the two objects are equal as determined by the &#8216;!=&#8217;
916operator.</p>
917</dd></dl>
918
919<dl class="method">
920<dt id="sasmodels.resolution.ResolutionTest.assertNotEquals">
921<tt class="descname">assertNotEquals</tt><big>(</big><em>first</em>, <em>second</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.assertNotEquals" title="Permalink to this definition">¶</a></dt>
922<dd><p>Fail if the two objects are equal as determined by the &#8216;!=&#8217;
923operator.</p>
924</dd></dl>
925
926<dl class="method">
927<dt id="sasmodels.resolution.ResolutionTest.assertNotIn">
928<tt class="descname">assertNotIn</tt><big>(</big><em>member</em>, <em>container</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.assertNotIn" title="Permalink to this definition">¶</a></dt>
929<dd><p>Just like self.assertTrue(a not in b), but with a nicer default message.</p>
930</dd></dl>
931
932<dl class="method">
933<dt id="sasmodels.resolution.ResolutionTest.assertNotIsInstance">
934<tt class="descname">assertNotIsInstance</tt><big>(</big><em>obj</em>, <em>cls</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.assertNotIsInstance" title="Permalink to this definition">¶</a></dt>
935<dd><p>Included for symmetry with assertIsInstance.</p>
936</dd></dl>
937
938<dl class="method">
939<dt id="sasmodels.resolution.ResolutionTest.assertNotRegexpMatches">
940<tt class="descname">assertNotRegexpMatches</tt><big>(</big><em>text</em>, <em>unexpected_regexp</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.assertNotRegexpMatches" title="Permalink to this definition">¶</a></dt>
941<dd><p>Fail the test if the text matches the regular expression.</p>
942</dd></dl>
943
944<dl class="method">
945<dt id="sasmodels.resolution.ResolutionTest.assertRaises">
946<tt class="descname">assertRaises</tt><big>(</big><em>excClass</em>, <em>callableObj=None</em>, <em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.assertRaises" title="Permalink to this definition">¶</a></dt>
947<dd><p>Fail unless an exception of class excClass is raised
948by callableObj when invoked with arguments args and keyword
949arguments kwargs. If a different type of exception is
950raised, it will not be caught, and the test case will be
951deemed to have suffered an error, exactly as for an
952unexpected exception.</p>
953<p>If called with callableObj omitted or None, will return a
954context object used like this:</p>
955<div class="highlight-python"><div class="highlight"><pre><span class="k">with</span> <span class="bp">self</span><span class="o">.</span><span class="n">assertRaises</span><span class="p">(</span><span class="n">SomeException</span><span class="p">):</span>
956    <span class="n">do_something</span><span class="p">()</span>
957</pre></div>
958</div>
959<p>The context manager keeps a reference to the exception as
960the &#8216;exception&#8217; attribute. This allows you to inspect the
961exception after the assertion:</p>
962<div class="highlight-python"><div class="highlight"><pre><span class="k">with</span> <span class="bp">self</span><span class="o">.</span><span class="n">assertRaises</span><span class="p">(</span><span class="n">SomeException</span><span class="p">)</span> <span class="k">as</span> <span class="n">cm</span><span class="p">:</span>
963    <span class="n">do_something</span><span class="p">()</span>
964<span class="n">the_exception</span> <span class="o">=</span> <span class="n">cm</span><span class="o">.</span><span class="n">exception</span>
965<span class="bp">self</span><span class="o">.</span><span class="n">assertEqual</span><span class="p">(</span><span class="n">the_exception</span><span class="o">.</span><span class="n">error_code</span><span class="p">,</span> <span class="mi">3</span><span class="p">)</span>
966</pre></div>
967</div>
968</dd></dl>
969
970<dl class="method">
971<dt id="sasmodels.resolution.ResolutionTest.assertRaisesRegexp">
972<tt class="descname">assertRaisesRegexp</tt><big>(</big><em>expected_exception</em>, <em>expected_regexp</em>, <em>callable_obj=None</em>, <em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.assertRaisesRegexp" title="Permalink to this definition">¶</a></dt>
973<dd><p>Asserts that the message in a raised exception matches a regexp.</p>
974<dl class="docutils">
975<dt>Args:</dt>
976<dd><p class="first">expected_exception: Exception class expected to be raised.
977expected_regexp: Regexp (re pattern object or string) expected</p>
978<blockquote>
979<div>to be found in error message.</div></blockquote>
980<p class="last">callable_obj: Function to be called.
981args: Extra args.
982kwargs: Extra kwargs.</p>
983</dd>
984</dl>
985</dd></dl>
986
987<dl class="method">
988<dt id="sasmodels.resolution.ResolutionTest.assertRegexpMatches">
989<tt class="descname">assertRegexpMatches</tt><big>(</big><em>text</em>, <em>expected_regexp</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.assertRegexpMatches" title="Permalink to this definition">¶</a></dt>
990<dd><p>Fail the test unless the text matches the regular expression.</p>
991</dd></dl>
992
993<dl class="method">
994<dt id="sasmodels.resolution.ResolutionTest.assertSequenceEqual">
995<tt class="descname">assertSequenceEqual</tt><big>(</big><em>seq1</em>, <em>seq2</em>, <em>msg=None</em>, <em>seq_type=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.assertSequenceEqual" title="Permalink to this definition">¶</a></dt>
996<dd><p>An equality assertion for ordered sequences (like lists and tuples).</p>
997<p>For the purposes of this function, a valid ordered sequence type is one
998which can be indexed, has a length, and has an equality operator.</p>
999<dl class="docutils">
1000<dt>Args:</dt>
1001<dd><p class="first">seq1: The first sequence to compare.
1002seq2: The second sequence to compare.
1003seq_type: The expected datatype of the sequences, or None if no</p>
1004<blockquote>
1005<div>datatype should be enforced.</div></blockquote>
1006<dl class="last docutils">
1007<dt>msg: Optional message to use on failure instead of a list of</dt>
1008<dd>differences.</dd>
1009</dl>
1010</dd>
1011</dl>
1012</dd></dl>
1013
1014<dl class="method">
1015<dt id="sasmodels.resolution.ResolutionTest.assertSetEqual">
1016<tt class="descname">assertSetEqual</tt><big>(</big><em>set1</em>, <em>set2</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.assertSetEqual" title="Permalink to this definition">¶</a></dt>
1017<dd><p>A set-specific equality assertion.</p>
1018<dl class="docutils">
1019<dt>Args:</dt>
1020<dd><p class="first">set1: The first set to compare.
1021set2: The second set to compare.
1022msg: Optional message to use on failure instead of a list of</p>
1023<blockquote class="last">
1024<div>differences.</div></blockquote>
1025</dd>
1026</dl>
1027<p>assertSetEqual uses ducktyping to support different types of sets, and
1028is optimized for sets specifically (parameters must support a
1029difference method).</p>
1030</dd></dl>
1031
1032<dl class="method">
1033<dt id="sasmodels.resolution.ResolutionTest.assertTrue">
1034<tt class="descname">assertTrue</tt><big>(</big><em>expr</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.assertTrue" title="Permalink to this definition">¶</a></dt>
1035<dd><p>Check that the expression is true.</p>
1036</dd></dl>
1037
1038<dl class="method">
1039<dt id="sasmodels.resolution.ResolutionTest.assertTupleEqual">
1040<tt class="descname">assertTupleEqual</tt><big>(</big><em>tuple1</em>, <em>tuple2</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.assertTupleEqual" title="Permalink to this definition">¶</a></dt>
1041<dd><p>A tuple-specific equality assertion.</p>
1042<dl class="docutils">
1043<dt>Args:</dt>
1044<dd><p class="first">tuple1: The first tuple to compare.
1045tuple2: The second tuple to compare.
1046msg: Optional message to use on failure instead of a list of</p>
1047<blockquote class="last">
1048<div>differences.</div></blockquote>
1049</dd>
1050</dl>
1051</dd></dl>
1052
1053<dl class="method">
1054<dt id="sasmodels.resolution.ResolutionTest.assert_">
1055<tt class="descname">assert_</tt><big>(</big><em>expr</em>, <em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.assert_" title="Permalink to this definition">¶</a></dt>
1056<dd><p>Check that the expression is true.</p>
1057</dd></dl>
1058
1059<dl class="method">
1060<dt id="sasmodels.resolution.ResolutionTest.countTestCases">
1061<tt class="descname">countTestCases</tt><big>(</big><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.countTestCases" title="Permalink to this definition">¶</a></dt>
1062<dd></dd></dl>
1063
1064<dl class="method">
1065<dt id="sasmodels.resolution.ResolutionTest.debug">
1066<tt class="descname">debug</tt><big>(</big><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.debug" title="Permalink to this definition">¶</a></dt>
1067<dd><p>Run the test without collecting errors in a TestResult</p>
1068</dd></dl>
1069
1070<dl class="method">
1071<dt id="sasmodels.resolution.ResolutionTest.defaultTestResult">
1072<tt class="descname">defaultTestResult</tt><big>(</big><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.defaultTestResult" title="Permalink to this definition">¶</a></dt>
1073<dd></dd></dl>
1074
1075<dl class="method">
1076<dt id="sasmodels.resolution.ResolutionTest.doCleanups">
1077<tt class="descname">doCleanups</tt><big>(</big><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.doCleanups" title="Permalink to this definition">¶</a></dt>
1078<dd><p>Execute all cleanup functions. Normally called for you after
1079tearDown.</p>
1080</dd></dl>
1081
1082<dl class="method">
1083<dt id="sasmodels.resolution.ResolutionTest.fail">
1084<tt class="descname">fail</tt><big>(</big><em>msg=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.fail" title="Permalink to this definition">¶</a></dt>
1085<dd><p>Fail immediately, with the given message.</p>
1086</dd></dl>
1087
1088<dl class="method">
1089<dt id="sasmodels.resolution.ResolutionTest.failIf">
1090<tt class="descname">failIf</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.failIf" title="Permalink to this definition">¶</a></dt>
1091<dd></dd></dl>
1092
1093<dl class="method">
1094<dt id="sasmodels.resolution.ResolutionTest.failIfAlmostEqual">
1095<tt class="descname">failIfAlmostEqual</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.failIfAlmostEqual" title="Permalink to this definition">¶</a></dt>
1096<dd></dd></dl>
1097
1098<dl class="method">
1099<dt id="sasmodels.resolution.ResolutionTest.failIfEqual">
1100<tt class="descname">failIfEqual</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.failIfEqual" title="Permalink to this definition">¶</a></dt>
1101<dd></dd></dl>
1102
1103<dl class="method">
1104<dt id="sasmodels.resolution.ResolutionTest.failUnless">
1105<tt class="descname">failUnless</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.failUnless" title="Permalink to this definition">¶</a></dt>
1106<dd></dd></dl>
1107
1108<dl class="method">
1109<dt id="sasmodels.resolution.ResolutionTest.failUnlessAlmostEqual">
1110<tt class="descname">failUnlessAlmostEqual</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.failUnlessAlmostEqual" title="Permalink to this definition">¶</a></dt>
1111<dd></dd></dl>
1112
1113<dl class="method">
1114<dt id="sasmodels.resolution.ResolutionTest.failUnlessEqual">
1115<tt class="descname">failUnlessEqual</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.failUnlessEqual" title="Permalink to this definition">¶</a></dt>
1116<dd></dd></dl>
1117
1118<dl class="method">
1119<dt id="sasmodels.resolution.ResolutionTest.failUnlessRaises">
1120<tt class="descname">failUnlessRaises</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.failUnlessRaises" title="Permalink to this definition">¶</a></dt>
1121<dd></dd></dl>
1122
1123<dl class="method">
1124<dt id="sasmodels.resolution.ResolutionTest.id">
1125<tt class="descname">id</tt><big>(</big><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.id" title="Permalink to this definition">¶</a></dt>
1126<dd></dd></dl>
1127
1128<dl class="method">
1129<dt id="sasmodels.resolution.ResolutionTest.run">
1130<tt class="descname">run</tt><big>(</big><em>result=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.run" title="Permalink to this definition">¶</a></dt>
1131<dd></dd></dl>
1132
1133<dl class="method">
1134<dt id="sasmodels.resolution.ResolutionTest.setUp">
1135<tt class="descname">setUp</tt><big>(</big><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.setUp" title="Permalink to this definition">¶</a></dt>
1136<dd></dd></dl>
1137
1138<dl class="classmethod">
1139<dt id="sasmodels.resolution.ResolutionTest.setUpClass">
1140<em class="property">classmethod </em><tt class="descname">setUpClass</tt><big>(</big><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.setUpClass" title="Permalink to this definition">¶</a></dt>
1141<dd><p>Hook method for setting up class fixture before running tests in the class.</p>
1142</dd></dl>
1143
1144<dl class="method">
1145<dt id="sasmodels.resolution.ResolutionTest.shortDescription">
1146<tt class="descname">shortDescription</tt><big>(</big><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.shortDescription" title="Permalink to this definition">¶</a></dt>
1147<dd><p>Returns a one-line description of the test, or None if no
1148description has been provided.</p>
1149<p>The default implementation of this method returns the first line of
1150the specified test method&#8217;s docstring.</p>
1151</dd></dl>
1152
1153<dl class="method">
1154<dt id="sasmodels.resolution.ResolutionTest.skipTest">
1155<tt class="descname">skipTest</tt><big>(</big><em>reason</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.skipTest" title="Permalink to this definition">¶</a></dt>
1156<dd><p>Skip this test.</p>
1157</dd></dl>
1158
1159<dl class="method">
1160<dt id="sasmodels.resolution.ResolutionTest.tearDown">
1161<tt class="descname">tearDown</tt><big>(</big><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.tearDown" title="Permalink to this definition">¶</a></dt>
1162<dd><p>Hook method for deconstructing the test fixture after testing it.</p>
1163</dd></dl>
1164
1165<dl class="classmethod">
1166<dt id="sasmodels.resolution.ResolutionTest.tearDownClass">
1167<em class="property">classmethod </em><tt class="descname">tearDownClass</tt><big>(</big><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.tearDownClass" title="Permalink to this definition">¶</a></dt>
1168<dd><p>Hook method for deconstructing the class fixture after running all tests in the class.</p>
1169</dd></dl>
1170
1171<dl class="method">
1172<dt id="sasmodels.resolution.ResolutionTest.test_perfect">
1173<tt class="descname">test_perfect</tt><big>(</big><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.test_perfect" title="Permalink to this definition">¶</a></dt>
1174<dd><p>Perfect resolution and no smearing.</p>
1175</dd></dl>
1176
1177<dl class="method">
1178<dt id="sasmodels.resolution.ResolutionTest.test_pinhole">
1179<tt class="descname">test_pinhole</tt><big>(</big><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.test_pinhole" title="Permalink to this definition">¶</a></dt>
1180<dd><p>Pinhole smearing with dQ = 0.001 [Note: not dQ/Q = 0.001]</p>
1181</dd></dl>
1182
1183<dl class="method">
1184<dt id="sasmodels.resolution.ResolutionTest.test_pinhole_zero">
1185<tt class="descname">test_pinhole_zero</tt><big>(</big><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.test_pinhole_zero" title="Permalink to this definition">¶</a></dt>
1186<dd><p>Pinhole smearing with perfect resolution</p>
1187</dd></dl>
1188
1189<dl class="method">
1190<dt id="sasmodels.resolution.ResolutionTest.test_slit_both_high">
1191<tt class="descname">test_slit_both_high</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.test_slit_both_high" title="Permalink to this definition">¶</a></dt>
1192<dd><p>Slit smearing with width &lt; 100*height.</p>
1193</dd></dl>
1194
1195<dl class="method">
1196<dt id="sasmodels.resolution.ResolutionTest.test_slit_both_wide">
1197<tt class="descname">test_slit_both_wide</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.test_slit_both_wide" title="Permalink to this definition">¶</a></dt>
1198<dd><p>Slit smearing with width &gt; 100*height.</p>
1199</dd></dl>
1200
1201<dl class="method">
1202<dt id="sasmodels.resolution.ResolutionTest.test_slit_high">
1203<tt class="descname">test_slit_high</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.test_slit_high" title="Permalink to this definition">¶</a></dt>
1204<dd><p>Slit smearing with height 0.005</p>
1205</dd></dl>
1206
1207<dl class="method">
1208<dt id="sasmodels.resolution.ResolutionTest.test_slit_wide">
1209<tt class="descname">test_slit_wide</tt><big>(</big><em>*args</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.test_slit_wide" title="Permalink to this definition">¶</a></dt>
1210<dd><p>Slit smearing with width 0.0002</p>
1211</dd></dl>
1212
1213<dl class="method">
1214<dt id="sasmodels.resolution.ResolutionTest.test_slit_zero">
1215<tt class="descname">test_slit_zero</tt><big>(</big><big>)</big><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.test_slit_zero" title="Permalink to this definition">¶</a></dt>
1216<dd><p>Slit smearing with perfect resolution.</p>
1217</dd></dl>
1218
1219<dl class="attribute">
1220<dt id="sasmodels.resolution.ResolutionTest.longMessage">
1221<tt class="descname">longMessage</tt><em class="property"> = False</em><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.longMessage" title="Permalink to this definition">¶</a></dt>
1222<dd></dd></dl>
1223
1224<dl class="attribute">
1225<dt id="sasmodels.resolution.ResolutionTest.maxDiff">
1226<tt class="descname">maxDiff</tt><em class="property"> = 640</em><a class="headerlink" href="#sasmodels.resolution.ResolutionTest.maxDiff" title="Permalink to this definition">¶</a></dt>
1227<dd></dd></dl>
1228
1229</dd></dl>
1230
1231<dl class="class">
1232<dt id="sasmodels.resolution.Slit1D">
1233<em class="property">class </em><tt class="descclassname">sasmodels.resolution.</tt><tt class="descname">Slit1D</tt><big>(</big><em>q</em>, <em>width</em>, <em>height</em>, <em>q_calc=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.Slit1D" title="Permalink to this definition">¶</a></dt>
1234<dd><p>Bases: <a class="reference internal" href="#sasmodels.resolution.Resolution" title="sasmodels.resolution.Resolution"><tt class="xref py py-class docutils literal"><span class="pre">sasmodels.resolution.Resolution</span></tt></a></p>
1235<p>Slit aperture with a complicated resolution function.</p>
1236<p><em>q</em> points at which the data is measured.</p>
1237<p><em>qx_width</em> slit width</p>
1238<p><em>qy_height</em> slit height</p>
1239<p><em>q_calc</em> is the list of points to calculate, or None if this should
1240be estimated from the <em>q</em> and <em>q_width</em>.</p>
1241<p>The <em>weight_matrix</em> is computed by <tt class="xref py py-func docutils literal"><span class="pre">slit1d_resolution()</span></tt></p>
1242<dl class="method">
1243<dt id="sasmodels.resolution.Slit1D.apply">
1244<tt class="descname">apply</tt><big>(</big><em>theory</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.Slit1D.apply" title="Permalink to this definition">¶</a></dt>
1245<dd></dd></dl>
1246
1247<dl class="attribute">
1248<dt id="sasmodels.resolution.Slit1D.q">
1249<tt class="descname">q</tt><em class="property"> = None</em><a class="headerlink" href="#sasmodels.resolution.Slit1D.q" title="Permalink to this definition">¶</a></dt>
1250<dd></dd></dl>
1251
1252<dl class="attribute">
1253<dt id="sasmodels.resolution.Slit1D.q_calc">
1254<tt class="descname">q_calc</tt><em class="property"> = None</em><a class="headerlink" href="#sasmodels.resolution.Slit1D.q_calc" title="Permalink to this definition">¶</a></dt>
1255<dd></dd></dl>
1256
1257</dd></dl>
1258
1259<dl class="function">
1260<dt id="sasmodels.resolution.apply_resolution_matrix">
1261<tt class="descclassname">sasmodels.resolution.</tt><tt class="descname">apply_resolution_matrix</tt><big>(</big><em>weight_matrix</em>, <em>theory</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.apply_resolution_matrix" title="Permalink to this definition">¶</a></dt>
1262<dd><p>Apply the resolution weight matrix to the computed theory function.</p>
1263</dd></dl>
1264
1265<dl class="function">
1266<dt id="sasmodels.resolution.bin_edges">
1267<tt class="descclassname">sasmodels.resolution.</tt><tt class="descname">bin_edges</tt><big>(</big><em>x</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.bin_edges" title="Permalink to this definition">¶</a></dt>
1268<dd><p>Determine bin edges from bin centers, assuming that edges are centered
1269between the bins.</p>
1270<p>Note: this uses the arithmetic mean, which may not be appropriate for
1271log-scaled data.</p>
1272</dd></dl>
1273
1274<dl class="function">
1275<dt id="sasmodels.resolution.demo">
1276<tt class="descclassname">sasmodels.resolution.</tt><tt class="descname">demo</tt><big>(</big><big>)</big><a class="headerlink" href="#sasmodels.resolution.demo" title="Permalink to this definition">¶</a></dt>
1277<dd></dd></dl>
1278
1279<dl class="function">
1280<dt id="sasmodels.resolution.demo_pinhole_1d">
1281<tt class="descclassname">sasmodels.resolution.</tt><tt class="descname">demo_pinhole_1d</tt><big>(</big><big>)</big><a class="headerlink" href="#sasmodels.resolution.demo_pinhole_1d" title="Permalink to this definition">¶</a></dt>
1282<dd></dd></dl>
1283
1284<dl class="function">
1285<dt id="sasmodels.resolution.demo_slit_1d">
1286<tt class="descclassname">sasmodels.resolution.</tt><tt class="descname">demo_slit_1d</tt><big>(</big><big>)</big><a class="headerlink" href="#sasmodels.resolution.demo_slit_1d" title="Permalink to this definition">¶</a></dt>
1287<dd></dd></dl>
1288
1289<dl class="function">
1290<dt id="sasmodels.resolution.eval_form">
1291<tt class="descclassname">sasmodels.resolution.</tt><tt class="descname">eval_form</tt><big>(</big><em>q</em>, <em>form</em>, <em>pars</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.eval_form" title="Permalink to this definition">¶</a></dt>
1292<dd></dd></dl>
1293
1294<dl class="function">
1295<dt id="sasmodels.resolution.gaussian">
1296<tt class="descclassname">sasmodels.resolution.</tt><tt class="descname">gaussian</tt><big>(</big><em>q</em>, <em>q0</em>, <em>dq</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.gaussian" title="Permalink to this definition">¶</a></dt>
1297<dd></dd></dl>
1298
1299<dl class="function">
1300<dt id="sasmodels.resolution.geometric_extrapolation">
1301<tt class="descclassname">sasmodels.resolution.</tt><tt class="descname">geometric_extrapolation</tt><big>(</big><em>q</em>, <em>q_min</em>, <em>q_max</em>, <em>points_per_decade=None</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.geometric_extrapolation" title="Permalink to this definition">¶</a></dt>
1302<dd><p>Extrapolate <em>q</em> to [<em>q_min</em>, <em>q_max</em>] using geometric steps, with the
1303average geometric step size in <em>q</em> as the step size.</p>
1304<p>if <em>q_min</em> is zero or less then <em>q[0]/10</em> is used instead.</p>
1305<p><em>points_per_decade</em> sets the ratio between consecutive steps such
1306that there will be <span class="math">\(n\)</span> points used for every factor of 10 increase
1307in <em>q</em>.</p>
1308<p>If <em>points_per_decade</em> is not given, it will be estimated as follows.
1309Starting at <span class="math">\(q_1\)</span> and stepping geometrically by <span class="math">\(\Delta q\)</span> to <span class="math">\(q_n\)</span>
1310in <span class="math">\(n\)</span> points gives a geometric average of:</p>
1311<div class="math">
1312\[\log \Delta q = (\log q_n - log q_1) / (n - 1)\]</div>
1313<p>From this we can compute the number of steps required to extend <span class="math">\(q\)</span>
1314from <span class="math">\(q_n\)</span> to <span class="math">\(q_\text{max}\)</span> by <span class="math">\(\Delta q\)</span> as:</p>
1315<div class="math">
1316\[n_\text{extend} = (\log q_\text{max} - \log q_n) / \log \Delta q\]</div>
1317<p>Substituting:</p>
1318<blockquote>
1319<div><dl class="docutils">
1320<dt><a href="#id1"><span class="problematic" id="id2">n_</span></a>text{extend} = (n-1) (log <a href="#id3"><span class="problematic" id="id4">q_</span></a>text{max} - log q_n)</dt>
1321<dd>/ (log q_n - log q_1)</dd>
1322</dl>
1323</div></blockquote>
1324</dd></dl>
1325
1326<dl class="function">
1327<dt id="sasmodels.resolution.interpolate">
1328<tt class="descclassname">sasmodels.resolution.</tt><tt class="descname">interpolate</tt><big>(</big><em>q</em>, <em>max_step</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.interpolate" title="Permalink to this definition">¶</a></dt>
1329<dd><p>Returns <em>q_calc</em> with points spaced at most max_step apart.</p>
1330</dd></dl>
1331
1332<dl class="function">
1333<dt id="sasmodels.resolution.linear_extrapolation">
1334<tt class="descclassname">sasmodels.resolution.</tt><tt class="descname">linear_extrapolation</tt><big>(</big><em>q</em>, <em>q_min</em>, <em>q_max</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.linear_extrapolation" title="Permalink to this definition">¶</a></dt>
1335<dd><p>Extrapolate <em>q</em> out to [<em>q_min</em>, <em>q_max</em>] using the step size in <em>q</em> as
1336a guide.  Extrapolation below uses about the same size as the first
1337interval.  Extrapolation above uses about the same size as the final
1338interval.</p>
1339<p>if <em>q_min</em> is zero or less then <em>q[0]/10</em> is used instead.</p>
1340</dd></dl>
1341
1342<dl class="function">
1343<dt id="sasmodels.resolution.main">
1344<tt class="descclassname">sasmodels.resolution.</tt><tt class="descname">main</tt><big>(</big><big>)</big><a class="headerlink" href="#sasmodels.resolution.main" title="Permalink to this definition">¶</a></dt>
1345<dd><p>Run tests given is sys.argv.</p>
1346<p>Returns 0 if success or 1 if any tests fail.</p>
1347</dd></dl>
1348
1349<dl class="function">
1350<dt id="sasmodels.resolution.pinhole_extend_q">
1351<tt class="descclassname">sasmodels.resolution.</tt><tt class="descname">pinhole_extend_q</tt><big>(</big><em>q</em>, <em>q_width</em>, <em>nsigma=3</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.pinhole_extend_q" title="Permalink to this definition">¶</a></dt>
1352<dd><p>Given <em>q</em> and <em>q_width</em>, find a set of sampling points <em>q_calc</em> so
1353that each point I(q) has sufficient support from the underlying
1354function.</p>
1355</dd></dl>
1356
1357<dl class="function">
1358<dt id="sasmodels.resolution.pinhole_resolution">
1359<tt class="descclassname">sasmodels.resolution.</tt><tt class="descname">pinhole_resolution</tt><big>(</big><em>q_calc</em>, <em>q</em>, <em>q_width</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.pinhole_resolution" title="Permalink to this definition">¶</a></dt>
1360<dd><p>Compute the convolution matrix <em>W</em> for pinhole resolution 1-D data.</p>
1361<p>Each row <em>W[i]</em> determines the normalized weight that the corresponding
1362points <em>q_calc</em> contribute to the resolution smeared point <em>q[i]</em>.  Given
1363<em>W</em>, the resolution smearing can be computed using <em>dot(W,q)</em>.</p>
1364<p><em>q_calc</em> must be increasing.  <em>q_width</em> must be greater than zero.</p>
1365</dd></dl>
1366
1367<dl class="function">
1368<dt id="sasmodels.resolution.q_to_u">
1369<tt class="descclassname">sasmodels.resolution.</tt><tt class="descname">q_to_u</tt><big>(</big><em>q</em>, <em>q0</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.q_to_u" title="Permalink to this definition">¶</a></dt>
1370<dd><p>Convert <em>q</em> values to <em>u</em> values for the integral computed at <em>q0</em>.</p>
1371</dd></dl>
1372
1373<dl class="function">
1374<dt id="sasmodels.resolution.romberg_pinhole_1d">
1375<tt class="descclassname">sasmodels.resolution.</tt><tt class="descname">romberg_pinhole_1d</tt><big>(</big><em>q</em>, <em>q_width</em>, <em>form</em>, <em>pars</em>, <em>nsigma=5</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.romberg_pinhole_1d" title="Permalink to this definition">¶</a></dt>
1376<dd><p>Romberg integration for pinhole resolution.</p>
1377<p>This is an adaptive integration technique.  It is called with settings
1378that make it slow to evaluate but give it good accuracy.</p>
1379</dd></dl>
1380
1381<dl class="function">
1382<dt id="sasmodels.resolution.romberg_slit_1d">
1383<tt class="descclassname">sasmodels.resolution.</tt><tt class="descname">romberg_slit_1d</tt><big>(</big><em>q</em>, <em>delta_qv</em>, <em>form</em>, <em>pars</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.romberg_slit_1d" title="Permalink to this definition">¶</a></dt>
1384<dd><p>Romberg integration for slit resolution.</p>
1385<p>This is an adaptive integration technique.  It is called with settings
1386that make it slow to evaluate but give it good accuracy.</p>
1387</dd></dl>
1388
1389<dl class="function">
1390<dt id="sasmodels.resolution.slit_extend_q">
1391<tt class="descclassname">sasmodels.resolution.</tt><tt class="descname">slit_extend_q</tt><big>(</big><em>q</em>, <em>width</em>, <em>height</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.slit_extend_q" title="Permalink to this definition">¶</a></dt>
1392<dd><p>Given <em>q</em>, <em>width</em> and <em>height</em>, find a set of sampling points <em>q_calc</em> so
1393that each point I(q) has sufficient support from the underlying
1394function.</p>
1395</dd></dl>
1396
1397<dl class="function">
1398<dt id="sasmodels.resolution.slit_resolution">
1399<tt class="descclassname">sasmodels.resolution.</tt><tt class="descname">slit_resolution</tt><big>(</big><em>q_calc</em>, <em>q</em>, <em>width</em>, <em>height</em><big>)</big><a class="headerlink" href="#sasmodels.resolution.slit_resolution" title="Permalink to this definition">¶</a></dt>
1400<dd><p>Build a weight matrix to compute <em>I_s(q)</em> from <em>I(q_calc)</em>, given
1401<span class="math">\(q_v\)</span> = <em>width</em> and <span class="math">\(q_h\)</span> = <em>height</em>.</p>
1402<p><em>width</em> and <em>height</em> are scalars since current instruments use the
1403same slit settings for all measurement points.</p>
1404<p>If slit height is large relative to width, use:</p>
1405<div class="math">
1406\[I_s(q_o) = \frac{1}{\Delta q_v}
1407    \int_0^{\Delta q_v} I(\sqrt{q_o^2 + u^2} du\]</div>
1408<p>If slit width is large relative to height, use:</p>
1409<div class="math">
1410\[I_s(q_o) = \frac{1}{2 \Delta q_v}
1411    \int_{-\Delta q_v}^{\Delta q_v} I(u) du\]</div>
1412</dd></dl>
1413
1414</div>
1415</div>
1416
1417
1418      </div>
1419      <div class="bottomnav">
1420     
1421        <p>
1422        «&#160;&#160;<a href="model_test.html">3.10. Unit test support</a>
1423        &#160;&#160;::&#160;&#160;
1424        <a class="uplink" href="../index.html">Contents</a>
1425        &#160;&#160;::&#160;&#160;
1426        <a href="resolution2d.html">3.12. 2-D resolution functions</a>&#160;&#160;»
1427        </p>
1428
1429      </div>
1430
1431    <div class="footer">
1432        &copy; Copyright 2014, sasview team.
1433      Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.2.3.
1434    </div>
1435  </body>
1436</html>
Note: See TracBrowser for help on using the repository browser.