コード例 #1
0
    def __init__(self,
                 variables_of_interest_indexes={},
                 prefix='',
                 project_id=None):
        super(EEGMonitorForm, self).__init__(variables_of_interest_indexes,
                                             prefix, project_id)

        sensor_filter = FilterChain(
            fields=[FilterChain.datatype + '.sensors_type'],
            operations=["=="],
            values=[EEG_S])

        projection_filter = FilterChain(
            fields=[FilterChain.datatype + '.projection_type'],
            operations=["=="],
            values=[EEG_P])

        self.projection = TraitDataTypeSelectField(
            EEGViewModel.projection,
            self,
            name='projection',
            conditions=projection_filter)
        self.reference = ScalarField(EEG.reference, self)
        self.sensors = TraitDataTypeSelectField(EEGViewModel.sensors,
                                                self,
                                                name='sensors',
                                                conditions=sensor_filter)
        self.sigma = ScalarField(EEG.sigma, self)
コード例 #2
0
 def __init__(self, prefix='', project_id=None):
     super(PearsonCorrelationCoefficientAdapterForm, self).__init__(prefix, project_id)
     self.time_series = TraitDataTypeSelectField(PearsonCorrelationCoefficientAdapterModel.time_series, self,
                                                 name=self.get_input_name(), conditions=self.get_filters(),
                                                 has_all_option=True)
     self.t_start = ScalarField(PearsonCorrelationCoefficientAdapterModel.t_start, self)
     self.t_end = ScalarField(PearsonCorrelationCoefficientAdapterModel.t_end, self)
コード例 #3
0
    def __init__(self,
                 session_stored_simulator=None,
                 prefix='',
                 project_id=None):
        super(EEGMonitorForm, self).__init__(session_stored_simulator, prefix,
                                             project_id)

        sensor_filter = FilterChain(
            fields=[FilterChain.datatype + '.sensors_type'],
            operations=["=="],
            values=[SensorTypes.TYPE_EEG.value])

        projection_filter = FilterChain(
            fields=[FilterChain.datatype + '.projection_type'],
            operations=["=="],
            values=[ProjectionsType.EEG.value])

        self.projection = TraitDataTypeSelectField(
            EEGViewModel.projection,
            self,
            name='projection',
            conditions=projection_filter)
        self.reference = ScalarField(EEG.reference, self)
        self.sensors = TraitDataTypeSelectField(EEGViewModel.sensors,
                                                self,
                                                name='sensors',
                                                conditions=sensor_filter)
        self.sigma = ScalarField(EEG.sigma, self)
コード例 #4
0
 def __init__(self, prefix='', project_id=None):
     super(FFTAdapterForm, self).__init__(prefix, project_id)
     self.time_series = TraitDataTypeSelectField(FFTAdapterModel.time_series, self, name='time_series',
                                                 conditions=self.get_filters(), has_all_option=True)
     self.segment_length = ScalarField(FFTAdapterModel.segment_length, self)
     self.window_function = SelectField(FFTAdapterModel.window_function, self)
     self.detrend = ScalarField(FFTAdapterModel.detrend, self)
コード例 #5
0
    def __init__(self,
                 variables_of_interest_indexes,
                 prefix='',
                 project_id=None):
        super(EEGMonitorForm, self).__init__(variables_of_interest_indexes,
                                             prefix, project_id)

        sensor_filter = FilterChain(
            fields=[FilterChain.datatype + '.sensors_type'],
            operations=["=="],
            values=[EEG_S])

        projection_filter = FilterChain(
            fields=[FilterChain.datatype + '.projection_type'],
            operations=["=="],
            values=[EEG_P])

        self.projection = DataTypeSelectField(ProjectionMatrixIndex,
                                              self,
                                              name='projection',
                                              required=True,
                                              label=EEG.projection.label,
                                              doc=EEG.projection.label,
                                              conditions=projection_filter)
        self.reference = ScalarField(EEG.reference, self)
        self.sensors = DataTypeSelectField(SensorsIndex,
                                           self,
                                           name='sensors',
                                           required=True,
                                           label=EEG.sensors.label,
                                           doc=EEG.sensors.doc,
                                           conditions=sensor_filter)
        self.sigma = ScalarField(EEG.sigma, self)
コード例 #6
0
    def __init__(self, equation_choices, prefix='', project_id=None):
        super(LocalConnectivityCreatorForm, self).__init__(prefix, project_id)
        filter_for_cortical = FilterChain(
            fields=[FilterChain.datatype + '.surface_type'],
            operations=["=="],
            values=[CORTICAL])
        self.surface = TraitDataTypeSelectField(
            LocalConnectivityCreatorModel.surface,
            self,
            name=self.get_input_name(),
            conditions=filter_for_cortical)
        self.spatial = SelectField(LocalConnectivityCreatorModel.equation,
                                   self,
                                   name='spatial',
                                   choices=equation_choices,
                                   display_none_choice=False)

        self.spatial_params = FormField(GaussianEquationForm,
                                        self,
                                        name=self.NAME_EQUATION_PARAMS_DIV,
                                        label='Equation parameters')
        self.cutoff = ScalarField(LocalConnectivityCreatorModel.cutoff, self)
        self.display_name = ScalarField(
            LocalConnectivityCreatorModel.display_name,
            self,
            name='display_name')
