============================= Observable Plotting Tutorial ============================= -------------- Basic plotting -------------- For any Palantir :class:`Observable `, there are some basic ways to plot data. Throughout this part of the tutorial, we will use a :class:`E2EObservable ` .. doctest:: >>> import palantir.structures as structures >>> startDate = '231102' >>> endDate = '231102' >>> startTime = '000000' >>> endTime = '100000' >>> infraID = 1 >>> REFIMEVE = structures.Infrastructure(infraID, startDate, endDate, startTime, endTime, 'UTC') >>> freq_transfer = REFIMEVE.processE2E(1) >>> observable = freq_transfer.e2e Using the :meth:`~palantir.workflow.Observable.plotTrace` Trace .. doctest:: >>> observable.plotTrace(stageKey="stage1") .. image:: /_static/observable_trace.png :alt: Observable trace Using the :meth:`~palantir.workflow.Observable.plotDistribution` Density Distribution .. doctest:: >>> observable.plotDistribution(stageKey="stage1") .. image:: /_static/observable_distribution.png :alt: Observable distribution Using the :meth:`~palantir.workflow.Observable.plotDeviation` Plot Allan deviation .. doctest:: >>> observable.plotDeviation(method="mdev", stageKey="stage1") .. image:: /_static/observable_mdev.png :alt: Observable deviation Using the :meth:`~palantir.workflow.Observable.plotPhase` Plot Phase .. doctest:: >>> observable.plotPhase(stageKey="stage1") .. image:: /_static/observable_phase.png :alt: Observable phase Using the :meth:`~palantir.workflow.Observable.plotQuickview` Plot Quickview .. doctest:: >>> observable.plotQuickview(stages=[2,3,4]) .. image:: /_static/observable_quickview.png :alt: Observable quickview Using the :meth:`~palantir.workflow.Observable.plotFilters` Plot filters .. doctest:: >>> observable.plotFilters(stages=[2,3,4]) .. image:: /_static/observable_filters.png :alt: Observable trace Using the :meth:`~palantir.workflow.Observable.plotTemplatePage` Plot template .. doctest:: >>> observable.plotTemplatePage(stageKey="stage1") Using the :meth:`~palantir.workflow.Observable.plotAllTemplates` Plot All Templates .. doctest:: >>> observable.plotAllTemplates() ------------------------------------- Measuring Instrument timestamps drift ------------------------------------- TODO ------------------------------- Clock comparison specific plots ------------------------------- Throughout this part of the tutorial, we will use a :class:`ClockComparison ` object of two Strontium clocks as follow : .. doctest:: >>> import palantir.clock_comparisons as clock_comparisons >>> startDate = '230331' >>> endDate = '230402' >>> startTime = '000000' >>> endTime = '000000' >>> campaignID = 6 >>> CAMPAIGN_2023 = clock_comparisons.Campaign(campaignID, startDate, endDate, startTime, endTime, timezone='UTC') >>> module0 = 184 >>> moduleN = 79 >>> PTB_Sr3_CombKnoten_NPL_Sr1 = CAMPAIGN_2023.processClockComparison(module0, moduleN, fetch_local=True) Plot all the comparators and the comparison in a single plot. Plot the published frequencies .. doctest:: >>> PTB_Sr3_CombKnoten_NPL_Sr1.plotComparators() .. image:: /_static/comparison_traces.png :alt: Comparison traces Plot the quality factors .. doctest:: >>> PTB_Sr3_CombKnoten_NPL_Sr1.plotComparators(quality=True) .. image:: /_static/comparison_quality.png :alt: Comparison quality factors