how to create a subset using current mask of data

9 views
Skip to first unread message

shen renjie

unread,
Dec 24, 2021, 3:38:40 AM12/24/21
to Glue users
Hi,
I have a 4D data cube and several dendrogram structures. Is there any method to convert the  data*mask to subset so we can trace different dendrogram structures in 3d volume rendering?
I tried following code but it didn't work:

d = Dendrogram.load_from(filename)
dc = DataCollection()
dc.append(load_data(cubel))
catalog=dc[0]
mask = d[105].get_mask()    
state = catalog['PRIMARY']*mask
subset_group =dc.new_subset_group('mask', state)

with ValueError:
The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()

Any help would be appreciated, thank you.

Reply all
Reply to author
Forward
0 new messages