INTViewer has a user option to set the sample format when saving a seismic dataset to a SEGY file.
You can customize the Python SeismicDataWriter class to force the sample format as well. Example:
This Python file is attached at the bottom of this page. In the example above, we clip to the -14 + 14 range. If no clipping is required, change
writer.setSampleFormat('1-byte Int', -127, 127, -14, 14) # values greater than 14 are set to 127
to
minAmplitude = seismicData.getAmplitudeMinimum()
maxAmplitude = seismicData.getAmplitudeMaximum()
writer.setSampleFormat('1-byte Int', -127, 127, minAmplitude, maxAmplitude)
You can customize the target range. -127 to 127 is a good default because it keeps 0 as center. If the amplitude values were already in the -127 to 127 range, just use:
writer.setSampleFormat('1-byte Int')