code: def get_segments(ptrms, ptrm_checks, tmax):
      
      ptrms_included = []
      checks_included = []
      ptrms = numpy.array(ptrms)
      for ptrm in ptrms:
          if ptrm[0] <= tmax:
              ptrms_included.append(ptrm)
      for check in ptrm_checks:
          if check[0] <= tmax:
              checks_included.append(check)
      #print "checks", ptrm_checks
      #print "checks_included", checks_included
      return ptrms_included, checks_included
docs: input: ptrms, ptrm_checks, tmax
      grabs ptrms that are done below tmax
      grabs ptrm checks that are done below tmax AND whose starting temp is below tmax
      output: ptrms_included, checks_included