See :meth:`AbstractAcquisitionRunner<sparkle.run.abstract_acquisition.AbstractAcquisitionRunner.set_calibration>`
551711
def set_calibration(self, attenuations, freqs, frange, calname):
        """"""
        self._stimulus.setCalibration(attenuations, freqs, frange)
1250196
def _vis_calibrate(self, data, key):
        """"""
        # radiance to reflectance taken as in mipp/xrit/MSG.py
        # again FCI User Guide is not clear on how to do this

        sirr = self.nc[
            '/data/{}/measured/channel_effective_solar_irradiance'
            .format(key.name)][...]

        # reflectance = radiance / sirr * 100
        data.data[:] /= sirr
        data.data[:] *= 100
63271
public void setRunner(Class<? extends OperaRunner> runner) {
    options.get(RUNNER).setValue(runner.getName());
  }
604244
def set(self, r, g, b, intensity=None):
        """"""
        self.r = r
        self.g = g
        self.b = b
        if intensity:
            self.intensity = intensity
1217974
public void setOrtho() {
		matrixMode(MatrixMode.PROJECTION);
		resetMatrix();
		gl.glOrtho(0, this.width, 0, this.height, -1.0e10, 1.0e10);
		matrixMode(MatrixMode.MODELVIEW);
		resetMatrix();
	}
685931
def set_calibration_duration(self, dur):
        
        self.bs_calibrator.set_duration(dur)
        self.tone_calibrator.set_duration(dur)
1176582
def set_values(self,x):
        

        x = numpy.atleast_2d(x)

        x = x.real # ahem

        C_inv = self.__C_inv__
        theta = numpy.dot( x, C_inv )
        self.theta = theta

        return theta
306064
def set_standard_settings(self):
        '''
        '''
        if self.is_open(self.out_file_h5):
            self.out_file_h5.close()
        self.out_file_h5 = None
        self._setup_clusterizer()
        self.chunk_size = 3000000
        self.n_injections = None
        self.trig_count = 0  # 0 trig_count = 16 BCID per trigger
        self.max_tot_value = 13
        self.vcal_c0, self.vcal_c1 = None, None
        self.c_low, self.c_mid, self.c_high = None, None, None
        self.c_low_mask, self.c_high_mask = None, None
        self._filter_table = tb.Filters(complib='blosc', complevel=5, fletcher32=False)
        warnings.simplefilter("ignore", OptimizeWarning)
        self.meta_event_index = None
        self.fei4b = False
        self.create_hit_table = False
        self.create_empty_event_hits = False
        self.create_meta_event_index = True
        self.create_tot_hist = True
        self.create_mean_tot_hist = False
        self.create_tot_pixel_hist = True
        self.create_rel_bcid_hist = True
        self.correct_corrupted_data = False
        self.create_error_hist = True
        self.create_service_record_hist = True
        self.create_occupancy_hist = True
        self.create_meta_word_index = False
        self.create_source_scan_hist = False
        self.create_tdc_hist = False
        self.create_tdc_counter_hist = False
        self.create_tdc_pixel_hist = False
        self.create_trigger_error_hist = False
        self.create_threshold_hists = False
        self.create_threshold_mask = True  # Threshold/noise histogram mask: masking all pixels out of bounds
        self.create_fitted_threshold_mask = True  # Fitted threshold/noise histogram mask: masking all pixels out of bounds
        self.create_fitted_threshold_hists = False
        self.create_cluster_hit_table = False
        self.create_cluster_table = False
        self.create_cluster_size_hist = False
        self.create_cluster_tot_hist = False
        self.align_at_trigger = False  # use the trigger word to align the events
        self.align_at_tdc = False  # use the trigger word to align the events
        self.trigger_data_format = 0  # 0: 31bit trigger number, 1: 31bit trigger time stamp, 2: 15bit trigger time stamp + 16bit trigger number
        self.use_tdc_trigger_time_stamp = False  # the tdc time stamp is the difference between trigger and tdc rising edge
        self.max_tdc_delay = 255
        self.max_trigger_number = 2 ** 16 - 1
        self.set_stop_mode = False
248711
def _set_magic_constants(self):
        
        real_path = os.path.realpath(self._source_filename)

        self._replace['__FILE__'] = "'%s'" % real_path
        self._replace['__ROUTINE__'] = "'%s'" % self._routine_name
        self._replace['__DIR__'] = "'%s'" % os.path.dirname(real_path)
470368
def process_calibration(self, save=False):
        """"""
        
        if not self.save_data:
            raise Exception("Runner must be set to save when run, to be able to process")

        vfunc = np.vectorize(calc_db, self.mphonesens, self.mphonedb)

        if USE_FFT:
            peaks = np.mean(abs(self.datafile.get_data(self.current_dataset_name + '/fft_peaks')), axis=1)
        else:
            peaks = np.mean(abs(self.datafile.get_data(self.current_dataset_name + '/vamp')), axis=1)

        # print 'calibration frequencies', self.calibration_frequencies
        # cal_index = self.calibration_indexes[self.calibration_frequencies.index(self.calf)]
        # cal_peak = peaks[cal_index]
        # cal_vmax = vmaxes[cal_index]

        # print 'vfunc inputs', vmaxes, self.caldb, cal_vmax

        resultant_dB = vfunc(peaks, self.calpeak) * -1 #db attenuation

        print 'calibration frequences', self.calibration_frequencies, 'indexes', self.calibration_indexes
        print 'attenuations', resultant_dB

        calibration_vector = resultant_dB[self.calibration_indexes].squeeze()
        # Not currenly saving resultant intensity

        return resultant_dB, '', self.calf
1114406
def clear_calibrations():
    
    calibration_path = CONFIG['labware_calibration_offsets_dir_v4']
    try:
        targets = [
            f for f in calibration_path.iterdir() if f.suffix == '.json']
        for target in targets:
            target.unlink()
    except FileNotFoundError:
        pass
826624
def calibrate(self, data, calibration):
        """"""
        tic = datetime.now()
        if calibration == 'counts':
            res = data
        elif calibration in ['radiance', 'brightness_temperature']:
            res = self._calibrate(data)
        else:
            raise NotImplementedError("Don't know how to calibrate to " +
                                      str(calibration))

        res.attrs['standard_name'] = calibration
        res.attrs['calibration'] = calibration

        logger.debug("Calibration time " + str(datetime.now() - tic))
        return res
1124971
def updateCalibration(self):
        """"""
        if self.samplerate() != self._calibration_fs:
            self.setCalibration(self._attenuationVector, self._calFrequencies, self._calFrange)
188133
public void setCalibrationHoldOut(double holdOut)
    {
        if(Double.isNaN(holdOut) || holdOut <= 0 || holdOut >= 1)
            throw new IllegalArgumentException("HoldOut must be in (0, 1), not " + holdOut);
        this.holdOut = holdOut;
    }
281890
def _copy_calibration(self, calibration):
        """"""
        for key, item in calibration.__dict__.items():
            self.__dict__[key] = item
1369510
def set_dryrun(dryrun):
    
    r = _get_runez()
    old = r.DRYRUN
    r.DRYRUN = bool(dryrun)
    return old
443473
public void setUnitPerMillimeter(int unitPerMillimeter)
	{
		if (1 > unitPerMillimeter)
		{
			String _message = "The specified unitPerMillimetre ({0}) is incorrect, it must be greater or equal than 1.";
			Object[] _parameters =
			{
				new Integer(unitPerMillimeter)
			};
			throw new IllegalArgumentException(MessageFormat.format(_message, _parameters));
		}
		myUnitPerMillimeter = unitPerMillimeter;
	}