diff options
| author | Jules Laplace <julescarbon@gmail.com> | 2020-01-19 01:46:08 +0100 |
|---|---|---|
| committer | Jules Laplace <julescarbon@gmail.com> | 2020-01-19 01:46:08 +0100 |
| commit | b98d56450d24cbc715885005860d2d4aa4fde72c (patch) | |
| tree | b0ffd864c0e7a39effc5970220e8b54d6992ce68 /cli/app/search | |
| parent | 1726ff738f4f9b2836b92021b0b0ecfc61c9dde4 (diff) | |
parameter smoothing
Diffstat (limited to 'cli/app/search')
| -rw-r--r-- | cli/app/search/live.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cli/app/search/live.py b/cli/app/search/live.py index 096b4c1..7c11b24 100644 --- a/cli/app/search/live.py +++ b/cli/app/search/live.py @@ -101,10 +101,10 @@ class SinParam: orbit_time = InterpolatorParam(name=name + '_time', value=0.0) if lerp: noise = LerpParam(name + '_noise', shape=shape, datatype=datatype) - output = tf.math.cos(orbit_time.variable + noise.output) * orbit_radius.variable + output = tf.math.sin(orbit_time.variable + noise.output) * orbit_radius.variable else: noise = InterpolatorParam(name + '_noise_a', shape=shape, datatype=datatype) - output = tf.math.cos(orbit_time.variable + noise.variable) * orbit_radius.variable + output = tf.math.sin(orbit_time.variable + noise.variable) * orbit_radius.variable interpolator.sin_params[name] = self self.name = name self.orbit_speed = orbit_speed @@ -115,7 +115,7 @@ class SinParam: self.t = 0 def update(self): - self.orbit_time.assign((np.pi * 0.5) / self.orbit_speed.value, immediate=True) + self.orbit_time.assign((np.pi * 0.25) / self.orbit_speed.value, immediate=True) self.t += 1 # randomize the orbit when possible - # - check if we've done one full orbital period |
