How to use the georinex.batch_convert function in georinex

To help you get started, we’ve selected a few georinex examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github scivision / georinex / tests / View on Github external
def test_bad(tmp_path):
    pat = '*o'

    with pytest.raises(TypeError):
        gr.batch_convert(tmp_path, pat)
github scivision / georinex / tests / View on Github external
def test_batch_convert_rinex2(tmp_path, filename):

    outdir = tmp_path
    gr.batch_convert(R,, outdir)

    outfn = outdir / ( + '.nc')
        return  # blank files do not convert

    assert outfn.is_file(), f'{outfn}'
    assert outfn.stat().st_size > 15000, f'{outfn}'

    truth = gr.load(filename)
    dat = gr.load(outfn)

    assert dat.equals(truth), f'{outfn}  {filename}'
github scivision / georinex / View on Github external
p = ArgumentParser(description='example of reading RINEX 2/3 Navigation/Observation file')
    p.add_argument('indir', help='path to RINEX 2 or RINEX 3 files to convert')
    p.add_argument('glob', help='file glob pattern', nargs='?', default='*')
    p.add_argument('-o', '--out', help='write data to path or file as NetCDF4')
    p.add_argument('-v', '--verbose', action='store_true')
    p.add_argument('-p', '--plot', help='display plots', action='store_true')
    p.add_argument('-u', '--use', help='select which GNSS system(s) to use', nargs='+')
    p.add_argument('-m', '--meas', help='select which GNSS measurement(s) to use', nargs='+')
    p.add_argument('-t', '--tlim', help='specify time limits (process part of file)', nargs=2)
    p.add_argument('-useindicators', help='use SSI, LLI indicators (signal, loss of lock)',
    p.add_argument('-strict', help='do not use speculative preallocation (slow) let us know if this is needed',
    P = p.parse_args()

    gr.batch_convert(P.indir, P.glob, P.out, use=P.use, tlim=P.tlim,
                     useindicators=P.useindicators, meas=P.meas,
                     verbose=P.verbose, fast=P.strict)