This is a slow way of doing this.  If data and the header values are ndarray, you can use broadcasting to speed this up considerably.  Try something like this:

```python
mult = (header['fADCRange'] /
            (header['fInstrumentScaleFactor'] *
             header['fSignalGain'] *
             header['fADCProgrammableGain'] *
             header['lADCResolution']))
if header['nTelegraphEnable']:
    mult /= header['fTelegraphAdditGain']
add = header['fInstrumentOffset'] - header['fSignalOffset']
mult = np.atleast_2d(mult)
add = np.atleast_2d(add)
data = data*mult+add
```

If they aren't arrays, you can convert them to arrays with, e.g. "np.array(header['fInstrumentScaleFactor'])"