Skip to content
Snippets Groups Projects
Commit 8e76b715 authored by Mattia Mancini's avatar Mattia Mancini
Browse files

Merge branch 'use_everybeam_time_cache' into 'master'

Make predict and apply beam use cached time directions

See merge request !1247
parents 3e06fd5c 38fe7095
No related branches found
No related tags found
1 merge request!1247Make predict and apply beam use cached time directions
Pipeline #79011 failed
......@@ -3,7 +3,7 @@
## Next release
### Improvements
- DP3 now requires EveryBeam v0.5.4
- DP3 now requires EveryBeam v0.5.8
## [6.0] - 2023-08-11
......
......@@ -249,7 +249,7 @@ include_directories(${AOFLAGGER_INCLUDE_DIR})
# make it somewhat more explicit
find_package(EveryBeam NO_MODULE)
if(${EVERYBEAM_FOUND})
if(${EVERYBEAM_VERSION} VERSION_LESS "0.5.4" OR ${EVERYBEAM_VERSION}
if(${EVERYBEAM_VERSION} VERSION_LESS "0.5.8" OR ${EVERYBEAM_VERSION}
VERSION_GREATER_EQUAL "0.6.0")
message(
FATAL_ERROR
......
......@@ -2,7 +2,7 @@ FROM ubuntu:20.04
# TODO: needs to be bumped before next DP3 release
# ENV IDG_VERSION=0.8
ENV EVERYBEAM_VERSION=v0.5.7
ENV EVERYBEAM_VERSION=v0.5.8
ENV IDG_VERSION=6b61c038883ad3f807d20047c4f9e1a1f0b8d98a
ENV AOFLAGGER_VERSION=65d5fba4f4c12797386d3fd9cd76734956a8b233
......
......@@ -2,7 +2,7 @@ FROM ubuntu:22.04
# TODO: needs to be bumped before next DP3 release
# ENV IDG_VERSION=0.8
ENV EVERYBEAM_VERSION=v0.5.7
ENV EVERYBEAM_VERSION=v0.5.8
ENV IDG_VERSION=6b61c038883ad3f807d20047c4f9e1a1f0b8d98a
ENV AOFLAGGER_VERSION=65d5fba4f4c12797386d3fd9cd76734956a8b233
......
......@@ -170,6 +170,8 @@ void ApplyBeam::updateInfo(const DPInfo& infoIn) {
MDirection::Ref(MDirection::ITRF, itsMeasFrames[thread]));
telescopes_[thread] = base::GetTelescope(
info().msName(), itsElementResponseModel, itsUseChannelFreq);
telescopes_[thread]->SetTime(info().startTime());
}
}
......@@ -231,6 +233,8 @@ bool ApplyBeam::processMultithreaded(std::unique_ptr<base::DPBuffer> buffer,
srcdir = dir2Itrf(itsDirection, itsMeasConverters[threadIter]);
}
telescopes_[thread]->SetTime(time);
if (undoInputBeam) {
// A beam was previously applied to this MS, and a different direction
// was asked this time. 'Undo' applying the input beam.
......
......@@ -631,6 +631,10 @@ void OnePredict::PredictSourceRange(
const size_t n_channels = info().nchan();
const size_t n_buffer_correlations = stokes_i_only_ ? 1 : info().ncorr();
if (apply_beam_) {
telescope_->SetTime(time);
}
aocommon::xt::UTensor<std::complex<double>, 3> model_data(
{n_baselines, n_channels, n_buffer_correlations},
std::complex<double>(0.0, 0.0));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment