if __name__ == '__main__': # dat = get_dat(2214) # x = dat.Data.get_data('x') # data = dat.Data.get_data('i_sense')[63] # all_data = dat.Transition.data # dat = get_dat(2216) dat = get_dat(2164) out = dat.SquareEntropy.get_row_only_output(name='default') x = out.x all_data = np.nanmean(np.array(out.cycled[:, (0, 2), :]), axis=1) single_row = 10 data = all_data[single_row] plotter = OneD(dat=dat) plotter.MAX_POINTS = 100000 fig = plotter.figure( ylabel='Current /nA', title=f'Dat{dat.datnum}: Checking Accuracy of Center from fit') # Whole row of data fig.add_trace( plotter.trace(x=x, data=data, name=f'All data of row{single_row}', mode='lines')) # Fits reports = [] fits = [] params = dat.Transition.get_default_params(x, data)
# # [plotter.add_line(fig, v, color='black', linetype='dash') for v in [0, 1]] # # fig.update_layout(template='simple_white') # fig.show() # # fig.write_image('dndt_vs_Occ_many.svg') # dats = get_dats([ 2102, 7046, 7084, 7094 ]) # Last CD, This CD slow sweep, This CD same sweep, This CD fast sweep plotter = OneD(dats=dats) plotter.RESAMPLE_METHOD = 'downsample' # So jumps are still obvious instead of binning plotter.MAX_POINTS = 2000 single_figs = [] row = 0 fig = plotter.figure(xlabel='ACC /mV', ylabel='Current /nA', title=f'Comparing Transition Noise: Row{row}') for dat in dats: fig.add_trace( plotter.trace( data=dat.Transition.data[row], x=dat.Transition.x / 100, name=f'Dat{dat.datnum}: {dat.Logs.sweeprate/100:.1f}mV/s', mode='lines')) single_fig = plotter.figure(