def __init__(self):
     SpatioTemporalController.__init__(self)
     ui_name_to_equation_dict = get_ui_name_to_equation_dict()
     self.equation_choices = {
         GAUSSIAN_EQUATION: ui_name_to_equation_dict.get(GAUSSIAN_EQUATION),
         SIGMOID_EQUATION: ui_name_to_equation_dict.get(SIGMOID_EQUATION)
     }
    def set_temporal(self, equation):
        eq_class = get_ui_name_to_equation_dict().get(equation)
        current_surface_stim = common.get_from_session(KEY_SURFACE_STIMULI)
        current_surface_stim.temporal = eq_class()

        eq_params_form = get_form_for_equation(eq_class)(prefix=SurfaceStimulusCreatorForm.NAME_TEMPORAL_PARAMS_DIV)
        return {'form': eq_params_form, 'equationsPrefixes': self.plotted_equation_prefixes}
 def __init__(self):
     SpatioTemporalController.__init__(self)
     ui_name_to_equation_dict = get_ui_name_to_equation_dict()
     self.possible_spatial_equations = {GAUSSIAN_EQUATION: ui_name_to_equation_dict.get(GAUSSIAN_EQUATION),
                                        DOUBLE_GAUSSIAN_EQUATION: ui_name_to_equation_dict.get(DOUBLE_GAUSSIAN_EQUATION),
                                        SIGMOID_EQUATION: ui_name_to_equation_dict.get(SIGMOID_EQUATION)}
     self.possible_temporal_equations = ui_name_to_equation_dict
 def __init__(self):
     SpatioTemporalController.__init__(self)
     self.plotted_equation_prefixes = {}
     ui_name_to_equation_dict = get_ui_name_to_equation_dict()
     self.possible_equations = {GAUSSIAN_EQUATION: ui_name_to_equation_dict.get(GAUSSIAN_EQUATION),
                                DOUBLE_GAUSSIAN_EQUATION: ui_name_to_equation_dict.get(DOUBLE_GAUSSIAN_EQUATION),
                                SIGMOID_EQUATION: ui_name_to_equation_dict.get(SIGMOID_EQUATION)}
    def set_equation(self, equation):
        eq_class = get_ui_name_to_equation_dict().get(equation)
        current_lconn = common.get_from_session(KEY_LCONN)
        current_lconn.equation = eq_class()

        eq_params_form = get_form_for_equation(eq_class)(prefix=LocalConnectivityCreatorForm.NAME_EQUATION_PARAMS_DIV)
        return {'form': eq_params_form, 'equationsPrefixes': self.plotted_equation_prefixes}
Пример #6
0
    def set_temporal(self, temporal_equation):
        eq_class = get_ui_name_to_equation_dict().get(temporal_equation)
        current_region_stim = common.get_from_session(KEY_REGION_STIMULUS)
        current_region_stim.temporal = eq_class()

        eq_params_form = get_form_for_equation(eq_class)(prefix=RegionStimulusCreatorForm.NAME_TEMPORAL_PARAMS_DIV)
        #TODO: check eqPrefixes
        return {'adapter_form': eq_params_form, 'equationsPrefixes': self.plotted_equation_prefixes}
Пример #7
0
 def __init__(self, prefix=''):
     super(MultiplicativeNoiseForm, self).__init__(prefix)
     self.nsig = ArrayField(Multiplicative.nsig, self)
     self.equation_choices = get_ui_name_to_equation_dict()
     self.equation = SimpleSelectField(self.equation_choices,
                                       self,
                                       name='equation',
                                       required=True,
                                       label='Equation')
    def set_equation(self, equation):
        eq_class = get_ui_name_to_equation_dict().get(equation)
        context = common.get_from_session(KEY_CONTEXT_MPS)
        context.current_equation = eq_class()

        eq_params_form = get_form_for_equation(eq_class)(
            prefix=SurfaceModelParametersForm.NAME_EQATION_PARAMS_DIV)
        return {
            'form': eq_params_form,
            'equationsPrefixes': self.plotted_equation_prefixes
        }
Пример #9
0
 def __init__(self):
     SpatioTemporalController.__init__(self)
     self.equation_choices = get_ui_name_to_equation_dict()