Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing meshgrid to mgrid - fixing gdX, gdY and ext_x, ext_y for 2D kCS... #7

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ccluri
Copy link

@ccluri ccluri commented May 4, 2015

Fixing issue #6

@parkag
Copy link
Member

parkag commented May 5, 2015

2D reconstructions for different gdX and gdY look better indeed! However this pull request is not pep8 compliant (lines longer than 80 chars).

It also breaks tests - which means these should be rethought, I believe they are not valid anymore.
The original idea was to test if pykCSD returns the same results as the previous kCSD Matlab scripts.

I think the old tests should be gradually dropped and more unit tests should be added.
This could be a good moment to start it.

lin_y = np.linspace(self.ymin, self.ymax, ny)
self.space_X, self.space_Y = np.meshgrid(lin_x, lin_y)
self.space_X, self.space_Y = np.mgrid[self.xmin:self.xmax:np.complex(0,nx),
self.ymin:self.ymax:np.complex(0,ny)]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To avoid long lines:

        self.space_X, self.space_Y = np.mgrid[
            self.xmin:self.xmax:np.complex(0,nx),
            self.ymin:self.ymax:np.complex(0,ny)
        ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants