Login / Get an account Logout
  • view
  • history

Revision 405ffe24dff85550b5a2ee0cd2034a2a20b77b9e (click the page title to view the current version)

Handling/CompAlgSystems4Golem/python/v3/Jupyter/Demos/39187/Ul/code/script.py

import numpy as np
import matplotlib.pyplot as plt

shot_no = 39187
identifier = "U_Loop.csv"
DAS='Diagnostics/BasicDiagnostics/'
# 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.title('#'+str(shot_no))
plt.plot(data[:,0]*1000, 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
If you have anything to contribute to this page, you are welcome to send us an email with a small description where and what you are offering. Thank you in advance. The GOLEM team. powered by gitit
Site
  • Front page
  • All pages
  • Categories
  • Random page
  • Recent activity
  • Upload a file
  • Atom feed feed icon
  • Help
This page
  • Raw page source
  • Printable version
  • Delete this page
  • Atom feed feed icon