diff --git a/README.md b/README.md index dbfa014..fe9f8ce 100644 --- a/README.md +++ b/README.md @@ -3,3 +3,4 @@ # BrainIO collection Utility to retrieve and write to the BrainIO collection of stimulus sets and assemblies. + diff --git a/brainio_collection/lookup.csv b/brainio_collection/lookup.csv index 7d92eeb..a8ca747 100644 --- a/brainio_collection/lookup.csv +++ b/brainio_collection/lookup.csv @@ -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 diff --git a/tests/test_assemblies.py b/tests/test_assemblies.py index 2fdf519..3d3aa2f 100644 --- a/tests/test_assemblies.py +++ b/tests/test_assemblies.py @@ -31,7 +31,6 @@ 'dicarlo.Kar2018hvm', 'dicarlo.Kar2018cocogray', 'klab.Zhang2018search_obj_array', - 'aru.Kuzovkin2018', 'dicarlo.Rajalingham2020', 'dicarlo.SanghaviMurty2020', 'dicarlo.SanghaviJozwik2020', @@ -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() @@ -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 @@ -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 + diff --git a/tests/test_stimuli.py b/tests/test_stimuli.py index 4bdf670..6862538 100644 --- a/tests/test_stimuli.py +++ b/tests/test_stimuli.py @@ -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()