ocssw
V2022
|
Classes | |
class | GlobalRandomManager |
class | Optimizer |
Functions | |
def | loadtxt (filename, delimiter=',') |
def | find_wavelength (k, waves, validate=True, tol=5, squeeze=False) |
def | closest_wavelength (k, waves, validate=True, tol=5, squeeze=False) |
def | has_band (w, waves, tol=5) |
def | to_rrs (Rrs) |
def | to_Rrs (rrs) |
def | get_required (Rrs, waves, required=[], tol=5, squeeze=False) |
def | get_benchmark_models (products, allow_opt=False, debug=False, method=None) |
def | optimize (opt_vars, has_default=True) |
def | set_outputs (output_keys) |
Function Documentation
◆ closest_wavelength()
◆ find_wavelength()
◆ get_benchmark_models()
def MDN.benchmarks.utils.get_benchmark_models | ( | products, | |
allow_opt = False , |
|||
debug = False , |
|||
method = None |
|||
) |
Return all benchmark models within the product directory, as well as those within the 'multiple' directory. Note that this means some models returned will not be applicable to the given product(s), and will need to be filtered. If allow_opt=True, models requiring optimization will also be returned.
◆ get_required()
def MDN.benchmarks.utils.get_required | ( | Rrs, | |
waves, | |||
required = [] , |
|||
tol = 5 , |
|||
squeeze = False |
|||
) |
Checks that all required wavelengths are available in the given data. Returns an object which acts as a functional interface into the Rrs data, allowing a wavelength or set of wavelengths to be returned: Rrs = get_required(Rrs, ...) Rrs(443) # Returns a matrix containing the band data closest to 443nm (shape [N, 1]) Rrs([440, 740]) # Returns a matrix containing the band data closest to 440nm, and to 740nm (shape [N, 2])
◆ has_band()
def MDN.benchmarks.utils.has_band | ( | w, | |
waves, | |||
tol = 5 |
|||
) |
◆ loadtxt()
def MDN.benchmarks.utils.loadtxt | ( | filename, | |
delimiter = ',' |
|||
) |
◆ optimize()
def MDN.benchmarks.utils.optimize | ( | opt_vars, | |
has_default = True |
|||
) |
◆ set_outputs()
def MDN.benchmarks.utils.set_outputs | ( | output_keys | ) |
All models within the 'multiple' folder should be decorated with this, as the model output should be a dictionary. This decorator takes as input a list of products (the keys within the output dict) and makes them available to check, without needing to run the model beforehand. As well, models can take 'product' as a keyword argument, and will then return only that product.
◆ to_rrs()
def MDN.benchmarks.utils.to_rrs | ( | Rrs | ) |