Skip to content

Commit

Permalink
modified: pipelines/idr2_preprocessing/preprocess_data.py
Browse files Browse the repository at this point in the history
  • Loading branch information
nkern committed Jun 19, 2018
1 parent 830a48a commit 6d0d51f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pipelines/idr2_preprocessing/preprocess_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
for i, dfs in enumerate(datafiles):

# setup bl reformat function
def bl_reformat(j, i=i, datapols=datapols, dfs=dfs, lens=lens, angs=angs, reds=reds, p=cf['algorithm']['reformat']):
def bl_reformat(j, i=i, datapols=datapols, dfs=dfs, lens=lens, angs=angs, reds=reds, data_suffix=data_suffix, p=cf['algorithm']['reformat']):
try:
if not p['bl_len_range'][0] < lens[j] < p['bl_len_range'][1]:
return 0
Expand Down Expand Up @@ -201,7 +201,7 @@ def run_xrfi(i, datafiles=datafiles, p=cf['algorithm']['xrfi']):
pol = datapols[i][0]

# write full tavg function
def full_tavg(j, pol=pol, lens=lens, angs=angs, reds=reds, dfs=dfs, p=cf['algorithm']['timeavg_sub']):
def full_tavg(j, pol=pol, lens=lens, angs=angs, reds=reds, dfs=dfs, data_suffix=data_suffix, p=cf['algorithm']['timeavg_sub']):
try:
# load data into uvdata
uvd = UVData()
Expand Down Expand Up @@ -333,7 +333,7 @@ def tavg_sub(j, dfs=dfs, pol=pol, tavg_file=tavg_out, p=cf['algorithm']['timeavg
for i, dfs in enumerate(datafiles):
pol = datapols[i][0]

def time_average(j, dfs=dfs, pol=pol, lens=lens, angs=angs, reds=reds, p=cf['algorithm']['tavg']):
def time_average(j, dfs=dfs, pol=pol, lens=lens, angs=angs, reds=reds, data_suffix=data_suffix, p=cf['algorithm']['tavg']):
try:
# load data into uvdata
uvd = UVData()
Expand Down Expand Up @@ -377,7 +377,7 @@ def time_average(j, dfs=dfs, pol=pol, lens=lens, angs=angs, reds=reds, p=cf['alg
Nfiles = int(np.ceil(Ntimes / float(file_Ntimes)))
times = [times[i*file_Ntimes:(i+1)*file_Ntimes] for i in range(Nfiles)]

def reformat_files(j, pol=pol, tavg_files=tavg_files, times=times, p=cf['algorithm']['tavg']):
def reformat_files(j, pol=pol, tavg_files=tavg_files, times=times, data_suffix=data_suffix, p=cf['algorithm']['tavg']):
try:
uvd = UVData()
uvd.read_miriad(tavg_files, time_range=[times[j].min()-1e-8, times[j].max()+1e-8])
Expand Down

0 comments on commit 6d0d51f

Please sign in to comment.