@@ -118,6 +118,27 class PlotData(Operation, Process): | |||
|
118 | 118 | eachfigure.canvas.manager.set_window_title('{} {} - {}'.format(self.title[n], self.CODE.upper(), |
|
119 | 119 | datetime.datetime.fromtimestamp(self.max_time).strftime('%Y/%m/%d'))) |
|
120 | 120 | |
|
121 | # if self.save: | |
|
122 | # if self.ind_plt_ch is False : #standard | |
|
123 | # figname = os.path.join(self.save, '{}_{}.png'.format(self.CODE, | |
|
124 | # datetime.datetime.fromtimestamp(self.saveTime).strftime('%y%m%d_%H%M%S'))) | |
|
125 | # print 'Saving figure: {}'.format(figname) | |
|
126 | # self.figure.savefig(figname) | |
|
127 | # else : | |
|
128 | # for n, eachfigure in enumerate(self.figurelist): | |
|
129 | # #add specific name for each channel in channelList | |
|
130 | # figname = os.path.join(self.save, '{}_{}_{}.png'.format(self.titles[n],self.CODE, | |
|
131 | # datetime.datetime.fromtimestamp(self.saveTime).strftime('%y%m%d_%H%M%S'))) | |
|
132 | # | |
|
133 | # print 'Saving figure: {}'.format(figname) | |
|
134 | # eachfigure.savefig(figname) | |
|
135 | ||
|
136 | if self.ind_plt_ch is False : | |
|
137 | self.figure.canvas.draw() | |
|
138 | else : | |
|
139 | for eachfigure in self.figurelist: | |
|
140 | eachfigure.canvas.draw() | |
|
141 | ||
|
121 | 142 | if self.save: |
|
122 | 143 | if self.ind_plt_ch is False : #standard |
|
123 | 144 | figname = os.path.join(self.save, '{}_{}.png'.format(self.CODE, |
@@ -133,11 +154,6 class PlotData(Operation, Process): | |||
|
133 | 154 | print 'Saving figure: {}'.format(figname) |
|
134 | 155 | eachfigure.savefig(figname) |
|
135 | 156 | |
|
136 | if self.ind_plt_ch is False : | |
|
137 | self.figure.canvas.draw() | |
|
138 | else : | |
|
139 | for eachfigure in self.figurelist: | |
|
140 | eachfigure.canvas.draw() | |
|
141 | 157 | |
|
142 | 158 | def plot(self): |
|
143 | 159 | |
@@ -576,11 +592,11 class PlotRTIData(PlotData): | |||
|
576 | 592 | ax.xaxis.set_major_formatter(FuncFormatter(func)) |
|
577 | 593 | ax.xaxis.set_major_locator(LinearLocator(6)) |
|
578 | 594 | ax.set_ylabel(self.ylabel) |
|
579 |
|
|
|
580 |
|
|
|
581 |
|
|
|
582 |
|
|
|
583 |
|
|
|
595 | if self.xmin is None: | |
|
596 | xmin = self.min_time | |
|
597 | else: | |
|
598 | xmin = (datetime.datetime.combine(self.dataOut.datatime.date(), | |
|
599 | datetime.time(self.xmin, 0, 0))-d1970).total_seconds() | |
|
584 | 600 | ax.set_xlim(xmin, xmax) |
|
585 | 601 | ax.firsttime = False |
|
586 | 602 | else: |
@@ -632,11 +648,11 class PlotRTIData(PlotData): | |||
|
632 | 648 | |
|
633 | 649 | self.axes[n].set_ylabel(self.ylabel) |
|
634 | 650 | |
|
635 |
|
|
|
636 |
|
|
|
637 |
|
|
|
638 |
|
|
|
639 |
|
|
|
651 | if self.xmin is None: | |
|
652 | xmin = self.min_time | |
|
653 | else: | |
|
654 | xmin = (datetime.datetime.combine(self.dataOut.datatime.date(), | |
|
655 | datetime.time(self.xmin, 0, 0))-d1970).total_seconds() | |
|
640 | 656 | |
|
641 | 657 | self.axes[n].set_xlim(xmin, xmax) |
|
642 | 658 | self.axes[n].firsttime = False |
@@ -5,6 +5,7 from schainpy.controller import Project, multiSchain | |||
|
5 | 5 | desc = "HF_EXAMPLE" |
|
6 | 6 | path='/home/ci-81/Documents/DATA/HFADATA/hfdata_2017/pdata/sp1_f0' |
|
7 | 7 | path = '/media/ci-81/Huancayo/DATA/hfradar_2016/pdata/sp1_f1' |
|
8 | path = '/media/ci-81/Huancayo/DATA/hfradar_2016/pdata/sp1_f1' | |
|
8 | 9 | def fiber(cursor, skip, q, dt): |
|
9 | 10 | |
|
10 | 11 | controllerObj = Project() |
@@ -18,7 +18,7 if __name__ == '__main__': | |||
|
18 | 18 | # proc1.addParameter(name='realtime', value='0', format='bool') |
|
19 | 19 | #proc1.addParameter(name='plottypes', value='rti,coh,phase,snr,dop', format='str') |
|
20 | 20 | #proc1.addParameter(name='plottypes', value='rti,coh,phase,snr', format='str') |
|
21 | proc1.addParameter(name='plottypes', value='dop', format='str') | |
|
21 | proc1.addParameter(name='plottypes', value='snr,dop', format='str') | |
|
22 | 22 | |
|
23 | 23 | #proc1.addParameter(name='throttle', value='10', format='int') |
|
24 | 24 | |
@@ -54,7 +54,7 if __name__ == '__main__': | |||
|
54 | 54 | # proc2.addParameter(name='server', value='juanca', format='str') |
|
55 | 55 | # proc2.addParameter(name='plottypes', value='snr,dop', format='str') |
|
56 | 56 | # |
|
57 | ||
|
57 | """ | |
|
58 | 58 | op3 = proc1.addOperation(name='PlotSNRData', optype='other') |
|
59 | 59 | op3.addParameter(name='wintitle', value='HF System SNR0', format='str') |
|
60 | 60 | op3.addParameter(name='save', value='/home/ci-81/Pictures', format='str') |
@@ -62,7 +62,8 if __name__ == '__main__': | |||
|
62 | 62 | op3.addParameter(name='zmin', value='-10', format='int') |
|
63 | 63 | op3.addParameter(name='zmax', value='30', format='int') |
|
64 | 64 | op3.addParameter(name='SNRthresh', value='0', format='float') |
|
65 | """ | |
|
65 | op3.addParameter(name='ind_plt_ch',value='1',format = 'bool') | |
|
66 | ||
|
66 | 67 | # |
|
67 | 68 | op5 = proc1.addOperation(name='PlotDOPData', optype='other') |
|
68 | 69 | op5.addParameter(name='wintitle', value='HF System DOP', format='str') |
@@ -1,1 +1,1 | |||
|
1 |
<Project description="HF_EXAMPLE" id="191" name="test01"><ReadUnit datatype="SpectraReader" id="1911" inputId="0" name="SpectraReader"><Operation id="19111" name="run" priority="1" type="self"><Parameter format="str" id="191111" name="datatype" value="SpectraReader" /><Parameter format="str" id="191112" name="path" value="/media/ci-81/Huancayo/DATA/hfradar_2016/pdata/sp1_f1" /><Parameter format="date" id="191113" name="startDate" value="2016/04/2 |
|
|
1 | <Project description="HF_EXAMPLE" id="191" name="test01"><ReadUnit datatype="SpectraReader" id="1911" inputId="0" name="SpectraReader"><Operation id="19111" name="run" priority="1" type="self"><Parameter format="str" id="191111" name="datatype" value="SpectraReader" /><Parameter format="str" id="191112" name="path" value="/media/ci-81/Huancayo/DATA/hfradar_2016/pdata/sp1_f1" /><Parameter format="date" id="191113" name="startDate" value="2016/04/27" /><Parameter format="date" id="191114" name="endDate" value="2016/04/27" /><Parameter format="time" id="191115" name="startTime" value="00:00:00" /><Parameter format="time" id="191116" name="endTime" value="23:59:59" /><Parameter format="int" id="191118" name="cursor" value="0" /><Parameter format="int" id="191119" name="skip" value="0" /><Parameter format="int" id="191120" name="delay" value="10" /><Parameter format="int" id="191121" name="walk" value="1" /><Parameter format="int" id="191122" name="online" value="0" /></Operation></ReadUnit><ProcUnit datatype="ParametersProc" id="1913" inputId="1911" name="ParametersProc"><Operation id="19131" name="run" priority="1" type="self" /><Operation id="19132" name="SpectralMoments" priority="2" type="other" /><Operation id="19133" name="PublishData" priority="3" type="other"><Parameter format="int" id="191331" name="zeromq" value="1" /></Operation></ProcUnit><ProcUnit datatype="Spectra" id="1912" inputId="1911" name="SpectraProc"><Operation id="19121" name="run" priority="1" type="self" /><Operation id="19122" name="removeInterference" priority="2" type="self" /></ProcUnit></Project> No newline at end of file |
General Comments 0
You need to be logged in to leave comments.
Login now