<jupyter_start><jupyter_text>spintest---Here, we have provided a sample example of using the spintest codes to compare correspondence between to surface maps.In this example the spearman correlation between the high-resolution maps of uniqueness in functional and structural connectivity is computed (as explained in our paper).---<jupyter_code># initial imports
import os
import sys
import numpy as np

# import the vcm code
codes_directory = os.path.abspath('../codes')
if codes_directory not in sys.path:
    sys.path.append(codes_directory)
import spintest

# Note: you can import spintest directly if you copy the spintest.py code to your directory, this import method is only because we are accessing spintes.py from a different directory
# load the surface maps from git repository
data_directory = os.path.abspath('../data')

# load the first surface map (functional connectivity uniqueness)
cifti1 = os.path.join(data_directory, 'uniqueness/High resolution/sparse_functional_connectivity_uniqueness.dscalar.nii')

# load the first surface map (structural connectivity uniqueness)
cifti2 = os.path.join(data_directory, 'uniqueness/High resolution/structural_connectivity_uniqueness.dscalar.nii')

# execute the spintest (this may take a while)
result = spintest.cifti_spin_test(cifti1, cifti2, random_seed=0, method='spearman')
print(result)<jupyter_output>{'corellation r': 0.315865431167968, 'parametric p-val': 0.0, 'non-parametric p-val': 0.001}
{'fraction_non_alphanumeric': 0.08167467398764584, 'fraction_numerical': 0.018531228551818806, 'mean_word_length': 5.845070422535211, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '645763', 'license': 'MIT', 'n_tokens_mistral': 454, 'n_tokens_neox': 423, 'n_words': 150, 'path': 'notebooks/spintest.ipynb', 'repo_name': 'sina-mansour/neural-identity', 'size': '1457'}