Commit 9b287eaf authored by Chris Shallue's avatar Chris Shallue Committed by Christopher Shallue
Browse files

Rename light_curve_util/ to light_curve/ and light_curve/cc/ to light_curve/fast_ops/.

Also fix a few lint errors in unit tests.

PiperOrigin-RevId: 223434695
parent 2a6e342e
...@@ -12,8 +12,8 @@ See the License for the specific language governing permissions and ...@@ -12,8 +12,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
==============================================================================*/ ==============================================================================*/
#ifndef TENSORFLOW_MODELS_ASTRONET_LIGHT_CURVE_UTIL_CC_MEDIAN_H_ #ifndef TENSORFLOW_MODELS_ASTRONET_LIGHT_CURVE_FAST_OPS_MEDIAN_H_
#define TENSORFLOW_MODELS_ASTRONET_LIGHT_CURVE_UTIL_CC_MEDIAN_H_ #define TENSORFLOW_MODELS_ASTRONET_LIGHT_CURVE_FAST_OPS_MEDIAN_H_
#include <algorithm> #include <algorithm>
#include <iterator> #include <iterator>
...@@ -70,4 +70,4 @@ typename std::iterator_traits<ForwardIterator>::value_type Median( ...@@ -70,4 +70,4 @@ typename std::iterator_traits<ForwardIterator>::value_type Median(
} // namespace astronet } // namespace astronet
#endif // TENSORFLOW_MODELS_ASTRONET_LIGHT_CURVE_UTIL_CC_MEDIAN_H_ #endif // TENSORFLOW_MODELS_ASTRONET_LIGHT_CURVE_FAST_OPS_MEDIAN_H_
...@@ -12,10 +12,10 @@ See the License for the specific language governing permissions and ...@@ -12,10 +12,10 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
==============================================================================*/ ==============================================================================*/
#include "light_curve_util/cc/median_filter.h" #include "light_curve/fast_ops/median_filter.h"
#include "absl/strings/substitute.h" #include "absl/strings/substitute.h"
#include "light_curve_util/cc/median.h" #include "light_curve/fast_ops/median.h"
using absl::Substitute; using absl::Substitute;
using std::min; using std::min;
......
...@@ -12,8 +12,8 @@ See the License for the specific language governing permissions and ...@@ -12,8 +12,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
==============================================================================*/ ==============================================================================*/
#ifndef TENSORFLOW_MODELS_ASTRONET_LIGHT_CURVE_UTIL_CC_MEDIAN_FILTER_H_ #ifndef TENSORFLOW_MODELS_ASTRONET_LIGHT_CURVE_FAST_OPS_MEDIAN_FILTER_H_
#define TENSORFLOW_MODELS_ASTRONET_LIGHT_CURVE_UTIL_CC_MEDIAN_FILTER_H_ #define TENSORFLOW_MODELS_ASTRONET_LIGHT_CURVE_FAST_OPS_MEDIAN_FILTER_H_
#include <iostream> #include <iostream>
...@@ -56,4 +56,4 @@ bool MedianFilter(const std::vector<double>& x, const std::vector<double>& y, ...@@ -56,4 +56,4 @@ bool MedianFilter(const std::vector<double>& x, const std::vector<double>& y,
} // namespace astronet } // namespace astronet
#endif // TENSORFLOW_MODELS_ASTRONET_LIGHT_CURVE_UTIL_CC_MEDIAN_FILTER_H_ #endif // TENSORFLOW_MODELS_ASTRONET_LIGHT_CURVE_FAST_OPS_MEDIAN_FILTER_H_
...@@ -12,11 +12,11 @@ See the License for the specific language governing permissions and ...@@ -12,11 +12,11 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
==============================================================================*/ ==============================================================================*/
#include "light_curve_util/cc/median_filter.h" #include "light_curve/fast_ops/median_filter.h"
#include "gmock/gmock.h" #include "gmock/gmock.h"
#include "gtest/gtest.h" #include "gtest/gtest.h"
#include "light_curve_util/cc/test_util.h" #include "light_curve/fast_ops/test_util.h"
using std::vector; using std::vector;
using testing::Pointwise; using testing::Pointwise;
......
...@@ -12,7 +12,7 @@ See the License for the specific language governing permissions and ...@@ -12,7 +12,7 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
==============================================================================*/ ==============================================================================*/
#include "light_curve_util/cc/median.h" #include "light_curve/fast_ops/median.h"
#include "gmock/gmock.h" #include "gmock/gmock.h"
#include "gtest/gtest.h" #include "gtest/gtest.h"
......
...@@ -12,12 +12,12 @@ See the License for the specific language governing permissions and ...@@ -12,12 +12,12 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
==============================================================================*/ ==============================================================================*/
#include "light_curve_util/cc/normalize.h" #include "light_curve/fast_ops/normalize.h"
#include <algorithm> #include <algorithm>
#include "absl/strings/substitute.h" #include "absl/strings/substitute.h"
#include "light_curve_util/cc/median.h" #include "light_curve/fast_ops/median.h"
using absl::Substitute; using absl::Substitute;
using std::vector; using std::vector;
......
...@@ -12,8 +12,8 @@ See the License for the specific language governing permissions and ...@@ -12,8 +12,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
==============================================================================*/ ==============================================================================*/
#ifndef TENSORFLOW_MODELS_ASTRONET_LIGHT_CURVE_UTIL_CC_NORMALIZE_H_ #ifndef TENSORFLOW_MODELS_ASTRONET_LIGHT_CURVE_FAST_OPS_NORMALIZE_H_
#define TENSORFLOW_MODELS_ASTRONET_LIGHT_CURVE_UTIL_CC_NORMALIZE_H_ #define TENSORFLOW_MODELS_ASTRONET_LIGHT_CURVE_FAST_OPS_NORMALIZE_H_
#include <iostream> #include <iostream>
...@@ -41,4 +41,4 @@ bool NormalizeMedianAndMinimum(const std::vector<double>& x, ...@@ -41,4 +41,4 @@ bool NormalizeMedianAndMinimum(const std::vector<double>& x,
} // namespace astronet } // namespace astronet
#endif // TENSORFLOW_MODELS_ASTRONET_LIGHT_CURVE_UTIL_CC_NORMALIZE_H_ #endif // TENSORFLOW_MODELS_ASTRONET_LIGHT_CURVE_FAST_OPS_NORMALIZE_H_
...@@ -12,11 +12,11 @@ See the License for the specific language governing permissions and ...@@ -12,11 +12,11 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
==============================================================================*/ ==============================================================================*/
#include "light_curve_util/cc/normalize.h" #include "light_curve/fast_ops/normalize.h"
#include "gmock/gmock.h" #include "gmock/gmock.h"
#include "gtest/gtest.h" #include "gtest/gtest.h"
#include "light_curve_util/cc/test_util.h" #include "light_curve/fast_ops/test_util.h"
using std::vector; using std::vector;
using testing::Pointwise; using testing::Pointwise;
......
...@@ -12,7 +12,7 @@ See the License for the specific language governing permissions and ...@@ -12,7 +12,7 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
==============================================================================*/ ==============================================================================*/
#include "light_curve_util/cc/phase_fold.h" #include "light_curve/fast_ops/phase_fold.h"
#include <math.h> #include <math.h>
#include <algorithm> #include <algorithm>
......
...@@ -12,8 +12,8 @@ See the License for the specific language governing permissions and ...@@ -12,8 +12,8 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
==============================================================================*/ ==============================================================================*/
#ifndef TENSORFLOW_MODELS_ASTRONET_LIGHT_CURVE_UTIL_CC_PHASE_FOLD_H_ #ifndef TENSORFLOW_MODELS_ASTRONET_LIGHT_CURVE_FAST_OPS_PHASE_FOLD_H_
#define TENSORFLOW_MODELS_ASTRONET_LIGHT_CURVE_UTIL_CC_PHASE_FOLD_H_ #define TENSORFLOW_MODELS_ASTRONET_LIGHT_CURVE_FAST_OPS_PHASE_FOLD_H_
#include <iostream> #include <iostream>
...@@ -65,4 +65,4 @@ bool PhaseFoldAndSortLightCurve(std::vector<double> time, ...@@ -65,4 +65,4 @@ bool PhaseFoldAndSortLightCurve(std::vector<double> time,
} // namespace astronet } // namespace astronet
#endif // TENSORFLOW_MODELS_ASTRONET_LIGHT_CURVE_UTIL_CC_PHASE_FOLD_H_ #endif // TENSORFLOW_MODELS_ASTRONET_LIGHT_CURVE_FAST_OPS_PHASE_FOLD_H_
...@@ -12,11 +12,11 @@ See the License for the specific language governing permissions and ...@@ -12,11 +12,11 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
==============================================================================*/ ==============================================================================*/
#include "light_curve_util/cc/phase_fold.h" #include "light_curve/fast_ops/phase_fold.h"
#include "gmock/gmock.h" #include "gmock/gmock.h"
#include "gtest/gtest.h" #include "gtest/gtest.h"
#include "light_curve_util/cc/test_util.h" #include "light_curve/fast_ops/test_util.h"
using std::vector; using std::vector;
using testing::Pointwise; using testing::Pointwise;
......
...@@ -16,9 +16,9 @@ ...@@ -16,9 +16,9 @@
# #
# See https://github.com/google/clif # See https://github.com/google/clif
from light_curve_util.cc.python.postproc import ValueErrorOnFalse from light_curve.fast_ops.python.postproc import ValueErrorOnFalse
from "third_party/tensorflow_models/astronet/light_curve_util/cc/median_filter.h": from "third_party/tensorflow_models/astronet/light_curve/fast_ops/median_filter.h":
namespace `astronet`: namespace `astronet`:
def `MedianFilter` as median_filter (x: list<float>, def `MedianFilter` as median_filter (x: list<float>,
y: list<float>, y: list<float>,
......
...@@ -21,7 +21,7 @@ from __future__ import print_function ...@@ -21,7 +21,7 @@ from __future__ import print_function
from absl.testing import absltest from absl.testing import absltest
import numpy as np import numpy as np
from light_curve_util.cc.python import median_filter from light_curve.fast_ops.python import median_filter
class MedianFilterTest(absltest.TestCase): class MedianFilterTest(absltest.TestCase):
......
...@@ -16,9 +16,9 @@ ...@@ -16,9 +16,9 @@
# #
# See https://github.com/google/clif # See https://github.com/google/clif
from light_curve_util.cc.python.postproc import ValueErrorOnFalse from light_curve.fast_ops.python.postproc import ValueErrorOnFalse
from "third_party/tensorflow_models/astronet/light_curve_util/cc/phase_fold.h": from "third_party/tensorflow_models/astronet/light_curve/fast_ops/phase_fold.h":
namespace `astronet`: namespace `astronet`:
def `PhaseFoldTime` as phase_fold_time (time: list<float>, def `PhaseFoldTime` as phase_fold_time (time: list<float>,
period: float, period: float,
......
...@@ -21,7 +21,7 @@ from __future__ import print_function ...@@ -21,7 +21,7 @@ from __future__ import print_function
from absl.testing import absltest from absl.testing import absltest
import numpy as np import numpy as np
from light_curve_util.cc.python import phase_fold from light_curve.fast_ops.python import phase_fold
class PhaseFoldTimeTest(absltest.TestCase): class PhaseFoldTimeTest(absltest.TestCase):
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
"""Postprocessing utility function for CLIF.""" """Postprocessing utility functions for CLIF."""
# CLIF postprocessor for a C++ function with signature: # CLIF postprocessor for a C++ function with signature:
......
...@@ -16,10 +16,10 @@ ...@@ -16,10 +16,10 @@
# #
# See https://github.com/google/clif # See https://github.com/google/clif
from light_curve_util.cc.python.postproc import ValueErrorOnFalse from light_curve.fast_ops.python.postproc import ValueErrorOnFalse
from light_curve_util.cc.python.postproc import ValueErrorOnNull from light_curve.fast_ops.python.postproc import ValueErrorOnNull
from "third_party/tensorflow_models/astronet/light_curve_util/cc/view_generator.h": from "third_party/tensorflow_models/astronet/light_curve/fast_ops/view_generator.h":
namespace `astronet`: namespace `astronet`:
class ViewGenerator: class ViewGenerator:
def `GenerateView` as generate_view (self, def `GenerateView` as generate_view (self,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment