コード例 #1
0
ファイル: fft_base.py プロジェクト: vitale82/pycbc
 def test_rev_complex_arr(self):
     for rev_dtype in [complex64, complex128]:
         # Don't do separate even/odd tests for complex
         inarr = ar(self.in_c2c_rev, dtype=rev_dtype)
         outexp = ar(self.out_c2c_rev, dtype=rev_dtype)
         _test_ifft(self, inarr, outexp, self.tdict[rev_dtype])
         # Random---we don't do that in 'reverse' tests, since both
         # directions are already tested in forward, and if we just passed
         # in arrays in the other order we'd only get exceptions
         #
         # Check that exceptions are raised.  Need input and
         # output arrays; just reuse inarr and outexp (values won't
         # matter, we're just checking exceptions).
         _test_raise_excep_ifft(self, inarr, outexp)
コード例 #2
0
ファイル: fft_base.py プロジェクト: bema-ligo/pycbc
 def test_rev_complex_arr(self):
     for rev_dtype in [complex64,complex128]:
         # Don't do separate even/odd tests for complex
         inarr = ar(self.in_c2c_rev,dtype=rev_dtype)
         outexp = ar(self.out_c2c_rev,dtype=rev_dtype)
         _test_ifft(self,inarr,outexp,self.tdict[rev_dtype])
         # Random---we don't do that in 'reverse' tests, since both
         # directions are already tested in forward, and if we just passed
         # in arrays in the other order we'd only get exceptions
         #
         # Check that exceptions are raised.  Need input and
         # output arrays; just reuse inarr and outexp (values won't
         # matter, we're just checking exceptions).
         _test_raise_excep_ifft(self,inarr,outexp)
コード例 #3
0
ファイル: fft_base.py プロジェクト: vitale82/pycbc
 def test_fwd_complex_arr(self):
     for fwd_dtype in [complex64, complex128]:
         # Don't do separate even/odd tests for complex
         inarr = ar(self.in_c2c_fwd, dtype=fwd_dtype)
         outexp = ar(self.out_c2c_fwd, dtype=fwd_dtype)
         _test_fft(self, inarr, outexp, self.tdict[fwd_dtype])
         # Random
         rand_inarr = ar(zeros(self.rand_len_c, dtype=fwd_dtype))
         rand_outarr = ar(zeros(self.rand_len_c, dtype=fwd_dtype))
         _test_random(self, rand_inarr, rand_outarr, self.tdict[fwd_dtype])
         # Clean these up since they could be big:
         del rand_inarr
         del rand_outarr
         # Check that exceptions are raised.  Need input and
         # output arrays; just reuse inarr and outexp (values won't
         # matter, we're just checking exceptions).
         _test_raise_excep_fft(self, inarr, outexp)
コード例 #4
0
ファイル: fft_base.py プロジェクト: bema-ligo/pycbc
 def test_fwd_complex_arr(self):
     for fwd_dtype in [complex64,complex128]:
         # Don't do separate even/odd tests for complex
         inarr = ar(self.in_c2c_fwd,dtype=fwd_dtype)
         outexp = ar(self.out_c2c_fwd,dtype=fwd_dtype)
         _test_fft(self,inarr,outexp,self.tdict[fwd_dtype])
         # Random
         rand_inarr = ar(zeros(self.rand_len_c,dtype=fwd_dtype))
         rand_outarr = ar(zeros(self.rand_len_c,dtype=fwd_dtype))
         _test_random(self,rand_inarr,rand_outarr,self.tdict[fwd_dtype])
         # Clean these up since they could be big:
         del rand_inarr
         del rand_outarr
         # Check that exceptions are raised.  Need input and
         # output arrays; just reuse inarr and outexp (values won't
         # matter, we're just checking exceptions).
         _test_raise_excep_fft(self,inarr,outexp)
