In [1]:
import os
import sys
root_folder = os.path.dirname(os.getcwd())
sys.path.append(root_folder)
from ResoFit.calibration import Calibration
from ResoFit.fitresonance import FitResonance
from ResoFit.experiment import Experiment
from ResoFit.simulation import Simulation
from ImagingReso.resonance import Resonance
import matplotlib.pyplot as plt
import numpy as np
import scipy.signal as ss
import pprint
from ResoFit._utilities import get_foil_density_gcm3
from ResoFit._utilities import Layer
import peakutils as pku

In [2]:
%matplotlib notebook

In [26]:
# Global parameters
energy_min = 1
energy_max = 1000
energy_step = 0.01
# Input sample name or names as str, case sensitive
layers = Layer()
# layers.add_layer(layer='Ag', thickness_mm=0.025)
# layers.add_layer(layer='Au', thickness_mm=0.01)
# layers.add_layer(layer='Cd', thickness_mm=0.5)
# layers.add_layer(layer='Co', thickness_mm=0.025)
# layers.add_layer(layer='Hf', thickness_mm=0.025)
# layers.add_layer(layer='In', thickness_mm=0.05)
# layers.add_layer(layer='W', thickness_mm=0.05)
layers.add_layer(layer='U', thickness_mm=0.01)
# layers.add_layer(layer='I', thickness_mm=0.01)

# density = get_foil_density_gcm3(length_mm=25, width_mm=25, thickness_mm=0.025, mass_g=0.14)

simu = Simulation(energy_min=energy_min, energy_max=energy_max, energy_step=energy_step)
simu.add_Layer(layer=layers)

In [24]:
simu.layer_list


Out[24]:
['Ag', 'Au', 'Cd', 'Co', 'Hf', 'In', 'W']

In [38]:
simu.plot(all_isotopes=True, mixed=False, logx=True,
#           logy=True,
#           items_to_plot=['U238', 'U235']
#            y_type='sigma_raw',
         )


Out[38]:
<matplotlib.axes._subplots.AxesSubplot at 0x1c4321c080>

In [42]:
pprint.pprint(simu.o_reso.stack_sigma)


