Skip to content

For Developers ​

Use Timekeepers.jl from code, or extend it. To contribute, see CONTRIBUTING.md.

In five lines ​

julia
using Timekeepers, Dates

run = read_timekeeper("data/LEMI090.txt")      # LEMI-424, GEOMAG-02 or Metronix
ta  = to_timearray(run)                         # a TimeSeries.TimeArray

mask = TimekeeperMask(ta)                       # bad intervals; samples are never deleted
mask_interval!(mask, DateTime(2020, 10, 4, 0, 10), DateTime(2020, 10, 4, 0, 20))

cleaned  = cleaned_timearray(ta, mask)                # NaN in masked rows
segments = good_segments(ta, mask; min_samples = 256) # contiguous good parts
weights  = sample_weights(mask)                       # 1.0 good, 0.0 bad

write_mask("data/LEMI090_mask.csv", mask)       # read back with read_mask
write_lemi424("data/LEMI090_clean.txt", cleaned)      # or write_geomag, in the source format

The windows return their state when you close them:

julia
app = run_tkapp("data/LEMI090.txt")
cleaned_timearray(app)                          # every mask function accepts a TKApp

dash = run_tkdash("data/survey")
write_reference_plan("plan.txt", dash)

For Metronix, use write_metronix_site_masked: it cuts masked intervals out instead of writing NaN. Everything exported is in the API reference.

Topics ​

Code layout ​

FileContents
src/Timekeepers.jlmodule, includes and exports
src/Types.jlTimekeeperChannel, TimekeeperRun
src/Utilities.jlshared helpers
src/TimeArrayIO.jlto_timearray, from_timearray
src/Masking.jlTimekeeperMask and the cleaning functions
src/Spectra.jlWelch PSD and its workspace
src/LEMI424.jl, src/GEOMAG.jl, src/MetronixATS.jlformat readers and writers
src/TimekeeperIO.jlread_timekeeper, write_timekeeper, format detection
src/Explorer.jlTKApp
src/Survey.jlsurvey scan, overlaps, reference plans
src/Dashboard.jlTKDash
src/Calibration.jlcoil calibrations, dipoles, sensor orientation
src/IGRF.jlIGRF-14 declination
src/Processing.jlestimate_tf and TransferFunction
src/SiteProc.jlprocset.dat and process_site
src/EDI.jl, src/ModEM.jl, src/Report.jltransfer function output
src/Processor.jlTKProc
src/Precompile.jlprecompile workload

Tests ​

bash
julia --project=. test/runtests.jl