Commit 023ded66 authored by Nicolas Nunez Barreto's avatar Nicolas Nunez Barreto

agrego meds de calentamiento en varias resonacias oscuras

parent aba7f456
......@@ -79,7 +79,7 @@ def convert_amp_to_data(amp):
"""
takes amp values (from 0 to 1) and returns data values (suitable for DDS load)
"""
MAX = 2**10-1
MAX = 2**9-1
# N = 10
# if not iterable(amp):
......@@ -129,7 +129,15 @@ class AD9910RAM(EnvExperiment):
parameters = get_urukul_params( self.am_freq )
frec, num_samples, clock_step, n_harmonic = parameters
modulation = get_urukul_array(frec, num_samples, n_harmonic)
modulation = (array(modulation)/2 * self.depth ) + (self.amplitude-self.depth)
# print(self.amplitude)
# print(self.depth)
# modulation = (array(modulation)/2 * self.depth ) + (self.amplitude-self.depth)
modulation = self.amplitude*(1+0.5*(1-self.depth)*(array(modulation)-1))
# modulation = modulation/2
print(max(modulation))
print(min(modulation))
data = convert_amp_to_data( modulation )
self.clock_step = clock_step
......@@ -185,8 +193,10 @@ class AD9910RAM(EnvExperiment):
# clock_step = 1
#reset core
self.core.reset()
self.core.break_realtime()
# self.core.reset()
# Esto último hace saltar un error de de underflow
# self.core.break_realtime()
#initialise
self.u[self._channel].cpld.init()
self.u[self._channel].init()
......
......@@ -82,7 +82,7 @@ def convert_amp_to_data(amp):
"""
takes amp values (from 0 to 1) and returns data values (suitable for DDS load)
"""
MAX = 2**10-1
MAX = 2**9-1
# N = 10
# if not iterable(amp):
......@@ -261,7 +261,9 @@ class AD9910RAM(EnvExperiment):
# clock_step = 1
#reset core
self.core.reset()
# self.core.reset()
# Esto último hace saltar un error de de underflow
#initialise
self.u[self._channel].cpld.init()
......
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