apply_cut function

Applies the datacut based on the datacut flagging variables