parameters: (cls, parent)
return_statement: return data
docstring: Function to calculate points in chart
docstring_summary: Function to calculate points in chart
docstring_tokens: Function to calculate points in chart
function: def calculatePlot(cls, parent):
          """Function to calculate points in chart"""
  
          data = {}
          P = Preferences.getfloat("General", "P")
          P_kPa = P / 1000
          t = cls.LineList("isotdb", Preferences)
  
          # Saturation line
          Hs = []
          for tdb in t:
              Hs.append(HAProps("W", "P", P_kPa, "Tdb", tdb, "RH", 1))
              parent.progressBar.setValue(5 * len(Hs) / len(t))
          data["t"] = t
          data["Hs"] = Hs
  
          # left limit of isow lines
          H = cls.LineList("isow", Preferences)
          th = []
          for w in H:
              if w:
                  tdp = HAProps("Tdp", "P", 101.325, "W", w, "RH", 1)
                  th.append(tdp - 273.15)
              else:
                  tmin = Preferences.getfloat("Psychr", "isotdbStart")
                  th.append(tmin - 273.15)
          data["H"] = H
          data["th"] = th
  
          # Humidity ratio lines
          hr = cls.LineList("isohr", Preferences)
          Hr = {}
          cont = 0
          for i in hr:
              Hr[i] = []
              for tdb in t:
                  Hr[i].append(HAProps("W", "P", P_kPa, "Tdb", tdb, "RH", i / 100.))
                  cont += 1
                  parent.progressBar.setValue(5 + 10 * cont / len(hr) / len(Hs))
          data["Hr"] = Hr
  
          # Twb
          lines = cls.LineList("isotwb", Preferences)
          Twb = {}
          cont = 0
          for T in lines:
              ws = HAProps("W", "P", P_kPa, "RH", 1, "Tdb", T)
              H = [ws, 0]
              Tw = [T - 273.15, HAProps("Tdb", "P", P_kPa, "Twb", T, "RH", 0) - 273.15]
              cont += 1
              parent.progressBar.setValue(15 + 75 * cont / len(lines))
              Twb[T] = (H, Tw)
          data["Twb"] = Twb
  
          # v
          lines = cls.LineList("isochor", Preferences)
          V = {}
          rh = np.arange(1, -0.05, -0.05)
          for cont, v in enumerate(lines):
              w = []
              Td = []
              for r in rh:
                  w.append(HAProps("W", "P", P_kPa, "RH", r, "V", v))
                  Td.append(HAProps("Tdb", "P", P_kPa, "RH", r, "V", v) - 273.15)
              parent.progressBar.setValue(90 + 10 * cont / len(lines))
              V[v] = (Td, w)
          data["v"] = V
  
          return data
function_tokens: def calculatePlot ( cls , parent ) : data = { } P = Preferences . getfloat ( "General" , "P" ) P_kPa = P / 1000 t = cls . LineList ( "isotdb" , Preferences ) # Saturation line Hs = [ ] for tdb in t : Hs . append ( HAProps ( "W" , "P" , P_kPa , "Tdb" , tdb , "RH" , 1 ) ) parent . progressBar . setValue ( 5 * len ( Hs ) / len ( t ) ) data [ "t" ] = t data [ "Hs" ] = Hs # left limit of isow lines H = cls . LineList ( "isow" , Preferences ) th = [ ] for w in H : if w : tdp = HAProps ( "Tdp" , "P" , 101.325 , "W" , w , "RH" , 1 ) th . append ( tdp - 273.15 ) else : tmin = Preferences . getfloat ( "Psychr" , "isotdbStart" ) th . append ( tmin - 273.15 ) data [ "H" ] = H data [ "th" ] = th # Humidity ratio lines hr = cls . LineList ( "isohr" , Preferences ) Hr = { } cont = 0 for i in hr : Hr [ i ] = [ ] for tdb in t : Hr [ i ] . append ( HAProps ( "W" , "P" , P_kPa , "Tdb" , tdb , "RH" , i / 100. ) ) cont += 1 parent . progressBar . setValue ( 5 + 10 * cont / len ( hr ) / len ( Hs ) ) data [ "Hr" ] = Hr # Twb lines = cls . LineList ( "isotwb" , Preferences ) Twb = { } cont = 0 for T in lines : ws = HAProps ( "W" , "P" , P_kPa , "RH" , 1 , "Tdb" , T ) H = [ ws , 0 ] Tw = [ T - 273.15 , HAProps ( "Tdb" , "P" , P_kPa , "Twb" , T , "RH" , 0 ) - 273.15 ] cont += 1 parent . progressBar . setValue ( 15 + 75 * cont / len ( lines ) ) Twb [ T ] = ( H , Tw ) data [ "Twb" ] = Twb # v lines = cls . LineList ( "isochor" , Preferences ) V = { } rh = np . arange ( 1 , - 0.05 , - 0.05 ) for cont , v in enumerate ( lines ) : w = [ ] Td = [ ] for r in rh : w . append ( HAProps ( "W" , "P" , P_kPa , "RH" , r , "V" , v ) ) Td . append ( HAProps ( "Tdb" , "P" , P_kPa , "RH" , r , "V" , v ) - 273.15 ) parent . progressBar . setValue ( 90 + 10 * cont / len ( lines ) ) V [ v ] = ( Td , w ) data [ "v" ] = V return data