# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

import matplotlib.pyplot as plt

# +
# Plot Lidar NIS
nis_lidar = []
with open("lidarNis.txt", "r") as file:
    nis_lidar = file.read().splitlines()
nis_lidar = list(map(float, nis_lidar))

threshold_laser = [5.991]*len(nis_lidar)

fig = plt.figure()
plt.plot(nis_lidar)
plt.title("NIS (LIDAR)")
plt.xlabel("Measurement Index")
plt.ylabel("NIS")
plt.plot(threshold_laser)
plt.show()
fig.savefig('lidarNis.png')

# Plot Radar NIS
nis_radar = []
with open("radarNis.txt", "r") as file:
    nis_radar = file.read().splitlines()
nis_radar = list(map(float, nis))

threshold_radar = [7.815]*len(nis_lidar)

fig = plt.figure()
plt.plot(threshold_radar)
plt.plot(nis_radar)
plt.title("NIS (RADAR)")
plt.xlabel("Measurement Index")
plt.ylabel("NIS")
plt.show()
fig.savefig('radarNis.png')


StarcoderdataJupyterScriptsDedupFiltered