Skip to content

Commit

Permalink
Basic Structure for time and frequency decimation
Browse files Browse the repository at this point in the history
Signed-off-by: Devansh Agarwal <[email protected]>
  • Loading branch information
devanshkv committed Oct 30, 2020
1 parent de2fe6f commit 3a38daf
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
18 changes: 18 additions & 0 deletions bin/your_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,22 @@
action="store_true",
default=False,
)
parser.add_argument(
"-td",
"--time_decimation_factor",
help="Time Decimation Factor",
required=False,
type=int,
default=1
)
parser.add_argument(
"-fd",
"--frequency_decimation_factor",
help="Frequency Decimation Factor",
required=False,
type=int,
default=1
)
parser.add_argument(
"--no_log_file", help="Do not write a log file", action="store_true"
)
Expand Down Expand Up @@ -169,6 +185,8 @@
savgol_frequency_window=values.savgol_frequency_window,
savgol_sigma=values.savgol_sigma,
zero_dm_subt=values.zero_dm_subt,
time_decimation_factor=values.time_decimation_factor,
frequency_decimation_factor=values.frequency_decimation_factor
)

if values.type == "fits":
Expand Down
11 changes: 11 additions & 0 deletions your/writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ def __init__(
savgol_sigma=4,
gulp=None,
zero_dm_subt=False,
time_decimation_factor=1,
frequency_decimation_factor=1
):

self.your_object = your_object
Expand All @@ -67,6 +69,15 @@ def __init__(
self.c_min = c_min
self.c_max = c_max

self.time_decimation_factor = time_decimation_factor
self.frequency_decimation_factor = frequency_decimation_factor

if self.time_decimation_factor > 1:
raise NotImplementedError("We have not implemented this feature yet.")

if self.frequency_decimation_factor > 1:
raise NotImplementedError("We have not implemented this feature yet.")

self.outdir = outdir
self.outname = outname
self.flag_rfi = flag_rfi
Expand Down

0 comments on commit 3a38daf

Please sign in to comment.