-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSGPxExposure.py
41 lines (36 loc) · 1.33 KB
/
SGPxExposure.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
37
38
39
40
41
from datetime import datetime
# Update 18 April 2020
print('-------------------------------------')
print
print("Enter your Input")
ExposureTimeSec = input("Enter exposure time in sec: ") # Seconds
ExposureTime = int(ExposureTimeSec) / 60
StartTime = input("Enter start Time: ")
EndTime = input("Enter End Time: ")
# Personal Settings
FocusTime = 4 # Minuten
StartedGuiding = 1 # Minuten
TimeforFlip = 6 # Minuten
ExposuretimeMin = ExposureTime / 60
#fmt = '%d-%m-%Y %H:%M'
fmt = '%d %H:%M'
tstamp1 = datetime.strptime(StartTime, fmt)
tstamp2 = datetime.strptime(EndTime, fmt)
if tstamp1 > tstamp2:
td = tstamp1 - tstamp2
else:
td = tstamp2 - tstamp1
td_mins = int(round(td.total_seconds() / 60))
td_exposures = int(round(td_mins / ExposureTime))
NumberFocus = td_exposures / 12
print
print("Amount of Focus Actions = " + str(round(NumberFocus)))
td_hours = int((td_mins / 60))
td_other = (NumberFocus*FocusTime) + StartedGuiding + TimeforFlip
td_mins = td_mins - td_other
td_exposures = int(round(td_mins / ExposureTime))
print('The difference is approx = %s minutes' % round(td_mins))
#print('The difference is approx = %s hours' % td_hours)
print('Expected ' + str(ExposureTimeSec)+' Sec' + ' Exposures = ' + str(td_exposures))
print
print('-------------------------------------')