# <codecell> import run_kisq_retrieval as rk reload(rk) # <codecell> print max(meas.good) print type(mea['good']) print isinstance(mea['good'],tuple) print type(mea['good'][0]) # <codecell> (meas.tau,meas.ref,meas.phase,meas.ki) = rk.run_retrieval(meas,lut) # <codecell> print meas.utc.shape print len(meas.good), max(meas.good) # <codecell> from Sp_parameters import smooth fig,ax = plt.subplots(4,sharex=True) ax[0].set_title('Retrieval results time trace') ax[0].plot(meas.utc,meas.tau,'rx') ax[0].plot(meas.utc[meas.good],smooth(meas.tau[meas.good],20),'k') ax[0].set_ylabel('$\\tau$') ax[1].plot(meas.utc,meas.ref,'g+')
# <codecell> import run_kisq_retrieval as rk reload(rk) import Sp_parameters as Sp reload(Sp) #del lut #del meas # <codecell> print max(meas.good) # <codecell> (tau,ref,phase,ki) = rk.run_retrieval(meas,lut) # <codecell> del lut # <codecell> print meas.utc.shape print len(meas.good), max(meas.good) # <codecell> reload(Sp) from Sp_parameters import smooth
#i999,i992 = np.argmin(abs(meas.wvl-999)),np.argmin(abs(meas.wvl-992)) i981,i982 = 1039,1040 #ss = np.nanstd(meas.norm[meas.good,i980:i995],axis=1)/np.nanmean(meas.norm[meas.good,i980:i995],axis=1) sss = abs(meas.norm[meas.good,i981]-meas.norm[meas.good,i982]) #flt = (meas.norm[meas.good,i500]>0.4) & (ss<0.05) flt = sss<0.1 #(meas.norm[meas.good,i500]>0.4) & (sss<0.1) #import pdb; pdb.set_trace() meas.good = meas.good[flt] if debug: try: print lut[i].__dict__.keys() except Exception as ei: print 'exception: {}'.format(ei) import pdb; pdb.set_trace() print 'meas.good lengh: {},meas.utc length: {}'.format(meas.good.shape,meas.utc.shape) tau,ref,phase,ki = rk.run_retrieval(meas,lut[i],force_liq=forceliq,force_ice=forceice) meas.taut[meas.good] = tau[meas.good] meas.ref[meas.good] = ref[meas.good] meas.phase[meas.good] = phase[meas.good] meas.ki[meas.good] = ki[meas.good] # In[ ]: meas.tau = meas.taut # ## Save the retrieval results # In[ ]: