title: Segyio calling/updating trace header dictionary
body: <p>I am trying to update a trace header in my SEG-Y files using Segyio. Here is a working example:</p>
  <pre class="lang-py prettyprint-override"><code>with segyio.open(segy_path + &quot;/&quot; + filename + &quot;.sgy&quot;, &quot;r+&quot;, endian=endian_type, ignore_geometry='True') as segyfile:
  
      segyfile.header = {segyio.TraceField.EnergySourcePoint: 432}
  </code></pre>
  <p>What I want to accomplish is to define a dictionary showing the byte location of <code>EnergySourcePoint</code> and do the same thing above by calling the dictionary such as this (but it doesn't work).</p>
  <pre class="lang-py prettyprint-override"><code># Set dictionary for byte/name pairings
  dict = {17: &quot;EnergySourcePoint&quot;}
  
  # Define which byte to update
  byte = 17
  
  # Open SEG-Y
  with segyio.open(segy_path + &quot;/&quot; + filename + &quot;.sgy&quot;, &quot;r+&quot;, endian=endian_type, ignore_geometry='True') as segyfile:
  
      # Update value in proper byte header
      segyfile.header = {segyio.TraceField.dict[byte]: 432}
  
  </code></pre>
  <p>The resulting error which I don't understand:</p>
  <blockquote>
  <p>AttributeError: type object 'TraceField' has no attribute 'dict'</p>
  </blockquote>
  <p>Any suggestions on how to make this work? I want to make it so you just have to define the byte number and it will grab the proper name from the dictionary (<code>EnergySourcePoint</code>).</p>