Debian Codegraph @

doc/intro/tutorials/my_work_test_with_datalab.py

raw
1 # -*- coding: utf-8 -*-
2 """
3 Tutorial 'Working with Spyder'
4 ==============================
5
6 This tutorial shows how to use the DataLab remotely from a Python script running
7 outside DataLab (e.g. in Spyder).
8 """
9
10 # ---- Begin of the example code ----
11 # %% Connecting to DataLab current session
12
13 from sigima.client import SimpleRemoteProxy
14
15 proxy = SimpleRemoteProxy()
16 proxy.connect()
17
18 # %% Visualizing 1D data from my work
19
20 from my_work import test_my_1d_algorithm
21
22 x, y = test_my_1d_algorithm() # Here is all my research/technical work!
23 proxy.add_signal("My 1D result data", x, y) # Let's visualize it in DataLab
24 proxy.compute_wiener() # Denoise the signal using the Wiener filter
25
26
27 # %% Visualizing 2D data from my work
28
29 from my_work import test_my_2d_algorithm
30
31 z = test_my_2d_algorithm()[1] # Here is all my research/technical work!
32 proxy.add_image("My 2D result data", z) # Let's visualize it in DataLab