Ejemplo n.º 1
0
def parse_args():
    arg_parser = misc.default_parser(
        description="""
        Script to plot mean stimulus response over days.""",
        epilog="""
        The 'dates' option really only makes sense with a single Mouse.
        """, arguments=('mice', 'tags', 'dates', 'overwrite', 'verbose'))
    arg_parser.add_argument(
        "-T", "--trace_type", choices=('dff', 'deconvolved', 'raw'), default="dff",
        help="Trace type to plot.")
    arg_parser.add_argument(
        "-R", "--t_range_s", nargs=2, type=int, default=(-2, 8),
        help="Time range around stimulus to plot.")
    arg_parser.add_argument(
        "-b", "--baseline", nargs=2, type=int, default=(-1, 0),
        help='Baseline used for dFF trace.')
    arg_parser.add_argument(
        "-e", "--errortrials", choices=(-1, 0, 1, 2), type=int, default=-1,
        help="-1 is off, 0 is correct trials, 1 is error trials, 2 is diff of error trials.")
    # arg_parser.add_argument(
    #     "-H", "--hungry_sated", choices=(0, 1, 2), type=int, default=0,
    #     help="0 is hungry trials, 1 is sated trials, 2 is hungry-sated")

    args = arg_parser.parse_args()

    return args
Ejemplo n.º 2
0
def parse_args():
    arg_parser = misc.default_parser(
        description="""
        Script to plot mean stimulus response over days.""",
        # epilog="""
        # This is the epilog.
        # """,
        arguments=('mice', 'tags', 'dates', 'overwrite', 'verbose'))
    arg_parser.add_argument(
        "-T", "--trace_type", choices=('dff', 'deconvolved', 'raw'), default="dff",
        help="Trace type to plot.")
    arg_parser.add_argument(
        "-R", "--t_range_s", nargs=2, type=int, default=(-2, 8),
        help="Time range around stimulus to plot.")
    arg_parser.add_argument(
        "-b", "--baseline", nargs=2, type=int, default=None,
        help='Baseline used for dFF trace.')
    arg_parser.add_argument(
        "-e", "--errortrials", choices=(-1, 0, 1, 2), type=int, default=-1,
        help="-1 is off, 0 is correct trials, 1 is error trials, 2 is diff of error trials.")
    arg_parser.add_argument(
        "-N", "--normalize", action="store_true",
        help="If True, normalize each individual trace by z-scoring it.")
    arg_parser.add_argument(
        "-M", "--maxrois", action="store", type=int, default=10,
        help="Pull out the 'maxrois' top ROIs per stim type.")
    arg_parser.add_argument(
        "-O", '--mode', choices=('traces', 'heatmap'), default='traces',
        help="Determines how to plot the data: as traces or heatmaps.")

    args = arg_parser.parse_args()

    return args
Ejemplo n.º 3
0
def parse_args():
    arg_parser = misc.default_parser(description="""
        Script to plot mean response heatmap, sorted by preferred stimulus.""",
                                     arguments=('mouse', 'date'))
    arg_parser.add_argument("-T",
                            "--trace_type",
                            choices=('dff', 'deconvolved', 'raw'),
                            default="dff",
                            help="Trace type to plot.")
    arg_parser.add_argument("-R",
                            "--t_range_s",
                            nargs=2,
                            type=int,
                            default=(-2, 8),
                            help="Time range around stimulus to plot.")
    arg_parser.add_argument("-b",
                            "--baseline",
                            nargs=2,
                            type=int,
                            default=(-1, 0),
                            help='Baseline used for dFF trace.')
    arg_parser.add_argument(
        "-e",
        "--errortrials",
        choices=(-1, 0, 1, 2),
        type=int,
        default=-1,
        help=
        "-1 is off, 0 is correct trials, 1 is error trials, 2 is diff of error trials."
    )
    arg_parser.add_argument(
        "-H",
        "--hungry_sated",
        choices=(0, 1, 2),
        type=int,
        default=0,
        help="0 is hungry trials, 1 is sated trials, 2 is hungry-sated")

    args = arg_parser.parse_args()

    return args
Ejemplo n.º 4
0
def parse_args():
    arg_parser = misc.default_parser(description="""
        Script to plot mean stimulus response over days.""",
                                     epilog="""
        The 'dates' option really only makes sense with a single Mouse.
        """,
                                     arguments=('mice', 'tags', 'dates',
                                                'overwrite', 'verbose'))
    arg_parser.add_argument(
        "-R",
        "--t_range_s",
        nargs=2,
        type=int,
        default=(-5, 10),
        help=
        "Time range around stimulus to plot. If second value <= first or <=0, include all time up to next stim presentation."
    )

    args = arg_parser.parse_args()

    return args
Ejemplo n.º 5
0
def parse_args():
    arg_parser = misc.default_parser(
        description="""
        Script to plot replays.""", arguments=('mice', 'dates', 'tags'))
    arg_parser.add_argument(
        "-T", "--trace_type", choices=('dff', 'deconvolved', 'raw'), default="deconvolved",
        help="Trace type to plot.")
    arg_parser.add_argument(
        "-R", "--t_range_m", nargs=2, type=int, default=(-1, 1),
        help="Time range to plot.")
    arg_parser.add_argument(
        "-D", "--display_training", action="store_true",
        help="Also plot stimulus responses, otherwise just plots spontaneous time.")
    arg_parser.add_argument(
        "-M", "--mask_stimuli", action="store_true",
        help="Mask out stimulus times from traces and classifier probability.")
    arg_parser.add_argument(
        "--new_path", action='store_true',
        help='Use new save path format: SCRIPT/mouse/cword')

    args = arg_parser.parse_args()

    return args