Enable and disable frequency domain options.
339369
def toggle_freq(self):
        """"""
        freq = self.frequency

        export_full_on = freq['export_full'].get_value()
        export_band_on = freq['export_band'].get_value()
        freq_on = asarray([export_full_on,
                           export_band_on,
                           freq['plot_on'].get_value(),
                           freq['fooof_on'].get_value()]).any()
        freq['box_param'].setEnabled(freq_on)
        freq['box_output'].setEnabled(freq_on)
        freq['box_nfft'].setEnabled(freq_on)
        freq['box_band'].setEnabled(export_band_on)

        welch_on = freq['welch_on'].get_value() and freq_on
        freq['box_welch'].setEnabled(welch_on)

        if welch_on:
            overlap_on = freq['overlap'].isChecked()
            freq['overlap_val'].setEnabled(overlap_on)
            freq['step_val'].setEnabled(not overlap_on)
            freq['box_output'].setEnabled(not welch_on)
            freq['box_nfft'].setEnabled(not welch_on)
            freq['spectrald'].setChecked(True)

        nfft_fixed_on = freq['nfft_fixed'].isChecked()
        zeropad_on = freq['nfft_zeropad'].isChecked()
        freq['nfft_fixed_val'].setEnabled(nfft_fixed_on)

        epoch_on = self.chunk['epoch'].isChecked()
        rectangular = welch_on or epoch_on or zeropad_on or nfft_fixed_on or \
                        (self.nseg == 1)
        freq['prep'].setEnabled(freq_on)
        if not freq_on:
            freq['prep'].set_value(False)
        freq['export_full'].setEnabled(rectangular)
        freq['plot_on'].setEnabled(rectangular)
        freq['fooof_on'].setEnabled(rectangular)
        freq['box_norm'].setEnabled(freq_on and \
            ((welch_on or nfft_fixed_on or zeropad_on) or \
             (export_band_on and not export_full_on)))
        if not freq['plot_on'].isEnabled():
            freq['plot_on'].set_value(False)
        if not freq['box_norm'].isEnabled():
            freq['norm'].set_value('none')

        dpss_on = freq['taper'].get_value() == 'dpss'
        freq['box_mtap'].setEnabled(dpss_on)

        if dpss_on:
            nhbw_on = freq['nhbw'].get_value()
            freq['nhbw_val'].setEnabled(nhbw_on)

        complex_on = freq['complex'].isChecked()
        freq['sides'].setEnabled(complex_on)
        if complex_on:
            freq['welch_on'].setEnabled(False)
            freq['welch_on'].set_value(False)
        else:
            freq['welch_on'].setEnabled(True)

        norm_evt = freq['norm'].get_value() == 'by mean of event type(s)'
        norm_stage = freq['norm'].get_value() == 'by mean of stage(s)'
        freq['norm_evt_type'].setEnabled(norm_evt)
        freq['norm_stage'].setEnabled(norm_stage)
        freq['norm_concat'].setEnabled(norm_evt or norm_stage)

        nchan = len(self.idx_chan.selectedItems())
        #s2 = (self.nseg == 1 and nchan == 2) or (self.nseg == 2 and nchan == 1)
        freq['box_cross'].setEnabled(nchan == 2 and freq_on)
        if not nchan == 2:
            freq['csd'].set_value(False)
            freq['gainphase'].set_value(False)
            #freq['phaseshift'].set_value(False)
            freq['coh'].set_value(False)

        if True in [freq[x].get_value() for x in ['csd', 'gainphase', 'coh']]:
            freq['spectrald'].setChecked(True)
            freq['box_output'].setEnabled(False)
            #freq['norm'].set_value('none')
            #freq['box_norm'].setEnabled(False)

        fooof_on = freq['fooof_on'].get_value()
        freq['box_fooof'].setEnabled(fooof_on)
604325
def disable(self, clear_cache=True):
        
        logger.debug('disable(clear_cache={})'.format(clear_cache))
        if clear_cache:
            self.clear()
        self.options.enabled = False
        logger.info('cache disabled')
951950
def rfft2d_freqs(h, w):
    """"""

    fy = np.fft.fftfreq(h)[:, None]
    # when we have an odd input dimension we need to keep one additional
    # frequency and later cut off 1 pixel
    if w % 2 == 1:
        fx = np.fft.fftfreq(w)[: w // 2 + 2]
    else:
        fx = np.fft.fftfreq(w)[: w // 2 + 1]
    return np.sqrt(fx * fx + fy * fy)
642128
def temporarily_disabled(self):
        
        old_setting = self.options.enabled
        self.disable(clear_cache=False)
        try:
            yield
        finally:
            self.options.enabled = old_setting
654410
function () {
			
			var i, length;
			
			for (i = 0, length = this.choicesList.length; i < length; i += 1) {
				this.disableChoice(this.choicesList[i], false);
			}
			
		}
1226944
def block_signals(self):
        """"""
        self.disconnect_layer_listener()
        self.aggregation_layer_combo.blockSignals(True)
        self.exposure_layer_combo.blockSignals(True)
        self.hazard_layer_combo.blockSignals(True)
1255902
def set_freq(self, fout, freq):
        
        hsdiv_tuple = (4, 5, 6, 7, 9, 11)           # possible dividers
        n1div_tuple = (1,) + tuple(range(2,129,2))  #
        fdco_min = 5670.0           # set maximum as minimum
        hsdiv = self.get_hs_div()   # read curent dividers
        n1div = self.get_n1_div()   #

        if abs((freq-fout)*1e6/fout) > 3500:  
            # Large change of frequency      
            fdco = fout * hsdiv * n1div # calculate high frequency oscillator
            fxtal =  fdco / self.get_rfreq()  # should be fxtal = 114.285        
        
            for hsdiv_iter in hsdiv_tuple:      # find dividers with minimal power consumption
                for n1div_iter in n1div_tuple:
                    fdco_new = freq * hsdiv_iter * n1div_iter
                    if (fdco_new >= 4850) and (fdco_new <= 5670):
                        if (fdco_new <= fdco_min):
                            fdco_min = fdco_new        
                            hsdiv = hsdiv_iter
                            n1div = n1div_iter
            rfreq = fdco_min / fxtal        
        
            self.freeze_dco()       # write registers
            self.set_hs_div(hsdiv)
            self.set_n1_div(n1div)
            self.set_rfreq(rfreq)
            self.unfreeze_dco()
            self.new_freq()
        else:
            # Small change of frequency
            rfreq = self.get_rfreq() * (freq/fout)

            self.freeze_m()         # write registers           
            self.set_rfreq(rfreq)
            self.unfreeze_m()
788788
def _filter_options(self, aliases=True, comments=True, historical=True):
        """"""
        options = []
        if not aliases:
            options.append('noaliases')
        if not comments:
            options.append('nocomments')
        if not historical:
            options.append('nohistorical')
        return options
866988
def disable(self):
        
        self.engine.data.update(dns_relay_interface=[])
        self.engine.data.pop('dns_relay_profile_ref', None)
1198180
function setEnabledFeatures(selectedFeature) {
  switch (selectedFeature) {
  case "AnalogInputFirmata":
    analogInputEnabled = true;
    break;
  case "AnalogOutputFirmata":
    analogOutputEnabled = true;
    break;
  case "DigitalInputFirmata":
    digitalInputEnabled = true;
    break;
  case "DigitalOutputFirmata":
    digitalOutputEnabled = true;
    break;
  case "ServoFirmata":
    servoEnabled = true;
    break;
  case "FirmataScheduler":
    schedulerEnabled = true;
    break;
  }
}
167967
def disable(name, **kwargs):
    '''
    
    '''
    cmd = '/usr/sbin/svcadm disable {0}'.format(name)
    return not __salt__['cmd.retcode'](cmd, python_shell=False)
287979
def disableGroup(self):
        """"""
        radioButtonListInGroup = PygWidgetsRadioButton.__PygWidgets__Radio__Buttons__Groups__Dicts__[self.group]
        for radioButton in radioButtonListInGroup:
            radioButton.disable()
47887
def disable(self):
        
        self.engine.data.update(sandbox_type='none')
        self.pop('cloud_sandbox_settings', None) #pre-6.3
        self.pop('sandbox_settings', None)
854800
public void disableAll(){
		javaMemoryProducers =
		javaMemoryPoolProducers =
		javaThreadingProducers =
		osProducer =
		runtimeProducer =
		mbeanProducers =
		gcProducer =
		errorProducer =
			false;

	}
294538
public static function disable()
    {
        if (!\is_array($functions = spl_autoload_functions())) {
            return;
        }

        foreach ($functions as $function) {
            spl_autoload_unregister($function);
        }

        foreach ($functions as $function) {
            if (\is_array($function) && $function[0] instanceof self) {
                $function = $function[0]->getClassLoader();
            }

            spl_autoload_register($function);
        }
    }
320732
def disable_gen(self, idx):
        
        self.u[self.uid[idx]] = 0
        self.system.dae.factorize = True
144431
def set_options(self, **options):
        
        ignore_etag = options.pop('ignore_etag', False)
        disable = options.pop('disable_collectfast', False)
        if ignore_etag:
            warnings.warn(
                "--ignore-etag is deprecated since 0.5.0, use "
                "--disable-collectfast instead.")
        if ignore_etag or disable:
            self.collectfast_enabled = False
        super(Command, self).set_options(**options)