#NEWLINE# def test_q_twotheta_conversion( ) : #NEWLINE# #INDENT# wavelength = 1 #NEWLINE# q = np . linspace ( 0 , ( 4 * np . pi ) , 100 ) #NEWLINE# assert_array_almost_equal ( q , core . twotheta_to_q ( core . q_to_twotheta ( q , wavelength ) , wavelength ) , decimal = 12 ) #NEWLINE# two_theta = np . linspace ( 0 , np . pi , 100 ) #NEWLINE# assert_array_almost_equal ( two_theta , core . q_to_twotheta ( core . twotheta_to_q ( q , wavelength ) , wavelength ) , decimal = 12 )