esys :: lsm :: sim :: WavePropagation :: SeismographGroup :: Class SeismographGroup
[hide private]
[frames] | no frames]

Class SeismographGroup

Objects of this class represent a collection of seismographs.

Instance Methods [hide private]
 
__init__(self, seismoList, name, fileNamePrefix, sourcePosn)
 
inGroup(self, seismoData)
Returns whether the specfied SeismographData object is from a Seismograph in this group.
 
getRecordSectionFileName(self)
Returns the name of the file in which record section data is saved.
 
getSeismoDataFileName(self, posn)
Returns the name of a seismograph data file for the specified posn.
 
initialiseSeismoDataFiles(self)
Creates/overwrites empty seismograph data files.
 
save(self, time, seismoDataList)
Saves seismograph data to files.
 
saveSeismoData(self, time, seismoData)
Appends the specfied seismograph data to file.
 
saveRecordSectionData(self, time, seismoData)
Appends record-set style seismograph data to file.
 
writeReorderedRecordSectionData(self)
Re-orders record set data for more convenient plotting in gnuplot.
Method Details [hide private]

__init__(self, seismoList, name, fileNamePrefix, sourcePosn)
(Constructor)

 
Parameters:
  • seismoList (list) - List of Seismograph objects.
  • name (string) - Name of this group.
  • fileNamePrefix (string) - For all Seismograph objects, data is saved to files with this prefix.
  • sourcePosn (esys.lsm.util.FoundationPy.Vec3) - Location of source disturbance, used to calculate distance from source to seismograph.

inGroup(self, seismoData)

 

Returns whether the specfied SeismographData object is from a Seismograph in this group.

Parameters:
  • seismoData (SeismographData) - Determine whether this data belongs to a Seismograph object in this group.
Returns:
True if seismoData came from a seismograph in this group.

getSeismoDataFileName(self, posn)

 

Returns the name of a seismograph data file for the specified posn.

Parameters:
  • posn - A Vec3 object specifying the position of the seismograph. @rtype string
Returns:
File name for seismograph data at spatial coordinate posn.

save(self, time, seismoDataList)

 

Saves seismograph data to files. Appends record section info as well as individual seismo data file.

saveSeismoData(self, time, seismoData)

 

Appends the specfied seismograph data to file. Each seismograph data record is appended to a different file. Each line in the file is of the form 't dx dy dz vx vy vz ax ay az' where d=(dx,dy,dz) is the displacement vector, v=(vx,vy,vz) is the velocity vector and a=(ax,ay,az) is the acceleration vector.

Parameters:
  • time (float) - the time the data was recorded
  • seismoData (SeismographData) - Data in this object is saved to file. The file name is determined by the data's position.

saveRecordSectionData(self, time, seismoData)

 

Appends record-set style seismograph data to file. Each seismograph data record is appended to a record-set file. Each line in the file is of the form 't d ux uy uz vx vy vz ax ay az' where t is the time, d is the distance from the seismograph to the sourcePosn d=(dx,dy,dz) is the displacement vector, v=(vx,vy,vz) is the velocity vector and a=(ax,ay,az) is the acceleration vector.

Parameters:
  • time (float) - the time the data was recorded
  • seismoData (SeismographData) - This data is saved to record the section file.

writeReorderedRecordSectionData(self)

 

Re-orders record set data for more convenient plotting in gnuplot. Reads time-ordered record section data and re-orders according to distance-to-source.