The tentatively-named "EZIO" functionality is ready for review. It includes a call in PyCO2SYS.init.py , which should call upon the main 'ezio.py' script in PyCO2SYS.PyCO2SYS.EZIO. Example input and output files generated with this script are included in the same folder.
This functionality aims to replicate the Excel-based CO2SYS.xlsx as closely as possible. It takes columns A-L of that program (copied into a new .csv or .xlsx spreadsheet) as input, and returns/saves the output columns. The header columns (row 3) must match the CO2SYS.xlsx, though some flexibility in naming conventions for carbonate parameters has been allowed (e.g. DIC vs. TC).
In its simplest form, EZIO should be called and executed:
import PyCO2SYS as pyco2 results = pyco2.ezio(filepath)
Which returns a Pandas dataframe and saves a file of the same name with a '_processed.csv' tag appended. It also takes the optional carbonic, fluoride, bisulfate, and total borate arguments as pyco2.sys(), and retains the same default values.
Potential problems, uncertainties, and future improvements:
I am uncertain that the pyco2.ezio() is called correctly in init.
A robust intercomparison should be attempted between CO2SYS.xlsx and PyCO2SYS/EZIO.
The .xlsx template and processed template could be moved to the 'examples' folder.
The function is sensitive to input errors; try/except clauses may make it less brittle.
The tentatively-named "EZIO" functionality is ready for review. It includes a call in PyCO2SYS.init.py , which should call upon the main 'ezio.py' script in PyCO2SYS.PyCO2SYS.EZIO. Example input and output files generated with this script are included in the same folder.
This functionality aims to replicate the Excel-based CO2SYS.xlsx as closely as possible. It takes columns A-L of that program (copied into a new .csv or .xlsx spreadsheet) as input, and returns/saves the output columns. The header columns (row 3) must match the CO2SYS.xlsx, though some flexibility in naming conventions for carbonate parameters has been allowed (e.g. DIC vs. TC).
In its simplest form, EZIO should be called and executed:
import PyCO2SYS as pyco2 results = pyco2.ezio(filepath)
Which returns a Pandas dataframe and saves a file of the same name with a '_processed.csv' tag appended. It also takes the optional carbonic, fluoride, bisulfate, and total borate arguments as pyco2.sys(), and retains the same default values.Potential problems, uncertainties, and future improvements: