Command-line tools

Install the project before using these commands. Each section below is generated directly from the corresponding argparse parser, so it stays in sync with the command’s --help output.

product_volume

Create a report of product data volume over a time range.

usage: product_volume [-h] [-s START_DATE] [-e END_DATE] [-d DAYS]

Named Arguments

-s, --start_date

start date (YYYY-MM-DD)

-e, --end_date

end date (YYYY-MM-DD)

-d, --days

Duration (days)

gen_l2_batches

Create IDL batch files for processing THEMIS L2 products.

usage: gen_l2_batches [-h] [-s START_DATE] [-e END_DATE] [-d DAYS] -t
                      [{fgm,fbk,fit,esa,mom,gmom,sst,fft,scm,efi,efp,efw,scmode,all} ...]
                      -p [{a,b,c,d,e,all} ...] [-b BATCH_DAYS] -o
                      OUTPUT_DIRECTORY

Named Arguments

-s, --start_date

start date (YYYY-MM-DD)

-e, --end_date

end date (YYYY-MM-DD)

-d, --days

Duration (days)

-t, --l2_types

Possible choices: fgm, fbk, fit, esa, mom, gmom, sst, fft, scm, efi, efp, efw, scmode, all

L2 files to create

-p, --probes

Possible choices: a, b, c, d, e, all

Probes to process

-b, --batch_days

Days per batch to process

Default: 1

-o, --output_directory

Directory where master list and batch files will be written

gen_summary_plot_batches

Create IDL batch files for processing THEMIS summary plots.

usage: gen_summary_plot_batches [-h] [-s START_DATE] [-e END_DATE] [-d DAYS]
                                -t
                                [{over,esa,fgm,sst,memory,fitmom,fitgmom,fftfbk,fgmdyn,all} ...]
                                [-b BATCH_DAYS] -o OUTPUT_DIRECTORY

Named Arguments

-s, --start_date

start date (YYYY-MM-DD)

-e, --end_date

end date (YYYY-MM-DD)

-d, --days

Duration (days)

-t, --summary_plot_types

Possible choices: over, esa, fgm, sst, memory, fitmom, fitgmom, fftfbk, fgmdyn, all

Plots to create

-b, --batch_days

Days per batch to process

Default: 1

-o, --output_directory

Directory where master list and batch files will be written

gmag_retrieve_usgs_variometer

Retrieve USGS variometer data for THEMIS ground stations.

usage: gmag_retrieve_usgs_variometer [-h] [-s START_DATE] [-e END_DATE]
                                     [-d DAYS]
                                     [-c [{anmo,casy,ccm,cola,cor,dgmt,dwpf,ecsd,eymn,e46a,e62a,goga,hrv,j47a,kbs,kevo,kono,ksu1,k30b,k50a,mbwa,mstx,m63a,o20a,pab,p57a,qspa,rssd,r49a,sba,sfjd,spmn,sspa,s61a,t47a,u38b,wci,whtx,wvt,352a,k62a,n51a,n53a,bouv,s39b,t57a,x48a,y49a,154a,456a,midw,all} ...]]
                                     [-f SAMPLING_RATE] [-m DB_UPDATE_FP_STR]
                                     [-o OUTPUT_P_STR] [-i ISSUE_LIST_FP_STR]
                                     [-r RETRIES]

Named Arguments

-s, --start_date

start date (YYYY-MM-DD)

-e, --end_date

end date (YYYY-MM-DD)

-d, --days

Duration (days)

-c, --station_codes

Possible choices: anmo, casy, ccm, cola, cor, dgmt, dwpf, ecsd, eymn, e46a, e62a, goga, hrv, j47a, kbs, kevo, kono, ksu1, k30b, k50a, mbwa, mstx, m63a, o20a, pab, p57a, qspa, rssd, r49a, sba, sfjd, spmn, sspa, s61a, t47a, u38b, wci, whtx, wvt, 352a, k62a, n51a, n53a, bouv, s39b, t57a, x48a, y49a, 154a, 456a, midw, all

Stations to process, as THEMIS station code alias

Default: ['all']

-f, --sampling_rate

Set sampling rate, in Hz

Default: '1'

-m, --db_update_fp_str

MYSQL query filepath

Default: ''

-o, --output_p_str

Directory where retrieved files will be saved

Default: ''

-i, --issue_list_fp_str

Filepath which will contain list of stations, dates, and issues where retrieval failed.

Default: ''

-r, --retries

Number of retries to make if initial segment retrieval attempt fails.

Default: 0

ip_owner_report

Group IPv4 request addresses by registered organization and current origin ASN. Input may be read from a file or standard input; output is tab-separated.

Group IPv4 request addresses by RDAP owner and routed origin ASN.

usage: ip_owner_report [-h] [-i FILE] [--hostnames {ignore,resolve,error}]
                       [--cache CACHE] [--refresh] [--timeout TIMEOUT]
                       [--retries RETRIES] [--request-delay REQUEST_DELAY]
                       [--strict-lookups] [--ca-bundle CA_BUNDLE]

Named Arguments

-i, --input

read input from FILE instead of standard input

--hostnames

Possible choices: ignore, resolve, error

how to handle hostnames (default: ignore)

Default: 'ignore'

--cache

persistent lookup cache (default: .ip-owner-cache.json)

Default: .ip-owner-cache.json

--refresh

ignore cached lookups

Default: False

--timeout

HTTP timeout in seconds

Default: 15.0

--retries

retries for rate limits and transient failures (default: 8)

Default: 8

--request-delay

minimum seconds between requests to one host (default: 0.25)

Default: 0.25

--strict-lookups

stop instead of reporting UNKNOWN when an external lookup fails

Default: False

--ca-bundle

PEM CA bundle for HTTPS certificate verification

ip_rdns_report

Aggregate IPv4 addresses and hostnames by their reverse-DNS domain. Input may be read from a file or standard input; output is tab-separated.

Aggregate IPv4 addresses and hostnames by rDNS base domain.

usage: ip_rdns_report [-h] [-i FILE] [--cache CACHE] [--refresh]
                      [--domain-level {second,top}]
                      [--max-hostnames MAX_HOSTNAMES]

Named Arguments

-i, --input

read input from FILE instead of standard input

--cache

persistent rDNS cache (default: .ip-rdns-cache.json)

Default: .ip-rdns-cache.json

--refresh

ignore cached rDNS lookups

Default: False

--domain-level

Possible choices: second, top

domain level used for aggregation (default: second)

Default: 'second'

--max-hostnames

maximum hostnames listed per row (default: 10)

Default: 10