[FOLDER RESTURCTURING #22] some changes in path variables
This commit is contained in:
parent
7c5e16ecc6
commit
0dc5aff3fc
1
PyLoT.py
1
PyLoT.py
@ -1324,6 +1324,7 @@ class MainWindow(QMainWindow):
|
|||||||
return True
|
return True
|
||||||
|
|
||||||
def modify_project_path(self, new_rootpath):
|
def modify_project_path(self, new_rootpath):
|
||||||
|
# TODO: change root to datapath
|
||||||
self.project.rootpath = new_rootpath
|
self.project.rootpath = new_rootpath
|
||||||
for event in self.project.eventlist:
|
for event in self.project.eventlist:
|
||||||
event.rootpath = new_rootpath
|
event.rootpath = new_rootpath
|
||||||
|
@ -794,8 +794,8 @@ class PilotDataStructure(GenericDataStructure):
|
|||||||
|
|
||||||
def __init__(self, **fields):
|
def __init__(self, **fields):
|
||||||
if not fields:
|
if not fields:
|
||||||
fields = {'database': '2006.01',
|
fields = {'database': '',
|
||||||
'root': '/data/Egelados/EVENT_DATA/LOCAL'}
|
'root': ''}
|
||||||
|
|
||||||
GenericDataStructure.__init__(self, **fields)
|
GenericDataStructure.__init__(self, **fields)
|
||||||
|
|
||||||
|
@ -376,7 +376,7 @@ def picks_from_picksdict(picks, creation_info=None):
|
|||||||
|
|
||||||
def reassess_pilot_db(root_dir, db_dir, out_dir=None, fn_param=None, verbosity=0):
|
def reassess_pilot_db(root_dir, db_dir, out_dir=None, fn_param=None, verbosity=0):
|
||||||
import glob
|
import glob
|
||||||
|
# TODO: change root to datapath
|
||||||
db_root = os.path.join(root_dir, db_dir)
|
db_root = os.path.join(root_dir, db_dir)
|
||||||
evt_list = glob.glob1(db_root, 'e????.???.??')
|
evt_list = glob.glob1(db_root, 'e????.???.??')
|
||||||
|
|
||||||
@ -391,6 +391,7 @@ def reassess_pilot_event(root_dir, db_dir, event_id, out_dir=None, fn_param=None
|
|||||||
|
|
||||||
from pylot.core.io.inputs import PylotParameter
|
from pylot.core.io.inputs import PylotParameter
|
||||||
from pylot.core.pick.utils import earllatepicker
|
from pylot.core.pick.utils import earllatepicker
|
||||||
|
# TODO: change root to datapath
|
||||||
|
|
||||||
if fn_param is None:
|
if fn_param is None:
|
||||||
fn_param = defaults.AUTOMATIC_DEFAULTS
|
fn_param = defaults.AUTOMATIC_DEFAULTS
|
||||||
@ -483,7 +484,6 @@ def reassess_pilot_event(root_dir, db_dir, event_id, out_dir=None, fn_param=None
|
|||||||
os.makedirs(out_dir)
|
os.makedirs(out_dir)
|
||||||
fnout_prefix = os.path.join(out_dir, 'PyLoT_{0}.'.format(event_id))
|
fnout_prefix = os.path.join(out_dir, 'PyLoT_{0}.'.format(event_id))
|
||||||
evt.write(fnout_prefix + 'xml', format='QUAKEML')
|
evt.write(fnout_prefix + 'xml', format='QUAKEML')
|
||||||
# evt.write(fnout_prefix + 'cnv', format='VELEST')
|
|
||||||
|
|
||||||
|
|
||||||
def writephases(arrivals, fformat, filename, parameter=None, eventinfo=None):
|
def writephases(arrivals, fformat, filename, parameter=None, eventinfo=None):
|
||||||
|
@ -400,6 +400,7 @@ class PDFstatistics(object):
|
|||||||
This object can be used to get various statistic values from probability density functions.
|
This object can be used to get various statistic values from probability density functions.
|
||||||
Takes a path as argument.
|
Takes a path as argument.
|
||||||
"""
|
"""
|
||||||
|
# TODO: change root to datapath
|
||||||
|
|
||||||
def __init__(self, directory):
|
def __init__(self, directory):
|
||||||
"""Initiates some values needed when dealing with pdfs later"""
|
"""Initiates some values needed when dealing with pdfs later"""
|
||||||
|
@ -380,7 +380,7 @@ def check_time(datetime):
|
|||||||
except ValueError:
|
except ValueError:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
# TODO: change root to datapath
|
||||||
def get_file_list(root_dir):
|
def get_file_list(root_dir):
|
||||||
"""
|
"""
|
||||||
Function uses a directorie to get all the *.gse files from it.
|
Function uses a directorie to get all the *.gse files from it.
|
||||||
|
@ -61,10 +61,9 @@ from pylot.core.util.dataprocessing import Metadata
|
|||||||
|
|
||||||
if sys.version_info.major == 3:
|
if sys.version_info.major == 3:
|
||||||
import icons_rc_3 as icons_rc
|
import icons_rc_3 as icons_rc
|
||||||
elif sys.version_info.major == 2:
|
|
||||||
import icons_rc_2 as icons_rc
|
|
||||||
else:
|
else:
|
||||||
raise ImportError('Could not determine python version.')
|
raise ImportError(f'Python version {sys.version_info.major} of current interpreter not supported.'
|
||||||
|
f'\nPlease use Python 3+.')
|
||||||
|
|
||||||
|
|
||||||
# workaround to prevent PyCharm from deleting icons_rc import when optimizing imports
|
# workaround to prevent PyCharm from deleting icons_rc import when optimizing imports
|
||||||
@ -4589,7 +4588,7 @@ class InputsTab(PropTab):
|
|||||||
self.fullNameEdit.setText(fulluser)
|
self.fullNameEdit.setText(fulluser)
|
||||||
except TypeError as e:
|
except TypeError as e:
|
||||||
self.fullNameEdit.setText(fulluser[0])
|
self.fullNameEdit.setText(fulluser[0])
|
||||||
|
# TODO: check settings and substitute datapath for root
|
||||||
# information about data structure
|
# information about data structure
|
||||||
dataroot = settings.value("data/dataRoot")
|
dataroot = settings.value("data/dataRoot")
|
||||||
curstructure = settings.value("data/Structure")
|
curstructure = settings.value("data/Structure")
|
||||||
|
Loading…
Reference in New Issue
Block a user