Code Monkey home page Code Monkey logo

iliade-co2-o2's Introduction

Iliade-CO2-O2

Integration of O2 and CO2 measurements

INSTALLING

Follow these steps to install the project correctly :

  • Download the project here
  • Open MATLAB
  • Add the project to the path
  • Download the m_map package here
  • Download the maps
  • Unzip the maps and put them in the folder m_map/private
  • Add the m_map package to the MATLAB path

USAGE

In order to run the program, you will need the following data :

  • co2 data : .csv file (result of the concatCO2 program)
  • tsg data : .tsgqc file
  • o2 data : .oxy file

Once you add the project to path, you can run it from where you want using the following command :

>> interpCO2_TSG_O2

If you know the full path to your files, you can run the command with them in parameter :

>> interpCO2_TSG_O2 path2co2 path2tsg path2o2

The result of the program will be two different files :

  • CO2 and TSG interpolation
  • Previous interpolation and O2 interpolation

Then, you can visualize all the data :

  • CO2 data
>> traceCO2
  • Interpolated O2 data
>> traceO2
  • CO2 and O2 concentration on maps
>> traceMap

You can also run interpolations separatly. However, you need the result file of the first concatenation to run interpCO2_O2 :

  • interpTSG_CO2(co2File, tsgFile)
>> interpTSG_CO2
  • interpCO2_O2(tsg_co2InterpFile, o2File)
>> interpCO2_O2

UNIT TESTS

You can run all the tests from the project folder with

>> runtests('tests')

This will test the following functions:

  • readAsciiO2
  • readInterpTSG_CO2
  • interpCo2_O2
  • correctO2Data

Reading module : TestFiles

This file test the following functions

  • readAsciiO2
  • readInterpTSG_CO2

You can run all testFiles tests with :

>> runtests('TestFiles')

or a specific test of the file :

>> runtests('TestFiles','ProcedureName','readCo2')

the result is :

Running TFigureProperties
..
Done TFigureProperties
__________

Running TestFiles
Check if the tests files are found
../exemple/CSLO1902/cslo1902.oxy
../exemple/CSLO2001/cslo2001.oxy
../exemple/CSLO1902/cslo1902.csv
../exemple/CSLO2001/cslo2001.csv
../exemple/CSLO1902/cslo1902.bad
../exemple/CSLO2001/cslo2001.bad
.Check the number of lines read
.Check if we correctly read the data from o2 file
.Check if we correctly read the data from co2 file
.
Done TestFiles
__________

ans =

  1×6 TestResult array with properties:

    Name
    Passed
    Failed
    Incomplete
    Duration
    Details

Totals:
    6 Passed, 0 Failed, 0 Incomplete.
    6.8135 seconds testing time.

Interpolation module

TestInterpolation test the following function

  • interpCo2_O2

Note that it's highly recommended to run the previous test before running this one as it use readinterpTSC_CO2 and readAsciiO2

>> runtests('testFiles')

the result is :

Running TestInterpolation
Test with ../exemple/CSLO1902/cslo1902.oxy and ../exemple/CSLO1902/cslo1902.csv
Test with ../exemple/CSLO2001/cslo2001.oxy and ../exemple/CSLO2001/cslo2001.csv
.
Done TestInterpolation
__________


ans =

  TestResult with properties:

          Name: 'TestInterpolation/interpolationTest'
        Passed: 1
        Failed: 0
    Incomplete: 0
      Duration: 3.4632
        Details: [1×1 struct]

Totals:
    1 Passed, 0 Failed, 0 Incomplete.
    3.4632 seconds testing time.

O2 compensation module

TestO2Compensation test the following function

  • correctO2Data

Note that it's highly recommended to run the previous test before running this one as it use readinterpTSC_CO2 and readAsciiO2

>> runtests('TestO2Compensation')

the results is :

>> runtests('testInterpolation')

the result is :

Running TestO2Compensation
Computing scaled temperature ...
Computing solubility ...
Computing salinity compensation ...
Computing pressure compensation ...
Computing o2 concentration ...
Computing O2 Saturation ...
Writing data to structure ...
        OXYGEN_RAW: [278 131.2700 131.6100 131.3500 132.1700 245.0700 244.9200 244.7700 245.1900 245.4000]
              SSJT: [20 20.4110 20.4120 20.4270 20.4290 21.3920 21.4810 21.5640 21.5870 21.5770]
              SSPS: [0 35 35 35 35 36.5160 36.6140 36.7160 36.7550 36.7590]
          LICOR_P: [1.0133e+03 1.0195e+03 1.0194e+03 1.0192e+03 1.0191e+03 1.0140e+03 1.0141e+03 1.0141e+03 1.0143e+03 1.0141e+03]
    OXYGEN_ADJ_muM: [278 106.8229 107.0997 106.8906 107.5582 197.9599 197.7528 197.5395 197.8405 198.0022]
    OXYGEN_ADJ_MLL: [6.2311 2.3943 2.4005 2.3958 2.4108 4.4371 4.4324 4.4276 4.4344 4.4380]
OXYGEN_SATURATION: [6.9439 3.2662 3.2748 3.2690 3.2897 6.1303 6.1263 6.1220 6.1314 6.1377]

.
Done TestO2Compensation
__________


ans =

TestResult with properties:

      Name: 'TestO2Compensation/compensationTest'
    Passed: 1
    Failed: 0
Incomplete: 0
  Duration: 0.0739
    Details: [1×1 struct]

Totals:
1 Passed, 0 Failed, 0 Incomplete.
0.073924 seconds testing time.

iliade-co2-o2's People

Contributors

jgrelet avatar yannlenorment avatar

Watchers

 avatar  avatar

iliade-co2-o2's Issues

O2 correction data issue

The data written in the final file doesn't match the result expected. However, the computation is working well. Trying to find where the data change.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.