コード例 #1
0
ファイル: classify_form.py プロジェクト: RichardLitt/Vesper
    def __init__(self, *args, **kwargs):

        super().__init__(*args, **kwargs)

        # Populate classifiers field.
        self.fields['classifier'].choices = \
            form_utils.get_processor_choices('Classifier')

        # Populate detectors field.
        self.fields['detectors'].choices = \
            form_utils.get_processor_choices('Detector')

        # Populate station/mics field.
        names = model_utils.get_station_mic_output_pair_ui_names()
        choices = [(name, name) for name in names]
        self.fields['station_mics'].choices = choices
コード例 #2
0
    def __init__(self, *args, **kwargs):
        
        super().__init__(*args, **kwargs)
        
        # Populate detectors field.
        self.fields['detector'].choices = \
            form_utils.get_processor_choices('Detector')

        # Populate station/mics field.
        names = model_utils.get_station_mic_output_pair_ui_names()
        choices = [(name, name) for name in names]
        self.fields['station_mic'].choices = choices
コード例 #3
0
 def __init__(self, *args, **kwargs):
     
     super().__init__(*args, **kwargs)
     
     # Populate detector fields.
     choices = form_utils.get_processor_choices('Detector')
     self.fields['source_detector'].choices = choices
     self.fields['target_detector'].choices = choices
     
     # Populate station/mics field.
     names = model_utils.get_station_mic_output_pair_ui_names()
     choices = [(n, n) for n in names]
     self.fields['station_mics'].choices = choices
コード例 #4
0
 def __init__(self, *args, **kwargs):
     
     super().__init__(*args, **kwargs)
     
     # Populate detectors field.
     self.fields['detectors'].choices = \
         form_utils.get_processor_choices('Detector')
     
     # Populate station/mics field.
     names = model_utils.get_station_mic_output_pair_ui_names()
     choices = [(n, n) for n in names]
     self.fields['station_mics'].choices = choices
     
     # Populate classification field.
     self.fields['classification'].choices = \
         form_utils.get_string_annotation_value_choices('Classification')
コード例 #5
0
    def __init__(self, *args, **kwargs):

        super().__init__(*args, **kwargs)

        # Populate detectors field.
        self.fields['detectors'].choices = \
            form_utils.get_processor_choices('Detector')

        # Populate stations field.
        station_names = sorted(s.name for s in Station.objects.all())
        self.fields['stations'].choices = [(n, n) for n in station_names]

        # Populate schedule field.
        presets = preset_manager.instance.get_flattened_presets(
            'Detection Schedule')
        preset_names = ['/'.join(p[0]) for p in presets]
        choices = [(None, 'None')] + [(n, n) for n in preset_names]
        self.fields['schedule'].choices = choices
コード例 #6
0
ファイル: detect_form.py プロジェクト: HaroldMills/Vesper
 def __init__(self, *args, **kwargs):
     
     super().__init__(*args, **kwargs)
     
     # Populate detectors field.
     self.fields['detectors'].choices = \
         form_utils.get_processor_choices('Detector')
     
     # Populate stations field.
     station_names = sorted(s.name for s in Station.objects.all())
     self.fields['stations'].choices = [(n, n) for n in station_names]
     
     # Populate schedule field.
     presets = preset_manager.instance.get_flattened_presets(
         'Detection Schedule')
     preset_names = ['/'.join(p[0]) for p in presets]
     choices = [(None, 'None')] + [(n, n) for n in preset_names]
     self.fields['schedule'].choices = choices