-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFileSize.py
More file actions
26 lines (22 loc) · 960 Bytes
/
FileSize.py
File metadata and controls
26 lines (22 loc) · 960 Bytes
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
"""
@Author: Biraj Shrestha
"""
from simple_term_menu import TerminalMenu
from colorama import Fore, Style
def FileSizeCalculator(amplifier, samplingRate, channelNumber, recordingTime):
adc = 24;
if amplifier.upper() == "BRAINAMP":
adc = 16;
return (adc *samplingRate * channelNumber * recordingTime*60 /8 /1024 /1024)
if (__name__) == "__main__":
amp_list = ['BrainAmp', 'actiCHamp', 'LiveAmp']
print("Select Amplifier: ")
menu = TerminalMenu(amp_list)
amplifier = amp_list[menu.show()]
print(amplifier)
samplingRate = int(input("samplingRate (Hz): "))
channelNumber = int(input("channelNumber: "))
recordingTime = float(input("recordingTime (mins): "))
fileSize = FileSizeCalculator(amplifier, samplingRate, channelNumber, recordingTime);
print (Fore.GREEN + f"The Approximate size of recording is : {round(fileSize, 2)} MB")
if amplifier == "LiveAmp": print(Fore.RED + "Onboard recording would be even less")