Bugfix: Negative phi lead to negative values in the pattern file.