##// END OF EJS Templates
jroproc_spectra module modified:...
jroproc_spectra module modified: -Flags were set correctly -Incoherent integration by time was updated

File last commit:

r568:486c66596e4c
r623:926e0eaac812
Show More
jroIO_example.py
103 lines | 2.2 KiB | text/x-python | PythonLexer
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 '''
Created on Jul 3, 2014
@author: roj-idl71
'''
import os
from schainpy.model.data.jrodata import Voltage
from schainpy.model.proc.jroproc_base import ProcessingUnit, Operation
class Reader(ProcessingUnit):
'''
classdocs
'''
def __init__(self):
'''
Constructor
'''
ProcessingUnit.__init__(self)
#Is really necessary create the output object in the initializer
self.dataOut = Voltage()
def setup(self, path = None,
startDate = None,
endDate = None,
startTime = None,
endTime = None,
set = None,
expLabel = "",
ext = None,
online = False,
delay = 60,
walk = True):
'''
In this method we should set all initial parameters.
'''
Miguel Valdez
Merge with branch schain_julia_drifts from rev. 803 to 995....
r568 '''
Add code
'''
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 self.isConfig = True
def run(self, **kwargs):
'''
This method will be called many times so here you should put all your code
'''
if not self.isConfig:
self.setup(**kwargs)
Miguel Valdez
Merge with branch schain_julia_drifts from rev. 803 to 995....
r568 '''
Add code
'''
Daniel Valdez
This is the new organization by packages and scripts for Signal Chain, this version contains new features and bugs fixed until August 2014
r487 class Writer(Operation):
'''
classdocs
'''
def __init__(self):
'''
Constructor
'''
self.dataOut = None
self.isConfig = False
def setup(self, dataIn, path, blocksPerFile, set=0, ext=None):
'''
In this method we should set all initial parameters.
Input:
dataIn : Input data will also be outputa data
'''
self.dataOut = dataIn
self.isConfig = True
return
def run(self, dataIn, **kwargs):
'''
This method will be called many times so here you should put all your code
Inputs:
dataIn : object with the data
'''
if not self.isConfig:
self.setup(dataIn, **kwargs)