Q:

What is required to produce rocket quality methane fuel and oxygen from Mars' atmosphere?

Turning $\require{mhchem}\ce{CO2}$ and some hydrogen into $\ce{O2}$ and $\ce{CH4}$ seems pretty straightforward and has been known since early chemistry in the 19th century. But what about the quality, the purity of the fuel produced? Kerosene rockets use highly refined kerosene, would they still work with low grade kerosene? How sensitive is a methane rocket engine (like the Raptor under development), and especially reusable engines, to impurities in $\ce{CH4}$ and $\ce{O2}$? Is it challenging to produce pure enough rocket fuel and oxidizer on Mars, compared to just producing some of it? And doesn't it require quite a gear to cool and pressurize them to liquids in fuel tanks?
The illustration below, of the oxygen extracting MOXIE payload planned for the Mars 2020 rover, kind of hints that it isn't as trivial as the chemical formula suggests. Will MOXIE produce (not liquefied I suppose) oxygen pure enough for use in a rocket engine?

A:

That is the beauty of rocket engines, you can put almost whatever you want into them, and they still kinda work. (That said, I see that as beauty, engineers just scream in terror.)
Joking aside, there is actually a little bit of truth in that, rocket propellant specifications are not that strict. For example, the original specifications for RP-1 just limited the amount of sulphur and components inducing polymerization. Pretty much everything could pass as rocket fuel. (Ignition, by John D. Clarke has some fascinating information on that.) For methane fuel, contamination would likely be larger hydrocarbons, falling inside the range of kerosene, thereby providing no harm.
The MOXIE is an oxygenator, splitting $CO_2$ into $CO$ and $O_2$. The diagram has something labelled "cryocooler", so I presume it does actually produce liquid oxygen. Here is the thing: Even regular rockets does not burn their fuel completely! It actually helps performance. Most extreme is liquid hydrogen burning rockets, only using about half the fuel. So in a hydrocarbon propellant combination, you already have to deal with half-burned fuel, with species like $CO$ present. That means that really pure oxygen is not that important, and limited purity ISRU propellants are fine, within reasonable limits. Note that even if a little contamination is OK, it must be a homogeneous mix in your tanks, otherwise you have to deal with random combustion instability. The MOXIE $O_2$ is good enough for rockets, the real issue is producing enough of it. MOXIE is just a small scale test, and even a full scale system is going to require months if not years to produce enough fuel to ascend back into orbit.

A:

What is in Mars atmosphere? About 95.3 % CO2, 2.7 % nitrogen, 1.6 % argon and some water vapour and a lot of dust. The produced liquid oxygen should not contain water ice or dust, but a little nitrogen or argon would not harm, they would be liquid too. Liquid CH4 should not contain water ice or dust, but a little nitrogen or argon would be gaseous at the temperature of liquid CH4. CO2 is solid at the temperatures of LOX and LCH4. Therefore all remaining solids like dust, water ice and frozen CO2 should be removed.

