Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Time lag definition? #10

Open
kimmotikka opened this issue Sep 12, 2019 · 3 comments
Open

Time lag definition? #10

kimmotikka opened this issue Sep 12, 2019 · 3 comments

Comments

@kimmotikka
Copy link

kimmotikka commented Sep 12, 2019

I tried to define timelag for oxygen optodes calphase (23sec) like this:

In processGliderData.m:
[..]
options.sensor_lag_list = ...
struct('corrected', {'caphase'}, ...
'original', {'calphase'},...
'parameters', {23});
[..]

and in configDataProcessingSlocumG2.m:
[..]
processing_options.sensor_lag_list = ...
struct('corrected', {'cphase'}, ...
'original', {'calphase'},...
'parameters', {23});
[..]

While running I get an error:

Error processing glider deployment data:
Error using processGliderData (line 901)
Invalid sensor lag settings 1: bad parameter specification.

It would be useful if examples given in comments where with some filled values and not just empty strings.

@ctroupin
Copy link
Collaborator

Hello Kimmo,

not an obvious question, especially since I've not opened the toolbox for several years.
I've quickly checked the doc and indeed I would help to have an example with realistic values for the parameters.

Could you run the test with 'parameters' set to 'auto' and see if you get the same issue?

options.sensor_lag_list = ...
struct('corrected', {'caphase'}, ...
'original', {'calphase'},...
'parameters', {'auto'});
[..]

@kimmotikka
Copy link
Author

kimmotikka commented Sep 12, 2019 via email

@joanpau
Copy link
Contributor

joanpau commented Sep 12, 2019

First, this is just a guess, so excuse me for any errors here in advance.
I have not been involved with that code in years either.

The original problem seems to come from a configuration error.
With pumped CTD where constant flow can be assumed, the correction parameter is a single scalar.
Otherwise, the correction parameter depends on the flow and requires two values.

Looking at m/processing_tools/processGliderData.m#L199 the option constant_flow defaults to false. If you are passing a single value precomputed parameter, you are assuming constant flow but this needs to be indicated setting the constant_flow option to true.

You can try in configDataProcessingSlocumG2.m:

processing_options.sensor_lag_list = ...
  struct('corrected', {'cphase'}, 'original', {'calphase'}, ...
            'parameters', {23}, 'constant_flow', {true})

Of course this requires a preexisting calphase original variable, and the default time and depth variables time and depth. You can choose alternative variables by setting the corresponding options in the struct too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants