layer_to_matrix function

Get stars layer values as matrix