#NEWLINE# def test_byteswap( self ) : #NEWLINE# #INDENT# p = fits . PrimaryHDU ( ) #NEWLINE# l = fits . HDUList ( ) #NEWLINE# n = np . zeros ( 3 , dtype = 'i2' ) #NEWLINE# n [ 0 ] = 1 #NEWLINE# n [ 1 ] = 60000 #NEWLINE# n [ 2 ] = 2 #NEWLINE# c = fits . Column ( name = 'foo' , format = 'i2' , bscale = 1 , bzero = 32768 , array = n ) #NEWLINE# t = fits . BinTableHDU . from_columns ( [ c ] ) #NEWLINE# l . append ( n ) #NEWLINE# l . append ( t ) #NEWLINE# l . writeto ( self . temp ( 'test.fits' ) , clobber = True ) #NEWLINE# with fits . open ( self . temp ( 'test.fits' ) ) as p : #NEWLINE# #INDENT# assert ( p [ 1 ] . data [ 1 ] [ 'foo' ] == 60000.0 )