Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
sec23
korte
pymagglobal
Commits
95896eb8
Commit
95896eb8
authored
Aug 26, 2021
by
Maximilian Schanner
Browse files
Merge branch 'master' into 'geodetic'
# Conflicts: # pymagglobal/__init__.py
parents
1ae816fb
a2153a5a
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
pymagglobal/__init__.py
View file @
95896eb8
...
@@ -29,14 +29,14 @@ used in the geomagnetism community to evaluate global field models. It can be
...
@@ -29,14 +29,14 @@ used in the geomagnetism community to evaluate global field models. It can be
applied to all cubic-spline based geomagnetic field models stored in the same
applied to all cubic-spline based geomagnetic field models stored in the same
file format as gufm1 or the CALSxk model series.
file format as gufm1 or the CALSxk model series.
The package exposes several methods that can be applied to models or splines
representing
The package exposes several methods that can be applied to models or splines
a model. To acces the models, use the `Model` class or its
attribute
representing
a model. To acces the models, use the `Model` class or its
`Model.splines`. With the `models` dictionary, several built-in
models can be
attribute
`Model.splines`. With the `models` dictionary, several built-in
accessed, see also the `list of included models
models can be
accessed, see also the `list of included models
<overview.html#included-models>`__.
<overview.html#included-models>`__.
'''
'''
# expose only utilities and core m
odule
s
# expose only utilities and core m
ember
s
__all__
=
[
'local_curve'
,
'dipole_series'
,
'file2splines'
,
'field'
,
__all__
=
[
'local_curve'
,
'dipole_series'
,
'file2splines'
,
'field'
,
'built_in_models'
,
'coefficients'
,
'utils'
,
'secular_variation'
,
'built_in_models'
,
'coefficients'
,
'utils'
,
'secular_variation'
,
'power_spectrum'
,
'Model'
]
'power_spectrum'
,
'Model'
]
...
...
pymagglobal/_commands.py
View file @
95896eb8
...
@@ -27,6 +27,15 @@ from matplotlib import pyplot as plt
...
@@ -27,6 +27,15 @@ from matplotlib import pyplot as plt
from
pymagglobal
import
core
from
pymagglobal
import
core
from
pymagglobal
import
utils
from
pymagglobal
import
utils
from
urllib.error
import
URLError
from
warnings
import
warn
class
TimeOutWarning
(
Warning
):
'''Just to give the warning a meaningful name.
'''
pass
def
args2times
(
args
):
def
args2times
(
args
):
'''Read the range of the model and create a linear array to evaluate it.
'''Read the range of the model and create a linear array to evaluate it.
...
@@ -576,7 +585,12 @@ def maps(args, fig=None):
...
@@ -576,7 +585,12 @@ def maps(args, fig=None):
cmap
=
cmaps
[
it
],
cmap
=
cmaps
[
it
],
levels
=
levels
[
it
],
levels
=
levels
[
it
],
extend
=
extends
[
it
])
extend
=
extends
[
it
])
axs
[
it
].
coastlines
(
alpha
=
0.8
,
lw
=
0.5
)
try
:
axs
[
it
].
coastlines
(
alpha
=
0.8
,
lw
=
0.5
)
except
URLError
:
warn
(
'Server connection timed out. Coastlines could not be '
'loaded.'
,
category
=
TimeOutWarning
)
axs
[
it
].
set_global
()
axs
[
it
].
set_global
()
axs
[
it
].
set_title
(
f
'
{
utils
.
_names
[
args
.
type
][
it
]
}
[
{
units
[
it
]
}
]'
)
axs
[
it
].
set_title
(
f
'
{
utils
.
_names
[
args
.
type
][
it
]
}
[
{
units
[
it
]
}
]'
)
colaxs
[
it
].
tick_params
(
labelsize
=
12
)
colaxs
[
it
].
tick_params
(
labelsize
=
12
)
...
...
Write
Preview
Supports
Markdown
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