-
Notifications
You must be signed in to change notification settings - Fork 3
/
aptdecoder.jl
executable file
·35 lines (28 loc) · 950 Bytes
/
aptdecoder.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env julia
using ImageMagick
using Images
using ArgParse
using FileIO
using Statistics
import APTDecoder
using PyPlot
s = ArgParseSettings()
@add_arg_table s begin
"--satellite", "-s"
help = "the satellite name ( \"NOAA 15\", \"NOAA 18\", \"NOAA 19\")"
required = true
"--starttime", "-t"
help = "start time of the capture in UTC. It can be deduced from the file name, if it has the structure like gqrx_20190811_075102_137620000.png."
"--output-prefix"
help = "an option without argument, i.e. a flag"
"wav"
help = "a positional argument"
required = true
end
parsed_args = parse_args(ARGS, s)
@show parsed_args
wavname = parsed_args["wav"]
satellite_name = parsed_args["satellite"]
# missing paramter have a value nothing
kwargs = filter(kv -> (kv[2] != nothing) && !(kv[1] ∈ ["wav","satellite"]),parsed_args)
APTDecoder.makeplots(wavname,satellite_name,kwargs...)