Commit fe6f2816 authored by Stefan Mauerberger's avatar Stefan Mauerberger
Browse files

Sstripped GPL header from doc-strings

parent 2722467d
Package Documentation
=====================
Attributes exposed to the package
.. automodule:: pymagglobal
:members:
.. todo:: Fix URL for the package i.e. `pymagglobal/__init__.py`
Pymagglobal
***********
The core module
.. automodule:: pymagglobal.pymagglobal
:members:
Utilities
*********
.. automodule:: pymagglobal.utils
:members:
Argument Parser & Main Program
******************************
.. automodule:: pymagglobal.__main__
:members:
Commands
********
Just a bunch of wrapper functions
.. automodule:: pymagglobal.pymagglobal
.. automodule:: pymagglobal.commands
:members:
'''
Copyright (C) 2020 Helmholtz Centre Potsdam GFZ,
German Research Centre for Geosciences, Potsdam, Germany
Cite as:
TODO
This file is part of pymagglobal.
pymagglobal is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
pymagglobal is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with pymagglobal. If not, see <https://www.gnu.org/licenses/>.
# Copyright (C) 2020 Helmholtz Centre Potsdam GFZ,
# German Research Centre for Geosciences, Potsdam, Germany
#
# Cite as:
# TODO
#
# This file is part of pymagglobal.
#
# pymagglobal is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# pymagglobal is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with pymagglobal. If not, see <https://www.gnu.org/licenses/>.
'''The package exposes selected attributes of sub-modules ...
.. todo:: Doc-string of the module missing.
'''
# expose only utilities and core modules
......
'''
This is the main module of pymagglobal. It is called when using the command
line interface.
Copyright (C) 2020 Helmholtz Centre Potsdam GFZ,
German Research Centre for Geosciences, Potsdam, Germany
Cite as:
TODO
This file is part of pymagglobal.
pymagglobal is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
pymagglobal is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with pymagglobal. If not, see <https://www.gnu.org/licenses/>.
# This is the main module of pymagglobal. It is called when using the command
# line interface.
#
# Copyright (C) 2020 Helmholtz Centre Potsdam GFZ,
# German Research Centre for Geosciences, Potsdam, Germany
#
# Cite as:
# TODO
#
# This file is part of pymagglobal.
#
# pymagglobal is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# pymagglobal is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with pymagglobal. If not, see <https://www.gnu.org/licenses/>.
'''The contents will be executed when the pymagglobal is run with -m switch.
.. todo:: Doc-string of the module missing.
'''
import sys
......@@ -99,7 +101,7 @@ def argument_parser():
f'not given, use the latest year '
f'possible')
# the subparser for commands
subparsers = parser.add_subparsers(dest='command', required=True)
subparsers = parser.add_subparsers(dest='command')#, required=True)
# parser for the master curve handling
mst_parser = subparsers.add_parser('master', help=f'create a master curve '
f'for a specific location',
......
'''
This module contains the commands that are used by the main module of
pymagglobal.
Copyright (C) 2020 Helmholtz Centre Potsdam GFZ,
German Research Centre for Geosciences, Potsdam, Germany
Cite as:
TODO
This file is part of pymagglobal.
pymagglobal is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
pymagglobal is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with pymagglobal. If not, see <https://www.gnu.org/licenses/>.
# This module contains the commands that are used by the main module of
# pymagglobal.
#
# Copyright (C) 2020 Helmholtz Centre Potsdam GFZ,
# German Research Centre for Geosciences, Potsdam, Germany
#
# Cite as:
# TODO
#
# This file is part of pymagglobal.
#
# pymagglobal is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# pymagglobal is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with pymagglobal. If not, see <https://www.gnu.org/licenses/>.
'''Just a bunch of functions ...
.. todo:: Doc-string missing in module.
'''
from warnings import warn
......
'''
This is the core module of pymagglobal. It contains the function
file2splines, which creates a BSpline object from a coefficient file and
funtions that evaluate such an object to calculate different quantities of
interest. See the README file in the repository for further information.
Copyright (C) 2020 Helmholtz Centre Potsdam GFZ,
German Research Centre for Geosciences, Potsdam, Germany
Cite as:
TODO
This file is part of pymagglobal.
pymagglobal is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
pymagglobal is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with pymagglobal. If not, see <https://www.gnu.org/licenses/>.
# This is the core module of pymagglobal. It contains the function
# file2splines, which creates a BSpline object from a coefficient file and
# funtions that evaluate such an object to calculate different quantities of
# interest. See the README file in the repository for further information.
#
# Copyright (C) 2020 Helmholtz Centre Potsdam GFZ,
# German Research Centre for Geosciences, Potsdam, Germany
#
# Cite as:
# TODO
#
# This file is part of pymagglobal.
#
# pymagglobal is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# pymagglobal is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with pymagglobal. If not, see <https://www.gnu.org/licenses/>.
'''The core module of pymmagglobal ...
.. todo:: Doc-string of the module missing.
'''
import os
......
'''
This module contains utilility routines for pymagglobal.
Copyright (C) 2020 Helmholtz Centre Potsdam GFZ,
German Research Centre for Geosciences, Potsdam, Germany
Cite as:
TODO
This file is part of pymagglobal.
pymagglobal is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
pymagglobal is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with pymagglobal. If not, see <https://www.gnu.org/licenses/>.
# This module contains utilility routines for pymagglobal.
#
# Copyright (C) 2020 Helmholtz Centre Potsdam GFZ,
# German Research Centre for Geosciences, Potsdam, Germany
#
# Cite as:
# TODO
#
# This file is part of pymagglobal.
#
# pymagglobal is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# pymagglobal is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with pymagglobal. If not, see <https://www.gnu.org/licenses/>.
'''Utility functions
.. todo:: Doc-string of the module missing.
'''
import numpy as np
......@@ -28,9 +30,11 @@ import numpy as np
# some names and labels that are used multiple times
names = {'dif': ['Declination', 'Inclination', 'Intensity'],
'nez': ['North', 'East', 'Down']}
"""Doc-string missing ... """
labels = {'dif': [r'D [deg.]', r'I [deg.]', r'F [nT]'],
'nez': [r'N [nT]', r'E [nT]', r'Z [nT]']}
"""Doc-string missing ... """
def nicelabel(label):
......@@ -42,6 +46,10 @@ def nicelabel(label):
def nez2dif(n, e, z):
''' transform north, east, down field components to declination,
inclination and intensity
Example
-------
>>> nez2dif(1, 1, 1)
'''
return np.rad2deg(np.arctan2(e, n)), \
np.rad2deg(np.arctan2(z, np.sqrt(n**2 + e**2))), \
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment