Skip to content

Commit

Permalink
Remove legacy script
Browse files Browse the repository at this point in the history
  • Loading branch information
siiptuo committed Nov 30, 2023
1 parent 66b4478 commit fa75390
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 55 deletions.
29 changes: 0 additions & 29 deletions scripts/map-variable-names.py

This file was deleted.

10 changes: 0 additions & 10 deletions src/data_processing/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import netCDF4
import numpy as np
import requests
from cloudnetpy.plotting.plot_meta import ATTRIBUTES as ATTR
from cloudnetpy.plotting.plotting import Dimensions
from cloudnetpy.utils import get_time
from numpy import ma
Expand Down Expand Up @@ -275,15 +274,6 @@ def str2bool(s: str) -> bool | str:
return False if s == "False" else True if s == "True" else s


def get_plottable_variables_info(cloudnet_file_type: str) -> dict:
"""Find variable IDs and corresponding human-readable names."""
fields = get_fields_for_plot(cloudnet_file_type)[0]
return {
get_var_id(cloudnet_file_type, field): [f"{ATTR[field].name}", i]
for i, field in enumerate(fields)
}


def get_fields_for_plot(cloudnet_file_type: str) -> tuple[list, int]:
"""Return list of variables and maximum altitude for Cloudnet quicklooks.
Expand Down
16 changes: 0 additions & 16 deletions tests/unit/test_utils_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,22 +71,6 @@ def test_get_date_from_past(n, input_date, result):
assert utils.get_date_from_past(n, input_date) == result


def test_get_plottable_variables_info():
res = utils.get_plottable_variables_info("lidar")
expected = {
"lidar-beta": ["Attenuated backscatter coefficient", 0],
"lidar-beta_raw": ["Raw attenuated backscatter coefficient", 1],
"lidar-depolarisation": ["Lidar depolarisation", 2],
"lidar-depolarisation_raw": ["Raw depolarisation", 3],
"lidar-beta_1064": ["Attenuated backscatter coefficient at 1064 nm", 4],
"lidar-beta_532": ["Attenuated backscatter coefficient at 532 nm", 5],
"lidar-beta_355": ["Attenuated backscatter coefficient at 355 nm", 6],
"lidar-depolarisation_532": ["Lidar depolarisation at 532 nm", 7],
"lidar-depolarisation_355": ["Lidar depolarisation at 355 nm", 8],
}
assert res == expected


@pytest.mark.parametrize(
"instrument, file_type",
[
Expand Down

0 comments on commit fa75390

Please sign in to comment.