nwfsc-fram / OceanTS

Oceanographic data processing in Typescript using NodeJS and Apache Arrow
0 stars 3 forks source link

Find 2017 CTD 7738 xmlcon file with OPTODE Aanderaa calibration coefficients #20

Open ghost opened 5 years ago

ghost commented 5 years ago

Have inquired with Victor and Seabird, awaiting response. However, I would note that for the 2018 7738 xmlcon file, the OPTODE Aanderaa calibration coefficients are all 0's, as follows, so I can probably just proceed without using them:

  <Sensor index="6" SensorID="64" >
    <OptodeOxygenAanderaa SensorID="64" >
      <SerialNumber></SerialNumber>
      <CalibrationDate></CalibrationDate>
      <DoSalinityCorrection>0</DoSalinityCorrection>
      <DoDepthCorrection>0</DoDepthCorrection>
      <InternalSalinity>0.00000e+000</InternalSalinity>
    </OptodeOxygenAanderaa>
  </Sensor>
ghost commented 5 years ago

the other item to node is that for the oxygen optode calculation that I perform, I currently am not using any of the calibration coefficients. It is as follows:

export function oxygen_optode(df: Table, colName: string, c:Object): Table {
    /*
        Method to calculate the oxygen in ml/l units from the OPTODE Aanderaa sensor
    */
   let oxy = new Float32Array(df.length);
   let v: any = null;

   try {
       df.scan((idx) => {
           oxy[idx] = umoles_per_l2ml_per_l(v(idx));
       }, (batch) => {
           v = col(colName).bind(batch);
       });
       let newCol: string = "OPTODE Oxygen (ml_per_l)";
       df = df.assign(Table.new([Float32Vector.from(oxy)], [newCol]));
   } catch(e) {
       console.log(e);
   }
    return df
}