12
12
13
13
schema = dj .schema ()
14
14
15
- _required_module = None
15
+ _linking_module = None
16
16
17
17
18
18
def activate (ephys_schema_name , probe_schema_name = None , * , create_schema = True ,
19
- create_tables = True , required_module = None ):
19
+ create_tables = True , linking_module = None ):
20
20
"""
21
- activate(ephys_schema_name, probe_schema_name=None, *, create_schema=True, create_tables=True, dependency =None)
22
- :param ephys_schema_name: schema name to activate the `ephys` element
23
- :param probe_schema_name: schema name to activate the `probe` element
21
+ activate(ephys_schema_name, probe_schema_name=None, *, create_schema=True, create_tables=True, linking_module =None)
22
+ :param ephys_schema_name: schema name on the database server to activate the `ephys` element
23
+ :param probe_schema_name: schema name on the database server to activate the `probe` element
24
24
- may be omitted if the `probe` element is already activated
25
- :param create_schema: create the schema if not yet existed (default = True)
26
- :param create_tables: create the tables if not yet existed (default = True)
27
- :param required_module : a module name or a module containing the
25
+ :param create_schema: when True (default), create schema in the database if it does not yet exist.
26
+ :param create_tables: when True (default), create tables in the database if they do not yet exist.
27
+ :param linking_module : a module name or a module containing the
28
28
required dependencies to activate the `ephys` element:
29
29
Upstream tables:
30
30
+ Session: parent table to ProbeInsertion, typically identifying a recording session
@@ -45,17 +45,17 @@ def activate(ephys_schema_name, probe_schema_name=None, *, create_schema=True,
45
45
:return: int specifying the `paramset_idx`
46
46
"""
47
47
48
- if isinstance (required_module , str ):
49
- required_module = importlib .import_module (required_module )
50
- assert inspect .ismodule (required_module ), "The argument 'dependency' must be a module's name or a module"
48
+ if isinstance (linking_module , str ):
49
+ linking_module = importlib .import_module (linking_module )
50
+ assert inspect .ismodule (linking_module ), "The argument 'dependency' must be a module's name or a module"
51
51
52
- global _required_module
53
- _required_module = required_module
52
+ global _linking_module
53
+ _linking_module = linking_module
54
54
55
55
# activate
56
56
probe .schema .activate (probe_schema_name , create_schema = create_schema , create_tables = create_tables )
57
57
schema .activate (ephys_schema_name , create_schema = create_schema ,
58
- create_tables = create_tables , add_objects = _required_module .__dict__ )
58
+ create_tables = create_tables , add_objects = _linking_module .__dict__ )
59
59
60
60
61
61
# -------------- Functions required by the elements-ephys ---------------
@@ -68,7 +68,7 @@ def get_neuropixels_data_directory(probe_insertion_key: dict) -> str:
68
68
:param probe_insertion_key: a dictionary of one ProbeInsertion `key`
69
69
:return: a string for full path to the resulting Neuropixels data directory
70
70
"""
71
- return _required_module .get_neuropixels_data_directory (probe_insertion_key )
71
+ return _linking_module .get_neuropixels_data_directory (probe_insertion_key )
72
72
73
73
74
74
def get_kilosort_output_directory (clustering_task_key : dict ) -> str :
@@ -78,7 +78,7 @@ def get_kilosort_output_directory(clustering_task_key: dict) -> str:
78
78
:param clustering_task_key: a dictionary of one ClusteringTask `key`
79
79
:return: a string for full path to the resulting Kilosort output directory
80
80
"""
81
- return _required_module .get_kilosort_output_directory (clustering_task_key )
81
+ return _linking_module .get_kilosort_output_directory (clustering_task_key )
82
82
83
83
84
84
def get_paramset_idx (ephys_rec_key : dict ) -> int :
@@ -88,7 +88,7 @@ def get_paramset_idx(ephys_rec_key: dict) -> int:
88
88
:param ephys_rec_key: a dictionary of one EphysRecording `key`
89
89
:return: int specifying the `paramset_idx`
90
90
"""
91
- return _required_module .get_paramset_idx (ephys_rec_key )
91
+ return _linking_module .get_paramset_idx (ephys_rec_key )
92
92
93
93
94
94
# ----------------------------- Table declarations ----------------------
0 commit comments