Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
ResNet50_tensorflow
Commits
252e2d2e
"llmdeploy/serve/vscode:/vscode.git/clone" did not exist on "cb8ac1b08b405c3d80806b990247af8a7a9d3ed4"
Commit
252e2d2e
authored
Sep 21, 2018
by
Chris Shallue
Committed by
Christopher Shallue
Oct 16, 2018
Browse files
Update formatting.
PiperOrigin-RevId: 213963765
parent
9d0f41b7
Changes
24
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
33 deletions
+31
-33
research/astronet/light_curve_util/median_filter_test.py
research/astronet/light_curve_util/median_filter_test.py
+1
-1
research/astronet/light_curve_util/periodic_event.py
research/astronet/light_curve_util/periodic_event.py
+1
-1
research/astronet/light_curve_util/util.py
research/astronet/light_curve_util/util.py
+12
-12
research/astronet/third_party/kepler_spline/kepler_spline.py
research/astronet/third_party/kepler_spline/kepler_spline.py
+17
-19
No files found.
research/astronet/light_curve_util/median_filter_test.py
View file @
252e2d2e
...
@@ -124,5 +124,5 @@ class MedianFilterTest(absltest.TestCase):
...
@@ -124,5 +124,5 @@ class MedianFilterTest(absltest.TestCase):
np
.
testing
.
assert_array_equal
([
7
,
1
,
5
,
2
,
3
],
result
)
np
.
testing
.
assert_array_equal
([
7
,
1
,
5
,
2
,
3
],
result
)
if
__name__
==
'
__main__
'
:
if
__name__
==
"
__main__
"
:
absltest
.
main
()
absltest
.
main
()
research/astronet/light_curve_util/periodic_event.py
View file @
252e2d2e
research/astronet/light_curve_util/util.py
View file @
252e2d2e
...
@@ -138,8 +138,8 @@ def interpolate_missing_time(time, cadence_no=None, fill_value="extrapolate"):
...
@@ -138,8 +138,8 @@ def interpolate_missing_time(time, cadence_no=None, fill_value="extrapolate"):
time: A numpy array of monotonically increasing values, with missing values
time: A numpy array of monotonically increasing values, with missing values
denoted by NaN or Inf.
denoted by NaN or Inf.
cadence_no: Optional numpy array of cadence numbers corresponding to the
cadence_no: Optional numpy array of cadence numbers corresponding to the
time values. If not provided, missing time values are assumed to be
time values. If not provided, missing time values are assumed to be
evenly
evenly
spaced between present time values.
spaced between present time values.
fill_value: Specifies how missing time values should be treated at the
fill_value: Specifies how missing time values should be treated at the
beginning and end of the array. See scipy.interpolate.interp1d.
beginning and end of the array. See scipy.interpolate.interp1d.
...
@@ -186,8 +186,8 @@ def interpolate_masked_spline(all_time, all_masked_time, all_masked_spline):
...
@@ -186,8 +186,8 @@ def interpolate_masked_spline(all_time, all_masked_time, all_masked_spline):
points linearly interpolated.
points linearly interpolated.
"""
"""
interp_spline
=
[]
interp_spline
=
[]
for
time
,
masked_time
,
masked_spline
in
zip
(
for
time
,
masked_time
,
masked_spline
in
zip
(
all_time
,
all_masked_time
,
all_time
,
all_masked_time
,
all_masked_spline
):
all_masked_spline
):
if
masked_time
.
size
:
if
masked_time
.
size
:
interp_spline
.
append
(
np
.
interp
(
time
,
masked_time
,
masked_spline
))
interp_spline
.
append
(
np
.
interp
(
time
,
masked_time
,
masked_spline
))
else
:
else
:
...
...
research/astronet/third_party/kepler_spline/kepler_spline.py
View file @
252e2d2e
...
@@ -124,8 +124,8 @@ class SplineMetadata(object):
...
@@ -124,8 +124,8 @@ class SplineMetadata(object):
bad_bkspaces: List of break-point spacing values that failed.
bad_bkspaces: List of break-point spacing values that failed.
likelihood_term: The likelihood term of the Bayesian Information Criterion;
likelihood_term: The likelihood term of the Bayesian Information Criterion;
-2*ln(L), where L is the likelihood of the data given the model.
-2*ln(L), where L is the likelihood of the data given the model.
penalty_term: The penalty term for the number of parameters in the
penalty_term: The penalty term for the number of parameters in the
Bayesian
Bayesian
Information Criterion.
Information Criterion.
bic: The value of the Bayesian Information Criterion; equal to
bic: The value of the Bayesian Information Criterion; equal to
likelihood_term + penalty_coeff * penalty_term.
likelihood_term + penalty_coeff * penalty_term.
"""
"""
...
@@ -165,12 +165,11 @@ def choose_kepler_spline(all_time,
...
@@ -165,12 +165,11 @@ def choose_kepler_spline(all_time,
maxiter: Maximum number of attempts to fit each spline after removing badly
maxiter: Maximum number of attempts to fit each spline after removing badly
fit points.
fit points.
penalty_coeff: Coefficient of the penalty term for using more parameters in
penalty_coeff: Coefficient of the penalty term for using more parameters in
the Bayesian Information Criterion. Decreasing this value will allow
the Bayesian Information Criterion. Decreasing this value will allow more
more parameters to be used (i.e. smaller break-point spacing), and
parameters to be used (i.e. smaller break-point spacing), and vice-versa.
vice-versa.
verbose: Whether to log individual spline errors. Note that if bkspaces
verbose: Whether to log individual spline errors. Note that if bkspaces
contains many values (particularly small ones) then this may cause
contains many values (particularly small ones) then this may cause
logging
logging
pollution if calling this function for many light curves.
pollution if calling this function for many light curves.
Returns:
Returns:
spline: List of numpy arrays; values of the best-fit spline corresponding to
spline: List of numpy arrays; values of the best-fit spline corresponding to
...
@@ -297,12 +296,11 @@ def fit_kepler_spline(all_time,
...
@@ -297,12 +296,11 @@ def fit_kepler_spline(all_time,
maxiter: Maximum number of attempts to fit each spline after removing badly
maxiter: Maximum number of attempts to fit each spline after removing badly
fit points.
fit points.
penalty_coeff: Coefficient of the penalty term for using more parameters in
penalty_coeff: Coefficient of the penalty term for using more parameters in
the Bayesian Information Criterion. Decreasing this value will allow
the Bayesian Information Criterion. Decreasing this value will allow more
more parameters to be used (i.e. smaller break-point spacing), and
parameters to be used (i.e. smaller break-point spacing), and vice-versa.
vice-versa.
verbose: Whether to log individual spline errors. Note that if bkspaces
verbose: Whether to log individual spline errors. Note that if bkspaces
contains many values (particularly small ones) then this may cause
contains many values (particularly small ones) then this may cause
logging
logging
pollution if calling this function for many light curves.
pollution if calling this function for many light curves.
Returns:
Returns:
spline: List of numpy arrays; values of the best-fit spline corresponding to
spline: List of numpy arrays; values of the best-fit spline corresponding to
...
...
Prev
1
2
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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