function [so] = assignbsmask(s, pixels, bsmask_configuration, state)
%SAXS/ASSIGNBSMASK passes mask-related data to the SAXS structure.

% Make sure the first argument is a SAXS object.
if ~ (nargin > 0 && isa(s, 'saxs'))
    error('The first argument must be a SAXS image object.')
end

so=s;
so.bsmask_pixels =   pixels;
so.bsmask_configuration = bsmask_configuration;
so.reduction_state = state;


