Commit aae76794 authored by Marco Selig's avatar Marco Selig

fixed: kwarg forwaring to draw_vector_nd; size keyword removed;...

fixed: kwarg forwaring to draw_vector_nd; size keyword removed; power_operator.get_random_field replaced by super.
parent ecbc4221
This diff is collapsed.
......@@ -25,7 +25,7 @@ from __future__ import division
import numpy as np
def draw_vector_nd(axes,dgrid,ps,symtype=0,fourier=False,zerocentered=False):
def draw_vector_nd(axes,dgrid,ps,symtype=0,fourier=False,zerocentered=False,kpack=None):
"""
Draws a n-dimensional field on a regular grid from a given power
......@@ -64,9 +64,12 @@ def draw_vector_nd(axes,dgrid,ps,symtype=0,fourier=False,zerocentered=False):
The drawn random field.
"""
kdict = np.fft.fftshift(nkdict(axes,dgrid,fourier))
klength = nklength(kdict)
if(kpack is None):
kdict = np.fft.fftshift(nkdict(axes,dgrid,fourier))
klength = nklength(kdict)
else:
kdict = kpack[1][kpack[0]]
klength = kpack[1]
#output is in position space
if(not fourier):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment