def __init__(self): super(ZIPSurfaceImporterForm, self).__init__() self.uploaded = TraitUploadField(ZIPSurfaceImporterModel.uploaded, '.zip', 'uploaded') self.surface_type = SelectField(ZIPSurfaceImporterModel.surface_type, 'surface_type', choices=ALL_SURFACES_SELECTION) self.zero_based_triangles = BoolField(ZIPSurfaceImporterModel.zero_based_triangles, name='zero_based_triangles') self.should_center = BoolField(ZIPSurfaceImporterModel.should_center, name='should_center')
def __init__(self): super(PreSigmoidalCouplingForm, self).__init__() self.H = ArrayField(PreSigmoidal.H, self.project_id) self.Q = ArrayField(PreSigmoidal.Q, self.project_id) self.G = ArrayField(PreSigmoidal.G, self.project_id) self.P = ArrayField(PreSigmoidal.P, self.project_id) self.theta = ArrayField(PreSigmoidal.theta, self.project_id) self.dynamic = BoolField(PreSigmoidal.dynamic, self.project_id) self.globalT = BoolField(PreSigmoidal.globalT, self.project_id)
def __init__(self): super(PreSigmoidalCouplingForm, self).__init__() self.H = ArrayField(PreSigmoidal.H) self.Q = ArrayField(PreSigmoidal.Q) self.G = ArrayField(PreSigmoidal.G) self.P = ArrayField(PreSigmoidal.P) self.theta = ArrayField(PreSigmoidal.theta) self.dynamic = BoolField(PreSigmoidal.dynamic) self.globalT = BoolField(PreSigmoidal.globalT)
def __init__(self, prefix='', project_id=None): super(ObjSurfaceImporterForm, self).__init__(prefix, project_id) self.surface_type = SelectField(ObjSurfaceImporterModel.surface_type, self, name='surface_type', choices=ALL_SURFACES_SELECTION) self.data_file = TraitUploadField(ObjSurfaceImporterModel.data_file, '.obj', self, name='data_file') self.should_center = BoolField(ObjSurfaceImporterModel.should_center, self, name='should_center')
def __init__(self, project_id=None): super(RegionMatTimeSeriesImporterForm, self).__init__(project_id) self.data_file = TraitUploadField( RegionMatTimeSeriesImporterModel.data_file, '.mat', self.project_id, 'data_file', self.temporary_files) self.dataset_name = StrField( RegionMatTimeSeriesImporterModel.dataset_name, self.project_id, name='dataset_name') self.structure_path = StrField( RegionMatTimeSeriesImporterModel.structure_path, self.project_id, name='structure_path') self.transpose = BoolField(RegionMatTimeSeriesImporterModel.transpose, self.project_id, name='transpose') self.slice = StrField(RegionMatTimeSeriesImporterModel.slice, self.project_id, name='slice') self.sampling_rate = IntField( RegionMatTimeSeriesImporterModel.sampling_rate, self.project_id, name='sampling_rate') self.start_time = IntField(RegionMatTimeSeriesImporterModel.start_time, self.project_id, name='start_time') self.datatype = TraitDataTypeSelectField( RegionMatTimeSeriesImporterModel.datatype, self.project_id, name='tstype_parameters')
def __init__(self, project_id=None): super(FFTAdapterForm, self).__init__(project_id) self.time_series = TraitDataTypeSelectField(FFTAdapterModel.time_series, self.project_id, name='time_series', conditions=self.get_filters(), has_all_option=True) self.segment_length = FloatField(FFTAdapterModel.segment_length, self.project_id) self.window_function = SelectField(FFTAdapterModel.window_function, self.project_id) self.detrend = BoolField(FFTAdapterModel.detrend, self.project_id)
def __init__(self): super(BarAndBazForm, self).__init__() self.bar = FormField(BarForm, 'bar', label='bar') # BarAndBaz.bar self.baz = FormField(BazForm, 'baz', label='baaz') # not from trait self.happy = BoolField(Attr(bool, label='clap'), 'clasp') self.array = ArrayField(BarAndBaz.array)
def __init__(self): super(GIFTISurfaceImporterForm, self).__init__() self.file_type = SelectField(GIFTISurfaceImporterModel.file_type, name='file_type') self.data_file = TraitUploadField(GIFTISurfaceImporterModel.data_file, '.gii', 'data_file') self.data_file_part2 = TraitUploadField(GIFTISurfaceImporterModel.data_file_part2, '.gii', 'data_file_part2') self.should_center = BoolField(GIFTISurfaceImporterModel.should_center, name='should_center')
def __init__(self, project_id=None): super(ZIPSurfaceImporterForm, self).__init__(project_id) self.uploaded = TraitUploadField(ZIPSurfaceImporterModel.uploaded, '.zip', self.project_id, 'uploaded', self.temporary_files) self.surface_type = SelectField(ZIPSurfaceImporterModel.surface_type, self.project_id, 'surface_type', choices=ALL_SURFACES_SELECTION) self.zero_based_triangles = BoolField( ZIPSurfaceImporterModel.zero_based_triangles, self.project_id, name='zero_based_triangles') self.should_center = BoolField(ZIPSurfaceImporterModel.should_center, self.project_id, name='should_center')
def __init__(self, prefix='', project_id=None): super(NIFTIImporterForm, self).__init__(prefix, project_id) self.data_file = TraitUploadField(NIFTIImporterModel.data_file, ('.nii', '.gz', '.zip'), self, name='data_file') self.apply_corrections = BoolField(NIFTIImporterModel.apply_corrections, self, name='apply_corrections') self.mappings_file = TraitUploadField(NIFTIImporterModel.mappings_file, '.txt', self, name='mappings_file') self.connectivity = TraitDataTypeSelectField(NIFTIImporterModel.connectivity, self, name='connectivity')
def __init__(self, prefix='', project_id=None): super(ConnectivityCreatorForm, self).__init__(prefix, project_id) self.original_connectivity = TraitDataTypeSelectField(ConnectivityCreatorModel.original_connectivity, self, name='original_connectivity', conditions=self.get_filters()) self.new_weights = ArrayField(ConnectivityCreatorModel.new_weights, self) self.new_tracts = ArrayField(ConnectivityCreatorModel.new_tracts, self) self.interest_area_indexes = ArrayField(ConnectivityCreatorModel.interest_area_indexes, self) self.is_branch = BoolField(ConnectivityCreatorModel.is_branch, self)
def __init__(self, project_id=None): super(GIFTISurfaceImporterForm, self).__init__(project_id) self.file_type = SelectField(GIFTISurfaceImporterModel.file_type, self.project_id, name='file_type', choices=GIFTISurfaceImporterModel.surface_types) self.data_file = TraitUploadField(GIFTISurfaceImporterModel.data_file, '.gii', self.project_id, 'data_file', self.temporary_files) self.data_file_part2 = TraitUploadField(GIFTISurfaceImporterModel.data_file_part2, '.gii', self.project_id, 'data_file_part2', self.temporary_files) self.should_center = BoolField(GIFTISurfaceImporterModel.should_center, self.project_id, name='should_center')
def __init__(self): super(BalloonModelAdapterForm, self).__init__() self.time_series = TraitDataTypeSelectField(BalloonModelAdapterModel.time_series, name=self.get_input_name(), conditions=self.get_filters(), has_all_option=True) self.dt = FloatField(BalloonModelAdapterModel.dt) self.tau_s = FloatField(BalloonModelAdapterModel.tau_s) self.tau_f = FloatField(BalloonModelAdapterModel.tau_f) self.neural_input_transformation = SelectField(BalloonModelAdapterModel.neural_input_transformation) self.bold_model = SelectField(BalloonModelAdapterModel.bold_model) self.RBM = BoolField(BalloonModelAdapterModel.RBM)
def __init__(self): super(ObjSurfaceImporterForm, self).__init__() self.surface_type = SelectField(ObjSurfaceImporterModel.surface_type, name='surface_type') self.data_file = TraitUploadField(ObjSurfaceImporterModel.data_file, '.obj', 'data_file') self.should_center = BoolField(ObjSurfaceImporterModel.should_center, name='should_center') del self.surface_type.choices[-1]
def test_bool_field(self): bool_attr = Attr(field_type=bool, default=True, label='Dummy Bool') bool_field = BoolField(bool_attr, self.name) post_data = {'dummy_name': 'on'} bool_field.fill_from_post(post_data) assert bool_field.data, "True (boolean) was not set correctly on BoolField!" post_data = {} bool_field.fill_from_post(post_data) assert bool_field.data is False, "False (boolean) was not set correctly on BoolField!"
def __init__(self, project_id=None): super(BalloonModelAdapterForm, self).__init__(project_id) self.time_series = TraitDataTypeSelectField( BalloonModelAdapterModel.time_series, self.project_id, name=self.get_input_name(), conditions=self.get_filters(), has_all_option=True) self.dt = FloatField(BalloonModelAdapterModel.dt, self.project_id) self.tau_s = FloatField(BalloonModelAdapterModel.tau_s, self.project_id) self.tau_f = FloatField(BalloonModelAdapterModel.tau_f, self.project_id) self.neural_input_transformation = StrField( BalloonModelAdapterModel.neural_input_transformation, self.project_id) self.bold_model = StrField(BalloonModelAdapterModel.bold_model, self.project_id) self.RBM = BoolField(BalloonModelAdapterModel.RBM, self.project_id)
def __init__(self): super(BarForm, self).__init__() self.airplane_meal = StrField(Bar.airplane_meal) self.portions = IntField(Bar.portions) self.is_fancy = BoolField(Bar.is_fancy)