{'Ag': {'Ag': {'107-Ag': {'energy_eV': array([   1.  ,    1.01,    1.02, ...,  999.98,  999.99, 1000.  ]),
                          'sigma_b': array([6.39215496, 6.37309551, 6.35518929, ..., 2.73491183, 2.73483833,
       2.73476483]),
                          'sigma_b_raw': array([12.3307837 , 12.29401708, 12.25947509, ...,  5.27578046,
        5.27563867,  5.27549689])},
               '109-Ag': {'energy_eV': array([   1.  ,    1.01,    1.02, ...,  999.98,  999.99, 1000.  ]),
                          'sigma_b': array([11.32874099, 11.32392034, 11.31909968, ...,  3.33540078,
        3.33405441,  3.33270804]),
                          'sigma_b_raw': array([23.52264486, 23.5126354 , 23.50262595, ...,  6.92552228,
        6.92272671,  6.91993114])},
               '110-Ag': {'energy_eV': array([   1.  ,    1.01,    1.02, ...,  999.98,  999.99, 1000.  ]),
                          'sigma_b': array([0., 0., 0., ..., 0., 0., 0.]),
                          'sigma_b_raw': array([11.49874969, 11.42861736, 11.36368967, ..., 15.45210865,
       15.45205433, 15.452     ])},
               '111-Ag': {'energy_eV': array([   1.  ,    1.01,    1.02, ...,  999.98,  999.99, 1000.  ]),
                          'sigma_b': array([0., 0., 0., ..., 0., 0., 0.]),
                          'sigma_b_raw': array([ 5.83176816,  5.82930629,  5.82684442, ..., 12.56953922,
       12.56951961, 12.5695    ])},
               'energy_eV': array([   1.  ,    1.01,    1.02, ...,  999.98,  999.99, 1000.  ]),
               'isotopic_ratio': [0.51839, 0.48161000000000004, 0.0, 0.0],
               'sigma_b': array([17.72089595, 17.69701585, 17.67428897, ...,  6.07031262,
        6.06889274,  6.06747287])}},
 'Au': {'Au': {'197-Au': {'energy_eV': array([   1.  ,    1.01,    1.02, ...,  999.98,  999.99, 1000.  ]),
                          'sigma_b': array([31.06872752, 31.05458271, 31.0404379 , ..., 37.37973134,
       37.30476119, 37.22979104]),
                          'sigma_b_raw': array([31.06872752, 31.05458271, 31.0404379 , ..., 37.37973134,
       37.30476119, 37.22979104])},
               'energy_eV': array([   1.  ,    1.01,    1.02, ...,  999.98,  999.99, 1000.  ]),
               'isotopic_ratio': [1.0],
               'sigma_b': array([31.06872752, 31.05458271, 31.0404379 , ..., 37.37973134,
       37.30476119, 37.22979104])}},
 'Cd': {'Cd': {'106-Cd': {'energy_eV': array([   1.  ,    1.01,    1.02, ...,  999.98,  999.99, 1000.  ]),
                          'sigma_b': array([0.0586895 , 0.05867879, 0.05866807, ..., 0.05707664, 0.05707652,
       0.05707639]),
                          'sigma_b_raw': array([4.69516037, 4.69430304, 4.69344571, ..., 4.56613133, 4.56612145,
       4.56611156])},
               '108-Cd': {'energy_eV': array([   1.  ,    1.01,    1.02, ...,  999.98,  999.99, 1000.  ]),
                          'sigma_b': array([0.03082854, 0.03082122, 0.0308139 , ..., 0.03594439, 0.03594434,
       0.0359443 ]),
                          'sigma_b_raw': array([3.46388056, 3.46305838, 3.46223621, ..., 4.03869552, 4.03869023,
       4.03868495])},
               '110-Cd': {'energy_eV': array([   1.  ,    1.01,    1.02, ...,  999.98,  999.99, 1000.  ]),
                          'sigma_b': array([0.69858884, 0.69729488, 0.69600091, ..., 0.49389056, 0.49388588,
       0.49388119]),
                          'sigma_b_raw': array([5.59318528, 5.58282527, 5.57246526, ..., 3.95428791, 3.95425041,
       3.9542129 ])},
               '111-Cd': {'energy_eV': array([   1.  ,    1.01,    1.02, ...,  999.98,  999.99, 1000.  ]),
                          'sigma_b': array([0.84196404, 0.84118923, 0.84041442, ..., 0.59032125, 0.59032361,
       0.59032699]),
                          'sigma_b_raw': array([6.57784409, 6.57179088, 6.56573766, ..., 4.6118848 , 4.6119032 ,
       4.6119296 ])},
               '112-Cd': {'energy_eV': array([   1.  ,    1.01,    1.02, ...,  999.98,  999.99, 1000.  ]),
                          'sigma_b': array([1.29326953, 1.29271805, 1.29219867, ..., 1.14017605, 1.14015003,
       1.140124  ]),
                          'sigma_b_raw': array([5.35959191, 5.35730645, 5.35515406, ..., 4.72513903, 4.72503119,
       4.72492334])},
               '113-Cd': {'energy_eV': array([   1.  ,    1.01,    1.02, ...,  999.98,  999.99, 1000.  ]),
                          'sigma_b': array([16.57440468, 16.12085579, 15.69409754, ...,  0.64459164,
        0.64427471,  0.64395777]),
                          'sigma_b_raw': array([135.63342617, 131.92189678, 128.42960346, ...,   5.27489065,
         5.2722971 ,   5.26970355])},
               '114-Cd': {'energy_eV': array([   1.  ,    1.01,    1.02, ...,  999.98,  999.99, 1000.  ]),
                          'sigma_b': array([1.64770932, 1.64762141, 1.64753351, ..., 1.65552348, 1.65550503,
       1.65548659]),
                          'sigma_b_raw': array([5.73515252, 5.73484655, 5.73454057, ..., 5.76235112, 5.76228692,
       5.76222273])},
               '116-Cd': {'energy_eV': array([   1.  ,    1.01,    1.02, ...,  999.98,  999.99, 1000.  ]),
                          'sigma_b': array([0.37143502, 0.37142943, 0.37142384, ..., 0.27723591, 0.27721987,
       0.27720383]),
                          'sigma_b_raw': array([4.95907904, 4.95900443, 4.95892983, ..., 3.70141403, 3.7011999 ,
       3.70098577])},
               'energy_eV': array([   1.  ,    1.01,    1.02, ...,  999.98,  999.99, 1000.  ]),
               'isotopic_ratio': [0.0125,
                                  0.0089,
                                  0.1249,
                                  0.128,
                                  0.2413,
                                  0.1222,
                                  0.2873,
                                  0.07490000000000001],
               'sigma_b': array([21.51688947, 21.06060879, 20.63115087, ...,  4.89475992,
        4.89437998,  4.89400107])}},
 'Co': {'Co': {'58-Co': {'energy_eV': array([   1.  ,    1.01,    1.02, ...,  999.98,  999.99, 1000.  ]),
                         'sigma_b': array([0., 0., 0., ..., 0., 0., 0.]),
                         'sigma_b_raw': array([459.74124313, 458.88190452, 458.02256591, ...,  66.60914615,
        66.58022308,  66.5513    ])},
               '59-Co': {'energy_eV': array([   1.  ,    1.01,    1.02, ...,  999.98,  999.99, 1000.  ]),
                         'sigma_b': array([11.96985957, 11.94149078, 11.91312199, ...,  2.77847507,
        2.77845032,  2.77842558]),
                         'sigma_b_raw': array([11.96985957, 11.94149078, 11.91312199, ...,  2.77847507,
        2.77845032,  2.77842558])},
               'energy_eV': array([   1.  ,    1.01,    1.02, ...,  999.98,  999.99, 1000.  ]),
               'isotopic_ratio': [0.0, 1.0],
               'sigma_b': array([11.96985957, 11.94149078, 11.91312199, ...,  2.77847507,
        2.77845032,  2.77842558])}},
 'Hf': {'Hf': {'174-Hf': {'energy_eV': array([   1.  ,    1.01,    1.02, ...,  999.98,  999.99, 1000.  ]),
                          'sigma_b': array([0.12234716, 0.12155604, 0.12076493, ..., 0.07103165, 0.07103135,
       0.07103104]),
                          'sigma_b_raw': array([76.46697335, 75.97252706, 75.47808077, ..., 44.39478213,
       44.39459106, 44.3944    ])},
               '176-Hf': {'energy_eV': array([   1.  ,    1.01,    1.02, ...,  999.98,  999.99, 1000.  ]),
                          'sigma_b': array([0.48804813, 0.48726538, 0.48648262, ..., 1.85500595, 1.85499878,
       1.8549916 ]),
                          'sigma_b_raw': array([ 9.27848161,  9.26360034,  9.24871907, ..., 35.26627283,
       35.26613641, 35.266     ])},
               '177-Hf': {'energy_eV': array([   1.  ,    1.01,    1.02, ...,  999.98,  999.99, 1000.  ]),
                          'sigma_b': array([ 770.68470974,  937.59009549, 1161.45827138, ...,    7.32842617,
          7.32839449,    7.3283628 ]),
                          'sigma_b_raw': array([4143.46618142, 5040.80696498, 6244.39930851, ...,   39.40014071,
         39.39997035,   39.3998    ])},
               '178-Hf': {'energy_eV': array([   1.  ,    1.01,    1.02, ...,  999.98,  999.99, 1000.  ]),
                          'sigma_b': array([5.92154249, 5.90482267, 5.88810285, ..., 2.09094056, 2.09086722,
       2.09079388]),
                          'sigma_b_raw': array([21.70653405, 21.64524439, 21.58395472, ...,  7.66473812,
        7.66446928,  7.66420045])},
               '179-Hf': {'energy_eV': array([   1.  ,    1.01,    1.02, ...,  999.98,  999.99, 1000.  ]),
                          'sigma_b': array([1.64647305, 1.64096431, 1.63545558, ..., 4.93263281, 4.93261239,
       4.93259196]),
                          'sigma_b_raw': array([12.08864207, 12.04819613, 12.00775019, ..., 36.21609993,
       36.21594997, 36.2158    ])},
               '180-Hf': {'energy_eV': array([   1.  ,    1.01,    1.02, ...,  999.98,  999.99, 1000.  ]),
                          'sigma_b': array([8.37822761, 8.37292961, 8.36763161, ..., 2.6808411 , 2.68079037,
       2.68073965]),
                          'sigma_b_raw': array([23.88320298, 23.86810036, 23.85299774, ...,  7.64207838,
        7.64193378,  7.64178919])},
               'energy_eV': array([   1.  ,    1.01,    1.02, ...,  999.98,  999.99, 1000.  ]),
               'isotopic_ratio': [0.0016,
                                  0.0526,
                                  0.18600000000000003,
                                  0.2728,
                                  0.1362,
                                  0.3508],
               'sigma_b': array([ 787.24134818,  954.1176335 , 1177.95670896, ...,   18.95887824,
         18.95869458,   18.95851093])}},
 'I': {'I': {'127-I': {'energy_eV': array([   1.  ,    1.01,    1.02, ...,  999.98,  999.99, 1000.  ]),
                       'sigma_b': array([4.67308514, 4.66796408, 4.66284302, ..., 3.62319317, 3.62230206,
       3.62141096]),
                       'sigma_b_raw': array([4.67308514, 4.66796408, 4.66284302, ..., 3.62319317, 3.62230206,
       3.62141096])},
             '129-I': {'energy_eV': array([   1.  ,    1.01,    1.02, ...,  999.98,  999.99, 1000.  ]),
                       'sigma_b': array([0., 0., 0., ..., 0., 0., 0.]),
                       'sigma_b_raw': array([13.87541343, 13.84484651, 13.81427959, ...,  3.99960846,
        3.99744385,  3.99527923])},
             '130-I': {'energy_eV': array([   1.  ,    1.01,    1.02, ...,  999.98,  999.99, 1000.  ]),
                       'sigma_b': array([0., 0., 0., ..., 0., 0., 0.]),
                       'sigma_b_raw': array([5.25221444, 5.2368955 , 5.22157657, ..., 9.58072237, 9.58069119,
       9.58066   ])},
             '131-I': {'energy_eV': array([   1.  ,    1.01,    1.02, ...,  999.98,  999.99, 1000.  ]),
                       'sigma_b': array([0., 0., 0., ..., 0., 0., 0.]),
                       'sigma_b_raw': array([16.3405102 , 16.277337  , 16.21416381, ..., 16.64593251,
       16.64586625, 16.6458    ])},
             'energy_eV': array([   1.  ,    1.01,    1.02, ...,  999.98,  999.99, 1000.  ]),
             'isotopic_ratio': [1.0, 0.0, 0.0, 0.0],
             'sigma_b': array([4.67308514, 4.66796408, 4.66284302, ..., 3.62319317, 3.62230206,
       3.62141096])}},
 'In': {'In': {'113-In': {'energy_eV': array([   1.  ,    1.01,    1.02, ...,  999.98,  999.99, 1000.  ]),
                          'sigma_b': array([0.48629975, 0.49234305, 0.49884507, ..., 0.64569275, 0.64569032,
       0.6456879 ]),
                          'sigma_b_raw': array([11.3356586 , 11.47652802, 11.62809024, ..., 15.05111299,
       15.0510565 , 15.051     ])},
               '115-In': {'energy_eV': array([   1.  ,    1.01,    1.02, ...,  999.98,  999.99, 1000.  ]),
                          'sigma_b': array([303.02263392, 315.24319196, 328.15328602, ...,   7.82451511,
         7.78673802,   7.74794304]),
                          'sigma_b_raw': array([316.6049879 , 329.37330682, 342.86206877, ...,   8.17523259,
         8.13576222,   8.09522833])},
               'energy_eV': array([   1.  ,    1.01,    1.02, ...,  999.98,  999.99, 1000.  ]),
               'isotopic_ratio': [0.0429, 0.9571],
               'sigma_b': array([303.50893367, 315.73553501, 328.65213109, ...,   8.47020786,
         8.43242835,   8.39363094])}},
 'U': {'U': {'233-U': {'energy_eV': array([   1.  ,    1.01,    1.02, ...,  999.98,  999.99, 1000.  ]),
                       'sigma_b': array([0., 0., 0., ..., 0., 0., 0.]),
                       'sigma_b_raw': array([162.99542846, 164.7071018 , 166.68820125, ...,  23.41053015,
        23.41026507,  23.41      ])},
             '234-U': {'energy_eV': array([   1.  ,    1.01,    1.02, ...,  999.98,  999.99, 1000.  ]),
                       'sigma_b': array([0.00119734, 0.00119106, 0.00118506, ..., 0.00054407, 0.00054398,
       0.00054389]),
                       'sigma_b_raw': array([21.76973266, 21.65557042, 21.54646102, ...,  9.89211756,
        9.89053463,  9.88895171])},
             '235-U': {'energy_eV': array([   1.  ,    1.01,    1.02, ...,  999.98,  999.99, 1000.  ]),
                       'sigma_b': array([0.66678274, 0.68754812, 0.71156398, ..., 0.13499268, 0.13614978,
       0.13730688]),
                       'sigma_b_raw': array([92.6087141 , 95.49279404, 98.82833046, ..., 18.74898333,
       18.90969167, 19.0704    ])},
             '238-U': {'energy_eV': array([   1.  ,    1.01,    1.02, ...,  999.98,  999.99, 1000.  ]),
                       'sigma_b': array([ 9.49340387,  9.49015108,  9.48689829, ..., 21.3280674 ,
       21.31608827, 21.30410915]),
                       'sigma_b_raw': array([ 9.56278185,  9.55950529,  9.55622873, ..., 21.48393333,
       21.47186667, 21.4598    ])},
             'energy_eV': array([   1.  ,    1.01,    1.02, ...,  999.98,  999.99, 1000.  ]),
             'isotopic_ratio': [0.0, 5.4999999999999995e-05, 0.0072, 0.992745],
             'sigma_b': array([10.16138395, 10.17889026, 10.19964733, ..., 21.46360414,
       21.45278203, 21.44195992])}},
 'W': {'W': {'180-W': {'energy_eV': array([   1.  ,    1.01,    1.02, ...,  999.98,  999.99, 1000.  ]),
                       'sigma_b': array([0.01599298, 0.01595639, 0.01591981, ..., 0.04138282, 0.04138265,
       0.04138248]),
                       'sigma_b_raw': array([13.32748066, 13.29699483, 13.26650899, ..., 34.48568499,
       34.4855425 , 34.4854    ])},
             '182-W': {'energy_eV': array([   1.  ,    1.01,    1.02, ...,  999.98,  999.99, 1000.  ]),
                       'sigma_b': array([3.31853887, 3.31547662, 3.31241437, ..., 0.90188309, 0.90024772,
       0.89861235]),
                       'sigma_b_raw': array([12.52278819, 12.51123253, 12.49967686, ...,  3.40333242,
        3.39716121,  3.39099   ])},
             '183-W': {'energy_eV': array([   1.  ,    1.01,    1.02, ...,  999.98,  999.99, 1000.  ]),
                       'sigma_b': array([ 1.04231784,  1.04110355,  1.03997607, ..., 40.34025325,
       40.40954668, 40.4553717 ]),
                       'sigma_b_raw': array([  7.28384233,   7.27535672,   7.26747781, ..., 281.90253846,
       282.38676923, 282.707     ])},
             '184-W': {'energy_eV': array([   1.  ,    1.01,    1.02, ...,  999.98,  999.99, 1000.  ]),
                       'sigma_b': array([ 2.31783685,  2.31735207,  2.3168673 , ..., 23.12972542,
       22.62034979, 22.1070981 ]),
                       'sigma_b_raw': array([ 7.56474167,  7.56315951,  7.56157734, ..., 75.48866   ,
       73.8262069 , 72.15110345])},
             '186-W': {'energy_eV': array([   1.  ,    1.01,    1.02, ...,  999.98,  999.99, 1000.  ]),
                       'sigma_b': array([1.96220161, 1.95495848, 1.94771536, ..., 2.94395669, 2.94349504,
       2.94303338]),
                       'sigma_b_raw': array([ 6.90186989,  6.87639284,  6.85091578, ..., 10.35510619,
       10.35348236, 10.35185854])},
             'energy_eV': array([   1.  ,    1.01,    1.02, ...,  999.98,  999.99, 1000.  ]),
             'isotopic_ratio': [0.0012, 0.265, 0.1431, 0.3064, 0.2843],
             'sigma_b': array([ 8.65688815,  8.64484712,  8.63289291, ..., 67.35720128,
       66.91502188, 66.44549801])}}}

