OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022
AUCTransformer.py
Go to the documentation of this file.
1 from ._CustomTransformer import _CustomTransformer
2 
3 import numpy as np
4 
5 
7  ''' Area under the curve normalization '''
8 
9  def __init__(self, wavelengths, *args, **kwargs):
10  self.wavelengths = wavelengths
11 
12  def _transform(self, X, *args, **kwargs):
13  area = np.trapz(X, self.wavelengths, axis=1)[:, None]
14  return X/area#np.append(X / area, area, 1)
def __init__(self, wavelengths, *args, **kwargs)