Sets the instrument parameters.
432603
def setInstrumentParameters(self,instrpars):
        
        pri_header = self._image[0].header

        if self._isNotValid (instrpars['gain'], instrpars['gnkeyword']):
            instrpars['gnkeyword'] = None
        if self._isNotValid (instrpars['rdnoise'], instrpars['rnkeyword']):
            instrpars['rnkeyword'] = None
        if self._isNotValid (instrpars['exptime'], instrpars['expkeyword']):
            instrpars['expkeyword'] = 'EXPTIME'

        # We need to treat Read Noise and Gain as a special case since it is
        # not populated in the SBC primary header for the MAMA
        for chip in self.returnAllChips(extname=self.scienceExt):
            chip._gain      = 1.0 #self.getInstrParameter("", pri_header,
                                  #                  instrpars['gnkeyword'])
            chip._rdnoise   = 0.0 #self.getInstrParameter("", pri_header,
                                  #                   instrpars['rnkeyword'])
            chip._exptime   = self.getInstrParameter(instrpars['exptime'], pri_header,
                                                     instrpars['expkeyword'])
            if chip._exptime is None:
                print('ERROR: invalid instrument task parameter')
                raise ValueError

        # We need to determine if the user has used the default readnoise/gain value
        # since if not, they will need to supply a gain/readnoise value as well
        usingDefaultGain = instrpars['gnkeyword'] is None
        usingDefaultReadnoise = instrpars['rnkeyword'] is None

        # Set the default readnoise or gain values based upon the amount of user input given.

        # Case 1: User supplied no gain or readnoise information
        if usingDefaultReadnoise and usingDefaultGain:
            # Set the default gain and readnoise values
            self._setSBCchippars()
        # Case 2: The user has supplied a value for gain
        elif usingDefaultReadnoise and not usingDefaultGain:
            # Set the default readnoise value
            self._setDefaultSBCReadnoise()
        # Case 3: The user has supplied a value for readnoise
        elif not usingDefaultReadnoise and usingDefaultGain:
            # Set the default gain value
            self._setDefaultSBCGain()
        else:
            # In this case, the user has specified both a gain and readnoise values.  Just use them as is.
            pass
366446
public void setParameters(Map<String, String> parameters) {
        if (parameters == null || parameters.isEmpty()) {
            this.parameterItemRuleMap = null;
        } else {
            ItemRuleMap itemRuleMap = new ItemRuleMap();
            for (Map.Entry<String, String> entry : parameters.entrySet()) {
                ItemRule ir = new ItemRule();
                ir.setTokenize(false);
                ir.setName(entry.getKey());
                ir.setValue(entry.getValue());
                itemRuleMap.putItemRule(ir);
            }
            this.parameterItemRuleMap = itemRuleMap;
        }
    }
71759
def _set_params(self, x):
        """"""
        assert x.size == self.num_params
        self.varianceU = x[0]
        self.varianceY = x[1]
        self.lengthscaleU = x[2]
        self.lengthscaleY = x[3]
1216311
public void set(double[] dataValue, double lowerBound, double upperBound,
            int calibrationType, boolean[] needCalibration) {
        setStat(dataValue, calibrationType, needCalibration);
        setLowerAndUpperBounds(lowerBound, upperBound);
    }
342759
final public function __setParams()
    {
        // $this->class
        $this->class = new \ReflectionClass($this);

        // $this->classAcf
        if (class_exists('Acf')) {
            $this->classAcf = new Acf();
        }

        // $this->template
        if (!$this->template) {
            $this->template = Utils::convertToKebabCase($this->class->getShortName());
        }

        // $this->tree
        if ($this->class->implementsInterface('\Sober\Controller\Module\Tree')) {
            $this->tree = true;
        }
    }
948298
public function setParameters($parameters)
    {
        parent::setParameters($parameters);
        if ($parameters !== null) {
            for ($i = 0, $size = count($parameters); $i < $size; $i++) {
                $paramname = $parameters[$i]->getName();
                if (self::TYPE_KEY == strtolower($paramname)) {
                    $this->setType($parameters[$i]->getValue());
                } else {
                    $this->setError("Invalid parameter " . $paramname);
                }
            }
        }
    }
88421
def set_parameters(self, samples: np.ndarray, window_size, data_min, data_max) -> bool:
        
        redraw_needed = False
        if self.samples_need_update:
            self.spectrogram.samples = samples
            redraw_needed = True
            self.samples_need_update = False

        if window_size != self.spectrogram.window_size:
            self.spectrogram.window_size = window_size
            redraw_needed = True

        if data_min != self.spectrogram.data_min:
            self.spectrogram.data_min = data_min
            redraw_needed = True

        if data_max != self.spectrogram.data_max:
            self.spectrogram.data_max = data_max
            redraw_needed = True

        return redraw_needed
685668
def setParameter(self, parameterName, index, parameterValue):
    
    spec = self.getSpec()
    if parameterName not in spec['parameters']:
      raise Exception("Unknown parameter: " + parameterName)

    setattr(self, parameterName, parameterValue)
1184694
protected function setImageinfoParams()
    {
        $this->logger->debug('Base:setImageinfoParams');
        $this->setParam('prop', 'imageinfo');
        $this->setParam('iiprop', 'url|size|mime|thumbmime|user|userid|sha1|timestamp|extmetadata');
        $this->setParam('iiextmetadatafilter', 'LicenseShortName|UsageTerms|AttributionRequired|'
                        .'Restrictions|Artist|ImageDescription|DateTimeOriginal');
        $this->setParam('iiurlwidth', $this->thumbnailWidth);
    }
1131286
def set( self, params ):
        """"""
        if self._parameters is not None:
            self.deconfigure()
        self.configure(params)
        return self
710342
def setRandomParams(self):
        
        params = SP.randn(self.getNumberParams())
        self.setParams(params)
87873
public function setParameters($parameters)
    {
        parent::setParameters($parameters);
        if ($parameters !== null) {
            for ($i = 0, $size = count($parameters); $i < $size; $i++) {
                $paramname = $parameters[$i]->getName();
                switch (strtolower($paramname)) {
                    case self::MILLIS_KEY:
                        $this->setMillis($parameters[$i]->getValue());
                        break;
                    case self::DATETIME_KEY:
                        $this->setDatetime($parameters[$i]->getValue());
                        break;
                    case self::CHECKDIRS_KEY:
                        $this->setCheckdirs($parameters[$i]->getValue());
                        break;
                    case self::GRANULARITY_KEY:
                        $this->setGranularity($parameters[$i]->getValue());
                        break;
                    case self::WHEN_KEY:
                        $this->setWhen($parameters[$i]->getValue());
                        break;
                    default:
                        $this->setError("Invalid parameter " . $paramname);
                } // switch
            }
        }
    }
1133709
public void setParameters(Map<String, String> parameters) {
        this.parameters.clear();
        this.parameters.putAll(parameters);
    }
636264
def set_parameters(self, parameters):
        
        if not isinstance(parameters, np.ndarray):
            parameters = np.asarray(parameters)

        # if in two dimensions, flatten with fortran ordering
        if parameters.ndim > 1:
            parameters = parameters.flatten(order='F')

        libfn = utils.get_lib_fn('setTransformParameters%s'%self._libsuffix)
        libfn(self.pointer, parameters.tolist())
1217974
public void setOrtho() {
		matrixMode(MatrixMode.PROJECTION);
		resetMatrix();
		gl.glOrtho(0, this.width, 0, this.height, -1.0e10, 1.0e10);
		matrixMode(MatrixMode.MODELVIEW);
		resetMatrix();
	}
519939
@Override
    public void setParameters(Object[] params) throws CDKException {
        if (params.length > 2) throw new CDKException("ToleranceRangeRule expects only two parameter");

        if (!(params[0] instanceof Double)) throw new CDKException("The parameter 0 must be of type Double");

        if (!(params[1] instanceof Double)) throw new CDKException("The parameter 1 must be of type Double");

        mass = (Double) params[0];
        tolerance = (Double) params[1];
    }
1234157
public void setParameters(Parameterization config) {
    TrackParameters track = new TrackParameters(config);
    configureStep(track);

    // update parameter table
    {
      parameterTable.setEnabled(false);

      parameterTable.clear();
      for(TrackedParameter pair : track.getAllParameters()) {
        parameterTable.addParameter(pair.getOwner(), pair.getParameter(), track);
      }
      // parameters.updateFromTrackParameters(track);

      parameterTable.revalidate();
      parameterTable.setEnabled(true);
    }

    // Update status and notify observers
    updateStatus();
    firePanelUpdated();
  }