|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.sc.seis.seisFile.sac.SacTimeSeries
public class SacTimeSeries
Class that represents a sac file. All headers are have the same names as within the Sac program. Can read the whole file or just the header as well as write a file.
Field Summary | |
---|---|
float |
a
|
float[] |
amp
|
float |
az
|
float |
b
|
float |
baz
|
float |
cmpaz
|
float |
cmpinc
|
static int |
data_offset
|
static java.text.DecimalFormat |
decimalFormat
|
static int |
DEFAULT_NVHDR
|
float |
delta
|
float |
depmax
|
float |
depmen
|
float |
depmin
|
float |
dist
|
float |
e
|
float |
evdp
|
float |
evel
|
float |
evla
|
float |
evlo
|
float |
f
|
static int |
FALSE
|
static float |
FLOAT_UNDEF
|
float |
fmt
|
float |
gcarc
|
static int |
IA
|
static int |
IACC
|
static int |
IAMPH
|
static int |
IB
|
static int |
ICHEM
|
static int |
IDAY
|
int |
idep
|
static int |
IDISP
|
static int |
IDOWN
|
static int |
IDROP
|
static int |
IEAST
|
int |
ievreg
|
int |
ievtyp
|
int |
iftype
|
static int |
IGLCH
|
static int |
IGOOD
|
static int |
IHGLP
|
static int |
IHORZA
|
int |
iinst
|
static int |
ILLLBB
|
static int |
ILOWSN
|
float[] |
imaginary
|
int |
imagsrc
|
int |
imagtyp
|
static int |
INIV51
|
static int |
INIV52
|
static int |
INIV53
|
static int |
INIV54
|
static int |
INIV55
|
static int |
INIV56
|
static int |
INIV57
|
static int |
INIV58
|
static int |
INIV59
|
static int |
INIV60
|
static int |
INORTH
|
static int |
INT_UNDEF
|
static boolean |
IntelByteOrder
|
static int |
INUCL
|
static int |
IO
|
static int |
IOTHER
|
static int |
IPOSTN
|
static int |
IPOSTQ
|
static int |
IPREN
|
static int |
IPREQ
|
static int |
IQUAKE
|
int |
iqual
|
static int |
IRADEV
|
static int |
IRADNV
|
static int |
IREAL
|
static int |
IRLDTA
|
static int |
IRLIM
|
static int |
ISRO
|
int |
istreg
|
int |
isynth
|
static int |
IT0
|
static int |
IT1
|
static int |
IT2
|
static int |
IT3
|
static int |
IT4
|
static int |
IT5
|
static int |
IT6
|
static int |
IT7
|
static int |
IT8
|
static int |
IT9
|
static int |
ITANEV
|
static int |
ITANNV
|
static int |
ITIME
|
static int |
IUNKN
|
static int |
IUP
|
static int |
IVEL
|
static int |
IVOLTS
|
static int |
IWWSN1
|
static int |
IWWSN2
|
static int |
IXY
|
int |
iztype
|
java.lang.String |
ka
|
java.lang.String |
kcmpnm
|
java.lang.String |
kdatrd
|
java.lang.String |
kevnm
|
java.lang.String |
kf
|
java.lang.String |
khole
|
java.lang.String |
kinst
|
java.lang.String |
knetwk
|
java.lang.String |
ko
|
java.lang.String |
kstnm
|
java.lang.String |
kt0
|
java.lang.String |
kt1
|
java.lang.String |
kt2
|
java.lang.String |
kt3
|
java.lang.String |
kt4
|
java.lang.String |
kt5
|
java.lang.String |
kt6
|
java.lang.String |
kt7
|
java.lang.String |
kt8
|
java.lang.String |
kt9
|
java.lang.String |
kuser0
|
java.lang.String |
kuser1
|
java.lang.String |
kuser2
|
int |
lcalda
|
int |
leven
|
int |
lovrok
|
int |
lpspol
|
float |
mag
|
int |
nevid
|
int |
norid
|
int |
npts
|
static int |
NPTS_OFFSET
|
int |
nsnpts
|
int |
nvhdr
|
static int |
NVHDR_OFFSET
|
int |
nwfid
|
int |
nxsize
|
int |
nysize
|
int |
nzhour
|
int |
nzjday
|
int |
nzmin
|
int |
nzmsec
|
int |
nzsec
|
int |
nzyear
|
float |
o
|
float |
odelta
|
float[] |
phase
|
float[] |
real
|
float |
resp0
|
float |
resp1
|
float |
resp2
|
float |
resp3
|
float |
resp4
|
float |
resp5
|
float |
resp6
|
float |
resp7
|
float |
resp8
|
float |
resp9
|
float |
sb
|
float |
scale
|
float |
sdelta
|
float |
stdp
|
float |
stel
|
float |
stla
|
float |
stlo
|
static java.lang.String |
STRING16_UNDEF
|
static java.lang.String |
STRING8_UNDEF
|
static boolean |
SunByteOrder
|
float |
t0
|
float |
t1
|
float |
t2
|
float |
t3
|
float |
t4
|
float |
t5
|
float |
t6
|
float |
t7
|
float |
t8
|
float |
t9
|
static int |
TRUE
|
float |
unused10
|
float |
unused11
|
float |
unused12
|
int |
unused15
|
int |
unused16
|
int |
unused19
|
int |
unused20
|
int |
unused21
|
int |
unused22
|
int |
unused23
|
int |
unused24
|
int |
unused25
|
int |
unused26
|
int |
unused27
|
float |
unused6
|
float |
unused7
|
float |
unused8
|
float |
unused9
|
float |
user0
|
float |
user1
|
float |
user2
|
float |
user3
|
float |
user4
|
float |
user5
|
float |
user6
|
float |
user7
|
float |
user8
|
float |
user9
|
float[] |
x
|
float |
xmaximum
|
float |
xminimum
|
float[] |
y
|
float |
ymaximum
|
float |
yminimum
|
Constructor Summary | |
---|---|
SacTimeSeries()
|
|
SacTimeSeries(java.io.DataInputStream inStream)
|
|
SacTimeSeries(java.io.File file)
|
|
SacTimeSeries(java.lang.String filename)
|
Method Summary | |
---|---|
static java.lang.String |
format(java.lang.String label,
float f)
|
static java.lang.String |
formatLine(java.lang.String s1,
float f1,
java.lang.String s2,
float f2,
java.lang.String s3,
float f3,
java.lang.String s4,
float f4,
java.lang.String s5,
float f5)
|
boolean |
getByteOrder()
|
void |
littleEndian()
Deprecated. see setLittleEndian() |
static void |
main(java.lang.String[] args)
just for testing. |
void |
printHeader()
|
void |
read(java.io.DataInputStream dis)
|
void |
read(java.io.File sacFile)
|
void |
read(java.lang.String filename)
reads the sac file specified by the filename. |
void |
readData(java.io.DataInputStream fis)
read the data portion of the given File |
void |
readDataNewOld(java.io.DataInputStream fis)
read the data portion of the given File |
protected void |
readDataOld(java.io.DataInputStream dis)
reads the data portion from the given stream. |
void |
readHeader(java.io.DataInputStream indis)
reads the header from the given stream. |
void |
readHeader(java.lang.String filename)
reads just the sac header specified by the filename. |
void |
setBigEndian()
Sets the byte order when writing to output. |
void |
setLittleEndian()
Sets the byte order when writing to output. |
static int |
swapBytes(int val)
|
static long |
swapBytes(long val)
|
static short |
swapBytes(short val)
|
void |
write(java.io.File file)
writes this object out as a sac file. |
void |
write(java.lang.String filename)
writes this object out as a sac file. |
void |
writeData(java.io.DataOutputStream dos)
|
void |
writeHeader(java.io.DataOutputStream dos)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public float delta
public float depmin
public float depmax
public float scale
public float odelta
public float b
public float e
public float o
public float a
public float fmt
public float t0
public float t1
public float t2
public float t3
public float t4
public float t5
public float t6
public float t7
public float t8
public float t9
public float f
public float resp0
public float resp1
public float resp2
public float resp3
public float resp4
public float resp5
public float resp6
public float resp7
public float resp8
public float resp9
public float stla
public float stlo
public float stel
public float stdp
public float evla
public float evlo
public float evel
public float evdp
public float mag
public float user0
public float user1
public float user2
public float user3
public float user4
public float user5
public float user6
public float user7
public float user8
public float user9
public float dist
public float az
public float baz
public float gcarc
public float sb
public float sdelta
public float depmen
public float cmpaz
public float cmpinc
public float xminimum
public float xmaximum
public float yminimum
public float ymaximum
public float unused6
public float unused7
public float unused8
public float unused9
public float unused10
public float unused11
public float unused12
public int nzyear
public int nzjday
public int nzhour
public int nzmin
public int nzsec
public int nzmsec
public int nvhdr
public int norid
public int nevid
public int npts
public int nsnpts
public int nwfid
public int nxsize
public int nysize
public int unused15
public int iftype
public int idep
public int iztype
public int unused16
public int iinst
public int istreg
public int ievreg
public int ievtyp
public int iqual
public int isynth
public int imagtyp
public int imagsrc
public int unused19
public int unused20
public int unused21
public int unused22
public int unused23
public int unused24
public int unused25
public int unused26
public int leven
public int lpspol
public int lovrok
public int lcalda
public int unused27
public java.lang.String kstnm
public java.lang.String kevnm
public java.lang.String khole
public java.lang.String ko
public java.lang.String ka
public java.lang.String kt0
public java.lang.String kt1
public java.lang.String kt2
public java.lang.String kt3
public java.lang.String kt4
public java.lang.String kt5
public java.lang.String kt6
public java.lang.String kt7
public java.lang.String kt8
public java.lang.String kt9
public java.lang.String kf
public java.lang.String kuser0
public java.lang.String kuser1
public java.lang.String kuser2
public java.lang.String kcmpnm
public java.lang.String knetwk
public java.lang.String kdatrd
public java.lang.String kinst
public float[] y
public float[] x
public float[] real
public float[] imaginary
public float[] amp
public float[] phase
public static float FLOAT_UNDEF
public static int INT_UNDEF
public static java.lang.String STRING8_UNDEF
public static java.lang.String STRING16_UNDEF
public static final int DEFAULT_NVHDR
public static final int TRUE
public static final int FALSE
public static final int IREAL
public static final int ITIME
public static final int IRLIM
public static final int IAMPH
public static final int IXY
public static final int IUNKN
public static final int IDISP
public static final int IVEL
public static final int IACC
public static final int IB
public static final int IDAY
public static final int IO
public static final int IA
public static final int IT0
public static final int IT1
public static final int IT2
public static final int IT3
public static final int IT4
public static final int IT5
public static final int IT6
public static final int IT7
public static final int IT8
public static final int IT9
public static final int IRADNV
public static final int ITANNV
public static final int IRADEV
public static final int ITANEV
public static final int INORTH
public static final int IEAST
public static final int IHORZA
public static final int IDOWN
public static final int IUP
public static final int ILLLBB
public static final int IWWSN1
public static final int IWWSN2
public static final int IHGLP
public static final int ISRO
public static final int INUCL
public static final int IPREN
public static final int IPOSTN
public static final int IQUAKE
public static final int IPREQ
public static final int IPOSTQ
public static final int ICHEM
public static final int IOTHER
public static final int IGOOD
public static final int IGLCH
public static final int IDROP
public static final int ILOWSN
public static final int IRLDTA
public static final int IVOLTS
public static final int INIV51
public static final int INIV52
public static final int INIV53
public static final int INIV54
public static final int INIV55
public static final int INIV56
public static final int INIV57
public static final int INIV58
public static final int INIV59
public static final int INIV60
public static final int data_offset
public static final int NVHDR_OFFSET
public static final int NPTS_OFFSET
public static final boolean SunByteOrder
public static final boolean IntelByteOrder
public static final java.text.DecimalFormat decimalFormat
Constructor Detail |
---|
public SacTimeSeries()
public SacTimeSeries(java.io.File file) throws java.io.FileNotFoundException, java.io.IOException
java.io.FileNotFoundException
java.io.IOException
public SacTimeSeries(java.lang.String filename) throws java.io.FileNotFoundException, java.io.IOException
java.io.FileNotFoundException
java.io.IOException
public SacTimeSeries(java.io.DataInputStream inStream) throws java.io.IOException
java.io.IOException
Method Detail |
---|
public boolean getByteOrder()
public void read(java.lang.String filename) throws java.io.FileNotFoundException, java.io.IOException
java.io.FileNotFoundException
- if the file cannot be found
java.io.IOException
- if it isn't a sac file or if it happens :)public void read(java.io.File sacFile) throws java.io.FileNotFoundException, java.io.IOException
java.io.FileNotFoundException
java.io.IOException
public final void littleEndian()
public final void setLittleEndian()
public final void setBigEndian()
public static final short swapBytes(short val)
public static final int swapBytes(int val)
public static final long swapBytes(long val)
public void read(java.io.DataInputStream dis) throws java.io.IOException
java.io.IOException
public void readHeader(java.lang.String filename) throws java.io.FileNotFoundException, java.io.IOException
java.io.FileNotFoundException
java.io.IOException
public void readHeader(java.io.DataInputStream indis) throws java.io.FileNotFoundException, java.io.IOException
java.io.FileNotFoundException
java.io.IOException
public void readData(java.io.DataInputStream fis) throws java.io.IOException
java.io.IOException
public void readDataNewOld(java.io.DataInputStream fis) throws java.io.IOException
java.io.IOException
protected void readDataOld(java.io.DataInputStream dis) throws java.io.FileNotFoundException, java.io.IOException
java.io.FileNotFoundException
java.io.IOException
public void write(java.lang.String filename) throws java.io.FileNotFoundException, java.io.IOException
java.io.FileNotFoundException
java.io.IOException
public void write(java.io.File file) throws java.io.FileNotFoundException, java.io.IOException
java.io.FileNotFoundException
java.io.IOException
public void writeHeader(java.io.DataOutputStream dos) throws java.io.IOException
java.io.IOException
public void writeData(java.io.DataOutputStream dos) throws java.io.IOException
java.io.IOException
public static java.lang.String format(java.lang.String label, float f)
public static java.lang.String formatLine(java.lang.String s1, float f1, java.lang.String s2, float f2, java.lang.String s3, float f3, java.lang.String s4, float f4, java.lang.String s5, float f5)
public void printHeader()
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |