Skip to content

Commit

Permalink
extra UVData.read options
Browse files Browse the repository at this point in the history
  • Loading branch information
d3v-null committed Sep 23, 2024
1 parent a591ace commit f0d61d3
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 5 deletions.
28 changes: 25 additions & 3 deletions demo/04_ssins.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#!/usr/bin/env python

# identify RFI using ssins
# details: https://github.com/mwilensky768/SSINS

from pyuvdata import UVData
from SSINS import SS, INS, MF
import os
Expand Down Expand Up @@ -28,6 +32,24 @@ def get_parser():
action="store_true",
help="skip flagging of edge channels, quack time",
)
group_uvd_read.add_argument(
"--remove-coarse-band",
default=False,
action="store_true",
help="Correct coarse PFB passband (resolution must be > 10kHz)",
)
group_uvd_read.add_argument(
"--correct-van-vleck",
default=False,
action="store_true",
help="Correct van vleck quantization artifacts in legacy correlator. slow!",
)
group_uvd_read.add_argument(
"--include-flagged-ants",
default=False,
action="store_true",
help="Include flagged antenna when reading raw files",
)

# arguments for UVData.select()
group_uvd_sel = parser.add_argument_group("UVData.select")
Expand Down Expand Up @@ -322,9 +344,9 @@ def main():
args.files,
read_data=True,
diff=(not args.no_diff), # difference timesteps
remove_coarse_band=False, # does not work with low freq res
correct_van_vleck=False, # slow
remove_flagged_ants=True, # remove flagged antennas
remove_coarse_band=args.remove_coarse_band, # does not work with low freq res
correct_van_vleck=args.correct_van_vleck, # slow
remove_flagged_ants=(not args.include_flagged_ants), # remove flagged antennas
flag_init=(not args.no_flag_init),
)

Expand Down
3 changes: 1 addition & 2 deletions demo/04_ssins.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/bin/bash
# identify RFI using ssins
# details: https://github.com/mwilensky768/SSINS
# wrapper for 04_ssins.py

# ### #
# ENV #
Expand Down

0 comments on commit f0d61d3

Please sign in to comment.