In [44]:
item_list = [
#     '107-Ag',
#     '109-Ag',
#     '235-U',
#     '238-U',
    '127-I',
    '129-I',
    '130-I',
            ]
fig, ax0 = plt.subplots(figsize=(11,4))
ax = simu.plot(y_type='sigma_raw',
               mixed= False,
               all_elements=False,
               logx=True, logy=True,
               fmt='-', ms=1, lw=1,
               items_to_plot=item_list,
              ax_mpl=ax0)
_legend = ax.legend()
for _i, name in enumerate(item_list):
    _legend.get_texts()[_i].set_text(name)
plt.tight_layout()
fig.savefig(dpi=300, fname='Ag')


'y_axis='sigma'' is selected. Auto force 'mixed=False', 'all_layers=False'

In [5]:
folder = 'data/IPTS_13639/reso_data_13639'
data_file = layer_1 + '.csv'
spectra_file = 'spectra.csv'
image_start = 500  # Can be omitted or =None
image_end = 1600  # Can be omitted or =None
norm_to_file = 'Ag.csv'
baseline = True
each_step = False
before = False
table = True
fit_vary = 'none'

repeat = 1
source_to_detector_m = 16.293278721983177  # 16#16.445359069030175#16.447496101100739
offset_us = -12112.494119089204  # 0#2.7120797253959119#2.7355447625559037

