Compare commits
2 commits
24b1d0fdcb
...
0dbd1efe91
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0dbd1efe91 | ||
|
|
55c07be548 |
2 changed files with 17 additions and 4 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1 +1,2 @@
|
|||
data/
|
||||
plots/
|
||||
|
|
|
|||
18
att_eval.py
18
att_eval.py
|
|
@ -72,7 +72,7 @@ class ads:
|
|||
data = np.delete(data, 0, 0) # deletes the zeroes line
|
||||
return data
|
||||
|
||||
def plot(self) -> None:
|
||||
def plot(self, show: bool = True, save: bool = False) -> None:
|
||||
dataarray = self.read_file()
|
||||
plt.rcParams.update({'figure.autolayout': True})
|
||||
x = []
|
||||
|
|
@ -95,9 +95,21 @@ class ads:
|
|||
ax2.legend()
|
||||
ax1.grid()
|
||||
ax2.grid()
|
||||
plt.title(f"{self.filename}.png")
|
||||
ax1.set_ylabel("Measured magnetic field in Gs")
|
||||
ax2.set_ylabel("Measured acceleration in $g$")
|
||||
ax2.set_xlabel("Time in YYYY-MM-DD HH:MM:SS")
|
||||
if save:
|
||||
plt.savefig(fr"C:/Users/nicol/OneDrive/Dokumente/Python Scripts/ADS/plots/{self.filename}.png", format="png")
|
||||
if show:
|
||||
plt.show()
|
||||
|
||||
|
||||
if __name__ == "__main__" :
|
||||
instance = ads(r"C:/Users/nicol/OneDrive/Dokumente/Python Scripts/ADS/data/junior/2025-03-27T11-21-07Z.EI")
|
||||
instance.plot()
|
||||
# filenames on windows may not have a colon (:)
|
||||
|
||||
#calibration27mar = ads(r"C:/Users/nicol/OneDrive/Dokumente/Python Scripts/ADS/data/junior/2025-03-27T11-21-07Z.EI")
|
||||
#calibration27mar.plot()
|
||||
|
||||
flight01apr = ads(r'C:/Users/nicol/OneDrive/Dokumente/Python Scripts/ADS/data/junior/2025-04-01T07_32_37Z.EI')
|
||||
flight01apr.plot()
|
||||
Loading…
Add table
Add a link
Reference in a new issue