Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1""" 

2Summary Table formating 

3This is here to help keep the formating consistent across the different models 

4""" 

5import copy 

6 

7gen_fmt = { 

8 "data_fmts": ["%s", "%s", "%s", "%s", "%s"], 

9 "empty_cell": '', 

10 "colwidths": 7, 

11 "colsep": ' ', 

12 "row_pre": ' ', 

13 "row_post": ' ', 

14 "table_dec_above": '": ', 

15 "table_dec_below": None, 

16 "header_dec_below": None, 

17 "header_fmt": '%s', 

18 "stub_fmt": '%s', 

19 "title_align": 'c', 

20 "header_align": 'r', 

21 "data_aligns": "r", 

22 "stubs_align": "l", 

23 "fmt": 'txt' 

24} 

25 

26# Note table_1l_fmt over rides the below formating unless it is not 

27# appended to table_1l 

28fmt_1_right = { 

29 "data_fmts": ["%s", "%s", "%s", "%s", "%s"], 

30 "empty_cell": '', 

31 "colwidths": 16, 

32 "colsep": ' ', 

33 "row_pre": '', 

34 "row_post": '', 

35 "table_dec_above": '": ', 

36 "table_dec_below": None, 

37 "header_dec_below": None, 

38 "header_fmt": '%s', 

39 "stub_fmt": '%s', 

40 "title_align": 'c', 

41 "header_align": 'r', 

42 "data_aligns": "r", 

43 "stubs_align": "l", 

44 "fmt": 'txt' 

45} 

46 

47fmt_2 = { 

48 "data_fmts": ["%s", "%s", "%s", "%s"], 

49 "empty_cell": '', 

50 "colwidths": 10, 

51 "colsep": ' ', 

52 "row_pre": ' ', 

53 "row_post": ' ', 

54 "table_dec_above": '": ', 

55 "table_dec_below": '": ', 

56 "header_dec_below": '-', 

57 "header_fmt": '%s', 

58 "stub_fmt": '%s', 

59 "title_align": 'c', 

60 "header_align": 'r', 

61 "data_aligns": 'r', 

62 "stubs_align": 'l', 

63 "fmt": 'txt' 

64} 

65 

66 

67# new version # TODO: as of when? compared to what? is old version needed? 

68fmt_base = { 

69 "data_fmts": ["%s", "%s", "%s", "%s", "%s"], 

70 "empty_cell": '', 

71 "colwidths": 10, 

72 "colsep": ' ', 

73 "row_pre": '', 

74 "row_post": '', 

75 "table_dec_above": '=', 

76 "table_dec_below": '=', # TODO need '=' at the last subtable 

77 "header_dec_below": '-', 

78 "header_fmt": '%s', 

79 "stub_fmt": '%s', 

80 "title_align": 'c', 

81 "header_align": 'r', 

82 "data_aligns": 'r', 

83 "stubs_align": 'l', 

84 "fmt": 'txt' 

85} 

86 

87fmt_2cols = copy.deepcopy(fmt_base) 

88 

89fmt2 = { 

90 "data_fmts": ["%18s", "-%19s", "%18s", "%19s"], # TODO: TODO: what? 

91 "colsep": ' ', 

92 "colwidths": 18, 

93 "stub_fmt": '-%21s', 

94} 

95fmt_2cols.update(fmt2) 

96 

97fmt_params = copy.deepcopy(fmt_base) 

98 

99fmt3 = { 

100 "data_fmts": ["%s", "%s", "%8s", "%s", "%11s", "%11s"], 

101} 

102fmt_params.update(fmt3) 

103 

104""" 

105Summary Table formating 

106This is here to help keep the formating consistent across the different models 

107""" 

108fmt_latex = { 

109 'colsep': ' & ', 

110 'colwidths': None, 

111 'data_aligns': 'r', 

112 'data_fmt': '%s', 

113 'data_fmts': ['%s'], 

114 'empty': '', 

115 'empty_cell': '', 

116 'fmt': 'ltx', 

117 'header': '%s', 

118 'header_align': 'c', 

119 'header_dec_below': '\\hline', 

120 'header_fmt': '%s', 

121 'missing': '--', 

122 'row_dec_below': None, 

123 'row_post': ' \\\\', 

124 'strip_backslash': True, 

125 'stub': '%s', 

126 'stub_align': 'l', 

127 'stub_fmt': '%s', 

128 'table_dec_above': '\\hline', 

129 'table_dec_below': '\\hline'} 

130 

131fmt_txt = { 

132 'colsep': ' ', 

133 'colwidths': None, 

134 'data_aligns': 'r', 

135 'data_fmts': ['%s'], 

136 'empty': '', 

137 'empty_cell': '', 

138 'fmt': 'txt', 

139 'header': '%s', 

140 'header_align': 'c', 

141 'header_dec_below': '-', 

142 'header_fmt': '%s', 

143 'missing': '--', 

144 'row_dec_below': None, 

145 'row_post': '', 

146 'row_pre': '', 

147 'stub': '%s', 

148 'stub_align': 'l', 

149 'stub_fmt': '%s', 

150 'table_dec_above': '-', 

151 'table_dec_below': None, 

152 'title_align': 'c'}