RF: refactor setting of header dtype

Slightly easier to read, I think.
RF: generator to provide PAR files for tests

Refactor PAR file fetching and opening into a generator.