else: os.chdir(workDir) # print ('curDir = %s' % os.getcwd()) # print ('SBF = %s' % os.path.isfile(nameSBF)) # check whether the SBF datafile exists if not os.path.isfile(nameSBF): sys.stderr.write('SBF datafile %s does not exists. Exiting.\n' % nameSBF) sys.exit(E_FILE_NOT_EXIST) # execute the conversion sbf2stf needed SBF2STFOPTS = ['MeasEpoch_2', 'MeasExtra_1'] # options for conversion, ORDER IMPORTANT!! sbf2stfConverted = sbf2stf.runSBF2STF(nameSBF, SBF2STFOPTS, overwrite, verbose) # print('SBF2STFOPTS = %s' % SBF2STFOPTS) for option in SBF2STFOPTS: # print('option = %s - %d' % (option, SBF2STFOPTS.index(option))) if option == 'MeasEpoch_2': # read the MeasEpoch data into a numpy array dataMeas = sbf2stf.readMeasEpoch( sbf2stfConverted[SBF2STFOPTS.index(option)], verbose) elif option == 'MeasExtra_1': # read the MeasExtra data into numpy array dataExtra = sbf2stf.readMeasExtra( sbf2stfConverted[SBF2STFOPTS.index(option)], verbose) else: print(' wrong option %s given.' % option) sys.exit(E_WRONG_OPTION)
sys.exit(E_DIR_NOT_EXIST) else: if os.chdir(workDir) is False: sys.exit('Problem changing to directory %s. Exiting.\n' % workDir) # print('curDir = %s' % os.getcwd()) # print('SBF = %s' % os.path.isfile(nameSBF)) # check whether the SBF datafile exists if not os.path.isfile(nameSBF): sys.stderr.write('SBF datafile %s does not exists. Exiting.\n' % nameSBF) sys.exit(E_FILE_NOT_EXIST) # execute the conversion sbf2stf needed SBF2STFOPTS = ['MeasEpoch_2', 'MeasExtra_1'] # options for conversion, ORDER IMPORTANT!! sbf2stfConverted = sbf2stf.runSBF2STF(nameSBF, SBF2STFOPTS, overwrite, verbose) # print('SBF2STFOPTS = %s' % SBF2STFOPTS) for option in SBF2STFOPTS: # print('option = %s - %d' % (option, SBF2STFOPTS.index(option))) if option == 'MeasEpoch_2': # read the MeasEpoch data into a numpy array dataMeas = sbf2stf.readMeasEpoch(sbf2stfConverted[SBF2STFOPTS.index(option)], verbose) elif option == 'MeasExtra_1': # read the MeasExtra data into numpy array dataExtra = sbf2stf.readMeasExtra(sbf2stfConverted[SBF2STFOPTS.index(option)], verbose) else: print(' wrong option %s given.' % option) sys.exit(E_WRONG_OPTION) # check whether the same signaltypes are on corresponsing lines after sorting