# Path: modl/utils/system.py
# def get_output_dir(data_dir=None):
#     """ Returns the directories in which cogspaces store results.
# 
#     Parameters
#     ----------
#     data_dir: string, optional
#         Path of the data directory. Used to force data storage in a specified
#         location. Default: None
# 
#     Returns
#     -------
#     paths: list of strings
#         Paths of the dataset directories.
# 
#     Notes
#     -----
#     This function retrieves the datasets directories using the following
#     priority :
#     1. the keyword argument data_dir
#     2. the global environment variable OUTPUT_MODL_DIR
#     4. output/modl in the user home folder
#     """
# 
#     paths = []
# 
#     # Check data_dir which force storage in a specific location
#     if data_dir is not None:
#         return str(data_dir)
#     else:
#         # If data_dir has not been specified, then we crawl default locations
#         output_dir = os.getenv('MODL_OUTPUT')
#         if output_dir is not None:
#             return str(output_dir)
#     return os.path.expanduser('~/output/modl')


import os
import json
import pandas as pd
import sys
import numpy as np
import matplotlib.pyplot as plt
import seaborn.apionly as sns
from os.path import join
from joblib import dump
from modl.utils.system import get_output_dir



dir_name = os.path.dirname(os.path.realpath(sys.argv[0]))




idx = pd.IndexSlice

run_id = 14
run_dir = join(get_output_dir(), 'multi_decompose_fmri', str(run_id), 'run')

# Path: modl/utils/system.py
# def get_output_dir(data_dir=None):
#     """ Returns the directories in which cogspaces store results.
# 
#     Parameters
#     ----------
#     data_dir: string, optional
#         Path of the data directory. Used to force data storage in a specified
#         location. Default: None
# 
#     Returns
#     -------
#     paths: list of strings
#         Paths of the dataset directories.
# 
#     Notes
#     -----
#     This function retrieves the datasets directories using the following
#     priority :
#     1. the keyword argument data_dir
#     2. the global environment variable OUTPUT_MODL_DIR
#     4. output/modl in the user home folder
#     """
# 
#     paths = []
# 
#     # Check data_dir which force storage in a specific location
#     if data_dir is not None:
#         return str(data_dir)
#     else:
#         # If data_dir has not been specified, then we crawl default locations
#         output_dir = os.getenv('MODL_OUTPUT')
#         if output_dir is not None:
#             return str(output_dir)
#     return os.path.expanduser('~/output/modl')


# Path: exps/gather_decompose_fmri.py
import os
import json
import pandas as pd
import sys
import numpy as np
import matplotlib.pyplot as plt
import seaborn.apionly as sns
from os.path import join
from joblib import dump
from modl.utils.system import get_output_dir




dir_name = os.path.dirname(os.path.realpath(sys.argv[0]))




idx = pd.IndexSlice

run_id = 14
run_dir = join(get_output_dir(), 'multi_decompose_fmri', str(run_id), 'run')

analysis_dir = join(get_output_dir(), 'multi_decompose_fmri', str(run_id), 'analysis')