Skip to content

Commit

Permalink
Moved cnofs, csswe, de2, dscovr, elfin, equator_s, erg, fast, geotail…
Browse files Browse the repository at this point in the history
…, goes, image, kompsat, kyoto to projects
  • Loading branch information
jameswilburlewis committed Aug 24, 2024
1 parent 4bf741a commit e2bea2c
Show file tree
Hide file tree
Showing 216 changed files with 91 additions and 88 deletions.
50 changes: 25 additions & 25 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,23 +116,23 @@ jobs:
echo Starting ace tests at `date`
coverage run -a -m pyspedas.projects.ace.tests.tests
echo Starting erg tests at `date`
coverage run -a -m pyspedas.erg.tests.tests
coverage run -a -m pyspedas.projects.erg.tests.tests
echo Starting erg cotrans tests at `date`
coverage run -a -m pyspedas.erg.tests.cotrans_tests
coverage run -a -m pyspedas.projects.erg.tests.cotrans_tests
echo Starting erg ground data tests at `date`
coverage run -a -m pyspedas.erg.tests.ground_tests
coverage run -a -m pyspedas.projects.erg.tests.ground_tests
echo Starting erg mepe particle tests at `date`
coverage run -a -m pyspedas.erg.tests.mepe_part_products
coverage run -a -m pyspedas.projects.erg.tests.mepe_part_products
echo Starting erg mepi particle tests at `date`
coverage run -a -m pyspedas.erg.tests.mepi_part_products
coverage run -a -m pyspedas.projects.erg.tests.mepi_part_products
echo Starting erg lepe particle tests at `date`
coverage run -a -m pyspedas.erg.tests.lepe_part_products
coverage run -a -m pyspedas.projects.erg.tests.lepe_part_products
echo Starting erg lepi particle tests at `date`
coverage run -a -m pyspedas.erg.tests.lepi_part_products
coverage run -a -m pyspedas.projects.erg.tests.lepi_part_products
echo Starting erg xep particle tests at `date`
coverage run -a -m pyspedas.erg.tests.xep_part_products
coverage run -a -m pyspedas.projects.erg.tests.xep_part_products
echo Starting erg hep particle tests at `date`
coverage run -a -m pyspedas.erg.tests.hep_part_products
coverage run -a -m pyspedas.projects.erg.tests.hep_part_products
echo "========================================================="
# Show the free disk space on this filesystem
echo "Disk space after ERG tests:"
Expand Down Expand Up @@ -163,29 +163,29 @@ jobs:
echo Starting barrel tests at `date`
coverage run -a -m pyspedas.projects.barrel.tests.tests
echo Starting elfin epd_l1 tests at `date`
coverage run -a -m pyspedas.elfin.tests.test_epd_l1
coverage run -a -m pyspedas.projects.elfin.tests.test_epd_l1
echo Starting elfin epd_l2 tests at `date`
coverage run -a -m pyspedas.elfin.tests.test_epd_l2
coverage run -a -m pyspedas.projects.elfin.tests.test_epd_l2
echo Starting elfin state tests at `date`
coverage run -a -m pyspedas.elfin.tests.test_state
coverage run -a -m pyspedas.projects.elfin.tests.test_state
echo Starting elfin tests at `date`
coverage run -a -m pyspedas.elfin.tests.tests
coverage run -a -m pyspedas.projects.elfin.tests.tests
echo Starting elfin epd calibration tests at `date`
coverage run -a -m pyspedas.elfin.tests.test_epd_calibration
coverage run -a -m pyspedas.projects.elfin.tests.test_epd_calibration
echo Starting soho tests at `date`
coverage run -a -m pyspedas.soho.tests.tests
echo Starting de2 tests at `date`
coverage run -a -m pyspedas.de2.tests.tests
coverage run -a -m pyspedas.projects.de2.tests.tests
echo Starting st5 tests at `date`
coverage run -a -m pyspedas.st5.tests.tests
echo Starting lanl tests at `date`
coverage run -a -m pyspedas.lanl.tests.tests
echo Starting cotrans quaternion tests at `date`
coverage run -a -m pyspedas.cotrans.tests.quaternions
echo Starting cnofs tests at `date`
coverage run -a -m pyspedas.cnofs.tests.tests
coverage run -a -m pyspedas.projects.cnofs.tests.tests
echo Starting kompsat tests at `date`
coverage run -a -m pyspedas.kompsat.tests.tests
coverage run -a -m pyspedas.projects.kompsat.tests.tests
echo Starting hapi tests at `date`
coverage run -a -m pyspedas.hapi.tests.tests
echo Starting noaa tests at `date`
Expand Down Expand Up @@ -234,7 +234,7 @@ jobs:
df -h .
echo "========================================================="
echo Starting dscovr tests at `date`
coverage run -a -m pyspedas.dscovr.tests.tests
coverage run -a -m pyspedas.projects.dscovr.tests.tests
echo Starting utilities download tests at `date`
coverage run -a -m pyspedas.utilities.tests.download_tests
echo Starting utilities misc tests at `date`
Expand All @@ -252,11 +252,11 @@ jobs:
echo Starting cotrans minvar tests at `date`
coverage run -a -m pyspedas.cotrans.tests.test_minvar
echo Starting csswe tests at `date`
coverage run -a -m pyspedas.csswe.tests.tests
coverage run -a -m pyspedas.projects.csswe.tests.tests
echo Starting equator_s tests at `date`
coverage run -a -m pyspedas.equator_s.tests.tests
coverage run -a -m pyspedas.projects.equator_s.tests.tests
echo Starting image tests at `date`
coverage run -a -m pyspedas.image.tests.tests
coverage run -a -m pyspedas.projects.image.tests.tests
echo Starting psp tests at `date`
coverage run -a -m pyspedas.psp.tests.tests
echo Starting rbsp tests at `date`
Expand All @@ -276,29 +276,29 @@ jobs:
echo Starting geopack-IDL validation tests at `date`
coverage run -a -m pyspedas.geopack.tests.geopack_idl_validation_tests
echo Starting geotail tests at `date`
coverage run -a -m pyspedas.geotail.tests.tests
coverage run -a -m pyspedas.projects.geotail.tests.tests
echo Starting analysis tests at `date`
coverage run -a -m pyspedas.analysis.tests.tests
echo Starting analysis wavpol tests at `date`
coverage run -a -m pyspedas.analysis.tests.test_twavpol
echo Starting analysis magnetic nulls tests at `date`
coverage run -a -m pyspedas.analysis.tests.test_magnetic_nulls
echo Starting fast tests at `date`
coverage run -a -m pyspedas.fast.tests.tests
coverage run -a -m pyspedas.projects.fast.tests.tests
echo Starting omni tests at `date`
coverage run -a -m pyspedas.omni.tests.tests
echo Starting themis tests at `date`
coverage run -a -m pyspedas.themis.tests.tests
echo Starting goes tests at `date`
coverage run -a -m pyspedas.goes.tests.tests
coverage run -a -m pyspedas.projects.goes.tests.tests
echo Starting mica tests at `date`
coverage run -a -m pyspedas.mica.tests.tests
echo Starting ulysses tests at `date`
coverage run -a -m pyspedas.ulysses.tests.tests
echo Starting solo tests at `date`
coverage run -a -m pyspedas.solo.tests.tests
echo Starting kyoto tests at `date`
coverage run -a -m pyspedas.kyoto.tests.tests
coverage run -a -m pyspedas.projects.kyoto.tests.tests
echo Starting swarm tests at `date`
coverage run -a -m pyspedas.swarm.tests.tests
echo Starting themis_check_args tests at `date`
Expand Down
28 changes: 15 additions & 13 deletions pyspedas/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,26 +78,28 @@
from .mms.particles.mms_part_getspec import mms_part_getspec
from .mms.particles.mms_part_slice2d import mms_part_slice2d
from .maven import maven_load
from .kompsat.load import load as kompsat_load
from .noaa import noaa_load_kp

