Skip to content

Commit 231e027

Browse files
author
Lucas
committed
Uploading the initial package files
0 parents  commit 231e027

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+5154
-0
lines changed

.gitignore

+107
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
led / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# remove the mac DS_Store files
7+
.DS_Store
8+
9+
# C extensions
10+
*.so
11+
12+
# Distribution / packaging
13+
.Python
14+
build/
15+
develop-eggs/
16+
dist/
17+
downloads/
18+
eggs/
19+
.eggs/
20+
lib/
21+
lib64/
22+
parts/
23+
sdist/
24+
var/
25+
wheels/
26+
*.egg-info/
27+
.installed.cfg
28+
*.egg
29+
MANIFEST
30+
31+
# PyInstaller
32+
# Usually these files are written by a python script from a template
33+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
34+
*.manifest
35+
*.spec
36+
37+
# Installer logs
38+
pip-log.txt
39+
pip-delete-this-directory.txt
40+
41+
# Unit test / coverage reports
42+
htmlcov/
43+
.tox/
44+
.coverage
45+
.coverage.*
46+
.cache
47+
nosetests.xml
48+
coverage.xml
49+
*.cover
50+
.hypothesis/
51+
52+
# Translations
53+
*.mo
54+
*.pot
55+
56+
# Django stuff:
57+
*.log
58+
.static_storage/
59+
.media/
60+
local_settings.py
61+
62+
# Flask stuff:
63+
instance/
64+
.webassets-cache
65+
66+
# Scrapy stuff:
67+
.scrapy
68+
69+
# Sphinx documentation
70+
docs/_build/
71+
72+
# PyBuilder
73+
target/
74+
75+
# Jupyter Notebook
76+
.ipynb_checkpoints
77+
78+
# pyenv
79+
.python-version
80+
81+
# celery beat schedule file
82+
celerybeat-schedule
83+
84+
# SageMath parsed files
85+
*.sage.py
86+
87+
# Environments
88+
.env
89+
.venv
90+
env/
91+
venv/
92+
ENV/
93+
env.bak/
94+
venv.bak/
95+
96+
# Spyder project settings
97+
.spyderproject
98+
.spyproject
99+
100+
# Rope project settings
101+
.ropeproject
102+
103+
# mkdocs documentation
104+
/site
105+
106+
# mypy
107+
.mypy_cache/

LICENSE

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (c) 2017 Greg Lucas
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is
8+
furnished to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
SOFTWARE.