In [ ]:
# Calibrate the peak positions
calibration = Calibration(data_file=data_file,
                          spectra_file=spectra_file,
                          layer=layer,
                          energy_min=energy_min,
                          energy_max=energy_max,
                          energy_step=energy_step,
                          repeat=repeat,
                          folder=folder,
                          baseline=baseline)

calibration.norm_to(norm_to_file)
calibration.slice(slice_start=image_start, slice_end=image_end)

calibrate_result = calibration.calibrate(source_to_detector_m=source_to_detector_m,
                                         offset_us=offset_us,
                                         vary='all',
                                         each_step=each_step)
calibration.index_peak(thres=0.5, min_dist=50)
# calibration.analyze_peak()
pprint.pprint(calibration.experiment.o_peak.peak_map_indexed)
# peak_df = calibration.peak_df_scaled

calibration.plot(before=before, table=table, peak_id='all')

In [3]:
# Fit the peak height
fit = FitResonance(folder=folder,
                   spectra_file=spectra_file,
                   data_file=data_file,
                   repeat=repeat,
                   energy_min=energy_min,
                   energy_max=energy_max,
                   energy_step=energy_step,
                   calibrated_offset_us=calibration.calibrated_offset_us,
                   calibrated_source_to_detector_m=calibration.calibrated_source_to_detector_m,
                   norm_to_file=norm_to_file,
                   slice_start=image_start,
                   slice_end=image_end,
                   baseline=baseline)
fit_result = fit.fit(layer, vary=fit_vary, each_step=each_step)
fit.molar_conc()
# fit.fit_iso(layer=layer_1)
fit.index_peak(thres=0.5, min_dist=50)
fit.plot(before=before, table=table, peak_id='all')

In [6]:
# foil_list = ['Ag', 'Co', 'Hf', 'W', 'In', 'Cd', 'Au', 'all']
# foil_list = ['Ag', 'Co', 'Hf', 'W', 'In', 'Cd', 'Au']
foil_list = ['Co', 'Cd', 'W', 'In', 'Hf', 'Ag', 'Au']

data_file_list = [x + '.csv' for x in foil_list]
folder = 'data/IPTS_13639/reso_data_13639'
spectra_file = 'spectra.csv'
exps = {}
for each_data in data_file_list:
    _ele_name = each_data.split('.')[0]
    exps[_ele_name] = Experiment(spectra_file=spectra_file, data_file=each_data, folder=folder)
    exps[_ele_name].slice(start=294, end=2720)
#     exps[_ele_name].slice(start=294, end=2570)
    if _ele_name == 'Co':
        exps[_ele_name].norm_to('Ag.csv')
    elif _ele_name == 'Cd':
        exps[_ele_name].norm_to('In.csv')
    elif _ele_name == 'W':
        exps[_ele_name].norm_to('Hf.csv')
    else:
        exps[_ele_name].norm_to('ob_all.csv')

In [7]:
exps


Out[7]:
{'Co': <ResoFit.experiment.Experiment at 0x1a0d81cf28>,
 'Cd': <ResoFit.experiment.Experiment at 0x1c1fa49f28>,
 'W': <ResoFit.experiment.Experiment at 0x1c17d0bfd0>,
 'In': <ResoFit.experiment.Experiment at 0x1c17d0c0f0>,
 'Hf': <ResoFit.experiment.Experiment at 0x1c17d02f28>,
 'Ag': <ResoFit.experiment.Experiment at 0x1c17cfd0f0>,
 'Au': <ResoFit.experiment.Experiment at 0x1c17cf80f0>}

In [8]:
image_start = 500  # Can be omitted or =None
image_end = 1600  # Can be omitted or =None
# norm_to_file = 'ob_1.csv'  #'Ag.csv'
# norm_to_file = 'Ag.csv'
norm_to_file = None

repeat = 1
source_to_detector_m = 16.123278721983177  # 16#16.445359069030175#16.447496101100739
offset_us = -12112.494119089204  # 0#2.7120797253959119#2.7355447625559037

In [9]:
exps['Co'].plot(x_type='number', y_type='transmission',
                source_to_detector_m=source_to_detector_m, offset_us=offset_us,
                logx=False, baseline=True, deg=7, fmt='-')