Coastal-Imaging-Research-Network / cBathy-Toolbox

Routines needed to run cBathy + demos
https://github.com/Coastal-Imaging-Research-Network/cBathy-toolbox/wiki/cBathy-User-Manual
GNU General Public License v3.0
25 stars 23 forks source link

toolbox Compatibility #36

Closed SRHarrison closed 6 years ago

SRHarrison commented 6 years ago

I noticed that the new UAVtoolbox using PIXelToolbox creates variables in the *.mBW.mat that are not what cBathy toobox is expecting. Perhaps the problem is with what analyzeSingleBathyRunNotCIL.m is expecting.

analyzeSingleBathyRunNotCIL expects xyz, t, data, cam, etc. while UAVtoolbox creates variables in the *mBW.mat file like: XYZ, T, RAW, CAM, etc.

Not sure which would be the best way to fix this present incompatibility...

@jstanleyx ??

KateBrodie commented 6 years ago

@jstanleyx @RobHolman @SRHarrison @mpalmsten

So admittedly, I rarely run analyzeSingleBathyRun or the NotCIL version. I tend to run analyzeBathyCollect. I usually load the .mBW file, and then call something like this after i make the bathy structure with the params:

bathy=analyzeBathyCollect(XYZ,T,RAW,CAM,bathy);

John, how do you guys deal with this? Is there another script that reads the .mBW data? All the Duck .mBW files have XYZ, T, RAW, CAM, etc. Do you guys ever run analyzeSingleBathyRun or analyzeSingleBathyRunNotCIL?

I'll keep digging around - there's a number of ways we can fix this, but I feel like @jstanleyx and @RobHolman must already have something...

jstanleyx commented 6 years ago

For production, I have a script named doBW that loads the data using loadBathyStack and then calls analyzeBathyCollect. loadBathyStack loads the stack data from the raw stack files (*.ras.gz) and uses lower case names.

analyzeSingleBathyRun is a simple version of doBW that doesn't have the production error checking and handling, and also uses loadBathyStack.

analyzeSingleBathyRunNotCIL loads data from the split-out and preprocessed stack data, which has variables with uppercase names.

The correct solution would be to modify analyzeSingleBathyRunNotCIL to use the upper case names for loaded variables.

On Fri, 2018-06-01 at 06:15 -0700, Katherine Brodie wrote:

@jstanleyx @RobHolman @SRHarrison @mpalmsten

So admittedly, I rarely run analyzeSingleBathyRun or the NotCIL version. I tend to run analyzeBathyCollect. I usually load the .mBW file, and then call something like this after i make the bathy structure with the params:

bathy=analyzeBathyCollect(XYZ,T,RAW,CAM,bathy);

John, how do you guys deal with this? Is there another script that reads the .mBW data? All the Duck .mBW files have XYZ, T, RAW, CAM, etc. Do you guys ever run analyzeSingleBathyRun or analyzeSingleBathyRunNotCIL?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

SRHarrison commented 6 years ago

OK... good to know. I'll edit the analyzeSingleBathyRunNotCIL.m now to use UPPERCASE variable names.

On Fri, Jun 1, 2018 at 11:29 AM, jstanleyx notifications@github.com wrote:

For production, I have a script named doBW that loads the data using loadBathyStack and then calls analyzeBathyCollect. loadBathyStack loads the stack data from the raw stack files (*.ras.gz) and uses lower case names.

analyzeSingleBathyRun is a simple version of doBW that doesn't have the production error checking and handling, and also uses loadBathyStack.

analyzeSingleBathyRunNotCIL loads data from the split-out and preprocessed stack data, which has variables with uppercase names.

The correct solution would be to modify analyzeSingleBathyRunNotCIL to use the upper case names for loaded variables.

On Fri, 2018-06-01 at 06:15 -0700, Katherine Brodie wrote:

@jstanleyx @RobHolman @SRHarrison @mpalmsten

So admittedly, I rarely run analyzeSingleBathyRun or the NotCIL version. I tend to run analyzeBathyCollect. I usually load the .mBW file, and then call something like this after i make the bathy structure with the params:

bathy=analyzeBathyCollect(XYZ,T,RAW,CAM,bathy);

John, how do you guys deal with this? Is there another script that reads the .mBW data? All the Duck .mBW files have XYZ, T, RAW, CAM, etc. Do you guys ever run analyzeSingleBathyRun or analyzeSingleBathyRunNotCIL?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Coastal-Imaging-Research-Network/cBathy-Toolbox/issues/36#issuecomment-393970475, or mute the thread https://github.com/notifications/unsubscribe-auth/AVa07VKxushmmVVxX1-UOeg2sxk84CUQks5t4YgkgaJpZM4UV-zG .

jstanleyx commented 6 years ago

You might want to do a simple test for exist on uppercase XYZ vs lowercase xyz and work accordingly. I.e., if exist XYZ then convert the required variables to lower (keeping the conditional activity for missing cam etc.) otherwise use lower. That protects users who already have lowercase prepixel toolbox UAV output.

On Fri, 2018-06-01 at 11:39 -0700, Shawn Harrison wrote:

OK... good to know. I'll edit the analyzeSingleBathyRunNotCIL.m now to use UPPERCASE variable names.

On Fri, Jun 1, 2018 at 11:29 AM, jstanleyx notifications@github.com wrote:

For production, I have a script named doBW that loads the data using loadBathyStack and then calls analyzeBathyCollect. loadBathyStack loads the stack data from the raw stack files (*.ras.gz) and uses lower case names.

analyzeSingleBathyRun is a simple version of doBW that doesn't have the production error checking and handling, and also uses loadBathyStack.

analyzeSingleBathyRunNotCIL loads data from the split-out and preprocessed stack data, which has variables with uppercase names.

The correct solution would be to modify analyzeSingleBathyRunNotCIL to use the upper case names for loaded variables.

On Fri, 2018-06-01 at 06:15 -0700, Katherine Brodie wrote:

@jstanleyx @RobHolman @SRHarrison @mpalmsten

So admittedly, I rarely run analyzeSingleBathyRun or the NotCIL version. I tend to run analyzeBathyCollect. I usually load the .mBW file, and then call something like this after i make the bathy structure with the params:

bathy=analyzeBathyCollect(XYZ,T,RAW,CAM,bathy);

John, how do you guys deal with this? Is there another script that reads the .mBW data? All the Duck .mBW files have XYZ, T, RAW, CAM, etc. Do you guys ever run analyzeSingleBathyRun or analyzeSingleBathyRunNotCIL?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub

https://github.com/Coastal-Imaging-Research-Network/cBathy-Toolbox/issues/36#issuecomment-393970475, or mute the thread

https://github.com/notifications/unsubscribe-auth/AVa07VKxushmmVVxX1-UOeg2sxk84CUQks5t4YgkgaJpZM4UV-zG .

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

SRHarrison commented 6 years ago

good idea.... Ok. will update and test before pull request.

On Fri, Jun 1, 2018 at 11:55 AM, jstanleyx notifications@github.com wrote:

You might want to do a simple test for exist on uppercase XYZ vs lowercase xyz and work accordingly. I.e., if exist XYZ then convert the required variables to lower (keeping the conditional activity for missing cam etc.) otherwise use lower. That protects users who already have lowercase prepixel toolbox UAV output.

On Fri, 2018-06-01 at 11:39 -0700, Shawn Harrison wrote:

OK... good to know. I'll edit the analyzeSingleBathyRunNotCIL.m now to use UPPERCASE variable names.

On Fri, Jun 1, 2018 at 11:29 AM, jstanleyx notifications@github.com wrote:

For production, I have a script named doBW that loads the data using loadBathyStack and then calls analyzeBathyCollect. loadBathyStack loads the stack data from the raw stack files (*.ras.gz) and uses lower case names.

analyzeSingleBathyRun is a simple version of doBW that doesn't have the production error checking and handling, and also uses loadBathyStack.

analyzeSingleBathyRunNotCIL loads data from the split-out and preprocessed stack data, which has variables with uppercase names.

The correct solution would be to modify analyzeSingleBathyRunNotCIL to use the upper case names for loaded variables.

On Fri, 2018-06-01 at 06:15 -0700, Katherine Brodie wrote:

@jstanleyx @RobHolman @SRHarrison @mpalmsten

So admittedly, I rarely run analyzeSingleBathyRun or the NotCIL version. I tend to run analyzeBathyCollect. I usually load the .mBW file, and then call something like this after i make the bathy structure with the params:

bathy=analyzeBathyCollect(XYZ,T,RAW,CAM,bathy);

John, how do you guys deal with this? Is there another script that reads the .mBW data? All the Duck .mBW files have XYZ, T, RAW, CAM, etc. Do you guys ever run analyzeSingleBathyRun or analyzeSingleBathyRunNotCIL?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub

https://github.com/Coastal-Imaging-Research-Network/ cBathy-Toolbox/issues/36#issuecomment-393970475, or mute the thread

https://github.com/notifications/unsubscribe-auth/AVa07VKxushmmVVxX1- UOeg2sxk84CUQks5t4YgkgaJpZM4UV-zG .

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Coastal-Imaging-Research-Network/cBathy-Toolbox/issues/36#issuecomment-393977590, or mute the thread https://github.com/notifications/unsubscribe-auth/AVa07WkBS-LpUnH54t7iLVSfVVG3O09eks5t4Y4dgaJpZM4UV-zG .

KateBrodie commented 6 years ago

@SRHarrison @jstanleyx sounds like a good solution!

SRHarrison commented 6 years ago

@jstanleyx I think it's good... seems to work fine on the various files that I have. If you're happy with it, will you please merge this into the master? This one function is the only change.

On Fri, Jun 1, 2018 at 12:22 PM, Katherine Brodie notifications@github.com wrote:

@SRHarrison https://github.com/SRHarrison @jstanleyx https://github.com/jstanleyx sounds like a good solution!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Coastal-Imaging-Research-Network/cBathy-Toolbox/issues/36#issuecomment-393984336, or mute the thread https://github.com/notifications/unsubscribe-auth/AVa07TxRpYXMQucZQrWOU5CatbMH3pIMks5t4ZR2gaJpZM4UV-zG .

KateBrodie commented 6 years ago

Fixed in commit 3ab6512.