From 260dc77626845ca85d9fbbbcf20e41c5195beeb3 Mon Sep 17 00:00:00 2001 From: Darien Morrow Date: Tue, 10 Apr 2018 10:45:22 -0500 Subject: figures for OPA ranges and powers --- opa/Energy_10742.csv | 27 +++++++++++++ opa/Energy_10742.png | Bin 0 -> 95731 bytes opa/OPA ranges.py | 112 +++++++++++++++++++++++++++++++++++++++++++++++++++ opa/OPA_powers.png | Bin 0 -> 91570 bytes opa/OPA_ranges.png | Bin 0 -> 63668 bytes 5 files changed, 139 insertions(+) create mode 100644 opa/Energy_10742.csv create mode 100644 opa/Energy_10742.png create mode 100644 opa/OPA ranges.py create mode 100644 opa/OPA_powers.png create mode 100644 opa/OPA_ranges.png (limited to 'opa') diff --git a/opa/Energy_10742.csv b/opa/Energy_10742.csv new file mode 100644 index 0000000..aa156c6 --- /dev/null +++ b/opa/Energy_10742.csv @@ -0,0 +1,27 @@ +Idler,,Signal,,SHI,,SHS,,SFI,,SFS, +Wavelength(nm),Energy (uJ),Wavelength(nm),Energy (uJ),Wavelength(nm),Energy (uJ),Wavelength(nm),Energy (uJ),Wavelength(nm),Energy (uJ),Wavelength(nm),Energy (uJ) +2612.4,83.053,1624.9,198.81,1150.8,4.2247,813.08,37.981,603.69,69.664,529.27,141.95 +2512.4,104.56,1606.6,205.76,1131.7,6.328,802.16,42.987,598.92,96.116,524.25,141.95 +2427.9,124.04,1584.1,219.47,1112.8,8.6234,792.44,47.169,594.14,129.11,518.59,149.16 +2342.3,135.6,1566.3,230.09,1091,9.6431,782.83,51.439,589.34,130.98,513.68,154.8 +2274.5,144.97,1545.7,241.23,1071.8,12.007,772.29,55.063,583.75,132.61,508.81,154.8 +2205.1,156.15,1526.9,246.47,1052.8,14.016,762.91,58.579,579,130.17,503.98,155.77 +2144.8,166.95,1506.8,248.6,1033.2,16.014,752.62,61.173,574.28,126.2,499.21,158.69 +2089.6,175.86,1485.6,257.3,1012,18.218,742.48,66.299,568.81,119.37,493.82,166.74 +2039,185.24,1466.1,262.89,992.17,20.025,732.47,70.097,564.16,115.01,489.14,171.98 +1996.2,192.25,1445.5,268.6,972.73,22.011,722.59,73.201,558.8,110.82,483.86,178.49 +1947.9,196.58,1425.1,273.26,952.77,24.508,712.86,80.323,553.48,107.44,479.28,186.39 +1907,201.01,1405.1,276.81,932.39,29.106,702.28,83.362,548.24,108.78,474.1,189.89 +1870,207.08,1385.3,278,912.43,33.831,691.87,88.138,544.53,112.2,468.95,184.1 +1833.8,211.74,1365.8,281.61,892.88,38.653,682.54,92.612,538.53,113.6,, +1801.1,216.51,1345.3,284.04,872.08,42.305,672.41,97.313,533.53,114.3,, +1772,219.75,1325.1,288.96,852.57,46.301,662.43,100.37,529.2,118.63,, +1740.4,223.04,1305.2,288.96,831.92,51.113,652.59,102.89,524.22,131.79,, +1715,223.04,1285.6,287.72,812.52,54.283,642.03,106.12,,,, +1687.2,223.04,1265.1,282.82,792.77,52.901,632.48,103.53,,,, +1662.6,228.07,1246.1,274.44,,,623.05,97.917,,,, +1641,228.07,1225,267.45,,,612.1,94.933,,,, +1617,223.04,1205.5,262.89,,,602.17,91.472,,,, +1596,218.13,1185.1,251.83,,,592.4,89.235,,,, +1577.8,210.17,1165,225.2,,,581.97,82.336,,,, +1557.3,201.08,1144.1,189.63,,,571.66,63.882,,,, diff --git a/opa/Energy_10742.png b/opa/Energy_10742.png new file mode 100644 index 0000000..cfbcff8 Binary files /dev/null and b/opa/Energy_10742.png differ diff --git a/opa/OPA ranges.py b/opa/OPA ranges.py new file mode 100644 index 0000000..305b078 --- /dev/null +++ b/opa/OPA ranges.py @@ -0,0 +1,112 @@ +""" OPA power and ranges """ + +# --- import -------------------------------------------------------------------------------------- + + +import os +import collections + +import numpy as np + +import matplotlib +import matplotlib.pyplot as plt + +import WrightTools as wt +wt.artists.apply_rcparams('publication') + + +# --- define -------------------------------------------------------------------------------------- + + +p = 'Energy_10742.csv' +idler = np.genfromtxt(p, usecols=(0,1), delimiter=',', skip_header=2, unpack=True) +signal = np.genfromtxt(p, usecols=(2,3), delimiter=',', skip_header=2, unpack=True) +shi = np.genfromtxt(p, usecols=(4,5), delimiter=',', skip_header=2, unpack=True) +shs = np.genfromtxt(p, usecols=(6,7), delimiter=',', skip_header=2, unpack=True) +sfi = np.genfromtxt(p, usecols=(8,9), delimiter=',', skip_header=2, unpack=True) +sfs = np.genfromtxt(p, usecols=(10,11), delimiter=',', skip_header=2, unpack=True) + +names = ['idler', 'signal', 'SHI', 'SHS', 'SFI', 'SFS'] +wavelengths = [idler[0], signal[0], shi[0], shs[0], sfi[0], sfs[0]] +wavelengths_ev = [wt.units.converter(w, 'nm', 'eV') for w in wavelengths] +energys = [idler[1], signal[1], shi[1], shs[1], sfi[1], sfs[1]] +colors = ['C1', 'C2', 'C3', 'C4', 'C5', 'C6'] + + +# --- workspace ----------------------------------------------------------------------------------- + + +if True: + # start + # cbar is shady way to fit legend in + fig, gs = wt.artists.create_figure(width='single', nrows=1, cols=[1, 'cbar'], default_aspect=1) + ax = plt.subplot(gs[0,0]) + ax.semilogy( wavelengths_ev[0], energys[0], alpha=0) + for n,x,y,c in zip(names, wavelengths_ev, energys, colors): + ax.scatter(x,y, color=c, label=n, marker='o') + # pretty up + ax.grid(which='both') + ax.legend(loc='center left', bbox_to_anchor=(1, 0.5), frameon=False) + ax.set_xlabel('OPA output (eV)', fontsize=18) + ax.set_ylabel(u'pulse energy ($\mu$J)') + # finish + wt.artists.savefig('OPA_powers.png') + + +# --- old workspace ------------------------------------------------------------------------------- + + +if True: + # prepare figure + fig, gs = wt.artists.create_figure(width='single', nrows=1, cols=[1], default_aspect=0.3) + + # ranges + ax = plt.subplot(gs[0, 0]) + cs = ['C0', 'C1', 'C2', 'C3', 'C4', 'C5', 'C6', 'C7', 'C8', 'C9'] + ranges = collections.OrderedDict() + ranges['DFG'] = ([11000, 2600], 1) + ranges['Idl'] = ([2600, 1600], 0.5) + ranges['Sig'] = ([1600, 1150], 0) + ranges['SHI'] = ([800, 1200], 0.5) + ranges['SHS'] = ([800, 580], 0) + ranges['SFI'] = ([600, 533], 0.5) + ranges['SFS'] = ([540, 480], 0) + ranges['4HI'] = ([590, 400], 1) + ranges['4HS'] = ([400, 290], 0) + height = 0 + for i, item in enumerate(ranges.items()): + name, value = item + limits, height = value + limits = [wt.units.converter(n, 'nm', 'eV') for n in limits] + ax.plot(limits, [height, height], lw=25, label=name, c=cs[i], solid_capstyle='butt') + ax.text(np.mean(limits), height, name, va='center', ha='center', fontsize=11) + + ranges = collections.OrderedDict() + ranges['UVB'] = ([315, 280], wt.artists._colors.nm_to_rgb(400)) + ranges['UVA'] = ([400, 315], wt.artists._colors.nm_to_rgb(450)) + ranges['visible'] = ([700, 400], wt.artists._colors.nm_to_rgb(500)) + ranges['NIR'] = ([2500, 700], wt.artists._colors.nm_to_rgb(600)) + ranges['IR'] = ([15000, 2500], wt.artists._colors.nm_to_rgb(700)) + for i, item in enumerate(ranges.items()): + name, value = item + limits, c = value + limits = [wt.units.converter(n, 'nm', 'eV') for n in limits] + ax.axvline(limits[0], c='k', lw=1, zorder=1) + ax.axvline(limits[1], c='k', lw=1, zorder=1) + ax.text(np.mean(limits), 1.25, name, va='bottom', ha='center', fontsize=12) + for limit in limits: + nm = wt.units.converter(limit, 'eV', 'nm') + ax.text(limit, 1.6, '%i'%nm, fontsize=14, va='bottom', ha='center', rotation=90) + + width = limits[1]-limits[0] + patch = matplotlib.patches.Rectangle((limits[0], -1), width, 10, facecolor=c, alpha=0.1) + ax.add_patch(patch) + + ax.set_yticks([], []) + ax.set_xlim(0, 4.5) + ax.set_ylim(-0.25, 1.5) + ax.set_xlabel('OPA output (eV)', fontsize=18) + ax.grid(ls=':') + ax.set_title('OPA output (nm)', fontsize=18, y=1.3) + # finish + wt.artists.savefig('OPA_ranges.png') diff --git a/opa/OPA_powers.png b/opa/OPA_powers.png new file mode 100644 index 0000000..1a86b2f Binary files /dev/null and b/opa/OPA_powers.png differ diff --git a/opa/OPA_ranges.png b/opa/OPA_ranges.png new file mode 100644 index 0000000..ae4f421 Binary files /dev/null and b/opa/OPA_ranges.png differ -- cgit v1.2.3