Message Boards Message Boards

0
|
4647 Views
|
4 Replies
|
1 Total Likes
View groups...
Share
Share this post:

Edited: Locate center of floating "islands"

Posted 5 years ago

Hi,

I am working with an array that is 150x150. Typical data for the array looks like image 1 (raw data). raw data

However, if I select a subset of the original data set, you can see that there are these long gradual traces moving diagonally across (image 2). select traces And if I zoom in further you can see that the traces are made up of tiny "floating islands" with small discontinuities between them. floating islands My question this is how to "find" each of these floating islands starting from the raw data and then group the points so that they are considered separate. Is there a way to take advantage of their discontinuities? Big goal would be to locate the center of each island as well as its boundary.

POSTED BY: Cole Pierson
4 Replies
Posted 5 years ago

Update to my efforts:

Starting with a subset of my original data: enter image description here

Using some built-in filters with Mathematica I've been able to "isolate" the islands more or less with the following code:

gswla = GradientFilter[swla, 1];

This gives me a gradient matrix of the initial square matrix I was using.

enter image description here Next, I went through the matrix and put Null on anything above a threshold value that is known for this type of data.

Table[If[gswla[[i, j]] < thresh, gswla[[i, j]], Null], {i, 1, 
   Dimensions[gswla][[1]]}, {j, 1, Dimensions[gswla][[2]]}];

This then gives me a plot of all the "Islands" isolated by "no man's land" enter image description here

It is easier to see in MatrixForm: enter image description here

So using this "isolated" data, how can I group these islands into their own distinguishable cluster? I figure I can use the matrix coordinates for each cluster in the gradient matrix to identify the counterpart in the original data set.

Thanks!!!

POSTED BY: Cole Pierson
Posted 5 years ago

Have you tried the cluster analysis functionality in WL?

POSTED BY: Rohit Namjoshi
Posted 5 years ago

Yes.

I get the following result:

FindClusters::amtd: FindClusters is unable to automatically select an appropriate dissimilarity function for the input data

Maybe a For loop or Table would be able to find the boundaries?

POSTED BY: Cole Pierson
Posted 5 years ago

Hi Rohit,

Adding more feedback to your suggestion, I did try the FindClusters to the raw wavelength data and I got the following "clusters":

cluster

You can see that the algorithm didn't group by discrete wavelength islands or bands, but rather some version of descending steps. I don't know enough about the algorithm to tell if that approach is suitable for this application.

POSTED BY: Cole Pierson
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract