def setInstrumentParameters(self, instrpars):
        """ This method overrides the superclass to set default values into
            the parameter dictionary, in case empty entries are provided.
        """
        pri_header = self._image[0].header
        usingDefaultGain = False
        usingDefaultReadnoise = False

        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'

        for chip in self.returnAllChips(extname=self.scienceExt):
            #pri_header=chip.header #stis stores stuff in the science data header

            chip.cte_dir=0

            chip._exptime = self.getInstrParameter(
                instrpars['exptime'], chip.header, instrpars['expkeyword']
            )

            if chip._exptime is None:
                print('ERROR: invalid instrument task parameter')
                raise ValueError

            if instrpars['rnkeyword'] is not None:
                chip._rdnoise   = self.getInstrParameter(
                    instrpars['rdnoise'], pri_header, instrpars['rnkeyword']
                )
            else:
                chip._rdnoise = None
                usingDefaultReadnoise = True

            if instrpars['gnkeyword'] is not None:
                chip._gain = self.getInstrParameter(
                    instrpars['gain'], pri_header, instrpars['gnkeyword']
                )
            else:
                chip._gain = None
                usingDefaultGain = True

            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

            if usingDefaultReadnoise:
                chip._rdnoise= self._setMAMADefaultReadnoise()

            if usingDefaultGain:
                chip._gain = self._setMAMADefaultGain()

            self._assignSignature(chip._chip) #this is used in the static mask
            chip._effGain=chip._gain

        # Convert the science data to electrons if specified by the user.
        self.doUnitConversions()