Skip to content

Commit

Permalink
more robust method to get unique areas in a results file
Browse files Browse the repository at this point in the history
  • Loading branch information
egmcbride committed Dec 3, 2024
1 parent 5c5ca7e commit aa9bbb0
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/dynamic_routing_analysis/decoding_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1321,10 +1321,8 @@ def concat_decoder_results(files,savepath=None,return_table=True,single_session=
half_shifts=shifts

half_shift_inds=np.arange(len(half_shifts))

areas=decoder_results[session_id]['areas']

#TODO: ####option to exclude areas with multiple probes in a session or SC subdivisions####
areas=list(decoder_results[session_id]['results'].keys())

#TODO: add decoder accuracy using all trials (no shift)

Expand Down Expand Up @@ -1360,7 +1358,7 @@ def concat_decoder_results(files,savepath=None,return_table=True,single_session=
probe_name=aa.split('_probe')[1]
elif '_all' in aa:
area_name=aa.split('_all')[0]
probe_name='all_probes'
probe_name='all'
else:
area_name=aa
probe_name=''
Expand Down Expand Up @@ -1851,7 +1849,7 @@ def concat_trialwise_decoder_results(files,savepath=None,return_table=False,n_un
probe_name=aa.split('_probe')[1]
elif '_all' in aa:
area_name=aa.split('_all')[0]
probe_name='all_probes'
probe_name='all'
else:
area_name=aa
probe_name=''
Expand Down

0 comments on commit aa9bbb0

Please sign in to comment.