# axu.set_title('{fn}, time={t:.4f} {dt}'.format(fn=da.name, t=tslice, dt=dtstr)) tit = axu.get_title() cfg, cfg_dict = get_mag_config(shot) if cfg is None: ind = '' else: ind = 13 - 12*cfg[2]/.3904 if abs(ind - round(ind)) < .03: ind = int(round((ind))) ind = 'Ind {ind}'.format(ind=ind) axu.set_title(tit+'\nProgram Id {s}, time={t:.4f} {ind}'# {dt}' .format(s=shot, fn=da.name, t=tslice, dt=dtstr, ind=ind)) if cfg_dict is not None: plot_trim(axu, mag_dict=cfg_dict, color='g', aspect=1.2) if time_strip_h > 0: locator = MaxNLocator(nbins=3) # , prune='upper') # This is for the time #probedata = dev.acq.getdata(shot,'W7X'+chan + '_I') from pyfusion.data.filters import dummysig # plot ECH til after probes so colours match up diags = ['ne18','Te'] axtwin = axtime.twinx() deflw = plt.rcParams['lines.linewidth'] for (i, diag) in enumerate(diags): for (pp, prch) in enumerate(probe_chans): probedata = dummysig(da['t_mid'],da[diag][prch]) probedata.signal = da.masked[diag][:,prch] # kludge probedata.utc = da['info']['params']['i_diag_utc']
sold, td, sig2, ebar2 = LCFS_plot(da, diag2, nrm=nrm, ax=axLCne, Tesmooth=fitsig1, **kwargs) sigs.append(sig2) tds.append(td) solds.append(sold) for fp in fp_list: fp.write(', Integral = {intg:.1f}\n'.format(intg=integrate(sig2, td))) # if diag1 in fits: params = fitgauss(sold, sig1, ebar1, ax=axLCne) maxTe = max(maxTe, np.nanmax(sig1)) maxne = max(maxne, np.nanmax(sig2)) #1/0 cfg, cfg_dict = get_mag_config(shot_number) if cfg_dict is not None: plot_trim(axLCTe, mag_dict=cfg_dict, aspect=2.6, size=0.06, color='g') ind = 13 - 12*cfg[2]/.3904 if abs(ind - round(ind)) < .03: ind = int(round((ind))) ind = 'Ind {ind}'.format(ind=ind) else: ind = '' tb = 'LP t_mid' if use_t_mid else 'into ECH' figLCFS.subplots_adjust(hspace=0, right=0.87) # figLCFS.suptitle('shot {s}, {avname} over time {fr}-{t}s {tb}: {ind}' title = str('shot {s}, {avname} filter over time {fr}-{t}s {tb}: {ind}' .format(s=[da['date'][0], da['progId'][0]], fr=t_range[0],t=t_range[1], tb=tb, avname=av.__name__, ind=ind)) if axset is None:
# axu.set_title('{fn}, time={t:.4f} {dt}'.format(fn=da.name, t=tslice, dt=dtstr)) tit = axu.get_title() cfg, cfg_dict = get_mag_config(shot) if cfg is None: ind = '' else: ind = 13 - 12 * cfg[2] / .3904 if abs(ind - round(ind)) < .03: ind = int(round((ind))) ind = 'Ind {ind}'.format(ind=ind) axu.set_title(tit + '\nProgram Id {s}, time={t:.4f} {ind}' # {dt}' .format(s=shot, fn=da.name, t=tslice, dt=dtstr, ind=ind)) if cfg_dict is not None: plot_trim(axu, mag_dict=cfg_dict, color='g', aspect=1.2) if time_strip_h > 0: locator = MaxNLocator(nbins=3) # , prune='upper') # This is for the time #probedata = dev.acq.getdata(shot,'W7X'+chan + '_I') from pyfusion.data.filters import dummysig # plot ECH til after probes so colours match up diags = ['ne18', 'Te'] axtwin = axtime.twinx() deflw = plt.rcParams['lines.linewidth'] for (i, diag) in enumerate(diags): for (pp, prch) in enumerate(probe_chans): probedata = dummysig(da['t_mid'], da[diag][prch]) probedata.signal = da.masked[diag][:, prch] # kludge probedata.utc = da['info']['params']['i_diag_utc']