Skip to content

Commit

Permalink
Merge branch 'lst-inpaint-mode' of github.com:hera-team/hera_cal into…
Browse files Browse the repository at this point in the history
… lst-inpaint-mode
  • Loading branch information
steven-murray committed Aug 24, 2023
2 parents 83607f9 + f705177 commit 1ebcb1a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions hera_cal/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,7 @@ def read(self, bls=None, polarizations=None, times=None, time_range=None, lsts=N
run_check_acceptability=run_check_acceptability, **kwargs)
self.use_future_array_shapes()
if self.filetype == 'uvfits':
self.unphase_to_drift()
self.unproject_phase()
else:
if not read_data:
raise NotImplementedError('reading only metadata is not implemented for ' + self.filetype)
Expand Down Expand Up @@ -2273,7 +2273,7 @@ def _write_HERAData_to_filetype(hd, outfilename, filetype_out='miriad', clobber=
if filetype_out == 'miriad':
hd.write_miriad(outfilename, clobber=clobber)
elif filetype_out == 'uvfits':
hd.write_uvfits(outfilename, force_phase=True, spoof_nonessential=True)
hd.write_uvfits(outfilename, force_phase=True)
elif filetype_out == 'uvh5':
hd.write_uvh5(outfilename, clobber=clobber)
else:
Expand Down
2 changes: 1 addition & 1 deletion hera_cal/reflections.py
Original file line number Diff line number Diff line change
Expand Up @@ -1320,7 +1320,7 @@ def L(x, amp, dly, phs, clean_data, clean_model, clean_wgts, dly_range, freqs, f
else:
x0.append(phs0[i])
_phs = None
x0 = np.array(x0)
x0 = np.squeeze(x0)

# optimize
res = minimize(L, x0, args=(_amp, _dly, _phs, clean_data[i], clean_model[i], clean_wgts[i], dly_range, freqs, fft_kwargs), method=method, tol=tol, options=dict(maxiter=maxiter))
Expand Down
3 changes: 2 additions & 1 deletion hera_cal/tests/test_redcal.py
Original file line number Diff line number Diff line change
Expand Up @@ -1890,9 +1890,10 @@ def test_redcal_run(self):
sys.stdout = open(os.devnull, 'w')
redcal_meta, hc_first, hc_omni, hd_vissol = om.redcal_run(input_data, verbose=True, ant_z_thresh=1.7, add_to_history='testing',
a_priori_ex_ants_yaml=os.path.join(DATA_PATH, 'test_input', 'a_priori_flags_sample.yaml'),
flag_nchan_low=10, flag_nchan_high=10, check_after=500,
iter0_prefix='.iter0', metrics_files=ant_metrics_file, clobber=True)
hd = io.HERAData(input_data)
redcal_meta0, hc_first0, hc_omni0, hd_vissol0 = om.redcal_iteration(hd, ex_ants=[11, 50])
redcal_meta0, hc_first0, hc_omni0, hd_vissol0 = om.redcal_iteration(hd, flag_nchan_low=10, flag_nchan_high=10, check_after=500, ex_ants=[11, 50])
sys.stdout = sys.__stdout__

for prefix, hc_here, bad_ants in [('', hc_first, [11, 50, 12, 24]), ('.iter0', hc_first0, [11, 50])]:
Expand Down

0 comments on commit 1ebcb1a

Please sign in to comment.