#bands=2 # paste below the line (only works with mouse middle - not %paste) #Also, gen_fs_bands needs outfile=0 in the defaults, until process_cmd_line_args is fixed. #_PYFUSION_TEST_@@Skip figure() fn='PF2_160221_50136_{n}b'.format(n=bands) run -i pyfusion/examples/gen_fs_bands.py n_samples=None df=2 exception=() max_bands=bands dev_name="HeliotronJ" 'time_range="default"' seg_dt=1 overlap=2.5 diag_name='HeliotronJ_MP_array' shot_range=[50136] info=0 "outfile=fn" exception=() run -i pyfusion/examples/merge_text_pyfusion.py file_list=[fn] pyfusion.DEBUG=0 exception=Exception from pyfusion.visual import window_manager, sp, tog sp(dd,'t_mid','freq','amp','a12',size_scale=.05,dot_size=50) (xl,yl)=(xlim(),ylim()) run pyfusion/examples/plot_specgram.py dev_name='HeliotronJ' shot_number=50136 diag_name=HeliotronJ_MP_array hold=1 xlim(xl); ylim(0,yl[1]) suptitle(fn)
# /data/datamining/DA/PF2_131122_VSL_6_105_9.npz #run -i pyfusion/examples/mode_identify_script.py DAfilename='saved_PF2_150311_VSL6_105.npz' sel=range(5) DAfilename=None doN=1 mode_list=mmm run -i pyfusion/examples/mode_identify_script.py DAfilename='/data/datamining/DA/saved_PF2_150311_VSL6_105.npz' sel=range(5) doN=1 mode_list=mmm # from here on can be %paste ed thisDA.extract(locals()) N=dd['N'] w1 = whr((dd['N']==1) & (freq<0.8)) sh = unique(shot[w1]) ; len(sh) if pl.gcf().get_label()!='': pl.figure() # avoid overwriting labeled figures for (i,p) in enumerate(decimate(w1,limit=2000)): plot(dd['phases'][p].T,'k', linewidth=0.1, hold=i>0) from pyfusion.visual import window_manager, sp, tog for s in sh: # do another select to avoid select of select wg_loose = where((shot==s)&(freq<2)&(amp>0.015)&(dd['N']==1))[0] if len(where(freq[wg_loose]<1)[0]) > 2: # at least 2 below 1kHz pl.figure(num=str(s)) coll = sp(dd,t_mid, freq, amp, N, ind=wg_loose, size_scale=.01) # marker='v') ws = where((shot==s))[0] ax2 = coll.axes.twinx() ax2.plot(t_mid[ws], w_p[ws]) # ,hold=1) only for simple plot #sp(dd, t_mid, w_p/200, amp, 1/(1+freq), size_scale=.01,ind=ws,hold=1) pl.title(str(s)) show()