コード例 #7
0
 def __init__(self, equation_choices, prefix='', project_id=None):
     super(LocalConnectivityCreatorForm, self).__init__(prefix, project_id)
     self.surface = TraitDataTypeSelectField(LocalConnectivityCreatorModel.surface, self, name=self.get_input_name(),
                                             conditions=self.get_filters())
     self.spatial = SelectField(LocalConnectivityCreatorModel.equation, self, name='spatial',
                                choices=equation_choices, display_none_choice=False, subform=GaussianEquationForm)
     self.cutoff = ScalarField(LocalConnectivityCreatorModel.cutoff, self)
     self.display_name = ScalarField(LocalConnectivityCreatorModel.display_name, self, name='display_name')
コード例 #8
0
 def __init__(self, prefix=''):
     super(PreSigmoidalCouplingForm, self).__init__(prefix)
     self.H = ArrayField(PreSigmoidal.H, self)
     self.Q = ArrayField(PreSigmoidal.Q, self)
     self.G = ArrayField(PreSigmoidal.G, self)
     self.P = ArrayField(PreSigmoidal.P, self)
     self.theta = ArrayField(PreSigmoidal.theta, self)
     self.dynamic = ScalarField(PreSigmoidal.dynamic, self)
     self.globalT = ScalarField(PreSigmoidal.globalT, self)
コード例 #9
0
 def __init__(self, prefix='', project_id=None):
     super(BalloonModelAdapterForm, self).__init__(prefix, project_id)
     self.time_series = TraitDataTypeSelectField(BalloonModelAdapterModel.time_series, self,
                                                 name=self.get_input_name(),
                                                 conditions=self.get_filters(), has_all_option=True)
     self.dt = ScalarField(BalloonModelAdapterModel.dt, self)
     self.neural_input_transformation = ScalarField(BalloonModelAdapterModel.neural_input_transformation, self)
     self.bold_model = ScalarField(BalloonModelAdapterModel.bold_model, self)
     self.RBM = ScalarField(BalloonModelAdapterModel.RBM, self)
コード例 #10
0
ファイル: allen_creator.py プロジェクト: yop0/tvb-root
 def __init__(self, prefix='', project_id=None):
     super(AllenConnectomeBuilderForm, self).__init__(prefix, project_id)
     self.resolution = SelectField(AllenConnectModel.resolution,
                                   self,
                                   choices=RESOLUTION_OPTIONS)
     self.weighting = SelectField(AllenConnectModel.weighting,
                                  self,
                                  choices=WEIGHTS_OPTIONS)
     self.inj_f_thresh = ScalarField(AllenConnectModel.inj_f_thresh, self)
     self.vol_thresh = ScalarField(AllenConnectModel.vol_thresh, self)
コード例 #11
0
 def __init__(self, prefix='', project_id=None):
     super(FCDAdapterForm, self).__init__(prefix, project_id)
     self.time_series = TraitDataTypeSelectField(
         FCDAdapterModel.time_series,
         self,
         name=self.get_input_name(),
         conditions=self.get_filters(),
         has_all_option=True)
     self.sw = ScalarField(FCDAdapterModel.sw, self)
     self.sp = ScalarField(FCDAdapterModel.sp, self)
コード例 #12
0
 def __init__(self, prefix='', project_id=None):
     super(TimeseriesMetricsAdapterForm, self).__init__(prefix, project_id)
     self.time_series = TraitDataTypeSelectField(
         TimeseriesMetricsAdapterModel.time_series,
         self,
         name="time_series")
     self.start_point = ScalarField(
         TimeseriesMetricsAdapterModel.start_point, self)
     self.segment = ScalarField(TimeseriesMetricsAdapterModel.segment, self)
     self.algorithms = MultiSelectField(
         TimeseriesMetricsAdapterModel.algorithms, self, name="algorithms")
コード例 #13
0
 def __init__(self, prefix='', project_id=None):
     super(LocalConnectivityCreatorForm, self).__init__(prefix, project_id)
     self.surface = DataTypeSelectField(
         self.get_required_datatype(),
         self,
         name=self.get_input_name(),
         required=LocalConnectivity.surface.required,
         label=LocalConnectivity.surface.label,
         doc=LocalConnectivity.surface.doc)
     self.equation = ScalarField(LocalConnectivity.equation, self)
     self.cutoff = ScalarField(LocalConnectivity.cutoff, self)
