Skip to content
Snippets Groups Projects
Commit 437ba008 authored by JupyterHub User's avatar JupyterHub User
Browse files

probably fixed errors with txt-csv files

parent 91061588
No related branches found
No related tags found
No related merge requests found
...@@ -237,7 +237,7 @@ ...@@ -237,7 +237,7 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.11.4" "version": "3.9.7"
} }
}, },
"nbformat": 4, "nbformat": 4,
......
...@@ -9,9 +9,9 @@ from datetime import datetime ...@@ -9,9 +9,9 @@ from datetime import datetime
def I_V_Measurement(start,stop,step): def I_V_Measurement(start,stop,step):
device = module.HP4155a('GPIB0::17::INSTR') device = module.HP4155a('GPIB0::17::INSTR')
device.reset()
device.inst.write(":PAGE:MEAS") device.inst.write(":PAGE:MEAS")
device.inst.write(":PAGE:CHAN:MODE SWEEP") #go to sweep page and prepare sweep measurement device.inst.write(":PAGE:CHAN:MODE SWEEP") #go to sweep page and prepare sweep measurement
device.reset()
#setup sweep #setup sweep
device.inst.write(":PAGE:CHAN:MODE SWEEP") #go to sweep page and prepare sweep measurement device.inst.write(":PAGE:CHAN:MODE SWEEP") #go to sweep page and prepare sweep measurement
...@@ -60,8 +60,9 @@ def I_V_Measurement(start,stop,step): ...@@ -60,8 +60,9 @@ def I_V_Measurement(start,stop,step):
print(df) print(df)
#exporting the data frame in an excel file #exporting the data frame in an excel file
#file_name =f"_results_{date}.csv" file_name ="\_results_"+date+".csv"
#df.to_csv(file_name) path = "\\FILESERVER\public\Datentransfer\Asonitis, Alexandros" + file_name
df.to_csv(path)
del device del device
...@@ -217,8 +218,8 @@ def ctlm(field_name ='M00',start=-50*10**(-3),stop=50*10**(-3),step=10**(-3),com ...@@ -217,8 +218,8 @@ def ctlm(field_name ='M00',start=-50*10**(-3),stop=50*10**(-3),step=10**(-3),com
df = pd.DataFrame(data) df = pd.DataFrame(data)
print(df) print(df)
file_name = f"{field_name}_CTLM_{j+1}_{date}.txt" file_name = field_name+"_CTLM_"+str(j+1)+"_"+date+".txt"
path = f"\\FILESERVER\public\Datentransfer\Asonitis, Alexandros\_{file_name}" path = "\\FILESERVER\public\Datentransfer\Asonitis, Alexandros\ " + file_name
#export DataFrame to text file (keep header row and index column) #export DataFrame to text file (keep header row and index column)
#f=open(path, 'a') #f=open(path, 'a')
#f.write('title\n') #f.write('title\n')
......
Source diff could not be displayed: it is too large. Options to address this: view the blob.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment