Skip to content
This repository has been archived by the owner on Jul 15, 2021. It is now read-only.

Commit

Permalink
dicarlo.BashivanKar2019 (#39)
Browse files Browse the repository at this point in the history
* Lookup and tests for BashivanKar2019.

* Revert packaging of dicarlo.BashivanKar2019 so I can repackage as only two assemblies.

* Consolidated assemblies for synthetic data (dicarlo.BashivanKar2019).  Added NaNs to tests.

* Trigger Travis.
  • Loading branch information
jjpr-mit authored Feb 4, 2021
1 parent b43c13f commit ff93098
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
# BrainIO collection

Utility to retrieve and write to the BrainIO collection of stimulus sets and assemblies.

6 changes: 6 additions & 0 deletions brainio_collection/lookup.csv
Original file line number Diff line number Diff line change
Expand Up @@ -228,3 +228,9 @@ aru.Kuzovkin2018,stimulus_set,,S3,https://brainio.contrib.s3.amazonaws.com/image
aru.Kuzovkin2018,assembly,NeuronRecordingAssembly,S3,https://brainio.contrib.s3.amazonaws.com/assy_aru_Kuzovkin2018.nc,5fae8b283a043562ce9925d48ad99db151f39067,aru.Kuzovkin2018
dicarlo.Rust2012.single,assembly,NeuronRecordingAssembly,S3,https://brainio.dicarlo.s3.amazonaws.com/assy_dicarlo_Rust2012_single.nc,4ef420e70fbd0de3745df5be7c83dfc0a8f2e528,dicarlo.Rust2012
dicarlo.Rust2012.array,assembly,NeuronRecordingAssembly,S3,https://brainio.dicarlo.s3.amazonaws.com/assy_dicarlo_Rust2012_array.nc,6709b641751370acfccd9567e3d75b71865a71ab,dicarlo.Rust2012
dicarlo.BashivanKar2019.naturalistic,stimulus_set,StimulusSet,S3,https://brainio.dicarlo.s3.amazonaws.com/image_dicarlo_BashivanKar2019_naturalistic.csv,48ef84282552b8796142ffe7d0d2c632f8ef061a,
dicarlo.BashivanKar2019.naturalistic,stimulus_set,,S3,https://brainio.dicarlo.s3.amazonaws.com/image_dicarlo_BashivanKar2019_naturalistic.zip,d7b71b431cf23d435395205f1e38036a9e10acca,
dicarlo.BashivanKar2019.naturalistic,assembly,NeuronRecordingAssembly,S3,https://brainio.dicarlo.s3.amazonaws.com/assy_dicarlo_BashivanKar2019_naturalistic.nc,1ec2f32ef800f0c6e15879d883be1d55b51b8b67,dicarlo.BashivanKar2019.naturalistic
dicarlo.BashivanKar2019.synthetic,stimulus_set,StimulusSet,S3,https://brainio.dicarlo.s3.amazonaws.com/image_dicarlo_BashivanKar2019_synthetic.csv,81da195e9b2a128b228fc4867e23ae6b21bd7abd,
dicarlo.BashivanKar2019.synthetic,stimulus_set,,S3,https://brainio.dicarlo.s3.amazonaws.com/image_dicarlo_BashivanKar2019_synthetic.zip,e2de33f25c5c19bcfb400055c1db399d553487e5,
dicarlo.BashivanKar2019.synthetic,assembly,NeuronRecordingAssembly,S3,https://brainio.dicarlo.s3.amazonaws.com/assy_dicarlo_BashivanKar2019_synthetic.nc,f687c8d26f8943dc379dbcbe94d3feb148400c6b,dicarlo.BashivanKar2019.synthetic
16 changes: 13 additions & 3 deletions tests/test_assemblies.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
'dicarlo.Kar2018hvm',
'dicarlo.Kar2018cocogray',
'klab.Zhang2018search_obj_array',
'aru.Kuzovkin2018',
'dicarlo.Rajalingham2020',
'dicarlo.SanghaviMurty2020',
'dicarlo.SanghaviJozwik2020',
Expand All @@ -42,7 +41,8 @@
'dicarlo.Seibert2019',
'dicarlo.Rust2012.single',
'dicarlo.Rust2012.array',
'dicarlo.BashivanKar2019.naturalistic',
'dicarlo.BashivanKar2019.synthetic',
))
def test_list_assembly(assembly):
l = brainio_collection.list_assemblies()
Expand Down Expand Up @@ -79,7 +79,8 @@ def test_list_assembly(assembly):
pytest.param('dicarlo.Seibert2019', marks=[pytest.mark.private_access]),
pytest.param('dicarlo.Rust2012.single', marks=[pytest.mark.private_access]),
pytest.param('dicarlo.Rust2012.array', marks=[pytest.mark.private_access]),
pytest.param('dicarlo.BashivanKar2019.naturalistic', marks=[pytest.mark.private_access]),
pytest.param('dicarlo.BashivanKar2019.synthetic', marks=[pytest.mark.private_access]),
])
def test_existence(assembly_identifier):
assert brainio_collection.get_assembly(assembly_identifier) is not None
Expand Down Expand Up @@ -318,3 +319,12 @@ def test_coords(self):
assert len(set(assembly['region'].values)) == 2


@pytest.mark.parametrize('assembly,shape,nans', [
pytest.param('dicarlo.BashivanKar2019.naturalistic', (24320, 233, 1), 309760, marks=[pytest.mark.private_access]),
pytest.param('dicarlo.BashivanKar2019.synthetic', (21360, 233, 1), 4319940, marks=[pytest.mark.private_access]),
])
def test_synthetic(assembly, shape, nans):
assy = brainio_collection.get_assembly(assembly)
assert assy.shape == shape
assert np.count_nonzero(np.isnan(assy)) == nans

3 changes: 2 additions & 1 deletion tests/test_stimuli.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ def test_dicarlohvm(self):
'dicarlo.THINGS2',
'aru.Kuzovkin2018',
'fei-fei.Deng2009',
'dicarlo.BashivanKar2019.naturalistic',
'dicarlo.BashivanKar2019.synthetic'
))
def test_list_stimulus_set(stimulus_set):
l = brainio_collection.list_stimulus_sets()
Expand Down

0 comments on commit ff93098

Please sign in to comment.