# Make mission-specific namespaces available under pyspedas
from .projects import ace
from .projects import akebono
from .projects import barrel
from .projects import cluster
from . import cnofs
from . import csswe
from . import de2
from . import dscovr
from . import elfin
from . import equator_s
from . import erg
from . import fast
from . import geotail
from . import goes
from . import image
from . import kyoto
from .projects import cnofs
from .projects import csswe
from .projects import de2
from .projects import dscovr
from .projects import elfin
from .projects import equator_s
from .projects import erg
from .projects import fast
from .projects import geotail
from .projects import goes
from .projects import image
from .projects import kompsat
# for backward compatibility
from .projects.kompsat.load import load as kompsat_load
from .projects import kyoto
from . import lanl
from . import maven
from . import mica
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pyspedas.de2.load import load
from .load import load
from functools import update_wrapper
from pyspedas.utilities.pyspedas_functools import better_partial
from pyspedas.utilities.datasets import find_datasets
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion pyspedas/de2/load.py → pyspedas/projects/de2/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from pytplot import time_clip as tclip
from pytplot import cdf_to_tplot

from pyspedas.de2.config import CONFIG
from .config import CONFIG


def load(
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from functools import update_wrapper
from pyspedas.dscovr.load import load
from .load import load
from pyspedas.utilities.datasets import find_datasets
from pyspedas.utilities.pyspedas_functools import better_partial

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from pytplot import cdf_to_tplot
from pyspedas.utilities.dailynames import dailynames
from pyspedas.utilities.download import download
from pyspedas.dscovr.config import CONFIG
from .config import CONFIG


def load(
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pyspedas.elfin.load import load
from pyspedas.projects.elfin.load import load

def eng_load(trange=['2022-08-19', '2022-08-19'],
probe='a',
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def get_epd_calibration(probe, instrument, trange):
filename = f"el{probe}_epde_cal_data.txt"

cal_datasets = None
with importlib.resources.path("pyspedas.elfin.epd", filename) as cal_file_path:
with importlib.resources.path("pyspedas.projects.elfin.epd", filename) as cal_file_path:
cal_datasets = read_epde_calibration_data(cal_file_path)

if not cal_datasets:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
from pytplot import get_data
import numpy as np

from pyspedas.elfin.load import load
from pyspedas.elfin.epd.postprocessing import epd_l1_postprocessing, epd_l2_postprocessing
from pyspedas.projects.elfin.load import load
from pyspedas.projects.elfin.epd.postprocessing import epd_l1_postprocessing, epd_l2_postprocessing

def epd_load(trange=['2022-08-19', '2022-08-19'],
probe='a',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
from pytplot import get, store, del_data, tnames, tplot_rename, options, tplot
from pytplot import time_clip as tclip

from pyspedas.elfin.epd.calibration_l2 import epd_l2_Espectra, epd_l2_PAspectra
from pyspedas.elfin.epd.calibration_l1 import calibrate_epd
from pyspedas.projects.elfin.epd.calibration_l2 import epd_l2_Espectra, epd_l2_PAspectra
from pyspedas.projects.elfin.epd.calibration_l1 import calibrate_epd

def epd_l1_postprocessing(
tplotnames,
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pyspedas.elfin.load import load
from pyspedas.projects.elfin.load import load

def fgm_load(trange=['2022-08-19', '2022-08-19'],
probe='a',
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pyspedas.elfin.load import load
from pyspedas.projects.elfin.load import load

def mrma_load(trange=['2022-08-19', '2022-08-19'],
probe='a',
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pyspedas.elfin.load import load
from pyspedas.projects.elfin.load import load

def mrmi_load(trange=['2022-08-19', '2022-08-19'],
probe='a',
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from pyspedas.elfin.load import load
from pyspedas.projects.elfin.load import load

def state_load(trange=['2022-08-19', '2022-08-19'],
probe='a',
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import unittest
import importlib.resources

from pyspedas.elfin.epd.calibration_l1 import read_epde_calibration_data
from pyspedas.projects.elfin.epd.calibration_l1 import read_epde_calibration_data

EXPECTED_EPDE_CAL_DATA = [
{'ch_efficiencies': [0.74, 0.8, 0.85, 0.86, 0.87, 0.87, 0.87, 0.87, 0.82, 0.8, 0.75, 0.6, 0.5, 0.45, 0.25, 0.05],
Expand Down Expand Up @@ -66,7 +66,7 @@
class EPDCalibrationTestCases(unittest.TestCase):

def test_read_epde_calibration_data(self):
with importlib.resources.path("pyspedas.elfin.tests", "test_epde_cal_data.txt") as test_file_path:
with importlib.resources.path("pyspedas.projects.elfin.tests", "test_epde_cal_data.txt") as test_file_path:
self.assertListEqual(read_epde_calibration_data(test_file_path), EXPECTED_EPDE_CAL_DATA)

if __name__ == '__main__':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
from pytplot.importers.tplot_restore import tplot_restore
from numpy.testing import assert_allclose

import pyspedas.elfin
import pyspedas.projects.elfin
from pyspedas.utilities.download import download
from pyspedas.elfin.config import CONFIG
from pyspedas.projects.elfin.config import CONFIG

TEST_DATASET_PATH="test/"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
import pytplot.get_data
from pytplot.importers.tplot_restore import tplot_restore

import pyspedas.elfin
from pyspedas.elfin.epd.calibration_l2 import spec_pa_sort
import pyspedas.projects.elfin
from pyspedas.projects.elfin.epd.calibration_l2 import spec_pa_sort
from pyspedas.utilities.download import download
from pyspedas.elfin.config import CONFIG
from pyspedas.projects.elfin.config import CONFIG

TEST_DATASET_PATH="test/"

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
from pytplot.importers.tplot_restore import tplot_restore
from numpy.testing import assert_allclose, assert_array_almost_equal, assert_array_equal

import pyspedas.elfin
import pyspedas.projects.elfin
from pyspedas.utilities.download import download
from pyspedas.elfin.config import CONFIG
from pyspedas.projects.elfin.config import CONFIG

TEST_DATASET_PATH="test/"

Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from functools import update_wrapper
from pyspedas.utilities.pyspedas_functools import better_partial
from pyspedas.equator_s.load import load
from .load import load
from pyspedas.utilities.datasets import find_datasets


Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from pytplot import time_clip as tclip
from pytplot import cdf_to_tplot

from pyspedas.equator_s.config import CONFIG
from .config import CONFIG


def load(
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from pyspedas.utilities.download import download
from pytplot import cdf_to_tplot

from pyspedas.erg.config import CONFIG
from pyspedas.projects.erg.config import CONFIG

def load(trange=['2017-03-27', '2017-03-28'],
pathformat=None,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import unittest
import logging
from pyspedas.erg import mgf
from pyspedas.erg.satellite.erg.common.cotrans.erg_cotrans import erg_cotrans
from pyspedas.projects.erg import mgf
from pyspedas.projects.erg.satellite.erg.common.cotrans.erg_cotrans import erg_cotrans
from pytplot import tplot_names, get_data, data_exists, store_data
import numpy as np
from numpy.testing import assert_allclose
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
import os
import unittest
from pytplot import data_exists, del_data, timespan,tplot, tplot_names, get_data
from pyspedas.erg import erg_hep_part_products
from pyspedas.erg.satellite.erg.particle.erg_hep_get_dist import erg_hep_get_dist
from pyspedas.erg.satellite.erg.particle.erg_pgs_make_e_spec import erg_pgs_make_e_spec
from pyspedas.erg.satellite.erg.particle.erg_pgs_make_theta_spec import erg_pgs_make_theta_spec
from pyspedas.erg.satellite.erg.particle.erg_pgs_make_phi_spec import erg_pgs_make_phi_spec
from pyspedas.projects.erg import erg_hep_part_products
from pyspedas.projects.erg.satellite.erg.particle.erg_hep_get_dist import erg_hep_get_dist
from pyspedas.projects.erg.satellite.erg.particle.erg_pgs_make_e_spec import erg_pgs_make_e_spec
from pyspedas.projects.erg.satellite.erg.particle.erg_pgs_make_theta_spec import erg_pgs_make_theta_spec
from pyspedas.projects.erg.satellite.erg.particle.erg_pgs_make_phi_spec import erg_pgs_make_phi_spec

import pyspedas
import pytplot
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import os
import unittest
from pytplot import data_exists, del_data, timespan,tplot
from pyspedas.erg import erg_lep_part_products
from pyspedas.projects.erg import erg_lep_part_products

import pyspedas
import pytplot
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import os
import unittest
from pytplot import data_exists, del_data, timespan,tplot
from pyspedas.erg import erg_lep_part_products
from pyspedas.projects.erg import erg_lep_part_products

import pyspedas
import pytplot
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import os
import unittest
from pytplot import data_exists, del_data, timespan,tplot
from pyspedas.erg import erg_mep_part_products
from pyspedas.projects.erg import erg_mep_part_products

import pyspedas
import pytplot
Expand Down
Loading

0 comments on commit e2bea2c

Please sign in to comment.