Skip to content

Commit

Permalink
removing unused funcitons
Browse files Browse the repository at this point in the history
  • Loading branch information
aladinor committed Nov 18, 2024
1 parent e07a602 commit 4dcfdf1
Showing 1 changed file with 1 addition and 39 deletions.
40 changes: 1 addition & 39 deletions raw2zarr/utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from idlelib.iomenu import encoding

import xarray as xr
import xradar as xd
Expand All @@ -13,7 +12,7 @@
from time import time
from collections.abc import Iterator
from typing import Any, List
from xarray import DataTree, Dataset
from xarray import DataTree
import gzip
import bz2

Expand Down Expand Up @@ -187,43 +186,6 @@ def write_file_radar(file: str, path: str = f"../results") -> None:
txt_file.close()


#
# def time_encoding(dtree, append_dim) -> dict:
# """
# Function that creates encoding for time and append_dim variables
# @param dtree: Input xarray Datatree
# @param append_dim: dimension name. e.g. "vcp_time"
# @return: dict with encoding parameters
# """
# encoding = {}
# enc = dict(
# units="nanoseconds since 1950-01-01T00:00:00.00",
# dtype="float64",
# _FillValue=np.datetime64("NaT"),
# )
# if isinstance(dtree, DataTree):
#
# # append_dim encoding
# encoding = {f"{dtree[group].path}": {f"{append_dim}": enc} for group in dtree.groups}
#
# # time encoding (only sweeps)
# encoding.update(
# {f"{node}": {"time": enc, append_dim: enc} for node in dtree.match("*/sweep_*").groups[2:]}
# )
# try:
# encoding.pop("/")
# except KeyError:
# pass
# else:
# encoding.update(
# {
# f"{append_dim}": enc,
# "time": enc,
# }
# )
# return encoding


def dtree_encoding(dtree, append_dim) -> dict:
"""
Function that creates encoding for time, append_dim, and all variables in datasets within the DataTree.
Expand Down

0 comments on commit 4dcfdf1

Please sign in to comment.