コード例 #14
0
 def __init__(self, prefix='', project_id=None):
     super(ContinuousWaveletTransformAdapterForm, self).__init__(prefix, project_id)
     self.time_series = TraitDataTypeSelectField(WaveletAdapterModel.time_series, self,
                                                 name=self.get_input_name(), conditions=self.get_filters(),
                                                 has_all_option=True)
     self.mother = ScalarField(ContinuousWaveletTransform.mother, self)
     self.sample_period = ScalarField(ContinuousWaveletTransform.sample_period, self)
     self.normalisation = ScalarField(ContinuousWaveletTransform.normalisation, self)
     self.q_ratio = ScalarField(ContinuousWaveletTransform.q_ratio, self)
     self.frequencies = FormField(RangeForm, self, name='frequencies',
                                  label=ContinuousWaveletTransform.frequencies.label,
                                  doc=ContinuousWaveletTransform.frequencies.doc)
コード例 #15
0
 def __init__(self,
              prefix='',
              project_id=None,
              default_simulation_name="simulation_1"):
     super(SimulatorFinalFragment, self).__init__(prefix, project_id)
     self.simulation_length = ScalarField(Simulator.simulation_length, self)
     self.simulation_name = ScalarField(Attr(
         str,
         doc='Name for the current simulation configuration',
         default=default_simulation_name,
         label='Simulation name'),
                                        self,
                                        name='input_simulation_name_id')
コード例 #16
0
ファイル: fcd_adapter.py プロジェクト: nedkab/tvb-framework
 def __init__(self, prefix='', project_id=None):
     super(FCDAdapterForm, self).__init__(prefix, project_id)
     self.time_series = DataTypeSelectField(
         self.get_required_datatype(),
         self,
         name=self.get_input_name(),
         required=True,
         label=FcdCalculator.time_series.label,
         doc=FcdCalculator.time_series.doc,
         conditions=self.get_filters(),
         has_all_option=True)
     self.sw = ScalarField(FcdCalculator.sw, self)
     self.sp = ScalarField(FcdCalculator.sp, self)
コード例 #17
0
 def __init__(self, prefix='', project_id=None):
     super(FFTAdapterForm, self).__init__(prefix, project_id)
     self.time_series = DataTypeSelectField(self.get_required_datatype(),
                                            self,
                                            name='time_series',
                                            required=True,
                                            label=fft.FFT.time_series.label,
                                            doc=fft.FFT.time_series.doc,
                                            conditions=self.get_filters(),
                                            has_all_option=True)
     self.segment_length = ScalarField(fft.FFT.segment_length, self)
     self.window_function = ScalarField(fft.FFT.window_function, self)
     self.detrend = ScalarField(fft.FFT.detrend, self)
コード例 #18
0
 def __init__(self, prefix='', project_id=None):
     super(PearsonCorrelationCoefficientAdapterForm,
           self).__init__(prefix, project_id)
     self.time_series = DataTypeSelectField(
         self.get_required_datatype(),
         self,
         name=self.get_input_name(),
         required=True,
         label=CorrelationCoefficient.time_series.label,
         doc=CorrelationCoefficient.time_series.doc,
         conditions=self.get_filters(),
         has_all_option=True)
     self.t_start = ScalarField(CorrelationCoefficient.t_start, self)
     self.t_end = ScalarField(CorrelationCoefficient.t_end, self)
コード例 #19
0
ファイル: ica_adapter.py プロジェクト: nedkab/tvb-framework
 def __init__(self, prefix='', project_id=None):
     super(ICAAdapterForm, self).__init__(prefix, project_id)
     self.time_series = DataTypeSelectField(self.get_required_datatype(), self, name='time_series', required=True,
                                            label=FastICA.time_series.label, doc=FastICA.time_series.doc,
                                            conditions=self.get_filters(), has_all_option=True)
     self.n_components = ScalarField(FastICA.n_components, self)
     self.project_id = project_id
コード例 #20
0
ファイル: neoforms_test.py プロジェクト: nedkab/tvb-root
 def __init__(self, prefix=''):
     super(BarAndBazForm, self).__init__(prefix)
     self.bar = FormField(BarForm, self, 'bar', label='bar')  # BarAndBaz.bar
     self.baz = FormField(BazForm, self, 'baz', label='baaz')
     # not from trait
     self.happy = ScalarField(Attr(bool, label='clap'), self, 'clasp')
     self.array = ArrayField(BarAndBaz.array, self)
