Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Avet Harutyunyan
gofio
Commits
339a3e61
Commit
339a3e61
authored
Dec 09, 2017
by
Monica Rainer
Browse files
Add docopt argument all_calib
parent
8293a308
Changes
2
Hide whitespace changes
Inline
Side-by-side
gofio/drslib/gofio.py
View file @
339a3e61
...
...
@@ -41,6 +41,12 @@ def gofio_init(docopt_args):
CONFIG
[
'MASK_C'
]
=
os
.
path
.
join
(
CONFIG
[
'RES_DIR'
],
maskc
)
if
docopt_args
[
'<date>'
]:
if
docopt_args
[
'--all_calib'
]:
docopt_args
[
'--dark'
]
=
True
docopt_args
[
'--flat'
]
=
True
docopt_args
[
'--une'
]
=
True
docopt_args
[
'--fp'
]
=
True
CONFIG
[
'DATE'
]
=
docopt_args
[
'<date>'
]
CONFIG
[
'OFFLINE'
]
=
True
CONFIG
[
'RAW_DIR'
]
=
os
.
path
.
join
(
CONFIG
[
'BASE_RAW'
],
CONFIG
[
'DATE'
])
...
...
gofio/drslib/varie.py
View file @
339a3e61
...
...
@@ -29,7 +29,7 @@ import math
import
warnings
import
string
,
random
#
import matplotlib.pyplot as plt
import
matplotlib.pyplot
as
plt
#from scipy import optimize, interpolate, signal
from
scipy
import
optimize
,
interpolate
...
...
@@ -255,6 +255,9 @@ def optExtract(data,gain,ron,slit_pos,ordine):
profile
[
profile
==-
np
.
inf
]
=
0
profile
=
np
.
nan_to_num
(
profile
)
#plt.plot(profile[x1:x2])
#plt.show()
# update variance
variance
=
var
(
StdFlux
*
profile
)
...
...
@@ -315,12 +318,13 @@ def optExtract(data,gain,ron,slit_pos,ordine):
profile
[
profile
==-
np
.
inf
]
=
0
profile
=
np
.
nan_to_num
(
profile
)
#plt.plot(profile[x1:x2])
#plt.show()
#plt.plot(profile)
#plt.plot(fitprofile)
#plt.show()
#t4 = time.time()
#print 'Profile optimization order %s: %s ms' % (str(ordine+32),str((t4-t3)*1000))
...
...
@@ -406,6 +410,8 @@ def optExtract(data,gain,ron,slit_pos,ordine):
#t6 = time.time()
#print 'Cosmic removal order %s: %s ms' % (str(ordine+32),str((t6-t5)*1000))
#plt.plot(profile[x1:x2])
#plt.show()
#plt.plot(StdFlux)
#plt.plot(OptFlux)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment