Skip to content

Commit a50e7e3

Browse files
committed
minor viz improvements
1 parent d7b4fe1 commit a50e7e3

4 files changed

Lines changed: 22 additions & 24 deletions

File tree

gnss_lib_py/utils/visualizations.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ def plot_skyplot(navdata, receiver_state, save=False, prefix="",
382382
np.atleast_1d(sv_subset["el_sv_deg"])[-1] \
383383
+ el_offset,
384384
str(int(sv_name)),
385-
backgroundcolor=(1.,1.,1.,0.2))
385+
)
386386

387387
# updated axes for skyplot graph specifics
388388
axes.set_theta_zero_location('N')
@@ -707,7 +707,6 @@ def _save_figure(figures, titles=None, prefix="", fnames=None): # pragma: no cov
707707
title = titles[fig_idx]
708708
title = title.replace(" ","_")
709709
title = title.replace(".","")
710-
title = title.replace("vs","")
711710

712711
if prefix != "" and not prefix.endswith('_'):
713712
prefix += "_"
@@ -894,7 +893,6 @@ def _save_plotly(figures, titles=None, prefix="", fnames=None,
894893
title = titles[fig_idx]
895894
title = title.replace(" ","_")
896895
title = title.replace(".","")
897-
title = title.replace("vs","")
898896

899897
if prefix != "" and not prefix.endswith('_'):
900898
prefix += "_"
@@ -911,6 +909,6 @@ def _save_plotly(figures, titles=None, prefix="", fnames=None,
911909
break
912910
except ValueError as error:
913911
figure.layout.mapbox.zoom -= 1
914-
if figure.layout.mapbox.zoom <= 1:
912+
if figure.layout.mapbox.zoom < 1:
915913
print(error)
916914
break

notebooks/tutorials/myreceiver.csv

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
myTimestamp,mySatId,myPseudorange
2-
10,G10,270000001
3-
10,G14,270000007
4-
10,G07,270000004
5-
10,G03,270000005
6-
11,G10,270000002
7-
11,G14,270000008
8-
11,G07,270000003
9-
11,G03,270000004
2+
10,10,270000001
3+
10,14,270000007
4+
10,7,270000004
5+
10,3,270000005
6+
11,10,270000002
7+
11,14,270000008
8+
11,7,270000003
9+
11,3,270000004

notebooks/tutorials/parsers.ipynb

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -291,14 +291,14 @@
291291
"\n",
292292
"| myTimestamp | mySatId | myPseudorange |\n",
293293
"| ----------- | ------- | ------------- |\n",
294-
"| 10 | G10 | 270000001 |\n",
295-
"| 10 | G14 | 270000007 |\n",
296-
"| 10 | G07 | 270000004 |\n",
297-
"| 10 | G03 | 270000005 |\n",
298-
"| 11 | G10 | 270000002 |\n",
299-
"| 11 | G14 | 270000008 |\n",
300-
"| 11 | G07 | 270000003 |\n",
301-
"| 11 | G03 | 270000004 |"
294+
"| 10 | 10 | 270000001 |\n",
295+
"| 10 | 14 | 270000007 |\n",
296+
"| 10 | 7 | 270000004 |\n",
297+
"| 10 | 3 | 270000005 |\n",
298+
"| 11 | 10 | 270000002 |\n",
299+
"| 11 | 14 | 270000008 |\n",
300+
"| 11 | 7 | 270000003 |\n",
301+
"| 11 | 3 | 270000004 |"
302302
]
303303
},
304304
{
@@ -540,13 +540,13 @@
540540
"outputs": [],
541541
"source": [
542542
"from gnss_lib_py.utils.visualizations import plot_metric\n",
543-
"fig = plot_metric(my_receiver_data,\"myTimestamp\",\"corr_pr_m\",save=False)"
543+
"fig = plot_metric(my_receiver_data,\"gps_millis\",\"corr_pr_m\",groupby=\"sv_id\")"
544544
]
545545
}
546546
],
547547
"metadata": {
548548
"kernelspec": {
549-
"display_name": "Python 3 (ipykernel)",
549+
"display_name": "Python 3",
550550
"language": "python",
551551
"name": "python3"
552552
},

notebooks/tutorials/visualizations.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@
194194
"from gnss_lib_py.utils.visualizations import plot_metric_by_constellation\n",
195195
"\n",
196196
"galileo_data = derived_data.where(\"gnss_id\",\"galileo\")\n",
197-
"fig = plot_metric_by_constellation(galileo_data, \"gps_millis\", \"raw_pr_m\", save=False)"
197+
"fig = plot_metric_by_constellation(galileo_data, \"gps_millis\", \"raw_pr_m\")"
198198
]
199199
},
200200
{
@@ -225,7 +225,7 @@
225225
"\n",
226226
"state_estimate = solve_wls(derived_data)\n",
227227
"\n",
228-
"fig = plot_skyplot(derived_data, state_estimate, save=False)"
228+
"fig = plot_skyplot(derived_data, state_estimate)"
229229
]
230230
},
231231
{

0 commit comments

Comments
 (0)