data reading interface not clear yet, major changes have to be done to the data structure and the data reading part of PyLoT (DataStructure superclass is needed providing generalized methods to use by the Data object)
This commit is contained in:
parent
367610d032
commit
15bdc47f84
22
autoPyLoT.py
22
autoPyLoT.py
@ -36,13 +36,17 @@ def autoPyLoT(fnames, inputfile):
|
||||
|
||||
data = Data()
|
||||
|
||||
cfP = METHOD[parameter.getParam('algoP')]()
|
||||
meth = parameter.getParam('algoP')
|
||||
tsnr1 = parameter.getParam('tsnr1')
|
||||
tsnr2 = parameter.getParam('tsnr2')
|
||||
tnoise = parameter.getParam('pnoiselen')
|
||||
tsignal = parameter.getParam('tlim')
|
||||
order = parameter.getParam('hosorder')
|
||||
thosmw = parameter.getParam('tlta')
|
||||
|
||||
if parameter.hasParam('datastructure'):
|
||||
datastructure = DATASTRUCTURE[parameter.getParam('datastructure')]()
|
||||
|
||||
dsfields = {'root':parameter.rootpath} #see TODO: in data.py
|
||||
|
||||
dsfields = {'root':parameter.getParam('rootpath')} #see TODO: in data.py
|
||||
datastructure.modifyFields(dsfields)
|
||||
|
||||
def expandSDS(datastructure):
|
||||
@ -55,7 +59,11 @@ def autoPyLoT(fnames, inputfile):
|
||||
|
||||
expandMethod = dsem[datastructure.getName()]
|
||||
|
||||
data.setWFData(expandMethod())
|
||||
else:
|
||||
data.setWFData()
|
||||
|
||||
cfP = METHOD[meth](data.getWFData(), (tnoise, tsignal), thosmw, order)
|
||||
|
||||
if __name__ == "__main__":
|
||||
# parse arguments
|
||||
@ -70,8 +78,8 @@ if __name__ == "__main__":
|
||||
action='store',
|
||||
help='''full path to the file containing the input
|
||||
parameters for autoPyLoT''',
|
||||
default=os.path.join([os.path.expanduser('~'),
|
||||
'autoPyLoT.in'])
|
||||
default=os.path.join(os.path.expanduser('~'), '.pylot',
|
||||
'autoPyLoT.in')
|
||||
)
|
||||
parser.add_argument('-v', '-V', '--version', action='version',
|
||||
version='autoPyLoT ' + __version__,
|
||||
@ -79,4 +87,4 @@ if __name__ == "__main__":
|
||||
|
||||
cla = parser.parse_args()
|
||||
|
||||
autoPyLoT(cla.data, cla.input)
|
||||
autoPyLoT(cla.data, str(cla.inputfile))
|
||||
|
Loading…
Reference in New Issue
Block a user