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

Add support for datetime axis on Image #2023

Merged
merged 14 commits into from
Oct 27, 2017
Merged

Add support for datetime axis on Image #2023

merged 14 commits into from
Oct 27, 2017

Conversation

philippjfr
Copy link
Member

@philippjfr philippjfr commented Oct 26, 2017

Adds support for datetime axes on Image, SheetCoordinateSystem, BoundingBox and Slice. The basics are all working including instantiation of an Image with datetime bounds and slicing and indexing. Will make it possible to generate datashaded images with datetime axes.

screen shot 2017-10-26 at 4 27 42 am

@jbednar
Copy link
Member

jbednar commented Oct 26, 2017

Excellent!!!

@philippjfr
Copy link
Member Author

Since this is the first modification to SheetCoordinateSystem and BoundingBox since it moved into HoloViews, one of @jbednar and @ceball can have the great honor of reviewing this PR.

@philippjfr
Copy link
Member Author

While I think Image will correctly retain timezone information, I think datashade operations will discard them. I can't say I have a strong desire to tackle that issue right now.

@jbednar
Copy link
Member

jbednar commented Oct 26, 2017

Since I got to it first, I will nominate @ceball. :-)

@philippjfr
Copy link
Member Author

Needs lots of tests still of course.

@philippjfr
Copy link
Member Author

Also worth noting that it's currently using microsecond precision, switching to nanosecond precision introduces issues that are hard to handle correctly.

@jbednar
Copy link
Member

jbednar commented Oct 26, 2017

When this is done, maybe open an issue about the nanosecond precision issues and say that it's not something we expect to fix, but that if someone wants to use it for that purpose then here's what they would need to fix.

@philippjfr
Copy link
Member Author

Okay, this is ready to review now. I've added a bunch of unit tests for the utilities and for the interfaces. Iris does not like datetime coordinates apparently so I've had to skip those tests.

@philippjfr
Copy link
Member Author

This output:

HoloMap containing 28 items of type RGB
---------------------------------------

Key Dimensions: 
Date: Oct 25 2012 01:00 UTC...Nov 02 2012 16:00 UTC 
Layer Height (hPa): 850...1000 
Constant Dimensions: 
Frame: None...None 
Deep Dimensions: 
x: 0...400.0 
y: 0...350.0
R: 0...1 
G: 0...1 
B: 0...1 

changed to this:

HoloMap containing 28 items of type RGB
---------------------------------------

Key Dimensions: 
Date: Oct 25 2012 01:00 UTC...Nov 02 2012 16:00 UTC 
Layer Height (hPa): 850...1000 
Constant Dimensions: 
Frame: None...None 
Deep Dimensions: 
x: 0...400 
y: 0...350 
R: 0...1 
G: 0...1 
B: 0...1 

The latter is more correct so I've updated the test data but the push build isn't pulling it for some reason. It should still work so this can be merged after review.

@philippjfr
Copy link
Member Author

I'm going to go ahead and merge this myself since other work depends on it and the best smoke test is likely using it a lot in action. @ceball promised he'd take a more in depth look even after merging.

@philippjfr philippjfr merged commit b129189 into master Oct 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants