Skip to content

Commit

Permalink
Update run_socket_grex.py
Browse files Browse the repository at this point in the history
Make min_dm, max_ibox, min_snr, and min_snr_t2out settable through command line arguments for run_socket_grex. Main goal is that these values can be set in a .env file in grex/pipeline. Will submit PR for grex.sh soon that will make this possible
  • Loading branch information
sniedbalski authored Apr 23, 2024
1 parent af730b0 commit 62a67e3
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions scripts/run_socket_grex.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,14 @@
HOST = "127.0.0.1"
PORT = 12345

def main(trigger=True):
def main(trigger=True, args=sys.argv):
min_dm = float(args[1])
max_ibox = float(args[2])
min_snr = float(args[3])
min_snr_t2out = float(args[4])

print(f'min_dm: {min_dm}, max_ibox: {max_ibox}, min_snr: {min_snr}, min_snr_t2out: {min_snr_t2out}')

# Use roughly 8 seconds as a gulp size
gulpsize = 16384 * 8

Expand Down Expand Up @@ -50,9 +57,8 @@ def main(trigger=True):
print("Number of candidates %d" % cand_count)

if cand_count > 0:
print("Filtering", "last trig was ", last_trigger_time
last_trigger_time = socket_grex.filter_candidates(candstr_list, trigger=trigger,
last_trigger_time=last_trigger_time)
print("Filtering", "last trig was ", last_trigger_time)
last_trigger_time = socket_grex.filter_candidates(candstr_list, trigger=trigger, last_trigger_time=last_trigger_time, min_dm=min_dm, max_ibox=max_ibox, min_snr=min_snr, min_snr_t2out=min_snr_t2out)
print("Finished filtering")

continue
Expand Down

0 comments on commit 62a67e3

Please sign in to comment.