<jupyter_start><jupyter_text>Example 0Athor : <NAME> (<EMAIL>)We will learn how to plot a few ECEI channels and make an ECE image.  Step 0Import modules.<jupyter_code>%matplotlib inline 
import sys, os
sys.path.insert(0, os.pardir)
from fluctana import *<jupyter_output>/usr/local/anaconda2/lib/python2.7/site-packages/h5py/__init__.py:34: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
  from ._conv import register_converters as _register_converters<jupyter_text>Step 1 Make an instance for calculation and add data set.<jupyter_code>A = FluctAna()
A.add_data(dev='KSTAR', shot=18597, clist=['ECEI_G0101-0408'], trange=[1.78, 1.81])
#A.add_data(KstarMds(shot=18597, clist=['MC1T06']), trange=[1.78, 1.81], norm=0, res=0.000002)<jupyter_output>ECEI file = /eceidata2/exp_2017/018597/ECEI.018597.GFS.h5
Data is normalized by trange average ECEI<jupyter_text>You can check data set and channels as follows<jupyter_code>A.list_data()<jupyter_output>---- DATA SET # 0 for [1.780000, 1.810000] s ----
[000:ECEI_G0101][001:ECEI_G0102][002:ECEI_G0103][003:ECEI_G0104]
[004:ECEI_G0105][005:ECEI_G0106][006:ECEI_G0107][007:ECEI_G0108]
[008:ECEI_G0201][009:ECEI_G0202][010:ECEI_G0203][011:ECEI_G0204]
[012:ECEI_G0205][013:ECEI_G0206][014:ECEI_G0207][015:ECEI_G0208]
[016:ECEI_G0301][017:ECEI_G0302][018:ECEI_G0303][019:ECEI_G0304]
[020:ECEI_G0305][021:ECEI_G0306][022:ECEI_G0307][023:ECEI_G0308]
[024:ECEI_G0401][025:ECEI_G0402][026:ECEI_G0403][027:ECEI_G0404]
[028:ECEI_G0405][029:ECEI_G0406][030:ECEI_G0407][031:ECEI_G0408]<jupyter_text>A.add_data() takes an instance of 'KstarEcei' class as an input, and all the data and information is saved in that instance. It can be accessed as follows (A.Dlist[data set number])<jupyter_code>A.Dlist[0]<jupyter_output><empty_output><jupyter_text>Data is saved in 'data' of A.Dlist[0]. It has (channel number X data points) dimension<jupyter_code>print  A.Dlist[0].data.shape<jupyter_output>(32, 15001)<jupyter_text>The first channel data is (note that the data is normalized (default))<jupyter_code>print A.Dlist[0].data[0,:]<jupyter_output>[-0.28858685 -0.2404438  -0.34776906 ... -0.25209626 -0.27724104
 -0.30085259]<jupyter_text>Time base is<jupyter_code>print A.Dlist[0].time<jupyter_output>[1.78     1.780002 1.780004 ... 1.809996 1.809998 1.81    ]<jupyter_text>Channel positions are (in channel number ordering)<jupyter_code>print A.Dlist[0].rpos # R [m]
print A.Dlist[0].zpos # z [m]<jupyter_output>[2.17800437 2.15585517 2.13415193 2.11288132 2.09203051 2.07158722
 2.0515396  2.03187628 2.17800437 2.15585517 2.13415193 2.11288132
 2.09203051 2.07158722 2.0515396  2.03187628 2.17800437 2.15585517
 2.13415193 2.11288132 2.09203051 2.07158722 2.0515396  2.03187628
 2.17800437 2.15585517 2.13415193 2.11288132 2.09203051 2.07158722
 2.0515396  2.03187628]
[-0.23291438 -0.23270019 -0.23249031 -0.23228462 -0.23208299 -0.2318853
 -0.23169144 -0.23150129 -0.21266095 -0.21246539 -0.21227377 -0.21208596
 -0.21190186 -0.21172136 -0.21154436 -0.21137074 -0.19240753 -0.19223059
 -0.19205722 -0.1918873  -0.19172073 -0.19155742 -0.19139727 -0.1912402
 -0.1721541  -0.17199579 -0.17184067 -0.17168863 -0.1715396  -0.17139348
 -0.17125019 -0.17110965]<jupyter_text>Step 2Plot a few channels (channel number 0, 10, 20) in data set number 0 in multiple windows.<jupyter_code>A.mplot(dnum=0,cnl=[0,10,20],type='time')<jupyter_output><empty_output><jupyter_text>Plot a few channels (channel number 0, 10, 20) in data set number 0 in single window (overlapping)<jupyter_code>A.oplot(dnum=0,cnl=[0,10,20],type='time')<jupyter_output>dnum 0 : channel ECEI_G0101 is plotted
dnum 0 : channel ECEI_G0203 is plotted
dnum 0 : channel ECEI_G0305 is plotted<jupyter_text>Plot spectrums of a few channels (channel number 0, 10, 20) in data set number 0 in multiple windows<jupyter_code>A.spec(dnum=0,cnl=[0,10,20],climits=[-100,-30],flimits=[0,50000])<jupyter_output><empty_output><jupyter_text>Plot (interactively) ECE image of data set number 0 with sample channel number 0<jupyter_code>A.iplot(dnum=0,snum=0,vlimits=[-0.1,0.1])<jupyter_output>automatic, or manual [0,1]: 0
time step [idx]: 10000
{'fraction_non_alphanumeric': 0.13758231420507996, 'fraction_numerical': 0.24882408278457196, 'mean_word_length': 6.184121621621622, 'pattern_counts': {'":': 0, '<': 42, '<?xml version=': 0, '>': 42, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '12', 'dir': 'jupyter-structured-clean-dedup', 'id': '133443', 'license': 'MIT', 'n_tokens_mistral': 2501, 'n_tokens_neox': 1890, 'n_words': 351, 'path': 'examples/tutorial0.ipynb', 'repo_name': 'minjunJchoi/fluctana', 'size': '4270'}