Commit 954399c5 authored by Isabelle Kieffer's avatar Isabelle Kieffer

Correction of mol/l condition

parent d9d60aa9
......@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
......@@ -15,34 +15,92 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"#my_directory = \"/home/letard/Sshade/Data/Thomas_Hg2016\"\n",
"my_directory = \"/home/letard/Sshade/Data/Thomas_Zn2018\"\n",
"#my_directory = \"/home/letard/Sshade/Data/Bissardon_Se2015\"\n",
"my_directory = \"/home/letard/Sshade/Data/Test\""
"#my_directory = \"/home/letard/Sshade/Data/Test\""
]
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 6,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"=== The file laboratory.csv has been written in /home/letard/Sshade/Data/Thomas_Zn2018. ===\n",
"\n",
"=== The file experimentalist_BM.csv has been written in /home/letard/Sshade/Data/Thomas_Zn2018. ===\n",
"\n",
"=== The file experimentalist_SM.csv has been written in /home/letard/Sshade/Data/Thomas_Zn2018. ===\n",
"\n",
"=== The file pellet.csv has been written in /home/letard/Sshade/Data/Thomas_Zn2018. ===\n",
"\n",
"=== The file frozen_solution_1.csv has been written in /home/letard/Sshade/Data/Thomas_Zn2018. ===\n",
"\n",
"=== The file frozen_solution_2.csv has been written in /home/letard/Sshade/Data/Thomas_Zn2018. ===\n",
"\n",
"=== The file frozen_solution_3.csv has been written in /home/letard/Sshade/Data/Thomas_Zn2018. ===\n",
"\n",
"=== The file frozen_solution_4.csv has been written in /home/letard/Sshade/Data/Thomas_Zn2018. ===\n",
"\n",
"=== The file frozen_solution_5.csv has been written in /home/letard/Sshade/Data/Thomas_Zn2018. ===\n",
"\n",
"=== The file frozen_solution_6.csv has been written in /home/letard/Sshade/Data/Thomas_Zn2018. ===\n",
"\n",
"=== The file frozen_solution_7.csv has been written in /home/letard/Sshade/Data/Thomas_Zn2018. ===\n",
"\n",
"=== The file HPHT_solution.csv has been written in /home/letard/Sshade/Data/Thomas_Zn2018. ===\n",
"\n",
"=== The file experiments_spectra.csv has been written in /home/letard/Sshade/Data/Thomas_Zn2018. ===\n",
"\n",
"=== The file experiments_spectra_with_structure.csv has been written in /home/letard/Sshade/Data/Thomas_Zn2018. ===\n"
]
}
],
"source": [
"#csv2xml.ods_converter(my_directory,\"manip_Thomas_Hg2016.ods\")\n",
"csv2xml.ods_converter(my_directory,\"manip_Thomas_Zn2018.ods\")\n",
"#csv2xml.ods_converter(my_directory,\"manip_Bissardon_Se2015.ods\")\n",
"csv2xml_r.ods_converter(my_directory,\"manip_test4.ods\")"
"#csv2xml_r.ods_converter(my_directory,\"manip_test4.ods\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 7,
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"=== The file sample_ST_20180418_003.xml has been written in /home/letard/Sshade/Data/Thomas_Zn2018. ===\n",
"\n",
"=== The file sample_ST_20180418_005.xml has been written in /home/letard/Sshade/Data/Thomas_Zn2018. ===\n",
"\n",
"=== The file sample_ST_20180418_004.xml has been written in /home/letard/Sshade/Data/Thomas_Zn2018. ===\n",
"\n",
"=== The file sample_ST_20180418_007.xml has been written in /home/letard/Sshade/Data/Thomas_Zn2018. ===\n",
"\n",
"=== The file sample_ST_20180418_001.xml has been written in /home/letard/Sshade/Data/Thomas_Zn2018. ===\n",
"\n",
"=== The file sample_ST_20180418_006.xml has been written in /home/letard/Sshade/Data/Thomas_Zn2018. ===\n",
"\n",
"=== The file sample_ST_20180418_002.xml has been written in /home/letard/Sshade/Data/Thomas_Zn2018. ===\n"
]
}
],
"source": [
"#csv2xml.multiple_file_writer(my_directory,\"laboratory\")\n",
"#csv2xml.multiple_file_writer(my_directory,\"experimentalist\")\n",
"#csv2xml.multiple_file_writer(my_directory,\"pellet\")\n",
"csv2xml.multiple_file_writer(my_directory,\"pellet\")"
"csv2xml.multiple_file_writer(my_directory,\"frozen_solution\")"
]
},
{
......@@ -78,7 +136,7 @@
"metadata": {},
"outputs": [],
"source": [
"csv2xml.sample_frozen_solution_file_writer(my_directory,\"frozen_solution.csv\")"
"csv2xml.sample_frozen_solution_file_writer(my_directory,\"frozen_solution_4.csv\")"
]
},
{
......
......@@ -986,7 +986,7 @@ def sample_frozen_solution_file_writer(expdir,csvfilename):
item.remove(elem)
for elem in item.findall("mole_fraction_error"):
item.remove(elem)
if csvdata['specie_quantity_unit']=='mol/kg' and csvdata['specie_quantity_unit']!='mol/l':
if csvdata['specie_quantity_unit']=='mol/kg' or csvdata['specie_quantity_unit']=='mol/l':
for elem in item.findall("uid"):
if elem.text==spes[nspe]['specie_uid']:
for elem in item.findall("mass"):
......@@ -1258,7 +1258,7 @@ def sample_HPHT_solution_file_writer(expdir,csvfilename):
item.remove(elem)
for elem in item.findall("mole_fraction_error"):
item.remove(elem)
if csvdata['specie_quantity_unit']=='mol/kg' and csvdata['specie_quantity_unit']!='mol/l':
if csvdata['specie_quantity_unit']=='mol/kg' or csvdata['specie_quantity_unit']=='mol/l':
for elem in item.findall("uid"):
if elem.text==spes[nspe]['specie_uid']:
for elem in item.findall("mass"):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment