msr_normalize_header - Man Page

Normalize or synchronize the header fields of an MSRecord structure.

Synopsis

#include <libmseed.h>

int  msr_normalize_header ( MSRecord *msr, flag verbose);

Description

msr_normalize_header updates the SEED structures associated with an MSRecord structure (MSRecord.fsdh and the blockette chain at MSRecord.blkts) with primary values stored at the MSRecord level (e.g. MSRecord.starttime, MSRecord.samprate, etc.).

The long explanation is that certain key values (start time, sample rate, etc.) are duplicated in a given MSRecord structure.  For example the start time is stored at both MSRecord.starttime and in the BTIME structure in the FSDH at MSRecord.fsdh.  The base values at the MSRecord level (e.g. MSRecord.starttime) are always the primary values.  But before the data record can be packed these values must be translated back into the SEED structures.  For these duplicated values the msr_normalize_header routine peforms this translation. Normally this routine will be called via internal functions when msr_pack is called, it could also be used to synchronize the header values when they are directly modified.

Return Value

msr_normalize_header returns the header length in bytes on success and -1 on error.

See Also

ms_intro(3), msr_pack(3) and msr_pack_header(3).

Author

Chad Trabant
IRIS Data Management Center

Referenced By

msr_pack(3).

2007/04/28 Libmseed API