def plotrawnow(yrmoday,fpath='',chan='ch2',rstep=50,supply_index=False): """ function to automatically read last science file plot raw data vs encoder yrmoday should be a string '20130502' fpath should point to the directory where acq_tel and converter.py were run rstep determines how many revolutions to skip between plotted revolutions """ fld=glob(fpath+'data/'+yrmoday+'/*.dat') fld.sort() stats=os.stat(fld[-1]) if stats.st_size == 10752000: dr=demod.read_raw([fld[-1]],supply_index=supply_index) for i in range(0,np.shape(dr[chan])[0],rstep): plt.plot(dr[chan][i,:],label='rev '+str(i)) plt.xlabel('encoder position') plt.ylabel('Signal, V') plt.title(chan+' Raw data, every '+str(rstep) + ' revs, file: '+fld[-1]) plt.legend() plt.grid() plt.show() return dr
#script to run through cal test data import demod from glob import glob import cofe_util as cu get_ipython().magic(u"cd 'c:/cofe/cofe_ground_fall_2012/data/20121109'") fl = glob('*.dat') flcal = fl[77:] cal = demod.read_raw(flcal) #first capture specific timezones for nov 9 2012 dataset ssky1 = arange(100000) ssky2 = arange(100000) + 450000 ssky3 = arange(100000) + 840000 sfoam1 = arange(100000) + 260000 sfoam2 = arange(100000) + 1030000 secco = arange(100000) + 645000 chans = ['ch0', 'ch1', 'ch2', 'ch3', 'ch4', 'ch5'] #base rotation rate rotrate = 25 samprate = rotrate * 256 bbgain = {} bbgain['ch0'] = 100. bbgain['ch2'] = 100. bbgain['ch4'] = 100. tamb = 295 #arbitrary, but hopefully low impact on the gain tsky = 40 epsilons = {} calsecco = {}
#script to run through cal test data import demod from glob import glob import cofe_util as cu get_ipython().magic(u"cd 'c:/cofe/cofe_ground_fall_2012/data/20121109'") fl=glob('*.dat') flcal=fl[77:] cal=demod.read_raw(flcal) #first capture specific timezones for nov 9 2012 dataset ssky1=arange(100000) ssky2=arange(100000)+450000 ssky3=arange(100000)+840000 sfoam1=arange(100000)+260000 sfoam2=arange(100000)+1030000 secco=arange(100000)+645000 chans=['ch0','ch1','ch2','ch3','ch4','ch5'] #base rotation rate rotrate=25 samprate=rotrate*256 bbgain={} bbgain['ch0']=100. bbgain['ch2']=100. bbgain['ch4']=100. tamb=295 #arbitrary, but hopefully low impact on the gain tsky=40 epsilons={} calsecco={}