Production of magnetic materials and devices: Dots and MTJ