-
Notifications
You must be signed in to change notification settings - Fork 1
/
Parent.py
36 lines (28 loc) · 997 Bytes
/
Parent.py
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
# -*- coding: utf-8 -*-
"""
Created on Mon Jan 13 19:54:21 2020
@author: Jacob
"""
from data_file_writer import writer
from data_file_reader import FileReader
from Calculations import runner
from sample_initializer import initiator
sample_dictionary = FileReader()
newdata = input("If you would like to add a new dataset, type \"yes\" and press enter. Otherwise, press any other key.\n")
if newdata == 'yes':
# Proceed to add new data:
writer()
print("Data added. Re-run file to analyze this data. Exiting...")
else:
# Let the user select the model on dataset(s) of choice:
is_looped, model = initiator(sample_dictionary)
try:
if is_looped:
for model_params in model:
print(model_params)
runner(*model_params)
else:
runner(*model)
except Exception as err:
print(f'An error has occured: {err}')
print("Model analysis failed. Exiting...")