pySIMSalabim 1.1__tar.gz → 1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. {pysimsalabim-1.1 → pysimsalabim-1.2}/PKG-INFO +5 -2
  2. {pysimsalabim-1.1 → pysimsalabim-1.2}/README.md +3 -0
  3. pysimsalabim-1.2/pySIMsalabim/aux_funcs/addons.py +187 -0
  4. {pysimsalabim-1.1 → pysimsalabim-1.2}/pySIMsalabim/experiments/JV_steady_state.py +13 -1
  5. {pysimsalabim-1.1 → pysimsalabim-1.2}/pySIMsalabim/experiments/hysteresis.py +3 -2
  6. {pysimsalabim-1.1 → pysimsalabim-1.2}/pySIMsalabim/experiments/impedance.py +3 -2
  7. {pysimsalabim-1.1 → pysimsalabim-1.2}/pySIMsalabim/install/get_SIMsalabim.py +2 -2
  8. {pysimsalabim-1.1 → pysimsalabim-1.2}/pySIMsalabim/utils/general.py +9 -2
  9. {pysimsalabim-1.1 → pysimsalabim-1.2}/pySIMsalabim.egg-info/PKG-INFO +5 -2
  10. {pysimsalabim-1.1 → pysimsalabim-1.2}/setup.py +2 -2
  11. pysimsalabim-1.1/pySIMsalabim/aux_funcs/addons.py +0 -55
  12. {pysimsalabim-1.1 → pysimsalabim-1.2}/LICENSE +0 -0
  13. {pysimsalabim-1.1 → pysimsalabim-1.2}/pySIMsalabim/__init__.py +0 -0
  14. {pysimsalabim-1.1 → pysimsalabim-1.2}/pySIMsalabim/aux_funcs/SCLC_funcs.py +0 -0
  15. {pysimsalabim-1.1 → pysimsalabim-1.2}/pySIMsalabim/aux_funcs/__init__.py +0 -0
  16. {pysimsalabim-1.1 → pysimsalabim-1.2}/pySIMsalabim/experiments/CV.py +0 -0
  17. {pysimsalabim-1.1 → pysimsalabim-1.2}/pySIMsalabim/experiments/EQE.py +0 -0
  18. {pysimsalabim-1.1 → pysimsalabim-1.2}/pySIMsalabim/experiments/__init__.py +0 -0
  19. {pysimsalabim-1.1 → pysimsalabim-1.2}/pySIMsalabim/experiments/imps.py +0 -0
  20. {pysimsalabim-1.1 → pysimsalabim-1.2}/pySIMsalabim/install/__init__.py +0 -0
  21. {pysimsalabim-1.1 → pysimsalabim-1.2}/pySIMsalabim/install/compile_simsalabim.py +0 -0
  22. {pysimsalabim-1.1 → pysimsalabim-1.2}/pySIMsalabim/install/get_gnu_parallel.py +0 -0
  23. {pysimsalabim-1.1 → pysimsalabim-1.2}/pySIMsalabim/plots/__init__.py +0 -0
  24. {pysimsalabim-1.1 → pysimsalabim-1.2}/pySIMsalabim/plots/band_diagram.py +0 -0
  25. {pysimsalabim-1.1 → pysimsalabim-1.2}/pySIMsalabim/plots/plot_def.py +0 -0
  26. {pysimsalabim-1.1 → pysimsalabim-1.2}/pySIMsalabim/plots/plot_functions.py +0 -0
  27. {pysimsalabim-1.1 → pysimsalabim-1.2}/pySIMsalabim/tests/__init__.py +0 -0
  28. {pysimsalabim-1.1 → pysimsalabim-1.2}/pySIMsalabim/tests/test_CV.py +0 -0
  29. {pysimsalabim-1.1 → pysimsalabim-1.2}/pySIMsalabim/tests/test_EQE.py +0 -0
  30. {pysimsalabim-1.1 → pysimsalabim-1.2}/pySIMsalabim/tests/test_IMPS.py +0 -0
  31. {pysimsalabim-1.1 → pysimsalabim-1.2}/pySIMsalabim/tests/test_JV.py +0 -0
  32. {pysimsalabim-1.1 → pysimsalabim-1.2}/pySIMsalabim/tests/test_hyst.py +0 -0
  33. {pysimsalabim-1.1 → pysimsalabim-1.2}/pySIMsalabim/tests/test_impedance.py +0 -0
  34. {pysimsalabim-1.1 → pysimsalabim-1.2}/pySIMsalabim/utils/__init__.py +0 -0
  35. {pysimsalabim-1.1 → pysimsalabim-1.2}/pySIMsalabim/utils/clean_up.py +0 -0
  36. {pysimsalabim-1.1 → pysimsalabim-1.2}/pySIMsalabim/utils/device_parameters.py +0 -0
  37. {pysimsalabim-1.1 → pysimsalabim-1.2}/pySIMsalabim/utils/parallel_sim.py +0 -0
  38. {pysimsalabim-1.1 → pysimsalabim-1.2}/pySIMsalabim/utils/utils.py +0 -0
  39. {pysimsalabim-1.1 → pysimsalabim-1.2}/pySIMsalabim.egg-info/SOURCES.txt +0 -0
  40. {pysimsalabim-1.1 → pysimsalabim-1.2}/pySIMsalabim.egg-info/dependency_links.txt +0 -0
  41. {pysimsalabim-1.1 → pysimsalabim-1.2}/pySIMsalabim.egg-info/requires.txt +0 -0
  42. {pysimsalabim-1.1 → pysimsalabim-1.2}/pySIMsalabim.egg-info/top_level.txt +0 -0
  43. {pysimsalabim-1.1 → pysimsalabim-1.2}/setup.cfg +0 -0
