def pltsettings(self,save=None,fileformat='.pdf',disp = True,close=False, xlabel='',ylabel='', xlim=None, ylim=None,title=None,yscale=None,legendColumns=1,skip_legend=False): '''This function is a wrapper for the plot settings function imported from the Helper function. The wrapper is necessary to format the date axis. inputs ------ See plotxy. Note that the x-limits are required to be of the form [datetime.date(2014, 1, 26), datetime.date(2014, 2, 1)] ''' # beautify the x-labels plt.gcf().autofmt_xdate() pltsettings(save=save,fileformat=fileformat,disp = disp,close=close, xlabel=xlabel,ylabel=ylabel, xlim=xlim,ylim=ylim,title=title,yscale=yscale,legendColumns=legendColumns,skip_legend=skip_legend)
IVbyFactor = dict() for i in factor: IVbyFactor[i] = np.vstack( [IV.binedIVData[0], np.multiply(i, IV.binedIVData[1])]) title = newfig('Sum_Factor_1_1') plot(IVbyFactor[1.], label='Factor 1.') plot(IVbyFactor[1.], label='Factor 1.') plt.plot(IVbyFactor[1.][0], IVbyFactor[1.][1] + IVbyFactor[1.][1], label='Sum') pltsettings(save=directory + title, fileformat='.pdf', disp=True, close=True, xlabel=lbl['mV'], ylabel=lbl['uA'], xlim=[0, 2.7], ylim=[0, 30], title=None, legendColumns=1, skip_legend=False) title = newfig('Sum_Factor_1._1.2') plot(IVbyFactor[1.], label='Factor 1.') plot(IVbyFactor[1.2], label='Factor 1.2') plt.plot(IVbyFactor[1.][0], IVbyFactor[1.][1] + IVbyFactor[1.2][1], label='Sum') pltsettings(save=directory + title, fileformat='.pdf', disp=True,
'D1_17_m.csv': 85, 'D1_17_n.csv': 85 } for i in filenames: kwargs_IV_Response_rawData['normalResistance300K'] = r300K[i] IV = IV_Response(i, **kwargs_IV_Response_rawData) title = newfig(i.replace('.csv', '_Manual_Offset_Correction')) IV.plot_IV_with_Info([-3.85, 10, -3.85, 10], linespacing=1.7, fontsize=10) plt.tight_layout() pltsettings(save=directory + title, fileformat='.pdf', disp=True, close=True, xlabel=lbl['mV'], ylabel=lbl['uA'], xlim=[-4, 4], ylim=ylims[i], title=None, legendColumns=1, skip_legend=True) #Old implementation before IV_Class was updated on 14.02.2020. # #offsetCorrection={'Backup_Old_m.csv':[(-2.56+2.65)/2,(-1.01+16.5)/2], # 'Backup_Old_n.csv':[(-2.70+2.85)/2,(-33+49)/2], # 'D1_15_m.csv':[(-2.91+3.08)/2,(-148+164.5)/2], # 'D1_15_n.csv':[(.07)/2,(-73.84+85.54)/2], # 'D1_17_m.csv':[(-0.12+0.009)/2,-(-44.47+29.64)/2], # 'D1_17_n.csv':[(-2.5+2.67)/2,(-9+22.35)/2]} #
parser = ArgumentParser() parser.add_argument('-f', '--folder', action='store',default = 'Default_Folder', help='The folder in which the result is stored in.') args = parser.parse_args() directory = 'Cooper_Pair_Tunnelling_Current_Unit_Test/'+args.folder+'/' if not os.path.exists(directory): os.makedirs(directory) title = newfig('Flux_Dependency') fluxes = np.arange(0,15,.001) * magneticFluxQuantum te = 4 #K, The actual temperature tC = 9.2 # K for Nb delta = cooperPair_Binding_Energy_over_T(t_over_Tc =te/tC,delta0 = cooperPair_Binding_Energy_0K(tC), tDebye = 276)[0] rN =10 current = cooperPairTunnellingCurrent(fluxes,delta,te,rN) plt.plot(fluxes,current) pltsettings(save=directory+title,fileformat='.pdf',disp = True,close=True, xlabel=lbl['Wb'],ylabel=lbl['A'], xlim=None,ylim=None,title=None,legendColumns=1,skip_legend=True) title = newfig('Normal_Resistance_Dependency') fluxes = 0 te = 4 #K, The actual temperature delta = cooperPair_Binding_Energy_over_T(t_over_Tc =te/tC,delta0 = cooperPair_Binding_Energy_0K(tC), tDebye = 276)[0] #9.2 K for Nb rN =np.arange(5,40,.01) current = cooperPairTunnellingCurrent(fluxes,delta,te,rN) plt.plot(rN,current) pltsettings(save=directory+title,fileformat='.pdf',disp = True,close=False, xlabel=lbl['Rn'],ylabel=lbl['A'], xlim=None,ylim=None,title=None,legendColumns=1,skip_legend=True)