Skip to content

Commit b873309

Browse files
authored
Merge pull request #39 from rstoneback/develop
Name Update
2 parents 561d965 + bdd4905 commit b873309

19 files changed

Lines changed: 378 additions & 349 deletions

.travis.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,30 +16,33 @@ before_install:
1616
- pip install pytest-cov
1717
- pip install coveralls
1818
- pip install future
19-
# Install version specific packages for 2.7 and 3.5
2019
- pip install 'pandas<0.25'
21-
- pip install xarray
20+
- pip install 'xarray<0.15'
21+
# Install version specific packages for 2.7 and 3.5
2222
- pip install matplotlib
2323
- pip install apexpy
2424
- pip install numpy
2525
- pip install pysatCDF >/dev/null
2626
- cd ..
2727
- git clone https://github.com/pysat/pysat.git >/dev/null
28-
- cd ./pysat
28+
- cd ./pysat # set up data directory
29+
- git checkout develop
30+
- git pull origin develop
2931
- python setup.py install >/dev/null
3032
- cd ..
31-
# set up data directory
33+
34+
# set up data directory
3235
- mkdir /home/travis/build/pysatData
3336
- python -c 'import pysat; pysat.utils.set_data_dir("/home/travis/build/pysatData")'
3437

3538
install:
36-
# install pysatMagVect
37-
- cd ./pysatMagVect
39+
# install OMMBV
40+
- cd ./OMMBV
3841
- python setup.py develop
3942

4043
# command to run tests
4144
script:
42-
- nosetests -vs --with-coverage --cover-package=pysatMagVect
45+
- nosetests -vs --with-coverage --cover-package=OMMBV
4346

4447
after_success:
4548
- coveralls

MANIFEST.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
include pysatMagVect/version.txt
1+
include OMMBV/version.txt
22
include LICENSE
33
include CONTRIBUTING.md
4-
prune pysatMagVect/tests
4+
prune OMMBV/tests
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
on_rtd = os.environ.get('ONREADTHEDOCS') == 'True'
99

1010
if not on_rtd:
11-
from pysatMagVect import igrf
11+
from OMMBV import igrf
1212
else:
1313
igrf = None
1414

15-
from pysatMagVect import _core
16-
from pysatMagVect._core import *
17-
from pysatMagVect import satellite
15+
from OMMBV import _core
16+
from OMMBV._core import *
17+
from OMMBV import satellite
1818

1919
__all__ = []
File renamed without changes.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
import datetime
1010
import pysat
1111
# import reference IGRF fortran code within the package
12-
from pysatMagVect import igrf as igrf
13-
import pysatMagVect.fortran_coords
12+
from OMMBV import igrf as igrf
13+
import OMMBV.fortran_coords
1414

1515
# parameters used to define Earth ellipsoid
1616
# WGS84 parameters below
@@ -111,7 +111,7 @@ def geodetic_to_ecef(latitude, longitude, altitude):
111111
return x, y, z
112112

113113

114-
ecef_to_geodetic = pysatMagVect.fortran_coords.ecef_to_geodetic
114+
ecef_to_geodetic = OMMBV.fortran_coords.ecef_to_geodetic
115115

116116

117117
def python_ecef_to_geodetic(x, y, z, method=None):
File renamed without changes.
Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
import pysatMagVect as pymv
1+
import OMMBV as OMMBV
22

33

4-
def add_mag_drift_unit_vectors_ecef(inst, **kwargs):
4+
def add_mag_drift_unit_vectors_ecef(inst, lat_label='latitude', long_label='longitude',
5+
alt_label='altitude', **kwargs):
56
"""Adds unit vectors expressing the ion drift coordinate system
67
organized by the geomagnetic field. Unit vectors are expressed
78
in ECEF coordinates.
@@ -10,8 +11,6 @@ def add_mag_drift_unit_vectors_ecef(inst, **kwargs):
1011
----------
1112
inst : pysat.Instrument
1213
Instrument object that will get unit vectors
13-
max_steps : int
14-
Maximum number of steps allowed for field line tracing
1514
**kwargs
1615
Passed along to calculate_mag_drift_unit_vectors_ecef
1716
@@ -27,11 +26,11 @@ def add_mag_drift_unit_vectors_ecef(inst, **kwargs):
2726
"""
2827

