libsacio
1.0.2
Seismic Analysis Code I/O Library
|
sac data and header structure More...
Public Types | |
enum | CutAction |
Sac Cutting Behavior. | |
Public Member Functions | |
sac * | sac_read (char *filename, int *nerr) |
Read a sac file. More... | |
sac * | sac_read_header (char *filename, int *nerr) |
Read a sac file header. More... | |
void | sac_write (sac *s, char *filename, int *nerr) |
write a sac file to disk More... | |
void | sac_write_header (sac *s, char *filename, int *nerr) |
write a sac header to disk More... | |
int | sac_is_timeval (int hid) |
Identify if a header is a time value. More... | |
int | sac_set_pick (sac *s, int n, double value) |
Set a time pick value. More... | |
int | sac_get_pick (sac *s, int n, double *t) |
Get a timing pick. More... | |
void | sac_set_v7 (sac *s) |
Set the header version to 7. More... | |
void | sac_set_v6 (sac *s) |
Set the header version to 6. More... | |
sac * | sac_new () |
create a new sac file structure More... | |
void | sac_free (sac *s) |
free a sac file structure More... | |
void | sac_alloc (sac *s) |
allocate the sac data portion of a sac strucutre More... | |
void | sac_be (sac *s) |
Set the beginning and end time for a sac file. More... | |
void | sac_header_copy (sac *to, sac *from) |
copy the sac header More... | |
void | sac_meta_copy (sac *to, sac *from) |
copy the sac meta header More... | |
void | sac_data_copy (sac *to, sac *from) |
copy sac data More... | |
sac * | sac_copy (sac *s) |
copy a sac file More... | |
off_t | sac_size (sac *s) |
Get the size of a sac file in bytes. More... | |
int | sac_comps (sac *s) |
Get the number of data components. More... | |
void | sac_extrema (sac *s) |
compute depmin, depmax, and depmen in sac header More... | |
int | sac_time_to_index (sac *s, double t) |
Convert a time to index. More... | |
sac * | sac_read_with_cut (char *filename, char *c1, double t1, char *c2, double t2, enum CutAction cutact, int *nerr) |
read a sac file while cutting More... | |
int | sac_set_string (sac *s, int hdr, char *v) |
Set a character string in a sac file. More... | |
int | sac_get_string (sac *s, int hdr, char *v, size_t n) |
Get a character string from a sac file. More... | |
int | sac_set_float (sac *s, int hdr, double v) |
Set a floating point value in a sac file. More... | |
int | sac_get_float (sac *s, int hdr, double *v) |
Get a floating point value from a sac file. More... | |
int | sac_set_int (sac *s, int hdr, int v) |
Set a integer value in a sac file. More... | |
int | sac_get_int (sac *s, int hdr, int *v) |
Get a integer value from a sac file. More... | |
int | sac_hdr_defined (sac *s,...) |
Check if multiple header values are defined. More... | |
int | sac_get_time_ref (sac *s, timespec64 *t) |
Get the reference time from a sac file. More... | |
int | sac_get_time (sac *s, int hdr, timespec64 *t) |
Get time value from sac file. More... | |
int | sac_set_time (sac *s, timespec64 t) |
int | sac_fmt (char *dst, size_t n, const char *fmt, sac *s) |
format sac values into a string More... | |
Data Fields | |
sac_hdr * | h |
sac header | |
float * | y |
first data component | |
float * | x |
second data component | |
sac data and header structure