# You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. import itertools import math import numpy from . import base_classes as _base_classes from . import utils from actin_dynamics.numerical import interpolation, measurements from actin_dynamics import logger as _logger _log = _logger.getLogger(__file__) class PyreneSEM(_base_classes.Analysis): def __init__(self, sample_period=None, stop_time=None, label=None, **kwargs): self.sample_period = float(sample_period) self.stop_time = float(stop_time) self.weights = dict((k, float(v)) for k, v in kwargs.iteritems()) _base_classes.Analysis.__init__(self, label=label, **kwargs) def perform(self, simulation_results, result_factory): pyrene_measurements = [self._get_pyrene_measurements(s) for s in simulation_results] resulting_measurement = _calculate_concentration_sem(pyrene_measurements)
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. from .base_classes import Objective as _Objective from actin_dynamics.numerical import residuals as _residuals from actin_dynamics.numerical import interpolation as _interpolation from actin_dynamics.numerical import measurements as _measurements import itertools as _itertools from actin_dynamics import logger log = logger.getLogger(__file__) class SimpleDataFit(_Objective): def __init__(self, measurement=None, residual_type=None, interpolate_simulation=False, label=None, skip_beginning=0, scale_simulation_by=1): self.residual_function = getattr(_residuals, residual_type) self.measurement_name = measurement self.interpolate_simulation = bool(interpolate_simulation) self.scale_simulation_by = float(scale_simulation_by) self.skip_beginning = float(skip_beginning)