Files
superconductivity/sc_elements.py

63 lines
2.4 KiB
Python
Executable File

#!/bin/env python3
import pandas as pd
import re
df = pd.DataFrame(
[
['Nb', 9.25, 152., '[webb]', 'at 273 K [crc]'],
['Tc', 8.2, 200., '[webb]', '[rhowiki]'],
['Pb', 7.2, 213., '[webb]', '[crc]'],
['La', 6, 615., '[webb]', '[crc]'],
['V', 5.4, 202., '[webb]', '[crc]'],
['Ta', 4.4, 135., '[webb]', '[crc]'],
['Hg', 4.15, 961., '[webb]', 'at 298 K [crc]'],
['Sn', 3.7, 115., '[webb]', 'at 273 K [crc]'],
['In', 3.4, 80., '[webb]', 'at 273 K [crc]'],
['Tl', 2.4, 150., '[webb]', 'at 273 K [crc]'],
['Re', 1.7, 172., '[webb]', 'at 273 K [crc]'],
['Th', 1.4, 147., '[webb]', 'at 273 K [crc]'],
['Pa', 1.4, 108.0, '[webb]', '[crc]' ],
['U', 1.3, 280., '[webb]', 'at 273 K [crc]'],
['Al', 1.18, 27.33, '[webb]', '[crc]'],
['Ga', 1.08, 136., '[webb]', 'at 273 K [crc]'],
['Am', 1, 689., '[webb]', '[rhowiki]'],
['Mo', .92, 55.2, '[webb]', '[crc]'],
['Zn', .85, 60.6, '[webb]', '[crc]'],
['Os', .7, 81., '[webb]', 'at 273 K [crc]'],
['Zr', .6, 433., '[webb]', '[crc]'],
['Cd', .52, 68., '[webb]', 'at 273 K [crc]'],
['Ru', .5, 71., '[webb]', 'at 273 K [crc]'],
['Ti', .5, 390., '[webb]', 'at 273 K [crc]'],
['Hf', .38, 340., '[webb]', '[crc]'],
['Ir', .1, 47., '[webb]', 'at 273 K [crc]'],
['Lu', .1, 582., '[webb]', '[crc]'],
#['Be', 1440, 37.6, '[webb]', '[crc]'],
['Be', .026, 37.6, '[schmidt] (but [webb] reports 1440 K)', '[crc]'],
['W', .01, 54.4, '[webb]', '[crc]'],
['Li', .0004, 95.5, '[webb]', '[crc]'],
['Rh', .0003, 43., '[webb]', 'at 273 K [crc]'],
],
columns = ['element', 'T_c', 'rho_300', 'T_c source', 'rho_300 source']
)
table = df.to_latex(index = False, header = ['Element', 'tctex', 'rhotex', 'Tcsource', 'rhosource'])
table = table.replace('tctex', '$T_c (\\si{\\kelvin})$')
table = table.replace('rhotex', '$\\rho_{300 K} (\\si{\\nano\\ohm\\meter})$')
table = table.replace('Tcsource', 'Source $T_c$')
table = table.replace('rhosource', 'Source $\\rho_{300 K}$')
table = re.sub(r'\[(\w+)\]', r'\\cite{\1}', table)
with open('sc_elements.tex', 'w') as table_file:
table_file.write(table)
from matplotlib import pyplot as plt
fig, ax = plt.subplots(figsize=(15, 9))
df.plot('rho_300', 'T_c', kind='scatter', ax=ax)
for k, v in df.iterrows():
ax.annotate(v['element'], (v['rho_300'], v['T_c']))
#fig.show()
fig.savefig('/home/kvkempen/Documents/20212022Q3/Superconductivity/assignments/sc_elements.pdf')
plt.close(fig)