Skip to content

Commit

Permalink
code styling fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
louis-richard committed Apr 7, 2023
1 parent 92410ff commit 615e8bf
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 11 deletions.
6 changes: 3 additions & 3 deletions pyrfu/pyrf/pid_4sc.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import xarray as xr

# Local imports
from ..mms import rotate_tensor
from ..mms.rotate_tensor import rotate_tensor

from .c_4_grad import c_4_grad
from .avg_4sc import avg_4sc
Expand All @@ -16,9 +16,9 @@

__author__ = "Louis Richard"
__email__ = "[email protected]"
__copyright__ = "Copyright 2020-2021"
__copyright__ = "Copyright 2020-2023"
__license__ = "MIT"
__version__ = "2.3.7"
__version__ = "2.3.26"
__status__ = "Prototype"


Expand Down
8 changes: 4 additions & 4 deletions pyrfu/pyrf/read_cdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
from dateutil import parser

# Local imports
from . datetime2iso8601 import datetime2iso8601
from .datetime2iso8601 import datetime2iso8601

__author__ = "Louis Richard"
__email__ = "[email protected]"
__copyright__ = "Copyright 2020-2022"
__copyright__ = "Copyright 2020-2023"
__license__ = "MIT"
__version__ = "2.3.22"
__version__ = "2.3.26"
__status__ = "Prototype"


Expand All @@ -39,7 +39,7 @@ def read_cdf(path, tint):
tint = list(map(parser.parse, tint))
tint = list(map(datetime2iso8601, tint))
tint = list(map(cdfepoch.parse, tint))

out_dict = {}

with cdfread.CDF(path) as file:
Expand Down
13 changes: 10 additions & 3 deletions pyrfu/solo/read_lfr_density.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,8 @@ def _list_files_lfr_density_l3(tint, data_path: str = "", tree: bool = False):

# directory and file name search patterns:
# - assume directories are of the form: [data_path]/L3/lfr_density/year/month/
# - assume file names are of the form: solo_L3_rpw-bia-density-cdag_YYYYMMDD_version.cdf
# - assume file names are of the form:
# solo_L3_rpw-bia-density-cdag_YYYYMMDD_version.cdf

file_name = r"solo_L3_rpw-bia-density.*_([0-9]{8})_V[0-9]{2}.cdf"

Expand All @@ -81,7 +82,13 @@ def _list_files_lfr_density_l3(tint, data_path: str = "", tree: bool = False):
for date in days:
if tree:
local_dir = os.sep.join(
[data_path, "L3", "lfr_density", date.strftime("%Y"), date.strftime("%m")]
[
data_path,
"L3",
"lfr_density",
date.strftime("%Y"),
date.strftime("%m"),
]
)
else:
local_dir = data_path
Expand Down Expand Up @@ -129,7 +136,7 @@ def read_lfr_density(tint, data_path: str = "", tree: bool = False):
Time series of the density.
"""

# List LFR density files in the data path.
files = _list_files_lfr_density_l3(tint, data_path, tree)

Expand Down
3 changes: 2 additions & 1 deletion pyrfu/solo/read_tnr.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ def _list_files_tnr_l2(tint, data_path: str = "", tree: bool = False):

# directory and file name search patterns:
# - assume directories are of the form: [data_path]/L2/thr/year/month/
# - assume file names are of the form: solo_L2_rpw-tnr-surv-cdag_YYYYMMDD_version.cdf
# - assume file names are of the form:
# solo_L2_rpw-tnr-surv-cdag_YYYYMMDD_version.cdf

file_name = r"solo_L2_rpw-tnr-surv.*_([0-9]{8})_V[0-9]{2}.cdf"

Expand Down

0 comments on commit 615e8bf

Please sign in to comment.