original_docstring: Load historic data and calculate histogram
docstring: Load historic data and calculate histogram
docstring_tokens: Load historic data and calculate histogram
code: def historic(self):
          """Load historic data and calculate histogram"""
          LOG.info("Processing historic track records")
          config = ConfigParser()
          config.read(self.configFile)
          inputFile = config.get('DataProcess', 'InputFile')
          if len(os.path.dirname(inputFile)) == 0:
              inputFile = pjoin(self.inputPath, inputFile)
  
          source = config.get('DataProcess', 'Source')
  
          try:
              tracks = loadTrackFile(self.configFile, inputFile, source)
  
          except (TypeError, IOError, ValueError):
              LOG.critical("Cannot load historical track file: {0}".\
                           format(inputFile))
              raise
          else:
              startYr = 9999
              endYr = 0
              for t in tracks:
                  startYr = min(startYr, min(t.Year))
                  endYr = max(endYr, max(t.Year))
              numYears = endYr - startYr
              LOG.info("Range of years: %d - %d" % (startYr, endYr))
              self.hist = self._calculate(tracks)
              #self.hist = self._calculate(tracks) / numYears
code_tokens: def historic ( self ) : LOG . info ( "Processing historic track records" ) config = ConfigParser ( ) config . read ( self . configFile ) inputFile = config . get ( 'DataProcess' , 'InputFile' ) if len ( os . path . dirname ( inputFile ) ) == 0 : inputFile = pjoin ( self . inputPath , inputFile ) source = config . get ( 'DataProcess' , 'Source' ) try : tracks = loadTrackFile ( self . configFile , inputFile , source ) except ( TypeError , IOError , ValueError ) : LOG . critical ( "Cannot load historical track file: {0}" . format ( inputFile ) ) raise else : startYr = 9999 endYr = 0 for t in tracks : startYr = min ( startYr , min ( t . Year ) ) endYr = max ( endYr , max ( t . Year ) ) numYears = endYr - startYr LOG . info ( "Range of years: %d - %d" % ( startYr , endYr ) ) self . hist = self . _calculate ( tracks )
short_docstring: Load historic data and calculate histogram
short_docstring_tokens: Load historic data and calculate histogram
comment: """Load historic data and calculate histogram"""$SEP$#self.hist = self._calculate(tracks) / numYears