diff --git a/CHANGELOG.md b/CHANGELOG.md index b3230cc..9f5379f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,8 +8,8 @@ * Added new type of operation `external` for non-locking operations * New plotting architecture with buffering/throttle capabilities to speed up plots * Clean controller to optimize scripts (format & optype are no longer required) -* Replace ParamReader and ParamWriter with new flexible HDFReader and HDFWriter -* New GUI with dinamic load of Units and operations (use Kivy framework) +* Replace `ParamReader` and `ParamWriter` with new flexible `HDFReader` and `HDFWriter` +* New GUI with dynamic load of Units and operations (use Kivy framework) * Clean code ## 2.3 @@ -42,32 +42,32 @@ * Numpy version updated. * Migration to GIT. -## 2.2.5: +## 2.2.5 * splitProfiles and combineProfiles modules were added to VoltageProc and Signal Chain GUI. * nProfiles of USRP data (hdf5) is the number of profiles thera are in one second. * jroPlotter works directly with data objects instead of dictionaries * script "schain" was added to Signal Chain installer -## 2.2.4.1: +## 2.2.4.1 -* jroIO_usrp.py is update to read Sandra's data +* jroIO_usrp.py is update to read Sandra's data * decimation in Spectra and RTI plots is always enabled. * time* window option added to GUI -## 2.2.4: +## 2.2.4 * jroproc_spectra_lags.py added to schainpy * Bug fixed in schainGUI: ProcUnit was created with the same id in some cases. * Bug fixed in jroHeaderIO: Header size validation. -## 2.2.3.1: +## 2.2.3.1 * Filtering block by time has been added. * Bug fixed plotting RTI, CoherenceMap and others using xmin and xmax parameters. The first day worked properly but the next days did not. -## 2.2.3: +## 2.2.3 * Bug fixed in GUI: Error getting(reading) Code value * Bug fixed in GUI: Flip option always needs channelList field @@ -75,12 +75,12 @@ properly but the next days did not. was modified for every branch (because this was a reference). It was modified in data.copy() * Bug fixed in jroproc_voltage.profileSelector(): rangeList replaces to profileRangeList. -## 2.2.2: +## 2.2.2 * VoltageProc: ProfileSelector, Reshape, Decoder with nTxs!=1 and getblock=True was tested * Rawdata and testRawdata.py added to Signal Chain project -## 2.2.1: +## 2.2.1 * Bugs fixed in GUI * Views were improved in GUI @@ -88,56 +88,54 @@ was modified for every branch (because this was a reference). It was modified in * Bug fixed getting noise using hyldebrant. (minimum number of points > 20%) * handleError added to jroplotter.py -## 2.2.0: +## 2.2.0 * GUI: use of external plotter * Compatible with matplotlib 1.5.0 -## 2.1.5: +## 2.1.5 * serializer module added to Signal Chain * jroplotter.py added to Signal Chain -## 2.1.4.2: +## 2.1.4.2 * A new Plotter Class was added * Project.start() does not accept filename as a parameter anymore -## 2.1.4.1: +## 2.1.4.1 * Send notifications when an error different to ValueError is detected -## 2.1.4: +## 2.1.4 * Sending error notifications to signal chain administrator * Login to email server added -## 2.1.3.3: +## 2.1.3.3 * Colored Button Icons were added to GUI -## 2.1.3.2: +## 2.1.3.2 * GUI: user interaction enhanced * controller_api.py: Safe access to ControllerThead -## 2.1.3.1: +## 2.1.3.1 * GUI: every icon were resized * jroproc_voltage.py: Print a message when "Read from code" option is selected and the code is not defined inside data file -## 2.1.3: +## 2.1.3 * jroplot_heispectra.py: SpectraHeisScope was not showing the right channels -* jroproc_voltage.py: Bug fixed selecting profiles (self.nProfiles took a wrong value), - Bug fixed selecting heights by block (selecting profiles instead heights) +* jroproc_voltage.py: Bug fixed selecting profiles (self.nProfiles took a wrong value), Bug fixed selecting heights by block (selecting profiles instead heights) * jroproc_voltage.py: New feature added: decoding data by block using FFT. * jroIO_heispectra.py: Bug fixed in FitsReader. Using local Fits instance instead schainpy.mode.data.jrodata.Fits. * jroIO_heispectra.py: Channel index list does not exist. -## 2.1.2: +## 2.1.2 -* 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 +* 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 * jroplot_spectra.py: Noise path was not being created when noise data is saved. -* jroIO_base.py: startTime can be greater than endTime. Example: SpreadF [18:00 * 07:00] \ No newline at end of file +* jroIO_base.py: startTime can be greater than endTime. Example: SpreadF diff --git a/README.md b/README.md index fdc0d00..d288ad6 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,9 @@ data. ## Installation -To get started the easiest way to install it is through [PyPI](https://pypi.org/project/schainpy/) with pip: +To get started the easiest way to install it is through +[PyPI](https://pypi.org/project/schainpy/) with pip. We strongly recommend to +use an virtual environment like virtualenv or anaconda. ```bash pip install schainpy @@ -25,7 +27,7 @@ First, ensure that you have the above-listed dependencies installed, then clone the repository and install as normal python package: ```bash -git clone https://github.com/JRO-Peru/schain.git +git clone https://github.com/JRO-Peru/schainpy.git cd schain git checkout `branch-name` (optional) sudo pip install ./ diff --git a/schainpy/__init__.py b/schainpy/__init__.py index e3ec674..55cce8f 100644 --- a/schainpy/__init__.py +++ b/schainpy/__init__.py @@ -5,4 +5,4 @@ try: except: pass -__version__ = '3.0.0b3' +__version__ = '3.0.0b4' diff --git a/schainpy/model/io/jroIO_param.py b/schainpy/model/io/jroIO_param.py index 60bc62a..1eaa55b 100644 --- a/schainpy/model/io/jroIO_param.py +++ b/schainpy/model/io/jroIO_param.py @@ -365,21 +365,24 @@ class HDFWriter(Operation): self.path = path self.blocksPerFile = blocksPerFile self.metadataList = metadataList - self.dataList = dataList + self.dataList = [s.strip() for s in dataList] self.setType = setType self.description = description - for s in ['type', 'timeZone', 'useLocalTime']: - if s not in self.metadataList: - self.metadataList.append(s) + if self.metadataList is None: + self.metadataList = self.dataOut.metadata_list tableList = [] dsList = [] for i in range(len(self.dataList)): dsDict = {} - dataAux = getattr(self.dataOut, self.dataList[i]) - dsDict['variable'] = self.dataList[i] + if hasattr(self.dataOut, self.dataList[i]): + dataAux = getattr(self.dataOut, self.dataList[i]) + dsDict['variable'] = self.dataList[i] + else: + log.warning('Attribute {} not found in dataOut', self.name) + continue if dataAux is None: continue @@ -419,7 +422,7 @@ class HDFWriter(Operation): self.lastTime = currentTime return False - def run(self, dataOut, path, blocksPerFile=10, metadataList=[], + def run(self, dataOut, path, blocksPerFile=10, metadataList=None, dataList=[], setType=None, description={}): self.dataOut = dataOut @@ -516,7 +519,10 @@ class HDFWriter(Operation): elif isinstance(meta[name], dict): for key, value in meta[name].items(): return value[x] - return 'channel{:02d}'.format(x) + if 'cspc' in name: + return 'pair{:02d}'.format(x) + else: + return 'channel{:02d}'.format(x) def writeMetadata(self, fp): diff --git a/setup.py b/setup.py index 74eb5fc..64f96f3 100644 --- a/setup.py +++ b/setup.py @@ -29,9 +29,9 @@ setup( version = __version__, description = DOCLINES[0], long_description = "\n".join(DOCLINES[2:]), - url = "https://github.com/JRO-Peru/schain", + url = "https://github.com/JRO-Peru/schainpy", author = "Jicamarca Radio Observatory", - author_email = "jro-developers@igp.gob.pe", + author_email = "jro-developers@jro.igp.gob.pe", license="BSD-3-Clause", classifiers=[ "Development Status :: 4 - Beta",