{ "cells": [ { "cell_type": "markdown", "metadata": { "id": "Ke27mmuJ_i0R" }, "source": [ "# Recording data access\n", "When working with huge data repositories it can be worthwhile to record the subset of data used\n", "for a given analysis. ONE can keep track of which datasets were loaded via the `load_*` methods.\n", "\n", "Only datasets that were successfully loaded are recorded; missing datasets are ignored.\n", "\n", "## How to set up and save\n", "At the top of your analysis script, after instantiating ONE, simply set the `record_loaded`\n", "attribute to True:\n", "```python\n", "one.record_loaded = True\n", "```\n", "\n", "At the end of your analysis script, you can save the data by calling `one.save_loaded_ids()`.\n", "By default this will save the dataset UUIDs to a CSV file in the root of your cache directory\n", "and will clear the list of dataset UUIDs. The `sessions_only` kwarg will save the\n", "[eids](./experiment_ids) instead.\n", "\n", "