-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Refactoring Side View * Fixing blank line * Fixing errors in plotting Side View and refactoring Linear View * Empty-Commit * Empty-Commit * Testing Top view in plot module * Testing Top View in plot module to use MyTopViewFigure class * Using getBBOX() * Using get_plot_size_in_px() * Testing Side view and Linear view in plot module * Adding tight layout for side view CLI script and documentation (#1598) * CLI script and documentation * Updating plot module * Adding template for plot module * Fixes in documentation and adding template for plot module * Fixing error in template of plot module * Adding testing for mssautoplot * Adding template and fixing errors * Fixing errors in tests * Fixing errors in mssautoplot and updating mpl_pathinteractor module * Removing test_mssautoplot.py * Fixing flake8 errors
- Loading branch information
Showing
10 changed files
with
2,048 additions
and
942 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<FlightTrack version="1.8.2"> | ||
<ListOfWaypoints> | ||
<Waypoint flightlevel="200.0" lat="-53.778" location="SAWE" lon="-67.749"> | ||
<Comments></Comments> | ||
</Waypoint> | ||
<Waypoint flightlevel="200.0" lat="-53.833" location="1" lon="-67.667"> | ||
<Comments></Comments> | ||
</Waypoint> | ||
<Waypoint flightlevel="200.0" lat="-53.833" location="1" lon="-67.833"> | ||
<Comments></Comments> | ||
</Waypoint> | ||
<Waypoint flightlevel="250.0" lat="-53.59" location="GEDAB" lon="-68.407"> | ||
<Comments></Comments> | ||
</Waypoint> | ||
<Waypoint flightlevel="300.0" lat="-52.803" location="MUBES" lon="-68.479"> | ||
<Comments></Comments> | ||
</Waypoint> | ||
<Waypoint flightlevel="350.0" lat="-49.333" location="WP4" lon="-72.667"> | ||
<Comments></Comments> | ||
</Waypoint> | ||
<Waypoint flightlevel="380.0" lat="-52.5" location="WP5" lon="-72.5"> | ||
<Comments></Comments> | ||
</Waypoint> | ||
<Waypoint flightlevel="430.0" lat="-49.5" location="WP6" lon="-72.667"> | ||
<Comments></Comments> | ||
</Waypoint> | ||
<Waypoint flightlevel="430.0" lat="-49.167" location="WP7" lon="-72.5"> | ||
<Comments></Comments> | ||
</Waypoint> | ||
<Waypoint flightlevel="430.0" lat="-50.167" location="WP8" lon="-70.0"> | ||
<Comments></Comments> | ||
</Waypoint> | ||
<Waypoint flightlevel="450.0" lat="-51.833" location="WP9" lon="-70.0"> | ||
<Comments></Comments> | ||
</Waypoint> | ||
<Waypoint flightlevel="450.0" lat="-52.833" location="WP10" lon="-72.5"> | ||
<Comments></Comments> | ||
</Waypoint> | ||
<Waypoint flightlevel="450.0" lat="-51.833" location="WP11" lon="-75.0"> | ||
<Comments></Comments> | ||
</Waypoint> | ||
<Waypoint flightlevel="450.0" lat="-50.167" location="WP12" lon="-75.0"> | ||
<Comments></Comments> | ||
</Waypoint> | ||
<Waypoint flightlevel="450.0" lat="-49.167" location="WP13" lon="-72.667"> | ||
<Comments></Comments> | ||
</Waypoint> | ||
<Waypoint flightlevel="450.0" lat="-50.5" location="DS1" lon="-74.167"> | ||
<Comments></Comments> | ||
</Waypoint> | ||
<Waypoint flightlevel="460.0" lat="-51.833" location="WP15" lon="-76.5"> | ||
<Comments></Comments> | ||
</Waypoint> | ||
<Waypoint flightlevel="470.0" lat="-54.167" location="WP16" lon="-80.833"> | ||
<Comments></Comments> | ||
</Waypoint> | ||
<Waypoint flightlevel="470.0" lat="-51.0" location="DS2" lon="-73.5"> | ||
<Comments></Comments> | ||
</Waypoint> | ||
<Waypoint flightlevel="350.0" lat="-50.5" location="WP18" lon="-72.667"> | ||
<Comments></Comments> | ||
</Waypoint> | ||
<Waypoint flightlevel="350.0" lat="-53.833" location="1" lon="-67.667"> | ||
<Comments></Comments> | ||
</Waypoint> | ||
<Waypoint flightlevel="430.0" lat="-53.778" location="SAWE" lon="-67.749"> | ||
<Comments></Comments> | ||
</Waypoint> | ||
</ListOfWaypoints> | ||
</FlightTrack> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,5 +9,6 @@ Components | |
mswms | ||
mscolab | ||
gentutorials | ||
mssautoplot | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
mssautoplot - A CLI tool for automation | ||
======================================= | ||
|
||
A CLI tool which enables users to download a set of plots according to the given configuration. The configuration for downloading the plots is located in "mssautoplot.json". In this file you can specify the default settings. | ||
|
||
How to use | ||
---------- | ||
|
||
The CLI tool has the following parameters: | ||
|
||
+--------------+-------+----------------------------------------------------------------------+ | ||
| Parameter | Type | Description | | ||
+--------------+-------+----------------------------------------------------------------------+ | ||
| ``--cpath`` | TEXT | Path of the config file where the configuration is specified. | | ||
+--------------+-------+----------------------------------------------------------------------+ | ||
| ``--ftrack`` | TEXT | Flight track. | | ||
+--------------+-------+----------------------------------------------------------------------+ | ||
| ``--itime`` | TEXT | Initial time. | | ||
+--------------+-------+----------------------------------------------------------------------+ | ||
| ``--vtime`` | TEXT | Valid time. | | ||
+--------------+-------+----------------------------------------------------------------------+ | ||
| ``--intv`` |INTEGER| Time interval in hours. | | ||
+--------------+-------+----------------------------------------------------------------------+ | ||
| ``--stime`` | TEXT | Starting time for downloading multiple plots with a fixed interval.| | ||
+--------------+-------+----------------------------------------------------------------------+ | ||
| ``--etime`` | TEXT | Ending time for downloading multiple plots with a fixed interval. | | ||
+--------------+-------+----------------------------------------------------------------------+ | ||
|
||
A short description of how to start the program is given by the ``--help`` option. | ||
|
||
Examples | ||
~~~~~~~~ | ||
|
||
Here are a few examples on how to use this tool, | ||
|
||
1. ``mssautoplot --cpath mssautoplot.json`` | ||
|
||
The above command downloads the required number of plots with the default settings from mss_autoplot.json into the output folder. | ||
|
||
2. ``mssautoplot --cpath mssautoplot.json --itime="" --vtime="2019-09-02T00:00:00"`` | ||
|
||
The above command will download all the plots configured in mss_autoplot.json of initial time "" and valid time "2019-09-02T00:00:00". This can be used to create a daily "standard set" of plots with/without an actual flight track, e.g., for daily morning briefings | ||
|
||
For downloading plots of multiple flight tracks, specify the flight track and it's configuration in mss_autoplot.json. This can be used to create a "standard set" of plots for all actual flights of a campaign. See below: | ||
|
||
"automated_plotting_flights": [ | ||
["flight1", "section1", "vertical1", "filename1", "init_time1", "time1"] | ||
["flight2", "section2, "vertical2", "filename2", "init_time2", "time2"]] | ||
|
||
3. ``mssautoplot --cpath mssautoplot.json --stime="2019-09-01T00:00:00" --etime="2019-09-02T00:00:00" --intv=6`` | ||
|
||
The above command will download plots of the with/without flight track from start time "2019-09-01T00:00:00" to end time "2019-09-02T00:00:00". The user would need to compulsorily specify the init_time and time in mss_autoplot.json inorder to use this functionality. | ||
|
||
|
||
Settings file | ||
-------------- | ||
|
||
This file includes configuration settings to generate plots in automated fashion. It includes, | ||
|
||
- View | ||
- URL of the WMS server | ||
- URL of mscolab server | ||
- List of layers to be plotted | ||
- Style | ||
- Elevation | ||
- List of initial time and forecast hours | ||
- List of flight paths | ||
- List of operations (from MSCOLAB) | ||
- Level | ||
- Map section | ||
- Resolution of the plot | ||
- Path of output folder | ||
|
||
|
||
If you don't have a mss_autoplot.json then default configuration is in place. | ||
|
||
Store this mss_autoplot.json in a path, e.g. “$HOME/.config/msui” | ||
|
||
**/$HOME/.config/msui/mssautoplot.json** | ||
|
||
.. literalinclude:: samples/config/msui/mssautoplot.json.sample |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
|
||
{ | ||
"view":"topview" | ||
"data_dir": "~/mssdata", | ||
"filepicker_default": "default", | ||
|
||
"import_plugins": { | ||
"FliteStar": ["fls", "mslib.plugins.io.flitestar", "load_from_flitestar"], | ||
"Text": ["txt", "mslib.plugins.io.text", "load_from_txt"] | ||
}, | ||
|
||
"export_plugins": { | ||
"Text": ["txt", "mslib.plugins.io.text", "save_to_txt"], | ||
"KML": ["kml", "mslib.plugins.io.kml", "save_to_kml"], | ||
"GPX": ["gpx", "mslib.plugins.io.gpx", "save_to_gpx"] | ||
}, | ||
|
||
|
||
"layout": { | ||
"topview": [963, 702], | ||
"sideview": [913, 557], | ||
"tableview": [1236, 424], | ||
"immutable": false | ||
}, | ||
|
||
"locations": { | ||
"EDMO": [48.08, 11.28], | ||
"Hannover": [52.37, 9.74], | ||
"Hamburg": [53.55, 9.99], | ||
"Juelich": [50.92, 6.36], | ||
"Leipzig": [51.34, 12.37], | ||
"Muenchen": [48.14, 11.57], | ||
"Stuttgart": [48.78, 9.18], | ||
"Wien": [48.20833, 16.373064], | ||
"Zugspitze": [47.42, 10.98], | ||
"Kiruna": [67.821, 20.336], | ||
"Ny-Alesund": [78.928, 11.986] | ||
}, | ||
|
||
"predefined_map_sections": { | ||
"01 Europe (cyl)": {"CRS": "EPSG:4326", | ||
"map": {"llcrnrlon": -15.0, "llcrnrlat": 35.0, | ||
"urcrnrlon": 30.0, "urcrnrlat": 65.0}}, | ||
"02 Germany (cyl)": {"CRS": "EPSG:4326", | ||
"map": {"llcrnrlon": 5.0, "llcrnrlat": 45.0, | ||
"urcrnrlon": 15.0, "urcrnrlat": 57.0}}, | ||
"03 Global (cyl)": {"CRS": "EPSG:4326", | ||
"map": {"llcrnrlon": -180.0, "llcrnrlat": -90.0, | ||
"urcrnrlon": 180.0, "urcrnrlat": 90.0}}, | ||
"04 Shannon (stereo)": {"CRS": "EPSG:77752350", | ||
"map": {"llcrnrlon": -45.0, "llcrnrlat": 22.0, | ||
"urcrnrlon": 45.0, "urcrnrlat": 63.0}}, | ||
"05 Northern Hemisphere (stereo)": {"CRS": "EPSG:77790000", | ||
"map": {"llcrnrlon": -45.0, "llcrnrlat": 0.0, | ||
"urcrnrlon": 135.0, "urcrnrlat": 0.0}}, | ||
"06 Southern Hemisphere (stereo)": {"CRS": "EPSG:77890000", | ||
"map": {"llcrnrlon": 45.0, "llcrnrlat": 0.0, | ||
"urcrnrlon": -135.0, "urcrnrlat": 0.0}} | ||
}, | ||
|
||
"new_flighttrack_template": ["Kiruna", "Ny-Alesund"], | ||
"new_flighttrack_flightlevel": 250, | ||
"num_interpolation_points": 201, | ||
"num_labels": 10, | ||
|
||
"WMS_request_timeout": 30, | ||
|
||
"default_WMS": ["http://www.your-server.de/forecasts"], | ||
"default_VSEC_WMS": ["http://www.your-server.de/forecasts"], | ||
"default_LSEC_WMS": ["http://www.your-server.de/forecasts"], | ||
|
||
"default_MSCOLAB": ["http://www.your-mscolab-server.de/"], | ||
"WMS_login": { | ||
"http://www.your-server.de/forecasts" : ["youruser", "yourpassword"] | ||
}, | ||
"MSC_login": { | ||
"http://www.your-mscolab-server.de" : ["youruser", "yourpassword"] | ||
}, | ||
|
||
"automated_plotting_flights": [ | ||
["", "", "", "", "", ""] | ||
], | ||
"automated_plotting_hsecs": [ | ||
["", "", "", ""] | ||
], | ||
"automated_plotting_vsecs": [ | ||
["","", "", ""] | ||
], | ||
"automated_plotting_lsecs": [ | ||
["", "", ""] | ||
] | ||
|
||
"MSCOLAB_mailid": "", | ||
"MSCOLAB_password": "" | ||
"MSCOLAB_operations":[] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.