function roa(tm)

trials = tm.get_trials();
%%
actions = xylobium.dledit.Action.empty();
% actions(end+1) = xylobium.dledit.Action('roa_mask', ...
%     @(d,m,e) dogbane.trial_processing.roa.roa_mask(d.tseries), ...
%     true, ...
%     false);
actions(end+1) = xylobium.dledit.Action('Detect ROA', ...
    @(d,m,e) dogbane.trial_processing.roa.highpass_roa_mask(d.tseries), ...
    true, ...
    false);
actions(end+1) = xylobium.dledit.Action('Remove small ROA', ...
    @(d,m,e) dogbane.trial_processing.roa.highpass_thresh_roa_mask(d.tseries), ...
    true, false);
actions(end+1) = xylobium.dledit.Action('ROA Ignore Tool', ...
    @(d,m,e) xylobium.roa_ignore.RoaIgnoreGUI([d.tseries],'highpass_thresh_roa_mask'), ...
    false, ...
    true);
% actions(end+1) = xylobium.dledit.Action('h roa stats', ...
%     @(d,m,e) dogbane.trial_processing.roa.highpass_roa_stats(d.tseries), ...
%     true, ...
%     false);
actions(end+1) = xylobium.dledit.Action('Process ROA events', ...
    @(d,m,e) dogbane.trial_processing.roa.highpass_roa_stats_thresh(d.tseries), ...
    true, ...
    false);
% actions(end+1) = xylobium.dledit.Action('roa_in_rois', ...
%     @(d,m,e) dogbane.trial_processing.roa.roa_in_rois(d.tseries), ...
%     true, ...
%     false);
% actions(end+1) = xylobium.dledit.Action('roa_in_each_roi', ...
%     @(d,m,e) dogbane.trial_processing.roa.roa_in_each_roi(d.tseries), ...
%     true, ...
%     false);
%%
mods = alyssum_v2.util.RecRigHasVar.empty();
mods(end+1) = alyssum_v2.util.TSeriesHasVar('roa_ignore_mask');
% mods(end+1) = alyssum_v2.util.TSeriesHasVar('roa_mask');
% mods(end+1) = alyssum_v2.util.TSeriesHasVar('roa_table');
mods(end+1) = alyssum_v2.util.TSeriesHasVar('highpass_roa_mask');
mods(end+1) = alyssum_v2.util.TSeriesHasVar('highpass_thresh_roa_mask');
mods(end+1) = alyssum_v2.util.TSeriesHasVar('highpass_roa_table');
mods(end+1) = alyssum_v2.util.TSeriesHasVar('highpass_thresh_roa_table');
% mods(end+1) = alyssum_v2.util.TSeriesHasVar('roa_frequency_trace_AS');
% mods(end+1) = alyssum_v2.util.TSeriesHasVar('roa_frequency_trace_not_AS');
% mods(end+1) = alyssum_v2.util.TSeriesHasVar('roa_frequency_trace_Gp');
% mods(end+1) = alyssum_v2.util.TSeriesHasVar('roa_roi_frequency_trace_AS');
% mods(end+1) = alyssum_v2.util.TSeriesHasVar('roa_roi_frequency_trace_Gp');
% mods(end+1) = alyssum_v2.util.TSeriesHasVar('roa_in_each_roi');
%%

initial_vars = {};
initial_vars{end+1} = 'genotype';
initial_vars{end+1} = 'trial_id';
initial_vars{end+1} = 'highpass_roa_mask';
initial_vars{end+1} = 'highpass_thresh_roa_mask';
initial_vars{end+1} = 'roa_ignore_mask';
initial_vars{end+1} = 'highpass_thresh_roa_table';
% initial_vars{end+1} = 'roa_roi_frequency_trace_Gp';
% initial_vars{end+1} = 'roa_in_each_roi';
%%
xylobium.dledit.Editor(trials, actions, initial_vars,mods);
end

