Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
lscsoft
lalsuite
Commits
536309b2
Commit
536309b2
authored
Mar 24, 2017
by
Leo Pound Singer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Drop monkeypatch for unsupported version of Matplotlib
Original: 5fb180c7e2e0c73657f0e333f5183fda816d3f23
parent
0bc97412
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
35 deletions
+1
-35
lalinference/python/lalinference/plot/allsky.py
lalinference/python/lalinference/plot/allsky.py
+1
-35
No files found.
lalinference/python/lalinference/plot/allsky.py
View file @
536309b2
...
@@ -44,41 +44,7 @@ import numpy as np
...
@@ -44,41 +44,7 @@ import numpy as np
if
mpl_version
>=
'1.3.0'
:
if
mpl_version
>=
'1.3.0'
:
FixedMollweideAxes
=
MollweideAxes
FixedMollweideAxes
=
MollweideAxes
elif
mpl_version
<
'1.2.0'
:
elif
mpl_version
<
'1.2.0'
:
class
FixedMollweideAxes
(
MollweideAxes
):
raise
NotImplemented
(
'This module requires matplotlib >= 1.2.0. You have matplotlib {}.'
.
format
(
mpl_version
))
"""Patched version of matplotlib's Mollweide projection that implements a
correct inverse transform."""
class
FixedMollweideTransform
(
MollweideAxes
.
MollweideTransform
):
def
inverted
(
self
):
return
FixedMollweideAxes
.
InvertedFixedMollweideTransform
(
self
.
_resolution
)
inverted
.
__doc__
=
Transform
.
inverted
.
__doc__
class
InvertedFixedMollweideTransform
(
MollweideAxes
.
InvertedMollweideTransform
):
def
inverted
(
self
):
return
FixedMollweideAxes
.
FixedMollweideTransform
(
self
.
_resolution
)
inverted
.
__doc__
=
Transform
.
inverted
.
__doc__
def
transform
(
self
,
xy
):
x
=
xy
[:,
0
:
1
]
y
=
xy
[:,
1
:
2
]
sqrt2
=
np
.
sqrt
(
2
)
sintheta
=
y
/
sqrt2
with
np
.
errstate
(
invalid
=
'ignore'
):
costheta
=
np
.
sqrt
(
1.
-
0.5
*
y
*
y
)
longitude
=
0.25
*
sqrt2
*
np
.
pi
*
x
/
costheta
latitude
=
np
.
arcsin
(
2
/
np
.
pi
*
(
np
.
arcsin
(
sintheta
)
+
sintheta
*
costheta
))
return
np
.
concatenate
((
longitude
,
latitude
),
1
)
transform
.
__doc__
=
Transform
.
transform
.
__doc__
transform_non_affine
=
transform
def
_get_core_transform
(
self
,
resolution
):
return
self
.
FixedMollweideTransform
(
resolution
)
projection_registry
.
register
(
FixedMollweideAxes
)
else
:
else
:
class
FixedMollweideAxes
(
MollweideAxes
):
class
FixedMollweideAxes
(
MollweideAxes
):
"""Patched version of matplotlib's Mollweide projection that implements a
"""Patched version of matplotlib's Mollweide projection that implements a
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment