Ejemplo n.º 1
0
 def test_to_and_from_ascii(self, saxs_benchmark):
     saxs_prop_ref = ps.SaxsProperty()
     saxs_prop_ref.from_crysol_int(saxs_benchmark['crysol_int'])
     saxs_prop = ps.SaxsProperty()
     with tempfile.NamedTemporaryFile() as f:
         saxs_prop_ref.to_ascii(f.name)
         saxs_prop.from_ascii(f.name)
     np.testing.assert_array_almost_equal(
         saxs_prop.qvalues, saxs_prop_ref.qvalues)
Ejemplo n.º 2
0
 def test_from_crysol_pdb(self, saxs_benchmark):
     saxs_prop = ps.SaxsProperty()
     saxs_prop.from_crysol_pdb(saxs_benchmark['crysol_pdb'], args='')
     saxs_prop_ref = ps.SaxsProperty()
     saxs_prop_ref.from_crysol_int(saxs_benchmark['crysol_int'])
     np.testing.assert_array_almost_equal(
         saxs_prop.qvalues, saxs_prop_ref.qvalues)
     np.testing.assert_array_almost_equal(
         saxs_prop.profile, saxs_prop_ref.profile)
Ejemplo n.º 3
0
 def test_default_name(self):
     saxs_prop = ps.SaxsProperty()
     assert saxs_prop.name == 'saxs'
Ejemplo n.º 4
0
 def test_from_crysol_int(self, saxs_benchmark):
     saxs_prop = ps.SaxsProperty()
     saxs_prop.from_crysol_int(saxs_benchmark['crysol_file'])
     assert saxs_prop.qvalues[8] == 0.008
     assert saxs_prop.profile[8] == 1740900.0
     assert saxs_prop.errors[8] == 0.0