Changeset 434


Ignore:
Timestamp:
18.08.2011 14:54:28 (8 years ago)
Author:
marcus
Message:

Enforcing float32 data type for all traces (default in SH C backend). This will be changed in later versions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • SHX/trunk/SeismicHandler/patches/ObsPy.py

    r419 r434  
    4343    sample value. This destroys the spectra of the data but it's common. 
    4444    """ 
     45 
     46    # Change value data type to float32 as in former versions of SH. 
     47    # This will be changed in later versions. 
     48    for t in self.traces: 
     49        if t.data.dtype != np.dtype('float32'): 
     50            t.data = t.data.astype('float32') 
     51 
    4552    if self.traces: 
    4653        self.merge(method=1, fill_value='latest') 
Note: See TracChangeset for help on using the changeset viewer.