--- format:markdown ... # Computer systems 4 GOLEM (advanced examples) ## $U_l$ @ #33993 ### Python (using pandas library) (e.g. through [the Jupyter Notebook](jupyter.org))
~~~ import numpy as np import matplotlib.pyplot as plt shot_no = 33993 identifier = "LoopVoltageCoil_raw.csv" DAS='DASs/StandardDAS/' # create data cache in the 'golem_cache' folder ds = np.DataSource('golem_cache') #Create a path to data and download and open the file base_url = "http://golem.fjfi.cvut.cz/shots/" data_file = ds.open(base_url + str(shot_no)+ '/' +DAS +identifier) #Load data from the file and plot to screen and to disk data = np.loadtxt(data_file,delimiter=",") plt.plot(data[:,0], data[:,1]) #1. column vs 2. column plt.xlabel('Time [ms]');plt.ylabel('$U_l$ [V]'); plt.savefig('graph.jpg') plt.show() #Run it: save it as script.py and run "python script.py" or execute in a ceel in a Jupyter Notebook ~~~