|
11 | 11 |
|
12 | 12 | from typing import Optional |
13 | 13 |
|
14 | | -from ._schemas import InputParameters, OutputParameters |
15 | | -from ._current_source_density import ( |
16 | | - accumulate_lfp_data, |
17 | | - compute_csd, |
18 | | - extract_trial_windows |
19 | | -) |
20 | | -from ._filter_utils import filter_lfp_channels, select_good_channels |
21 | | -from ._interpolation_utils import ( |
22 | | - interp_channel_locs, |
23 | | - make_actual_channel_locations, |
24 | | - make_interp_channel_locations |
25 | | -) |
| 14 | +from allensdk.brain_observatory.ecephys.current_source_density._schemas \ |
| 15 | + import \ |
| 16 | + InputParameters, OutputParameters |
| 17 | +from allensdk.brain_observatory.ecephys.current_source_density.\ |
| 18 | + _current_source_density import ( |
| 19 | + accumulate_lfp_data, |
| 20 | + compute_csd, |
| 21 | + extract_trial_windows |
| 22 | + ) |
| 23 | +from allensdk.brain_observatory.ecephys.current_source_density._filter_utils \ |
| 24 | + import filter_lfp_channels, select_good_channels |
| 25 | +from allensdk.brain_observatory.ecephys.current_source_density\ |
| 26 | + ._interpolation_utils import ( |
| 27 | + interp_channel_locs, |
| 28 | + make_actual_channel_locations, |
| 29 | + make_interp_channel_locations |
| 30 | + ) |
26 | 31 | from allensdk.brain_observatory.ecephys.file_io.continuous_file import ( |
27 | 32 | ContinuousFile |
28 | 33 | ) |
@@ -75,6 +80,13 @@ def run_csd(args: dict) -> dict: |
75 | 80 |
|
76 | 81 | stimulus_table = pd.read_csv(args['stimulus']['stimulus_table_path']) |
77 | 82 |
|
| 83 | + # backwards compatibility |
| 84 | + stimulus_table['stimulus_name'] = stimulus_table['stimulus_name'].apply( |
| 85 | + lambda x: args['stimulus']['key'] if x == 'flashes' else x) |
| 86 | + if args['start_field'] not in stimulus_table: |
| 87 | + stimulus_table = stimulus_table.rename( |
| 88 | + columns={'Start': args['start_field']}) |
| 89 | + |
78 | 90 | probewise_outputs = [] |
79 | 91 | for probe_idx, probe in enumerate(args['probes']): |
80 | 92 | logging.info('Processing probe: {} (index: {})'.format(probe['name'], |
|
0 commit comments