Skip to content

sampling rate precision #29

@crotwell

Description

@crotwell

What is the rational for double precision sampling rate? If we need it, that is ok, but I would like to see some reasons other then "not precise enough". What is the use case where a single precision float is not enough?

Single precision float gives 24 bits of significand, so 1 part in over 10 million. I guess I am suspicious that we can measure time in seismology to a level where the rounding of a float vs a double matters, especially over the course of a single record?

Maybe a bit radical, but should we consider whether sampling rate is the best way to store/convey this information? I have long liked the idea of giving sampling as a number of samples and a time interval, so 40 samples per second is stored as "40" and "1 second". But since we already know the number of samples in the record, maybe the more accurate method is to just store the time of the last sample, or rather the offset from the start time? That is in some sense fundamentally what the digitizer knows I think. The sampling rate is not actually measured, just math, ie (end-start)/(n-1)? Storing the time interval of the record as a single precision float probably sufficiently accurate over the scale of a single record.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions