#NEWLINE# def __init__( self , parent , titleString , tempdata ) : #NEWLINE# #INDENT# wx . Panel . __init__ ( self , parent = parent , id = wx . ID_ANY ) #NEWLINE# self . text = wx . TextCtrl ( self , ( - 1 ) , '' , style = ( ( ( wx . TE_MULTILINE | wx . HSCROLL ) | wx . VSCROLL ) | wx . TE_READONLY ) ) #NEWLINE# self . text . AppendText ( ( titleString + '\n\n' ) ) #NEWLINE# minData = min ( tempdata ) #NEWLINE# maxData = max ( tempdata ) #NEWLINE# if ( maxData == minData ) : #NEWLINE# #INDENT# self . text . AppendText ( 'All data has the same value,\n' ) #NEWLINE# self . text . AppendText ( ( 'value = %-.16E\n' % minData ) ) #NEWLINE# self . text . AppendText ( 'statistics cannot be calculated.' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . text . AppendText ( ( 'max = %-.16E\n' % maxData ) ) #NEWLINE# self . text . AppendText ( ( 'min = %-.16E\n' % minData ) ) #NEWLINE# try : #NEWLINE# #INDENT# temp = scipy . mean ( parent ) #NEWLINE# self . text . AppendText ( ( 'mean = %-.16E\n' % temp ) ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# self . text . AppendText ( 'mean gave error in calculation\n' ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# temp = scipy . stats . sem ( tempdata ) #NEWLINE# self . text . AppendText ( ( 'standard error of mean = %-.16E\n' % temp ) ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# self . text . AppendText ( 'standard error of mean gave error in calculation\n' ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# temp = scipy . median ( tempdata ) #NEWLINE# self . text . AppendText ( ( 'median = %-.16E\n' % temp ) ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# self . text . AppendText ( 'median gave error in calculation\n' ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# temp = scipy . var ( tempdata ) #NEWLINE# self . text . AppendText ( ( 'variance = %-.16E\n' % temp ) ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# self . text . AppendText ( 'variance gave error in calculation\n' ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# temp = scipy . std ( tempdata ) #NEWLINE# self . text . AppendText ( ( 'std. deviation = %-.16E\n' % temp ) ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# self . text . AppendText ( 'std. deviation gave error in calculation\n' ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# temp = scipy . stats . skew ( tempdata ) #NEWLINE# self . text . AppendText ( ( 'skew = %-.16E\n' % temp ) ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# self . text . AppendText ( 'skew gave error in calculation\n' ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# temp = scipy . stats . kurtosis ( tempdata ) #NEWLINE# self . text . AppendText ( ( 'kurtosis = %-.16E\n' % temp ) ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# self . text . AppendText ( 'kurtosis gave error in calculation\n' ) #NEWLINE# #UNINDENT# #UNINDENT# sizer = wx . BoxSizer ( ) #NEWLINE# sizer . Add ( self . text , 1 , wx . EXPAND ) #NEWLINE# self . SetSizer ( sizer ) #NEWLINE# self . Fit ( )