nbia-astro / skeletor

Parallel PIC code written in Python and based on the skeleton codes provided by PICKSC
GNU General Public License v3.0
1 stars 0 forks source link

Flake8 #125

Closed tobson closed 7 years ago

tobson commented 7 years ago

@tberlok Please check if this line is correct. I made this change just so that it looks more similar to the corresponding code in the InitialCondition class.

tobson commented 7 years ago

Also, not that I see an immediate use case for this, but we could also get a noisy start with a coherent density perturbation by letting U be a uniformly distributed random number, right?

tberlok commented 7 years ago

Regarding the noisy start: That should work, yes.

tberlok commented 7 years ago

Regarding the lines: I think this will not work anymore as kyy1 will not be the same as before. So if y1 is in grid units ky should be iky2*pi/ny.

I think I prefer the previous solution where we converted just before storing the result in the particle array.

tobson commented 7 years ago

In DensityPerturbation.__call__(), the new y1 isn't actually in grid units. I just changed the expression so that it's y1 as defined in InitialCondition.__call__() times manifold.dy.

tobson commented 7 years ago

I'll merge this in if this test succeeds. It has Lx=4 so it should be sensitive to not getting the units of the particle positions right.

tberlok commented 7 years ago

You need to add sympy to requirements.txt

tobson commented 7 years ago

I love GitHub.

tberlok commented 7 years ago

We can rebase and merge now, right?

tobson commented 7 years ago

Yep.