-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathargument_parser.py
More file actions
40 lines (27 loc) · 1.34 KB
/
Copy pathargument_parser.py
File metadata and controls
40 lines (27 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import sys
import argparse
'''
Flags:
- gif generation
- multiple plots vs singular plots (w/ legend)
- path to data directory
- line of best fit
- return data for each dish as csv
'''
def parse_args(argv):
parser = argparse.ArgumentParser(description="Calcium Diffusion Fluorescence Video Analysis")
# Path to the directory containing the video files
parser.add_argument('-d', '--data', type=str, help='Absolute path to the directory containing the video files', required=True)
# Gif of the video will be generated and saved with the same name as the video with the extension .gif
parser.add_argument('-gif', '--gif', action='store_true', help='Generate and save gif of video')
# Single dish vs multiple dish per plot
parser.add_argument('-plot', '--plot_type', type=str, choices=['single_fluor', 'single_decay', 'multiple'], help='Plot single/multiple dishes on the same plot', required=False)
# Include line of best fit
parser.add_argument('-line', '--line_of_best_fit', action='store_true', help='Include line of best fit')
# Return data for each dish as csv
parser.add_argument('-csv', '--csv', action='store_true', help='Return data for each dish as csv')
return parser.parse_args(argv)
def main(argv):
args = parse_args(argv)
if __name__ == '__main__':
main(sys.argv[1:])