@@ -1,8 +1,8 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pySIMsalabim
3
- Version: 1.1
3
+ Version: 1.2
4
4
  Home-page: https://github.com/kostergroup/pySIMsalabim
5
- Download-URL: https://github.com/kostergroup/pySIMsalabim/v1.01.tar.gz
5
+ Download-URL: https://github.com/kostergroup/pySIMsalabim/v1.02.tar.gz
6
6
  Author: Vincent M. Le Corre, Sander Heester, L. Jan Anton Koster
7
7
  Author-email:
8
8
  License: GPLv3
@@ -26,6 +26,8 @@ Provides-Extra: dev
26
26
  Requires-Dist: pytest; extra == "dev"
27
27
  Requires-Dist: twine; extra == "dev"
28
28
 
29
+ <img src="./docs/logo/pySIMsalabim_logo.png" alt="pySIMsalabim logo" width="100px">
30
+
29
31
  # pySIMsalabim
30
32
 
31
33
  ## Description
@@ -34,6 +36,7 @@ Requires-Dist: twine; extra == "dev"
34
36
  ## Authors
35
37
  * [Vincent M. Le Corre](https://github.com/VMLC-PV)
36
38
  * [Sander Heester](https://github.com/sheester)
39
+ * [Fransien Elhorst](https://github.com/Fransien-Elhorst)
37
40
  * [L. Jan Anton Koster](https://github.com/kostergroup)
38
41
 
39
42
  ## Institutions
@@ -1,3 +1,5 @@
1
+ <img src="./docs/logo/pySIMsalabim_logo.png" alt="pySIMsalabim logo" width="100px">
2
+
1
3
  # pySIMsalabim
2
4
 
3
5
  ## Description
@@ -6,6 +8,7 @@
6
8
  ## Authors
7
9
  * [Vincent M. Le Corre](https://github.com/VMLC-PV)
8
10
  * [Sander Heester](https://github.com/sheester)
11
+ * [Fransien Elhorst](https://github.com/Fransien-Elhorst)
9
12
  * [L. Jan Anton Koster](https://github.com/kostergroup)
10
13
 
11
14
  ## Institutions
@@ -0,0 +1,187 @@
1
+ """Useful helper functions for pySIMsalabim"""
2
+ ######### Package Imports #########################################################################
3
+
4
+ import numpy as np
5
+ from scipy import stats,constants
6
+
7
+ ## Physics constants
8
+ q = constants.value(u'elementary charge')
9
+ eps_0 = constants.value(u'electric constant')
10
+ kb = constants.value(u'Boltzmann constant in eV/K')
11
+
12
+ ######### Function Definitions ####################################################################
13
+
14
+ def sci_notation(number, sig_fig=2):
15
+ """Make proper scientific notation for graphs
16
+
17
+ Parameters
18
+ ----------
19
+ number : float
20
+ Number to put in scientific notation.
21
+
22
+ sig_fig : int, optional
23
+ Number of significant digits (Defaults = 2).
24
+
25
+ Returns
26
+ -------
27
+ output : str
28
+ String containing the number in scientific notation
29
+ """
30
+ if sig_fig != -1:
31
+ if number == 0:
32
+ output = '0'
33
+ else:
34
+ ret_string = "{0:.{1:d}e}".format(number, sig_fig)
35
+ a,b = ret_string.split("e")
36
+ if int(b) >= 0:
37
+ b = int(b) #removed leading "+" and strips leading zeros too.
38
+ c = ''
39
+ else:
40
+ b = abs(int(b))
41
+ c = u"\u207B" # superscript minus sign
42
+ SUP = str.maketrans("0123456789", "⁰¹²³⁴⁵⁶⁷⁸⁹")
43
+ b = str(b).translate(SUP)
44
+ output =a + ' x 10' + c + b
45
+ else:
46
+ if number == 0:
47
+ output = '0'
48
+ else:
49
+ ret_string = "{0:.{1:d}e}".format(number, 0)
50
+ a,b = ret_string.split("e")
51
+ b = int(b) #removed leading "+" and strips leading zeros too.
52
+ if int(b) >= 0:
53
+ b = int(b) #removed leading "+" and strips leading zeros too.
54
+ c = ''
55
+ else:
56
+ b = abs(int(b))
57
+ c = u"\u207B" # superscript minus sign
58
+ SUP = str.maketrans("0123456789", "⁰¹²³⁴⁵⁶⁷⁸⁹")
59
+ #SUB = str.maketrans("0123456789", "₀₁₂₃₄₅₆₇₈₉")
60
+ b = str(b).translate(SUP)
61
+ output = '10' + c + b
62
+ return output
63
+
64
+ def get_Jsc(Volt,Curr):
65
+ """Get the short-circuit current (Jsc) from solar cell JV-curve by interpolating the current at 0 V
66
+
67
+ Parameters
68
+ ----------
69
+ Volt : 1-D sequence of floats
70
+ Array containing the voltages.
71
+
72
+ Curr : 1-D sequence of floats
73
+ Array containing the current-densities.
74
+
75
+ Returns
76
+ -------
77
+ Jsc : float
78
+ Short-circuit current value
79
+ """
80
+ Jsc_dumb = np.interp(0, Volt, Curr)
81
+ return Jsc_dumb
82
+
83
+ def get_Voc(Volt,Curr):
84
+ """Get the Open-circuit voltage (Voc) from solar cell JV-curve by interpolating the Voltage when the current is 0
85
+
86
+ Parameters
87
+ ----------
88
+ Volt : 1-D sequence of floats
89
+ Array containing the voltages.
90
+
91
+ Curr : 1-D sequence of floats
92
+ Array containing the current-densities.
93
+
94
+ Returns
95
+ -------
96
+ Voc : float
97
+ Open-circuit voltage value
98
+ """
99
+ Voc_dumb = np.interp(0, Curr, Volt)
100
+ return Voc_dumb
101
+
102
+ def get_FF(Volt,Curr):
103
+ """Get the fill factor (FF) from solar cell JV-curve by calculating the maximum power point
104
+
105
+ Parameters
106
+ ----------
107
+ Volt : 1-D sequence of floats
108
+ Array containing the voltages.
109
+
110
+ Curr : 1-D sequence of floats
111
+ Array containing the current-densities.
112
+
113
+ Returns
114
+ -------
115
+ FF : float
116
+ Fill factor value
117
+ """
118
+ power = []
119
+ Volt_oc = get_Voc(Volt,Curr)
120
+ Curr_sc = get_Jsc(Volt,Curr)
121
+ for i,j in zip(Volt,Curr):
122
+ if (i < Volt_oc and j > Curr_sc):
123
+ power.append(i*j)
124
+ power_max = min(power)
125
+ FF_dumb = power_max/(Volt_oc*Curr_sc)
126
+ return abs(FF_dumb)
127
+
128
+ def get_PCE(Volt,Curr,suns=1):
129
+ """Get the power conversion efficiency (PCE) from solar cell JV-curve
130
+
131
+ Parameters
132
+ ----------
133
+ Volt : 1-D sequence of floats
134
+ Array containing the voltages.
135
+
136
+ Curr : 1-D sequence of floats
137
+ Array containing the current-densities.
138
+
139
+ Returns
140
+ -------
141
+ PCE : float
142
+ Power conversion efficiency value.
143
+ """
144
+ Voc_dumb = get_Voc(Volt,Curr)
145
+ Jsc_dumb = get_Jsc(Volt, Curr)
146
+ FF_dumb = get_FF(Volt, Curr)
147
+ PCE_dumb = Voc_dumb*Jsc_dumb*FF_dumb/(10*suns) # to get it in % when Jsc is in A/m2 and Voc in V
148
+ return abs(PCE_dumb)
149
+
150
+ def get_ideality_factor(suns,Vocs,T=295):
151
+ """Returns ideality factor from suns-Voc data linear fit of Voc = (nIF/Vt)*log(suns) + intercept
152
+
153
+ Parameters
154
+ ----------
155
+ suns : 1-D sequence of floats
156
+ Array containing the intensity in sun.
157
+
158
+ Vocs : 1-D sequence of floats
159
+ Array containing the open-circuit voltages.
160
+
161
+ T : float optional
162
+ Temperature in Kelvin (Default = 295 K).
163
+
164
+ Returns
165
+ -------
166
+ nIF : float
167
+ Ideality factor value.
168
+
169
+ intercept : float
170
+ Intercept of the regression line.
171
+
172
+ rvalue : float
173
+ Correlation coefficient.
174
+
175
+ pvalue : float
176
+ Two-sided p-value for a hypothesis test whose null hypothesis is
177
+ that the slope is zero, using Wald Test with t-distribution of
178
+ the test statistic.
179
+
180
+ stderr : float
181
+ Standard error of the estimated gradient.
182
+ """
183
+ Vt = kb*T
184
+ suns = np.log(suns)
185
+ slope_d, intercept_d, r_value_d, p_value_d, std_err_d = stats.linregress(suns,Vocs)
186
+ nIF = slope_d/Vt
187
+ return nIF,intercept_d, r_value_d**2, p_value_d, std_err_d
@@ -159,8 +159,20 @@ def run_SS_JV(simss_device_parameters, session_path, JV_file_name = 'JV.dat', va
159
159
  results.append(result.returncode)
160
160
  msg_list.append(message)
161
161
 
162
+ # check if results is a list of CompletedProcess objects
163
+
164
+ if isinstance(results, list) :
165
+ if len(results) > 0 and not isinstance(results[0], subprocess.CompletedProcess):
166
+ pass
167
+ else:
168
+ if len(results) > 0 and isinstance(results[0], tuple) and all(isinstance(res[0], subprocess.CompletedProcess) for res in results):
169
+ # Extract the return codes from the CompletedProcess objects
170
+ results = [res[0].returncode for res in results]
171
+ # Check if all simulations were successful
162
172
  if all([res == 0 for res in results]):
163
173
  return 0, 'All JV simulations completed successfully'
174
+ elif all([(res == 0 or res == 95) for res in results]):
175
+ return 0, 'All JV simulations completed successfully, but some had some points that did not converge'
164
176
  else:
165
177
  return results, msg_list
166
178
 
@@ -256,4 +268,4 @@ if __name__ == "__main__":
256
268
  else:
257
269
  if results != 0:
258
270
  for i, msg in enumerate(message):
259
- print(f'G_frac: {G_fracs[i]} - {msg}')
271
+ print(f'G_frac: {G_fracs[i]} - {msg}')
@@ -5,6 +5,7 @@ import os,sys
5
5
  import numpy as np
6
6
  import pandas as pd
7
7
  import matplotlib.pyplot as plt
8
+ from scipy.integrate import trapezoid
8
9
  # import pySIMsalabim
9
10
  ## Import pySIMsalabim, if not successful, add the parent directory to the system path
10
11
  try :
@@ -628,7 +629,7 @@ def calc_hysteresis_index(session_path, tj_file_name = 'tj.dat', tVG_file_ame='t
628
629
  Jfinal_2.append(Jext_2[idx2])
629
630
 
630
631
  # Calculate the hysteresis index
631
- hysteresis_index_num = abs(np.trapezoid(np.abs(np.array(Jfinal_1) - np.array(Jfinal_2)),Vfinal)) # Use abs around trapezoid to avoid negative values when Vfinal is flipped
632
+ hysteresis_index_num = abs(trapezoid(np.abs(np.array(Jfinal_1) - np.array(Jfinal_2)),Vfinal)) # Use abs around trapezoid to avoid negative values when Vfinal is flipped
632
633
  hysteresis_index_denom = (Jmax - Jmin) * (Vmax - Vmin)
633
634
  hysteresis_index = hysteresis_index_num / hysteresis_index_denom
634
635
 
@@ -791,7 +792,7 @@ def Hysteresis_JV(zimt_device_parameters, session_path, UseExpData, scan_speed,
791
792
  rms = Compare_Exp_Sim_JV(session_path, expJV_Vmin_Vmax, expJV_Vmax_Vmin, rms_mode, direction, tj_name)
792
793
  hyst_index = calc_hysteresis_index(session_path, tj_name, tVG_name)
793
794
  else:
794
- message = result.stdout
795
+ message = message
795
796
 
796
797
  result = result.returncode
797
798
 
@@ -355,7 +355,7 @@ def get_impedance(data, f_min, f_max, f_steps, del_V, session_path, output_file,
355
355
  store_impedance_data(session_path, freq, ReZ, ImZ, errZ, C, G, errC, errG, output_file)
356
356
 
357
357
  msg = 'Success'
358
- return 0,msg
358
+ return 0, msg
359
359
  else:
360
360
  # Failed to determine integral bounds, exit with the error message
361
361
  return -1, msg
@@ -943,7 +943,8 @@ if __name__ == "__main__":
943
943
  output_file=output_name, tj_name=tJFile, varFile=varFile, ini_timeFactor=ini_timeFactor, timeFactor=timeFactor, cmd_pars=cmd_pars, UUID=UUID)
944
944
 
945
945
  # Make the impedance plots
946
- if result == 0 or result == 95:
946
+ calc_Voc_output_string = 'Computing the value of Voc led to the following error:'
947
+ if result == 0 or (result.returncode == 95 and calc_Voc_output_string not in message):
947
948
  plot_impedance(session_path, os.path.basename(output_name))
948
949
  else:
949
950
  print(message)
@@ -297,8 +297,8 @@ def install_SIMsalabim(cwd, folder_name='kostergroup-SIMsalabim-',verbose=False)
297
297
  os.system('fpc zimt.pas')
298
298
  os.chdir(cwd)
299
299
 
300
- if verbose:
301
- print('SIMsalabim programs have been compiled successfully!')
300
+ if verbose:
301
+ print('SIMsalabim programs have been compiled successfully!')
302
302
 
303
303
  else:
304
304
  # fpc version requirement not met
@@ -118,7 +118,11 @@ def construct_cmd(sim_type, cmd_pars):
118
118
  for i in cmd_pars:
119
119
  # When specified, the device parameter file must be placed first, as is required by SIMsalabim
120
120
  if i['par'] == 'dev_par_file':
121
- args_single = ' ''' + i['val']+ ' '''
121
+ if os.name == 'nt':
122
+ # Add the device parameters file as " -dev_par_file "dev_par_file"
123
+ args_single = ' "' + i['val']+ '"'
124
+ else:
125
+ args_single = ' ''' + i['val']+ ' '''
122
126
  cmd_line = cmd_line + args_single
123
127
  # After the dev_par_file key had been found once, stop the loop. If more than one dev_par_file is specified, the rest are ignored.
124
128
  break
@@ -127,7 +131,10 @@ def construct_cmd(sim_type, cmd_pars):
127
131
  for i in cmd_pars:
128
132
  if i['par'] != 'dev_par_file':
129
133
  # Add each parameter as " -par_name par_value"
130
- args_single = ' -' +i['par'] + ' ' + i['val']
134
+ if os.name == 'nt': #add "" to the parameter name if on Windows
135
+ args_single = ' -"' + i['par'] + '" "' + i['val'] + '"'
136
+ else:
137
+ args_single = ' -' +i['par'] + ' ' + i['val']
131
138
  cmd_line = cmd_line + args_single
132
139
 
133
140
  return cmd_line
@@ -1,8 +1,8 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pySIMsalabim
3
- Version: 1.1
3
+ Version: 1.2
4
4
  Home-page: https://github.com/kostergroup/pySIMsalabim
5
- Download-URL: https://github.com/kostergroup/pySIMsalabim/v1.01.tar.gz
5
+ Download-URL: https://github.com/kostergroup/pySIMsalabim/v1.02.tar.gz
6
6
  Author: Vincent M. Le Corre, Sander Heester, L. Jan Anton Koster
7
7
  Author-email:
8
8
  License: GPLv3
@@ -26,6 +26,8 @@ Provides-Extra: dev
26
26
  Requires-Dist: pytest; extra == "dev"
27
27
  Requires-Dist: twine; extra == "dev"
28
28
 
29
+ <img src="./docs/logo/pySIMsalabim_logo.png" alt="pySIMsalabim logo" width="100px">
30
+
29
31
  # pySIMsalabim
30
32
 
31
33
  ## Description
@@ -34,6 +36,7 @@ Requires-Dist: twine; extra == "dev"
34
36
  ## Authors
35
37
  * [Vincent M. Le Corre](https://github.com/VMLC-PV)
36
38
  * [Sander Heester](https://github.com/sheester)
39
+ * [Fransien Elhorst](https://github.com/Fransien-Elhorst)
37
40
  * [L. Jan Anton Koster](https://github.com/kostergroup)
38
41
 
39
42
  ## Institutions
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
5
5
 
6
6
  setuptools.setup(
7
7
  name="pySIMsalabim", # Replace with your own username
8
- version="v1.01",
8
+ version="v1.02",
9
9
  author="Vincent M. Le Corre, Sander Heester, L. Jan Anton Koster",
10
10
  author_email="",
11
11
  description="",
@@ -13,7 +13,7 @@ setuptools.setup(
13
13
  long_description_content_type="text/markdown",
14
14
  license='GPLv3',
15
15
  url="https://github.com/kostergroup/pySIMsalabim",
16
- download_url="https://github.com/kostergroup/pySIMsalabim/v1.01.tar.gz",
16
+ download_url="https://github.com/kostergroup/pySIMsalabim/v1.02.tar.gz",
17
17
  packages=setuptools.find_packages(),
18
18
  readme = "README.md",
19
19
  keywords=['Drift-diffusion', 'semiconductor', 'solar cells'],
@@ -1,55 +0,0 @@
1
- """Useful helper functions for pySIMsalabim"""
2
- ######### Package Imports #########################################################################
3
-
4
-
5
- ######### Function Definitions ####################################################################
6
-
7
- def sci_notation(number, sig_fig=2):
8
- """Make proper scientific notation for graphs
9
-
10
- Parameters
11
- ----------
12
- number : float
13
- Number to put in scientific notation.
14
-
15
- sig_fig : int, optional
16
- Number of significant digits (Defaults = 2).
17
-
18
- Returns
19
- -------
20
- output : str
21
- String containing the number in scientific notation
22
- """
23
- if sig_fig != -1:
24
- if number == 0:
25
- output = '0'
26
- else:
27
- ret_string = "{0:.{1:d}e}".format(number, sig_fig)
28
- a,b = ret_string.split("e")
29
- if int(b) >= 0:
30
- b = int(b) #removed leading "+" and strips leading zeros too.
31
- c = ''
32
- else:
33
- b = abs(int(b))
34
- c = u"\u207B" # superscript minus sign
35
- SUP = str.maketrans("0123456789", "⁰¹²³⁴⁵⁶⁷⁸⁹")
36
- b = str(b).translate(SUP)
37
- output =a + ' x 10' + c + b
38
- else:
39
- if number == 0:
40
- output = '0'
41
- else:
42
- ret_string = "{0:.{1:d}e}".format(number, 0)
43
- a,b = ret_string.split("e")
44
- b = int(b) #removed leading "+" and strips leading zeros too.
45
- if int(b) >= 0:
46
- b = int(b) #removed leading "+" and strips leading zeros too.
47
- c = ''
48
- else:
49
- b = abs(int(b))
50
- c = u"\u207B" # superscript minus sign
51
- SUP = str.maketrans("0123456789", "⁰¹²³⁴⁵⁶⁷⁸⁹")
52
- #SUB = str.maketrans("0123456789", "₀₁₂₃₄₅₆₇₈₉")
53
- b = str(b).translate(SUP)
54
- output = '10' + c + b
55
- return output
File without changes
File without changes