<p>The number of samples in the input binary header from the SEGY file does not match the NSAMP trace header.  I would first confirm: </p>

<ol>
<li>What # of samples is in the binary SEG-Y header. </li>
<li>The number of samples you expect in each trace</li>
<li>Dump the su trace header for     number of samples. You can use
SUGETHW and the keyword for # of samples is "ns".</li>
</ol>

<p>If the error is in an individual trace header, you can overwrite that with SUSETHW. </p>

CC BY-SA 3.0
2015-02-13T16:55:34.237Z
2015-02-13T18:00:25.077Z
2015-02-13T18:00:25.077Z
txpaulm
<p>I have tried to convert a Seismic SU file to ASCII format in seismic unix using openseaseis module named "sutoascii".</p>

<p><strong>I have already tested the SU file by opening it in SeaView Seismic Viewer and then tried to convert it to "ASCII" format using the following command:</strong></p>

<pre><code>sutoascii &lt;inputSUFilename &gt;outputASCIIFilename bare=0 index=1
</code></pre>

<p><em>The ASCII file is created as an output file but it gives an error while converting that <strong>"number of samples in header differs from number for first trace"</em></strong></p>

<p>Now to check whether the Resulting ASCIIFile is valid and working, I have tried to open it in SeaView Seismic Viewer again to cross-check but it shows an error and is unable to open the file.</p>

<p><em>Can anybody tell me how to correct this?</em></p>

CC BY-SA 3.0
2014-11-26T11:07:40.737Z
@BarryCarter yes, this is a command line and its not necessary for it to come before the first redirect symbol.
For reference regarding syntax, please refer to http://www.seismicunix.com/w/Suascii
abhinavgoyal02
CC BY-SA 3.0
2015-05-12T16:59:28.940Z
@abhinavgoyal02 - It would be nice to know how this ended... did the answer here help? What did you actually end up doing?
Matt Hall
<geophysics><seismology>
converting SU file to ASCII format in seismic unix using OpenSeaSeis
abhinavgoyal02
# converting SU file to ASCII format in seismic unix using OpenSeaSeis

(Asked by: username_0 on 2014-11-16)

I have tried to convert a Seismic SU file to ASCII format in seismic unix using openseaseis module named "sutoascii".
I have already tested the SU file by opening it in SeaView Seismic Viewer and then tried to convert it to "ASCII" format using the following command:
sutoascii outputASCIIFilename bare=0 index=1

The ASCII file is created as an output file but it gives an error while converting that "number of samples in header differs from number for first trace"
Now to check whether the Resulting ASCIIFile is valid and working, I have tried to open it in SeaView Seismic Viewer again to cross-check but it shows an error and is unable to open the file.
Can anybody tell me how to correct this?

**Tags:** geophysics, seismology

> **Comments:**
> **username_0**: @BarryCarter yes, this is a command line and its not necessary for it to come before the first redirect symbol. For reference regarding syntax, please refer to http://www.seismicunix.com/w/Suascii  
> **username_1**: @username_0 - It would be nice to know how this ended... did the answer here help? What did you actually end up doing?  

---

## 1 answers

### Answer by username_2 on 2015-02-13. Score: 5

The number of samples in the input binary header from the SEGY file does not match the NSAMP trace header. I would first confirm:

1. What # of samples is in the binary SEG-Y header.
2. The number of samples you expect in each trace
3. Dump the su trace header for number of samples. You can use
   SUGETHW and the keyword for # of samples is "ns".

If the error is in an individual trace header, you can overwrite that with SUSETHW.


---