コード例 #21
0
 def __init__(self, variables_of_interest_indexes, prefix='', project_id=None):
     super(MonitorForm, self).__init__(prefix)
     self.project_id = project_id
     self.period = ScalarField(Monitor.period, self)
     self.variables_of_interest_indexes = variables_of_interest_indexes
     self.variables_of_interest = MultiSelectField(List(of=str, label='Model Variables to watch',
                                                   choices=tuple(self.variables_of_interest_indexes.keys())),
                                                   self, name='variables_of_interest')
コード例 #22
0
    def __init__(self, prefix='', project_id=None):
        super(TimeseriesMetricsAdapterForm, self).__init__(prefix, project_id)
        self.time_series = DataTypeSelectField(self.get_required_datatype(), self, name="time_series",
                                               required=True, label=BaseTimeseriesMetricAlgorithm.time_series.label,
                                               doc = BaseTimeseriesMetricAlgorithm.time_series.doc)
        self.start_point = ScalarField(BaseTimeseriesMetricAlgorithm.start_point, self)
        self.segment = ScalarField(BaseTimeseriesMetricAlgorithm.segment, self)

        algo_names = list(ALGORITHMS)
        algo_names.sort()
        choices = OrderedDict()
        for name in algo_names:
            choices[name] = name

        self.algorithms = MultipleSelectField(choices, self, name="algorithms", include_none=False,
                                              label='Selected metrics to be applied',
                                              doc='The selected algorithms will all be applied on the input TimeSeries')
コード例 #23
0
    def __init__(self, variables_of_interest_indexes, prefix='', project_id=None):
        super(BoldMonitorForm, self).__init__(variables_of_interest_indexes, prefix, project_id)
        self.hrf_kernel_choices = get_ui_name_to_monitor_equation_dict()
        default_hrf_kernel = list(self.hrf_kernel_choices.values())[0]

        self.period = ScalarField(Bold.period, self)
        self.hrf_kernel = SelectField(Attr(HRFKernelEquation, label='Equation', default=default_hrf_kernel),
                                      self, name='hrf_kernel', choices=self.hrf_kernel_choices)
コード例 #24
0
 def __init__(self,
              session_stored_simulator=None,
              prefix='',
              project_id=None):
     super(SpatialAverageMonitorForm,
           self).__init__(session_stored_simulator, prefix, project_id)
     self.spatial_mask = ArrayField(SpatialAverage.spatial_mask, self)
     self.default_mask = ScalarField(SpatialAverage.default_mask, self)
コード例 #25
0
 def __init__(self, prefix='', project_id=None):
     super(SimulatorFinalFragment, self).__init__(prefix, project_id)
     self.simulation_name = ScalarField(Attr(
         str,
         doc='Name for the current simulation configuration',
         label='Simulation name'),
                                        self,
                                        name='input-simulation-name-id')
コード例 #26
0
 def __init__(self,
              variables_of_interest_indexes={},
              prefix='',
              project_id=None):
     super(SpatialAverageMonitorForm,
           self).__init__(variables_of_interest_indexes, prefix, project_id)
     self.spatial_mask = ArrayField(SpatialAverage.spatial_mask, self)
     self.default_mask = ScalarField(SpatialAverage.default_mask, self)
コード例 #27
0
 def __init__(self, prefix='', project_id=None):
     super(NodeCoherenceForm, self).__init__(prefix, project_id)
     self.time_series = TraitDataTypeSelectField(
         NodeCoherenceModel.time_series,
         self,
         name=self.get_input_name(),
         conditions=self.get_filters(),
         has_all_option=True)
     self.nfft = ScalarField(NodeCoherenceModel.nfft, self)
コード例 #28
0
 def __init__(self, prefix='', project_id=None):
     super(BoldMonitorForm, self).__init__(prefix, project_id)
     self.period = ScalarField(Bold.period, self)
     self.equation_choices = get_ui_name_to_monitor_equation_dict()
     self.equation = SimpleSelectField(self.equation_choices,
                                       self,
                                       name='equation',
                                       required=True,
                                       label='Equation')
コード例 #29
0
 def __init__(self, prefix='', project_id=None):
     super(ICAAdapterForm, self).__init__(prefix, project_id)
     self.time_series = TraitDataTypeSelectField(
         ICAAdapterModel.time_series,
         self,
         name='time_series',
         conditions=self.get_filters(),
         has_all_option=True)
     self.n_components = ScalarField(ICAAdapterModel.n_components, self)
     self.project_id = project_id
コード例 #30
0
 def __init__(self, prefix='', project_id=None):
     super(NodeCoherenceForm, self).__init__(prefix, project_id)
     self.time_series = DataTypeSelectField(
         self.get_required_datatype(),
         self,
         name=self.get_input_name(),
         required=True,
         label=NodeCoherence.time_series.label,
         doc=NodeCoherence.time_series.doc,
         conditions=self.get_filters(),
         has_all_option=True)
     self.nfft = ScalarField(NodeCoherence.nfft, self)