Investigations into the electronic and magnetic properties of (CrPS4)n layers