docs: def tcalc(nf, p):
      """
       t-table for nf degrees of freedom (95% confidence)
      """
  #
      if p == .05:
          if nf > 2:
              t = 4.3027
          if nf > 3:
              t = 3.1824
          if nf > 4:
              t = 2.7765
          if nf > 5:
              t = 2.5706
          if nf > 6:
              t = 2.4469
          if nf > 7:
              t = 2.3646
          if nf > 8:
              t = 2.3060
          if nf > 9:
              t = 2.2622
          if nf > 10:
              t = 2.2281
          if nf > 11:
              t = 2.2010
          if nf > 12:
              t = 2.1788
          if nf > 13:
              t = 2.1604
          if nf > 14:
              t = 2.1448
          if nf > 15:
              t = 2.1315
          if nf > 16:
              t = 2.1199
          if nf > 17:
              t = 2.1098
          if nf > 18:
              t = 2.1009
          if nf > 19:
              t = 2.0930
          if nf > 20:
              t = 2.0860
          if nf > 21:
              t = 2.0796
          if nf > 22:
              t = 2.0739
          if nf > 23:
              t = 2.0687
          if nf > 24:
              t = 2.0639
          if nf > 25:
              t = 2.0595
          if nf > 26:
              t = 2.0555
          if nf > 27:
              t = 2.0518
          if nf > 28:
              t = 2.0484
          if nf > 29:
              t = 2.0452
          if nf > 30:
              t = 2.0423
          if nf > 31:
              t = 2.0395
          if nf > 32:
              t = 2.0369
          if nf > 33:
              t = 2.0345
          if nf > 34:
              t = 2.0322
          if nf > 35:
              t = 2.0301
          if nf > 36:
              t = 2.0281
          if nf > 37:
              t = 2.0262
          if nf > 38:
              t = 2.0244
          if nf > 39:
              t = 2.0227
          if nf > 40:
              t = 2.0211
          if nf > 41:
              t = 2.0195
          if nf > 42:
              t = 2.0181
          if nf > 43:
              t = 2.0167
          if nf > 44:
              t = 2.0154
          if nf > 45:
              t = 2.0141
          if nf > 46:
              t = 2.0129
          if nf > 47:
              t = 2.0117
          if nf > 48:
              t = 2.0106
          if nf > 49:
              t = 2.0096
          if nf > 50:
              t = 2.0086
          if nf > 51:
              t = 2.0076
          if nf > 52:
              t = 2.0066
          if nf > 53:
              t = 2.0057
          if nf > 54:
              t = 2.0049
          if nf > 55:
              t = 2.0040
          if nf > 56:
              t = 2.0032
          if nf > 57:
              t = 2.0025
          if nf > 58:
              t = 2.0017
          if nf > 59:
              t = 2.0010
          if nf > 60:
              t = 2.0003
          if nf > 61:
              t = 1.9996
          if nf > 62:
              t = 1.9990
          if nf > 63:
              t = 1.9983
          if nf > 64:
              t = 1.9977
          if nf > 65:
              t = 1.9971
          if nf > 66:
              t = 1.9966
          if nf > 67:
              t = 1.9960
          if nf > 68:
              t = 1.9955
          if nf > 69:
              t = 1.9949
          if nf > 70:
              t = 1.9944
          if nf > 71:
              t = 1.9939
          if nf > 72:
              t = 1.9935
          if nf > 73:
              t = 1.9930
          if nf > 74:
              t = 1.9925
          if nf > 75:
              t = 1.9921
          if nf > 76:
              t = 1.9917
          if nf > 77:
              t = 1.9913
          if nf > 78:
              t = 1.9908
          if nf > 79:
              t = 1.9905
          if nf > 80:
              t = 1.9901
          if nf > 81:
              t = 1.9897
          if nf > 82:
              t = 1.9893
          if nf > 83:
              t = 1.9890
          if nf > 84:
              t = 1.9886
          if nf > 85:
              t = 1.9883
          if nf > 86:
              t = 1.9879
          if nf > 87:
              t = 1.9876
          if nf > 88:
              t = 1.9873
          if nf > 89:
              t = 1.9870
          if nf > 90:
              t = 1.9867
          if nf > 91:
              t = 1.9864
          if nf > 92:
              t = 1.9861
          if nf > 93:
              t = 1.9858
          if nf > 94:
              t = 1.9855
          if nf > 95:
              t = 1.9852
          if nf > 96:
              t = 1.9850
          if nf > 97:
              t = 1.9847
          if nf > 98:
              t = 1.9845
          if nf > 99:
              t = 1.9842
          if nf > 100:
              t = 1.9840
          return t
  #
      elif p == .01:
          if nf > 2:
              t = 9.9250
          if nf > 3:
              t = 5.8408
          if nf > 4:
              t = 4.6041
          if nf > 5:
              t = 4.0321
          if nf > 6:
              t = 3.7074
          if nf > 7:
              t = 3.4995
          if nf > 8:
              t = 3.3554
          if nf > 9:
              t = 3.2498
          if nf > 10:
              t = 3.1693
          if nf > 11:
              t = 3.1058
          if nf > 12:
              t = 3.0545
          if nf > 13:
              t = 3.0123
          if nf > 14:
              t = 2.9768
          if nf > 15:
              t = 2.9467
          if nf > 16:
              t = 2.9208
          if nf > 17:
              t = 2.8982
          if nf > 18:
              t = 2.8784
          if nf > 19:
              t = 2.8609
          if nf > 20:
              t = 2.8453
          if nf > 21:
              t = 2.8314
          if nf > 22:
              t = 2.8188
          if nf > 23:
              t = 2.8073
          if nf > 24:
              t = 2.7970
          if nf > 25:
              t = 2.7874
          if nf > 26:
              t = 2.7787
          if nf > 27:
              t = 2.7707
          if nf > 28:
              t = 2.7633
          if nf > 29:
              t = 2.7564
          if nf > 30:
              t = 2.7500
          if nf > 31:
              t = 2.7440
          if nf > 32:
              t = 2.7385
          if nf > 33:
              t = 2.7333
          if nf > 34:
              t = 2.7284
          if nf > 35:
              t = 2.7238
          if nf > 36:
              t = 2.7195
          if nf > 37:
              t = 2.7154
          if nf > 38:
              t = 2.7116
          if nf > 39:
              t = 2.7079
          if nf > 40:
              t = 2.7045
          if nf > 41:
              t = 2.7012
          if nf > 42:
              t = 2.6981
          if nf > 43:
              t = 2.6951
          if nf > 44:
              t = 2.6923
          if nf > 45:
              t = 2.6896
          if nf > 46:
              t = 2.6870
          if nf > 47:
              t = 2.6846
          if nf > 48:
              t = 2.6822
          if nf > 49:
              t = 2.6800
          if nf > 50:
              t = 2.6778
          if nf > 51:
              t = 2.6757
          if nf > 52:
              t = 2.6737
          if nf > 53:
              t = 2.6718
          if nf > 54:
              t = 2.6700
          if nf > 55:
              t = 2.6682
          if nf > 56:
              t = 2.6665
          if nf > 57:
              t = 2.6649
          if nf > 58:
              t = 2.6633
          if nf > 59:
              t = 2.6618
          if nf > 60:
              t = 2.6603
          if nf > 61:
              t = 2.6589
          if nf > 62:
              t = 2.6575
          if nf > 63:
              t = 2.6561
          if nf > 64:
              t = 2.6549
          if nf > 65:
              t = 2.6536
          if nf > 66:
              t = 2.6524
          if nf > 67:
              t = 2.6512
          if nf > 68:
              t = 2.6501
          if nf > 69:
              t = 2.6490
          if nf > 70:
              t = 2.6479
          if nf > 71:
              t = 2.6469
          if nf > 72:
              t = 2.6458
          if nf > 73:
              t = 2.6449
          if nf > 74:
              t = 2.6439
          if nf > 75:
              t = 2.6430
          if nf > 76:
              t = 2.6421
          if nf > 77:
              t = 2.6412
          if nf > 78:
              t = 2.6403
          if nf > 79:
              t = 2.6395
          if nf > 80:
              t = 2.6387
          if nf > 81:
              t = 2.6379
          if nf > 82:
              t = 2.6371
          if nf > 83:
              t = 2.6364
          if nf > 84:
              t = 2.6356
          if nf > 85:
              t = 2.6349
          if nf > 86:
              t = 2.6342
          if nf > 87:
              t = 2.6335
          if nf > 88:
              t = 2.6329
          if nf > 89:
              t = 2.6322
          if nf > 90:
              t = 2.6316
          if nf > 91:
              t = 2.6309
          if nf > 92:
              t = 2.6303
          if nf > 93:
              t = 2.6297
          if nf > 94:
              t = 2.6291
          if nf > 95:
              t = 2.6286
          if nf > 96:
              t = 2.6280
          if nf > 97:
              t = 2.6275
          if nf > 98:
              t = 2.6269
          if nf > 99:
              t = 2.6264
          if nf > 100:
              t = 2.6259
          return t
          return t
      else:
          return 0