logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

msr_samprate - Determine sample rate from an MSRecord structure

Author

       Chad Trabant
       IRIS Data Management Center

Libmseed API                                       2006/02/27                                    MSR_SAMPRATE(3)

Description

msr_samprate  will calculate a double precision sample rate in samples per second using the header values
       in the specified MSRecord.  If a Blockette 100 is included, the "Actual sample rate" (field  3)  will  be
       returned,  otherwise  a nominal sample rate will be calculated from the sample rate factor and multiplier
       in the fixed section data header.

       NOTE: The sample rate for a MSRecord structure is available directly  at  MSRecord.samplerate.   libmseed
       based  programs  should  use  that  sample  rate  whenever  possible (msr_unpack uses msr_samprate to set
       MSRecord.samplerate).

       msr_nomsamprate will calculate a double precision sample rate in samples per second using the sample rate
       factor and multiplier in the fixed section data header.

Name

       msr_samprate - Determine sample rate from an MSRecord structure

Return Values

msr_samprate returns a double precision sample rate on success and -1.0 on error.

       msr_nomsamprate returns a double precision sample rate on success and -1.0 on error.

See Also

ms_intro(3) and msr_unpack(3).

Synopsis

#include<libmseed.h>doublemsr_samprate(MSRecord*msr);doublemsr_nomsamprate(MSRecord*msr);

See Also