-
Notifications
You must be signed in to change notification settings - Fork 3
/
pointing.py
33 lines (23 loc) · 897 Bytes
/
pointing.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
### pointing script: determine Pointing parameters
### Version 0.2
### Created 2018 02 09:
### by Stefan Baar - [email protected]
### last edited (date, name)
### 2018 02 09 - S. Baar
import numpy as np
from bin.io import read_file
from bin.Pfunctions import compute_off, compute_parameters
OPARA = "New_Parameters"
PARA = "p_parameters.txt" ### parameters used during data apprehension
FILE = "examples/20130202.txt" ### offset data
RADEC, dRADEC, PHI = read_file(FILE)
if para == "":
PARAMETERS = np.genfromtxt(PARA)
ddRADEC = compute_off(RADEC[:,0], RADEC[:,0], PHI, param)
dRADEC = dRADEC - ddRADEC
else:
pass
newPARAMETERS = compute_parameters(RADEC, dRADEC, learning_rate = 0.003, maxdW = 0.001)
print "Newly computed pointing parameters:"
print newPARAMETERS
np.savetxt(np.round(newPARAMETERS[0][-1]*3600.,2), OPARA)