MANIFEST.in

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
include README.md LICENSE
2+
include bezpy/mt/data_1d/earth_model*.txt
3+
include bezpy/mag/data/*.dat

README.md

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
Bezpy
2+
=====
3+
4+
Bezpy is an open source library for analysis of magnetic (B), electric (E),
5+
and impedance (Z) data within a geophysical framework. This library contains
6+
routines for calculating the geoelectric field from the geomagnetic field in
7+
multiple different ways.
8+
9+
##Features
10+
- Geomagnetic to geoelectric field calculations
11+
- Integration of the geoelectric field along transmission lines
12+
- Built using established, fast, open source python libraries
13+
[Pandas](http://www.pandas.pydata.org/),
14+
[NumPy](http://www.numpy.org/),
15+
[SciPy](http://www.scipy.org/)
16+
17+
## Examples
18+
> [More Examples and notebooks in docs/example/](./docs/example/)
19+
20+
The following example reads magnetic field data that in IAGA2002 format
21+
into a Pandas DataFrame.
22+
23+
```import bezpy
24+
25+
df_mag = bezpy.mag.read_iaga("mag_data_2017_BOU.iaga")
26+
df_mag.head()
27+
```
28+
29+
## Install
30+
> [More Install options in docs/install.md](./docs/install.md).
31+
32+
## License
33+
The code is released under a BSD-3 license
34+
[License described in LICENSE.md](./LICENSE.md)
35+
36+
37+
## Problems or Questions?
38+
39+
- [Report an issue using the GitHub issue tracker](http://github.com/usgs/geomag-algorithms/issues)
40+
41+
## Additional Links
42+
43+
- [USGS Geomagnetism Program Home Page](http://geomag.usgs.gov/)

bezpy/__init__.py

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Let users know if they're missing any of our hard dependencies
2+
hard_dependencies = ("numpy", "pandas", "scipy", "shapely")
3+
missing_dependencies = []
4+
5+
for dependency in hard_dependencies:
6+
try:
7+
__import__(dependency)
8+
except ImportError as e:
9+
missing_dependencies.append(dependency)
10+
11+
if missing_dependencies:
12+
raise ImportError(
13+
"Missing required dependencies {0}".format(missing_dependencies))
14+
del hard_dependencies, dependency, missing_dependencies
15+
16+
from . import mt
17+
from . import tl
18+
from . import mag

bezpy/__version__.py

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__ = '0.0.1'

bezpy/mag/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from .utils import *
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
IAGA Name Country Colatitute East Longitude Institute GIN
2+
AAA Alma Ata Kazakhstan 46.8° 76.9° IIRK Edi
3+
AAE Addis Ababa Ethiopia 80.97° 38.77° AAU, IPGP Par
4+
ABG Alibag India 71.38° 72.87° IIG Kyo
5+
ABK Abisko Sweden 21.642° 18.823° SGU Edi
6+
AIA Argentine Islands (Akademik Vernadsky base) Antarctica 155.25° 295.75° NASC Ott
7+
ALE* Alert Canada 7.503° 297.647° GSC Ott
8+
AMS Martin de Vivies-Amsterdam Island French Southern and Antarctic Lands 127.8° 77.57° EOST Par
9+
API Apia Western Samoa 103.8° 188.22° MNRE Edi
10+
AQU* L'Aquila Italy 47.62° 13.32° INGV Par
11+
ARS Arti Russia 33.567° 58.567° IG UB RAS, GCRAS Edi
12+
ASC Ascension Island United Kingdom 97.95° 345.62° BGS Edi
13+
ASP Alice Springs Australia 113.77° 133.88° GA Edi
14+
BDV Budkov Czech Republic 40.92° 14.02° ASCR Edi
15+
BEL Belsk Poland 38.16° 20.79° PAS Edi
16+
BFE* Brorfelde Denmark 34.375° 11.672° DTU Kyo
17+
BFO Black Forest Germany 41.669° 8.325° GGUKS Edi
18+
BLC Baker Lake Canada 25.682° 263.988° GSC Ott
19+
BMT Beijing Ming Tombs China 49.7° 116.2° IGGCAS Kyo
20+
BNG* Bangui Central African Republic 85.67° 18.57° IRD Par
21+
BOU Boulder United States of America 49.86° 254.76° USGS Gol
22+
BOX Borok Russia 31.93° 38.23° GCRAS, IPGP Par
23+
BRD Brandon Canada 40.13° 260.0261° GSC Ott
24+
BRW Barrow United States of America 18.68° 203.38° USGS Gol
25+
BSL Stennis Space Center United States of America 59.65° 270.36° USGS Gol
26+
CBB Cambridge Bay Canada 20.877° 254.969° GSC Ott
27+
CKI Cocos-Keeling Islands Australia 102.1875° 96.8336° GA Edi
28+
CLF Chambon la Foret France 41.98° 2.27° IPGP Par
29+
CMO College United States of America 25.13° 212.14° USGS Gol
30+
CNB Canberra Australia 125.32° 149.36° GA Edi
31+
CNH Changchun China 45.92° 124.86° CEA Edi
32+
CSY Casey Station Antarctica 156.283° 110.533° GA Edi
33+
CTA Charters Towers Australia 110.1° 146.3° GA Edi
34+
CYG Cheongyang Republic of Korea 53.63° 126.854° KMA Kyo
35+
CZT Port Alfred French Southern and Antarctic Lands 136.43° 51.87° EOST Par
36+
DED Deadhorse United States of America 19.64° 211.21° USGS Gol
37+
DLR* Del Rio United States of America 60.5° 259.08° USGS Gol
38+
DLT Dalat Vietnam 78.06° 108.48° VAST, IPGP Par
39+
DMC Dome C Antarctica 165.25° 124.167° EOST, INGV Par
40+
DOU Dourbes Belgium 39.9° 4.6° RMIB Edi
41+
DRV Dumont d'Urville Antarctica 156.67° 140.01° EOST Par
42+
DUR Duronia Italy 48.61° 14.28° INGV Par
43+
EBR Ebro Spain 49.043° 0.333° OEB Par
44+
ESK Eskdalemuir United Kingdom 34.68° 356.8° BGS Edi
45+
EYR Eyrewell New Zealand 133.474° 172.393° GNS Edi
46+
FCC Fort Churchill Canada 31.241° 265.912° GSC Ott
47+
FRD Fredericksburg United States of America 51.8° 282.63° USGS Gol
48+
FRN Fresno United States of America 52.91° 240.28° USGS Gol
49+
FUR Furstenfeldbruck Germany 41.83° 11.28° LMU Edi
50+
GAN Gan Maldives 89.3054° 73.1537° ETH Edi
51+
GCK Grocka Serbia 45.4° 20.8° GIG Edi
52+
GDH Qeqertarsuaq (Godhavn) Greenland 20.748° 306.467° DTU Kyo
53+
GLN* Glenlea Canada 40.355° 262.880° GSC Ott
54+
GNA* Gnangara Australia 121.8° 116.0° GA Edi
55+
GNG Gingin Australia 121.356° 115.715° GA Edi
56+
GUA Guam United States of America 76.41° 144.87° USGS Gol
57+
GUI Guimar-Tenerife Spain 61.68° 343.57° IGNS Par
58+
GZH Zhaoqing China 67° 112.5° CEA Edi
59+
HAD Hartland United Kingdom 39° 355.52° BGS Edi
60+
HBK Hartebeesthoek South Africa 115.88° 27.71° SANSA Edi
61+
HER Hermanus South Africa 124.43° 19.23° SANSA Edi
62+
HLP Hel Poland 35.39° 18.82° PAS Edi
63+
HON Honolulu United States of America 68.68° 202.0° USGS Gol
64+
HRB Hurbanovo Slovakia 42.14° 18.19° SAS Par
65+
HRN Hornsund Norway 13° 15.37° PAS Edi
66+
HUA Huancayo Peru 102.05° 284.67° IGP Edi
67+
HYB Hyderabad India 72.6° 78.6° NGRI, GFZ Edi
68+
IPM Isla de Pascua Mataveri (Easter Island) Chile 117.2° 250.58° DMC, IPGP Par
69+
IQA Iqaluit Canada 26.247° 291.482° GSC Ott
70+
IRT Irkutsk Russia 37.73° 104.45° ISTP SB RAS Edi
71+
ISK* Kandilli Turkey 48.9° 29.1° KEORI Edi
72+
IZN Iznik Turkey 49.5° 29.72° KEORI Edi
73+
JAI Jaipur India 63.08° 75.80° IIG Kyo
74+
JCO Jim Carrigan Observatory United States of America 19.644° 211.201° HAL, BGS Edi
75+
KAK Kakioka Japan 53.77° 140.18° JMA Kyo
76+
KDU Kakadu Australia 102.69° 132.47° GA Edi
77+
KEP King Edward Point South Georgia and the South Sandwich Islands 144.2821° 323.5071° BGS Edi
78+
KHB Khabarovsk Russia 42.39° 134.69° IKIR Edi
79+
KIV Kiev Ukraine 39.28° 30.3° NASU Edi
80+
KMH Keetmanshoop Namibia 116.54° 18.110° SANSA, GFZ Edi
81+
KNY Kanoya Japan 58.58° 130.88° JMA Kyo
82+
KOU Kourou French Guiana 84.79° 307.27° IPGP Par
83+
LER Lerwick United Kingdom 29.87° 358.82° BGS Edi
84+
LNP* Lunping Taiwan 65° 121.2° DGT Kyo
85+
LON Lonjsko Polje Croatia 44.5919° 16.6592° UNIZG Edi
86+
LOV* Lovoe Sweden 30.66° 17.82° SGU Edi
87+
LRM Learmonth Australia 112.22° 114.1° GA Edi
88+
LVV Lviv Ukraine 40.1° 23.75° NASU Edi
89+
LYC Lycksele Sweden 25.4° 18.8° SGU Edi
90+
LZH Lanzhou China 53.9° 103.84° CEA, IPGP Par
91+
MAB Manhay Belgium 39.702° 5.682° RMIB Edi
92+
MAW Mawson Antarctica 157.6° 62.88° GA Edi
93+
MBC* Mould Bay Canada 13.685° 240.638° GSC Ott
94+
MBO Mbour Senegal 75.62° 343.03° IPGP, IRD Par
95+
MCQ Macquarie Island Australia 144.5° 158.95° GA Edi
96+
MEA Meanook Canada 35.384° 246.653° GSC Ott
97+
MGD Magadan Russia 29.949° 150.728° IKIR Edi
98+
MID* Midway Island United States of America 61.79° 182.62° USGS Gol
99+
MMB Memambetsu Japan 46.09° 144.19° JMA Kyo
100+
NAQ Narsarsuaq Greenland 28.84° 314.558° DTU Kyo
101+
NCK Nagycenk Hungary 42.37° 16.72° HAS Edi
102+
NEW Newport United States of America 41.73° 242.88° USGS Gol
103+
NGK Niemegk Germany 37.93° 12.68° GFZ Edi
104+
NUR Nurmijarvi Finland 29.49° 24.66° FMI Edi
105+
NVS Novosibirsk Russia 35.15° 83.23° ASB GS SB RAS Edi
106+
ORC Orcadas Argentina 150.737° 315.26° SMN Edi
107+
OTT Ottawa Canada 44.597° 284.448° GSC Ott
108+
PAF Port-aux-Francais French Southern and Antarctic Lands 139.35° 70.26° EOST Par
109+
PAG Panagjurishte Bulgaria 47.5° 24.2° NIGGG-BAS, GFZ Edi
110+
PBQ* Poste-de-la-Baleine Canada 34.723° 282.255° GSC Ott
111+
PEG Pedeli Greece 51.9° 23.9° IGME Edi
112+
PET Paratunka Russia 37.029° 158.248° IKIR Edi
113+
PHU Phuthuy Vietnam 68.97° 105.95° VAST, IPGP Par
114+
PIL Pilar Argentina 121.4° 296.12° SMN Edi
115+
PPT Pamatai French Polynesia 107.57° 210.42° IPGP Par
116+
PST Port Stanley Falkland Islands 141.7° 302.11° BGS Edi
117+
QSB* Qsaybeh Lebanon 56.1° 35.6° NCGR, IPGP Par
118+
RES Resolute Bay Canada 15.31° 265.105° GSC Ott
119+
SBA Scott Base Antarctica 167.85° 166.78° GNS Edi
120+
SBL Sable Island Canada 46.0679° 299.9905° BGS Edi
121+
SFS San Fernando Spain 53.333° 354.055° RIOA Par
122+
SHU Shumagin United States of America 34.65° 199.54° USGS Gol
123+
SIT Sitka United States of America 32.94° 224.67° USGS Gol
124+
SJG San Juan United States of America 71.89° 293.85° USGS Gol
125+
SOD Sodankyla Finland 22.63° 26.63° SOD Edi
126+
SON Sonmiani Pakistan 64.8832° 66.4487° SUPARCO Edi
127+
SPG Saint Petersburg Russia 29.458° 29.716° GCRAS Par
128+
SPT San Pablo-Toledo Spain 50.45° 355.65° IGNS Par
129+
STJ St John's Canada 42.405° 307.323° GSC Ott
130+
SUA Surlari Romania 45.32° 26.25° GIR, GFZ Par
131+
TAM Tamanrasset Algeria 67.21° 5.53° CRAAG, IPGP Par
132+
TAN* Antananarivo Madagascar 108.917° 47.552° IOGA, EOST Par
133+
TDC Tristan da Cunha Tristan da Cunha 127.067° 347.685° GFZ, DTU Kyo
134+
TEO* Teoloyucan Mexico 70.25° 260.81° IG/UNAM Edi
135+
THL Qaanaaq (Thule) Greenland 12.53° 290.773° DTU Kyo
136+
THY Tihany Hungary 43.1° 17.89° MFGI Edi
137+
TIK* Tixie Bay Russia 18.4° 129.0° IZMIRAN NA
138+
TRW Trelew Argentina 133.3° 294.7° UNLP, RMIB Edi
139+
TSU Tsumeb Namibia 109.202° 17.584° SANSA Edi
140+
TUC Tucson United States of America 57.82° 249.27° USGS Gol
141+
UPS Uppsala Sweden 30.097° 17.353° SGU Edi
142+
VAL Valentia Ireland 38.067° 349.75° IMS Edi
143+
VIC Victoria Canada 41.48° 236.580° GSC Ott
144+
VNA Neumayer Station Ⅲ Antarctica 160.683° -8.283° AWI, GFZ Kyo
145+
VOS Vostok Antarctica 168.464° 106.835° AARI Kyo
146+
VSS Vassouras Brazil 112.4° 316.35° ON, GFZ Par
147+
WIC Conrad Observatory Austria 42.0695° 15.8657° ZAMG Edi
148+
WMQ Urumqi China 46.19° 87.71° CEA Edi
149+
WNG Wingst Germany 36.26° 9.07° GFZ Edi
150+
YAK Yakutsk Russia 28.04° 129.66° IKFIA, GFZ Edi
151+
YKC Yellowknife Canada 27.52° 245.518° GSC Ott

0 commit comments

Comments
 (0)