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

Handle mercator infinity projection at 90,-90 #1552

Merged
merged 11 commits into from
Sep 21, 2015
Merged

Handle mercator infinity projection at 90,-90 #1552

merged 11 commits into from
Sep 21, 2015

Conversation

aashish24
Copy link
Contributor

Not ready for review yet.. just wanted to push for buildbot.

@aashish24
Copy link
Contributor Author

Ref #1552

@doutriaux1
Copy link
Contributor

130 or so failures! Wow congrats @aashish24 😉

@doutriaux1
Copy link
Contributor

LGTM merging. 😉

@aashish24
Copy link
Contributor Author

Goes with CDAT/uvcdat-testdata#64

@aashish24
Copy link
Contributor Author

@doutriaux1 yes, we should make a rule to merge only those branches that can bring atleast 100+ test failures -:).

Ready for review. One thing I noted (which I am not sure if caused by my branch), is that the text in the rendered plot overlaps slightly with the visualization. I am not sure if that is something related.

@@ -94,11 +94,27 @@ def putMaskOnVTKGrid(data, grid, actorColor=None, cellData=True, deep=True):
grid.GetPointData().AddArray(ghost)
return mapper

def handleProjectionEdgeCases(projName, data):
# For mercator projection, latitude values of -90 or 90
# transformation result in infinity values. We chose -85, 85
Copy link
Contributor

Choose a reason for hiding this comment

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

Technically, 85.051129 is used because that makes the domain a square in projected coordinates.
https://en.wikipedia.org/wiki/Web_Mercator#Formulas

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jbeezley sure, but matplotlib uses 85.0 and so as some other tools. For UV-CDAT since we scale the plot, which makes it a rectangle anyways but I am willing to change it to 85.051129 if that is preferred.

Copy link
Contributor

Choose a reason for hiding this comment

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

No 85.0 is close enough for any practical purpose, I was just pointing out that it isn't a magic number chosen arbitrarily. It is derived for a reason.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure, yup, I knew -:) but you are right not everyone would know. On a related note, matplotlib has a threshold option as well that I would like to add at some point.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

On this, I would like to propose that VCS do not scale the viewport but that's something I need to bring up in some meeting. The idea is to fill the screen but to me anytime you use a projection, it really comes out distorted.

Copy link
Contributor

Choose a reason for hiding this comment

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

👍 The aspect ratio of the projection should always be 1:1.

@aashish24
Copy link
Contributor Author

Ref: #587

@aashish24
Copy link
Contributor Author

@doutriaux1 some of tests are failing because of the bad testdata branch. I repushed it.

@doutriaux1
Copy link
Contributor

@aashish24 one test failed and no flake8.

@doutriaux1
Copy link
Contributor

@aashish24 I'm fixing annie should be able to run the build soon after is merged #1551

@aashish24
Copy link
Contributor Author

@doutriaux1 all of the tests should pass now.

@aashish24
Copy link
Contributor Author

@doutriaux1 ready to be merged.. all tests are passing.

@aashish24
Copy link
Contributor Author

@doutriaux1 looks like RH6 is not pulling the right branch for test-data

@doutriaux1
Copy link
Contributor

@aashish24 I wonder if ctest forces it back to master branch? I will take a look. The history show a successful switch to fix_mercator branch.

@aashish24
Copy link
Contributor Author

@doutriaux1 I am going to merge this branch soon since all of the tests are passing now.

@doutriaux1
Copy link
Contributor

Please keep it open I will merge it. I need to figure out why the bots don't check the correct branch

@doutriaux1
Copy link
Contributor

@aashish24 seems like my bots are out of sync with the master branch, going to update them and retrigger the builds. Please hold on.

@aashish24
Copy link
Contributor Author

@doutriaux1 ping!!

@doutriaux1
Copy link
Contributor

let me try locallly

@doutriaux1
Copy link
Contributor

@aashish24 I get a slight diff on my ubuntu: https://open.cdash.org/viewTest.php?onlyfailed&buildid=4017404

x = vcs.init()
iso = x.createisofill()
iso.projection = "mercator"
x.plot(s(latitude=(-90, 90)), iso)
Copy link
Contributor

Choose a reason for hiding this comment

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

@aashish24 please use setbgdimension and plot in bg=1

Copy link
Contributor

Choose a reason for hiding this comment

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

I suspect the slight diff on my ubunutu maybe due to default size being to small.

@aashish24
Copy link
Contributor Author

@doutriaux1 I have pushed changes as suggested. I may have to upload a new baseline as well.

@doutriaux1
Copy link
Contributor

@aashish24 thanks

@aashish24
Copy link
Contributor Author

@doutriaux1 ready for your review.

@doutriaux1
Copy link
Contributor

I don't understand why the bots do not check the correct uvcdat-testdata, running the command locally works...

doutriaux1 added a commit that referenced this pull request Sep 21, 2015
Handle mercator infinity projection at 90,-90

##bot##skip-commit
@doutriaux1 doutriaux1 merged commit 931d41e into master Sep 21, 2015
@doutriaux1 doutriaux1 deleted the fix_mercator branch September 21, 2015 23:57
@durack1
Copy link
Member

durack1 commented Sep 22, 2015

@doutriaux1 maybe get the ENV to be printed to the log to see what the problem is..

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.

4 participants