2928
# add unit vectors for magnetic drifts in ecef coordinates
30-
zvx, zvy, zvz, bx, by, bz, mx, my, mz = pymv.calculate_mag_drift_unit_vectors_ecef(inst['latitude'],
31-
inst['longitude'],
32-
inst['altitude'],
33-
inst.data.index,
34-
**kwargs)
29+
zvx, zvy, zvz, bx, by, bz, mx, my, mz = OMMBV.calculate_mag_drift_unit_vectors_ecef(inst[lat_label],
30+
inst[long_label],
31+
inst[alt_label],
32+
inst.index,
33+
**kwargs)
3534

3635
inst['unit_zon_ecef_x'] = zvx
3736
inst['unit_zon_ecef_y'] = zvy
@@ -168,7 +167,8 @@ def add_mag_drift_unit_vectors_ecef(inst, **kwargs):
168167
return
169168

170169

171-
def add_mag_drift_unit_vectors(inst, **kwargs):
170+
def add_mag_drift_unit_vectors(inst, lat_label='latitude', long_label='longitude',
171+
alt_label='altitude', **kwargs):
172172
"""Add unit vectors expressing the ion drift coordinate system
173173
organized by the geomagnetic field. Unit vectors are expressed
174174
in S/C coordinates.
@@ -198,19 +198,20 @@ def add_mag_drift_unit_vectors(inst, **kwargs):
198198
"""
199199

200200
# vectors are returned in geo/ecef coordinate system
201-
add_mag_drift_unit_vectors_ecef(inst, **kwargs)
201+
add_mag_drift_unit_vectors_ecef(inst, lat_label=lat_label, long_label=long_label,
202+
alt_label=alt_label,**kwargs)
202203
# convert them to S/C using transformation supplied by OA
203-
inst['unit_zon_x'], inst['unit_zon_y'], inst['unit_zon_z'] = pymv.project_ecef_vector_onto_basis(
204+
inst['unit_zon_x'], inst['unit_zon_y'], inst['unit_zon_z'] = OMMBV.project_ecef_vector_onto_basis(
204205
inst['unit_zon_ecef_x'], inst['unit_zon_ecef_y'], inst['unit_zon_ecef_z'],
205206
inst['sc_xhat_x'], inst['sc_xhat_y'], inst['sc_xhat_z'],
206207
inst['sc_yhat_x'], inst['sc_yhat_y'], inst['sc_yhat_z'],
207208
inst['sc_zhat_x'], inst['sc_zhat_y'], inst['sc_zhat_z'])
208-
inst['unit_fa_x'], inst['unit_fa_y'], inst['unit_fa_z'] = pymv.project_ecef_vector_onto_basis(
209+
inst['unit_fa_x'], inst['unit_fa_y'], inst['unit_fa_z'] = OMMBV.project_ecef_vector_onto_basis(
209210
inst['unit_fa_ecef_x'], inst['unit_fa_ecef_y'], inst['unit_fa_ecef_z'],
210211
inst['sc_xhat_x'], inst['sc_xhat_y'], inst['sc_xhat_z'],
211212
inst['sc_yhat_x'], inst['sc_yhat_y'], inst['sc_yhat_z'],
212213
inst['sc_zhat_x'], inst['sc_zhat_y'], inst['sc_zhat_z'])
213-
inst['unit_mer_x'], inst['unit_mer_y'], inst['unit_mer_z'] = pymv.project_ecef_vector_onto_basis(
214+
inst['unit_mer_x'], inst['unit_mer_y'], inst['unit_mer_z'] = OMMBV.project_ecef_vector_onto_basis(
214215
inst['unit_mer_ecef_x'], inst['unit_mer_ecef_y'], inst['unit_mer_ecef_z'],
215216
inst['sc_xhat_x'], inst['sc_xhat_y'], inst['sc_xhat_z'],
216217
inst['sc_yhat_x'], inst['sc_yhat_y'], inst['sc_yhat_z'],

0 commit comments

Comments
 (0)