You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
defknobs_df(my_df):
''' Extract the knob list of a pandas DF (it assumes that DF has a column called "knobs") and contanting lists Args: my_df: a pandas DF (it assumes that DF has a column called "knobs"). Returns: A data frame of knobs. '''importitertoolsimportnumpyasnpaux=list(my_df['knobs'].values)
aux=list(np.unique(list(itertools.chain.from_iterable(aux))))
my_dict={}
foriinaux:
my_dict[i]={}
filter_df=knob_df(i, my_df)
my_dict[i]['multeplicity']=len(filter_df)
my_dict[i]['dependences']=list(filter_df.index)
returnpd.DataFrame(my_dict).transpose().sort_values('multeplicity', ascending=False)
to extract and sort "by-use" the knobs of a sequence or of the global space of MAD-X.
Cheers,
The text was updated successfully, but these errors were encountered:
Hi,
I would also add
to extract and sort "by-use" the knobs of a sequence or of the global space of MAD-X.
Cheers,
The text was updated successfully, but these errors were encountered: