##// END OF EJS Templates
HDFWriter create metadata if not given, update setup files
jespinoza -
r1339:2c655c5faa65 v3.0.0b4
parent child
Show More
@@ -8,8 +8,8
8 8 * Added new type of operation `external` for non-locking operations
9 9 * New plotting architecture with buffering/throttle capabilities to speed up plots
10 10 * Clean controller to optimize scripts (format & optype are no longer required)
11 * Replace ParamReader and ParamWriter with new flexible HDFReader and HDFWriter
12 * New GUI with dinamic load of Units and operations (use Kivy framework)
11 * Replace `ParamReader` and `ParamWriter` with new flexible `HDFReader` and `HDFWriter`
12 * New GUI with dynamic load of Units and operations (use Kivy framework)
13 13 * Clean code
14 14
15 15 ## 2.3
@@ -42,32 +42,32
42 42 * Numpy version updated.
43 43 * Migration to GIT.
44 44
45 ## 2.2.5:
45 ## 2.2.5
46 46
47 47 * splitProfiles and combineProfiles modules were added to VoltageProc and Signal Chain GUI.
48 48 * nProfiles of USRP data (hdf5) is the number of profiles thera are in one second.
49 49 * jroPlotter works directly with data objects instead of dictionaries
50 50 * script "schain" was added to Signal Chain installer
51 51
52 ## 2.2.4.1:
52 ## 2.2.4.1
53 53
54 * jroIO_usrp.py is update to read Sandra's data
54 * jroIO_usrp.py is update to read Sandra's data
55 55 * decimation in Spectra and RTI plots is always enabled.
56 56 * time* window option added to GUI
57 57
58 ## 2.2.4:
58 ## 2.2.4
59 59
60 60 * jroproc_spectra_lags.py added to schainpy
61 61 * Bug fixed in schainGUI: ProcUnit was created with the same id in some cases.
62 62 * Bug fixed in jroHeaderIO: Header size validation.
63 63
64 ## 2.2.3.1:
64 ## 2.2.3.1
65 65
66 66 * Filtering block by time has been added.
67 67 * Bug fixed plotting RTI, CoherenceMap and others using xmin and xmax parameters. The first day worked
68 68 properly but the next days did not.
69 69
70 ## 2.2.3:
70 ## 2.2.3
71 71
72 72 * Bug fixed in GUI: Error getting(reading) Code value
73 73 * Bug fixed in GUI: Flip option always needs channelList field
@@ -75,12 +75,12 properly but the next days did not.
75 75 was modified for every branch (because this was a reference). It was modified in data.copy()
76 76 * Bug fixed in jroproc_voltage.profileSelector(): rangeList replaces to profileRangeList.
77 77
78 ## 2.2.2:
78 ## 2.2.2
79 79
80 80 * VoltageProc: ProfileSelector, Reshape, Decoder with nTxs!=1 and getblock=True was tested
81 81 * Rawdata and testRawdata.py added to Signal Chain project
82 82
83 ## 2.2.1:
83 ## 2.2.1
84 84
85 85 * Bugs fixed in GUI
86 86 * Views were improved in GUI
@@ -88,56 +88,54 was modified for every branch (because this was a reference). It was modified in
88 88 * Bug fixed getting noise using hyldebrant. (minimum number of points > 20%)
89 89 * handleError added to jroplotter.py
90 90
91 ## 2.2.0:
91 ## 2.2.0
92 92
93 93 * GUI: use of external plotter
94 94 * Compatible with matplotlib 1.5.0
95 95
96 ## 2.1.5:
96 ## 2.1.5
97 97
98 98 * serializer module added to Signal Chain
99 99 * jroplotter.py added to Signal Chain
100 100
101 ## 2.1.4.2:
101 ## 2.1.4.2
102 102
103 103 * A new Plotter Class was added
104 104 * Project.start() does not accept filename as a parameter anymore
105 105
106 ## 2.1.4.1:
106 ## 2.1.4.1
107 107
108 108 * Send notifications when an error different to ValueError is detected
109 109
110 ## 2.1.4:
110 ## 2.1.4
111 111
112 112 * Sending error notifications to signal chain administrator
113 113 * Login to email server added
114 114
115 ## 2.1.3.3:
115 ## 2.1.3.3
116 116
117 117 * Colored Button Icons were added to GUI
118 118
119 ## 2.1.3.2:
119 ## 2.1.3.2
120 120
121 121 * GUI: user interaction enhanced
122 122 * controller_api.py: Safe access to ControllerThead
123 123
124 ## 2.1.3.1:
124 ## 2.1.3.1
125 125
126 126 * GUI: every icon were resized
127 127 * jroproc_voltage.py: Print a message when "Read from code" option is selected and the code is not defined inside data file
128 128
129 ## 2.1.3:
129 ## 2.1.3
130 130
131 131 * jroplot_heispectra.py: SpectraHeisScope was not showing the right channels
132 * jroproc_voltage.py: Bug fixed selecting profiles (self.nProfiles took a wrong value),
133 Bug fixed selecting heights by block (selecting profiles instead heights)
132 * jroproc_voltage.py: Bug fixed selecting profiles (self.nProfiles took a wrong value), Bug fixed selecting heights by block (selecting profiles instead heights)
134 133 * jroproc_voltage.py: New feature added: decoding data by block using FFT.
135 134 * jroIO_heispectra.py: Bug fixed in FitsReader. Using local Fits instance instead schainpy.mode.data.jrodata.Fits.
136 135 * jroIO_heispectra.py: Channel index list does not exist.
137 136
138 ## 2.1.2:
137 ## 2.1.2
139 138
140 * jroutils_ftp.py: Bug fixed, Any error sending file stopped the Server Thread
141 Server thread opens and closes remote server each time file list is sent
139 * jroutils_ftp.py: Bug fixed, Any error sending file stopped the Server Thread Server thread opens and closes remote server each time file list is sent
142 140 * jroplot_spectra.py: Noise path was not being created when noise data is saved.
143 * jroIO_base.py: startTime can be greater than endTime. Example: SpreadF [18:00 * 07:00] No newline at end of file
141 * jroIO_base.py: startTime can be greater than endTime. Example: SpreadF
@@ -13,7 +13,9 data.
13 13
14 14 ## Installation
15 15
16 To get started the easiest way to install it is through [PyPI](https://pypi.org/project/schainpy/) with pip:
16 To get started the easiest way to install it is through
17 [PyPI](https://pypi.org/project/schainpy/) with pip. We strongly recommend to
18 use an virtual environment like virtualenv or anaconda.
17 19
18 20 ```bash
19 21 pip install schainpy
@@ -25,7 +27,7 First, ensure that you have the above-listed dependencies installed, then clone
25 27 the repository and install as normal python package:
26 28
27 29 ```bash
28 git clone https://github.com/JRO-Peru/schain.git
30 git clone https://github.com/JRO-Peru/schainpy.git
29 31 cd schain
30 32 git checkout `branch-name` (optional)
31 33 sudo pip install ./
@@ -5,4 +5,4 try:
5 5 except:
6 6 pass
7 7
8 __version__ = '3.0.0b3'
8 __version__ = '3.0.0b4'
@@ -365,21 +365,24 class HDFWriter(Operation):
365 365 self.path = path
366 366 self.blocksPerFile = blocksPerFile
367 367 self.metadataList = metadataList
368 self.dataList = dataList
368 self.dataList = [s.strip() for s in dataList]
369 369 self.setType = setType
370 370 self.description = description
371 371
372 for s in ['type', 'timeZone', 'useLocalTime']:
373 if s not in self.metadataList:
374 self.metadataList.append(s)
372 if self.metadataList is None:
373 self.metadataList = self.dataOut.metadata_list
375 374
376 375 tableList = []
377 376 dsList = []
378 377
379 378 for i in range(len(self.dataList)):
380 379 dsDict = {}
381 dataAux = getattr(self.dataOut, self.dataList[i])
382 dsDict['variable'] = self.dataList[i]
380 if hasattr(self.dataOut, self.dataList[i]):
381 dataAux = getattr(self.dataOut, self.dataList[i])
382 dsDict['variable'] = self.dataList[i]
383 else:
384 log.warning('Attribute {} not found in dataOut', self.name)
385 continue
383 386
384 387 if dataAux is None:
385 388 continue
@@ -419,7 +422,7 class HDFWriter(Operation):
419 422 self.lastTime = currentTime
420 423 return False
421 424
422 def run(self, dataOut, path, blocksPerFile=10, metadataList=[],
425 def run(self, dataOut, path, blocksPerFile=10, metadataList=None,
423 426 dataList=[], setType=None, description={}):
424 427
425 428 self.dataOut = dataOut
@@ -516,7 +519,10 class HDFWriter(Operation):
516 519 elif isinstance(meta[name], dict):
517 520 for key, value in meta[name].items():
518 521 return value[x]
519 return 'channel{:02d}'.format(x)
522 if 'cspc' in name:
523 return 'pair{:02d}'.format(x)
524 else:
525 return 'channel{:02d}'.format(x)
520 526
521 527 def writeMetadata(self, fp):
522 528
@@ -29,9 +29,9 setup(
29 29 version = __version__,
30 30 description = DOCLINES[0],
31 31 long_description = "\n".join(DOCLINES[2:]),
32 url = "https://github.com/JRO-Peru/schain",
32 url = "https://github.com/JRO-Peru/schainpy",
33 33 author = "Jicamarca Radio Observatory",
34 author_email = "jro-developers@igp.gob.pe",
34 author_email = "jro-developers@jro.igp.gob.pe",
35 35 license="BSD-3-Clause",
36 36 classifiers=[
37 37 "Development Status :: 4 - Beta",
General Comments 0
You need to be logged in to leave comments. Login now