コード例 #5
0
ファイル: fft_base.py プロジェクト: vitale82/pycbc
 def test_rev_real_arr(self):
     for rev_dtype in [float32, float64]:
         # Even input
         inarr = ar(self.in_c2r_e, dtype=_other_kind[rev_dtype])
         outexp = ar(self.out_c2r_e, dtype=rev_dtype)
         _test_ifft(self, inarr, outexp, self.tdict[rev_dtype])
         # Odd input
         inarr = ar(self.in_c2r_o, dtype=_other_kind[rev_dtype])
         outexp = ar(self.out_c2r_o, dtype=rev_dtype)
         _test_ifft(self, inarr, outexp, self.tdict[rev_dtype])
         # Random---we don't do that in 'reverse' tests, since both
         # directions are already tested in forward, and if we just passed
         # in arrays in the other order we'd only get exceptions
         #
         # Check that exceptions are raised.  Need input and
         # output arrays; just reuse inarr and outexp (values won't
         # matter, we're just checking exceptions).
         _test_raise_excep_ifft(self, inarr, outexp)
コード例 #6
0
ファイル: fft_base.py プロジェクト: bema-ligo/pycbc
 def test_rev_real_arr(self):
     for rev_dtype in [float32,float64]:
         # Even input
         inarr = ar(self.in_c2r_e,dtype=_other_kind[rev_dtype])
         outexp = ar(self.out_c2r_e,dtype=rev_dtype)
         _test_ifft(self,inarr,outexp,self.tdict[rev_dtype])
         # Odd input
         inarr = ar(self.in_c2r_o,dtype=_other_kind[rev_dtype])
         outexp = ar(self.out_c2r_o,dtype=rev_dtype)
         _test_ifft(self,inarr,outexp,self.tdict[rev_dtype])
         # Random---we don't do that in 'reverse' tests, since both
         # directions are already tested in forward, and if we just passed
         # in arrays in the other order we'd only get exceptions
         #
         # Check that exceptions are raised.  Need input and
         # output arrays; just reuse inarr and outexp (values won't
         # matter, we're just checking exceptions).
         _test_raise_excep_ifft(self,inarr,outexp)
コード例 #7
0
ファイル: fft_base.py プロジェクト: bema-ligo/pycbc
 def test_fwd_real_arr(self):
     for fwd_dtype in [float32,float64]:
         # Even input
         inarr = ar(self.in_r2c_e,dtype=fwd_dtype)
         outexp = ar(self.out_r2c_e,dtype=_other_kind[fwd_dtype])
         _test_fft(self,inarr,outexp,self.tdict[fwd_dtype])
         # Odd input
         inarr = ar(self.in_r2c_o,dtype=fwd_dtype)
         outexp = ar(self.out_r2c_o,dtype=_other_kind[fwd_dtype])
         _test_fft(self,inarr,outexp,self.tdict[fwd_dtype])
         # Random
         rand_inarr = ar(zeros(self.rand_len_r,dtype=fwd_dtype))
         rand_outarr = ar(zeros(self.rand_len_c,dtype=_other_kind[fwd_dtype]))
         _test_random(self,rand_inarr,rand_outarr,self.tdict[fwd_dtype])
         # Clean these up since they could be big:
         del rand_inarr
         del rand_outarr
         # Check that exceptions are raised.  Need input and
         # output arrays; just reuse inarr and outexp (values won't
         # matter, we're just checking exceptions).
         _test_raise_excep_fft(self,inarr,outexp)
コード例 #8
0
ファイル: fft_base.py プロジェクト: vitale82/pycbc
 def test_fwd_real_arr(self):
     for fwd_dtype in [float32, float64]:
         # Even input
         inarr = ar(self.in_r2c_e, dtype=fwd_dtype)
         outexp = ar(self.out_r2c_e, dtype=_other_kind[fwd_dtype])
         _test_fft(self, inarr, outexp, self.tdict[fwd_dtype])
         # Odd input
         inarr = ar(self.in_r2c_o, dtype=fwd_dtype)
         outexp = ar(self.out_r2c_o, dtype=_other_kind[fwd_dtype])
         _test_fft(self, inarr, outexp, self.tdict[fwd_dtype])
         # Random
         rand_inarr = ar(zeros(self.rand_len_r, dtype=fwd_dtype))
         rand_outarr = ar(
             zeros(self.rand_len_c, dtype=_other_kind[fwd_dtype]))
         _test_random(self, rand_inarr, rand_outarr, self.tdict[fwd_dtype])
         # Clean these up since they could be big:
         del rand_inarr
         del rand_outarr
         # Check that exceptions are raised.  Need input and
         # output arrays; just reuse inarr and outexp (values won't
         # matter, we're just checking exceptions).
         _test_raise_excep_fft(self, inarr, outexp)