Skip to content
Snippets Groups Projects
Commit cf66521b authored by Aaron Viets's avatar Aaron Viets
Browse files

test plot

parent fa711377
No related branches found
No related tags found
No related merge requests found
Pipeline #648724 passed
......@@ -128,10 +128,10 @@ test:
- dnf -y -q install python3-pytest
- dnf -y -q install framel
- dnf -y -q install git-all
- dnf -y -q install texlive-base
- dnf -y -q install texlive-amsmath
- dnf -y -q install texlive-fontspec
- dnf -y -q install texlive-times
#- dnf -y -q install texlive-base
#- dnf -y -q install texlive-amsmath
#- dnf -y -q install texlive-fontspec
#- dnf -y -q install texlive-times
script:
- export GST_DEBUG_DUMP_DOT_DIR=${CI_PROJECT_DIR}/tests/
# install our packages
......@@ -143,22 +143,23 @@ test:
- python3 -m pytest
artifacts:
paths:
- tests/tests_pytest/*.txt
- tests/tests_pytest/*.png
- tests/tests_pytest/ASD_data/*.png
- tests/tests_pytest/ASD_data/*asd.txt
- tests/tests_pytest/TDCF_data/*.png
- tests/tests_pytest/TDCF_data/*Approx.txt
- tests/tests_pytest/TDCF_data/*Exact.txt
- tests/tests_pytest/pcal_data/*.png
- tests/tests_pytest/pcal_data/*Pcal_0*.txt
- tests/tests_pytest/pcal_data/*Pcal_1*.txt
- tests/tests_pytest/act_data/*.png
- tests/tests_pytest/act_data/*exc_0*.txt
- tests/tests_pytest/act_data/*exc_1*.txt
- tests/tests_pytest/State_Vector_data/*.png
- tests/tests_pytest/State_Vector_data/State_Vector_Approx.txt
- tests/tests_pytest/State_Vector_data/State_Vector_Exact.txt
- tests/tests_pytest/test_order/temp/*.png
#- tests/tests_pytest/*.txt
#- tests/tests_pytest/*.png
#- tests/tests_pytest/ASD_data/*.png
#- tests/tests_pytest/ASD_data/*asd.txt
#- tests/tests_pytest/TDCF_data/*.png
#- tests/tests_pytest/TDCF_data/*Approx.txt
#- tests/tests_pytest/TDCF_data/*Exact.txt
#- tests/tests_pytest/pcal_data/*.png
#- tests/tests_pytest/pcal_data/*Pcal_0*.txt
#- tests/tests_pytest/pcal_data/*Pcal_1*.txt
#- tests/tests_pytest/act_data/*.png
#- tests/tests_pytest/act_data/*exc_0*.txt
#- tests/tests_pytest/act_data/*exc_1*.txt
#- tests/tests_pytest/State_Vector_data/*.png
#- tests/tests_pytest/State_Vector_data/State_Vector_Approx.txt
#- tests/tests_pytest/State_Vector_data/State_Vector_Exact.txt
expire_in: 24h
# Docker Images
......
# Configuration file for pytest within gstlal-calibration
[pytest]
testpaths = tests/tests_pytest/test_order
testpaths = tests/tests_pytest/test_order/temp
addopts =
-v
--doctest-modules
import matplotlib; matplotlib.use('Agg')
import numpy as np
import time
from math import erf
import time
from matplotlib import rc
#rc('text', usetex = True)
#matplotlib.rcParams['font.family'] = 'Times New Roman'
#matplotlib.rcParams['mathtext.default'] = 'regular'
matplotlib.rcParams['font.size'] = 20
matplotlib.rcParams['legend.fontsize'] = 20
import matplotlib.pyplot as plt
import matplotlib.patches as mpatches
from tests.tests_pytest.ticks_and_grid import ticks_and_grid
def test_plot():
x = np.arange(0.1, 10, 0.01)
y = np.sin(x) * np.sin(x)
plt.figure(figsize = (10, 6))
plt.plot(x, y, color = 'limegreen', linewidth = 0.75, label = r"$\mu_{1/2} = {\rm sin}^2$")
plt.xlabel(r"$Time_{\rm gps}$ in %s since %0.1f" % ('seconds', 123.635))
plt.title(r'${\rm %s} \ \widetilde{\Delta L}_{\rm free} / \tilde{x}_{\rm %s} \ {\rm at \ %0.1f \ Hz}$' % ('H1', 'pc', 410.3))
plt.ylabel(r"$\sin(x)$")
ticks_and_grid(plt.gca(), xmin = 0.2, xmax = 9, ymin = -1.1, ymax = 1.1, xscale = 'log', yscale = 'linear')
markersize = 1
leg = plt.legend(fancybox = True, markerscale = 16.0 / markersize, numpoints = 1, loc = 'upper right')
leg.get_frame().set_alpha(0.8)
plt.tight_layout()
plt.savefig("tests/tests_pytest/test_order/temp/testplot.png")
plt.close()
test_plot()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment