Skip to content

Commit

Permalink
Merge pull request #5 from individual-brain-charting/fetch_metadata
Browse files Browse the repository at this point in the history
Module for fetching metadata independent of ebrains
  • Loading branch information
man-shu authored Aug 2, 2023
2 parents 6d18111 + e32c94f commit 148ac8a
Show file tree
Hide file tree
Showing 6 changed files with 450 additions and 294 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
src/ibc_api.egg-info
src/ibc_api/__pycache__
src/ibc_api/data
src/ibc-api
ibc_data
.ipynb_checkpoints
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ import ibc_api.utils as ibc
ibc.authenticate()

# Fetch info on all available files
# Load as a pandas dataframe and save as ibc_data/available_statistic_map.csv
db = ibc.get_info(data_type="statistic_map")
# Load as a pandas dataframe and save as ibc_data/available_{data_type}.csv
db = ibc.get_info(data_type="volume_maps")

# Keep statistic maps for sub-08, for task-Discount
filtered_db = ibc.filter_data(db, subject_list=["sub-08"], task_list=["Discount"])

# Download all statistic maps for sub-08, task-Discount
# Saved under ibc_data/resulting_smooth_maps/sub-08/task-Discount
# Also create ibc_data/downloaded_statistic_map.csv
# This contains downloaded file paths and time of download
# Also creates ibc_data/downloaded_volume_maps.csv
# which contains downloaded file paths and time of download
downloaded_db = ibc.download_data(filtered_db, organise_by='task')
```
# Note
Expand Down
6 changes: 3 additions & 3 deletions examples/example.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
ibc.authenticate()

# Fetch info on all available files
# Load as a pandas dataframe and save as ibc_data/available_statistic_map.csv
db = ibc.get_info(data_type="statistic_map")
# Load as a pandas dataframe and save as ibc_data/available_{data_type}.csv
db = ibc.get_info(data_type="volume_maps")

# Keep statistic maps for sub-08, for task-Discount
filtered_db = ibc.filter_data(db, subject_list=["sub-08"], task_list=["Discount"])

# Download all statistic maps for sub-08, task-Discount
# Saved under ibc_data/resulting_smooth_maps/sub-08/task-Discount
# Also creates ibc_data/downloaded_statistic_map.csv
# Also creates ibc_data/downloaded_volume_maps.csv
# which contains downloaded file paths and time of download
downloaded_db = ibc.download_data(filtered_db, organise_by='task')
Loading

0 comments on commit 148ac8a

Please sign in to comment.