Skip to content

Commit

Permalink
cli args for data, methods
Browse files Browse the repository at this point in the history
  • Loading branch information
JasperVanDenBosch committed Nov 7, 2024
1 parent c2f3836 commit 3bf826e
Showing 1 changed file with 79 additions and 2 deletions.
81 changes: 79 additions & 2 deletions src/rsatoolbox/cli.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,27 @@
"""Command Line Interface
Usage output:
```
Representational Similarity Analysis
positional arguments:
file One or more files or directories with data
options:
-h, --help show this help message and exit
--version show program's version number and exit
--model MODEL File with RDM models
--estimator {auto,euclidean,correlation,mahalanobis,crossnobis,poisson,poisson_cv}
Which dissimilarity measure to generate RDM with
--comparator {auto,cosine,spearman,corr,kendall,tau-a,rho-a,corr_cov,cosine_cov,neg_riem_dist,bures,bures_metric}
Which method to use when evaluating models or comparing RDMs
--searchlight SEARCHLIGHT
Run a searchlight over the whole space with the given radius. Unit depends on data modality.
--window [WINDOW ...]
Boundaries of a temporal window in milliseconds, e.g. "150 200"
--roi [ROI ...] One or more "mask" or "picks" files to specify voxel or channel selection
```
"""
from argparse import ArgumentParser
from importlib.metadata import version
Expand All @@ -10,13 +33,67 @@
parser.add_argument(
'file',
default='.',
help='Data directory or file'
)
help='One or more files or directories with data',
nargs='*',
)
parser.add_argument(
'--version',
action='version',
version=f'rsatoolbox {version("rsatoolbox")}'
)
parser.add_argument(
'--model',
help='File with RDM models',
)
parser.add_argument(
'--estimator',
help='Which dissimilarity measure to generate RDM with',
choices=[
'auto',
'euclidean',
'correlation',
'mahalanobis',
'crossnobis',
'poisson',
'poisson_cv',
],
default='auto',
)
parser.add_argument(
'--comparator',
help='Which method to use when evaluating models or comparing RDMs',
choices=[
'auto',
'cosine',
'spearman',
'corr',
'kendall',
'tau-a',
'rho-a',
'corr_cov',
'cosine_cov',
'neg_riem_dist',
'bures',
'bures_metric',
],
default='auto',
)
parser.add_argument(
'--searchlight',
help='Run a searchlight over the whole space with the given radius. Unit depends on data modality.',
type=int,
default=0,
)
parser.add_argument(
'--window',
help='Boundaries of a temporal window in milliseconds, e.g. "150 200"',
nargs='*',
)
parser.add_argument(
'--roi',
help='One or more "mask" or "picks" files to specify voxel or channel selection',
nargs='*',
)


def main():
Expand Down

0 comments on commit 3bf826e

Please sign in to comment.