Skip to content
Snippets Groups Projects
Commit 286e6680 authored by Tammo Jan Dijkema's avatar Tammo Jan Dijkema
Browse files

Merge branch 'cleaner-mwa-coef-err' into 'master'

Improve MWA H5 coefficient file errors

See merge request !92
parents a9508953 3533a5a4
No related branches found
No related tags found
1 merge request!92Improve MWA H5 coefficient file errors
Pipeline #5128 passed
......@@ -56,8 +56,19 @@ BOOST_AUTO_TEST_CASE(load_mwa) {
std::vector<std::complex<float>> antenna_buffer(
grid_response->GetStationBufferSize(telescope->GetNrStations()));
grid_response->CalculateAllStations(antenna_buffer.data(), time, frequency,
0);
try {
grid_response->CalculateAllStations(antenna_buffer.data(), time, frequency,
0);
} catch (std::exception& e) {
throw std::runtime_error(
std::string(e.what()) +
"\nPath used for MWA coefficients file: " + MWA_COEFF_PATH);
} catch (...) {
throw std::runtime_error(
std::string("Unknown exception type was thrown, probably by HDF5 "
"lib.\nPath used for MWA coefficients file: ") +
MWA_COEFF_PATH);
}
// Check whether pixels are reproduced correctly at certain pixels on 16x16
// image MWABeam output at pixel (0, 8):
......
......@@ -20,10 +20,8 @@ MWA_COEFF_H5=mwa_full_embedded_element_pattern.h5
if [ ! -f ${MWA_COEFF_H5} ] ; then
if [ ! -f "$MWA_COEFF_ARCHIVE" ]; then
wget -q www.astron.nl/citt/EveryBeam/mwa_full_embedded_element_pattern.tar.bz2 -O $MWA_COEFF_ARCHIVE
fi
wget -q www.astron.nl/citt/EveryBeam/mwa_full_embedded_element_pattern.tar.bz2 -O ${MWA_COEFF_ARCHIVE}
tar -xf $MWA_COEFF_ARCHIVE
tar -xjf $MWA_COEFF_ARCHIVE
rm $MWA_COEFF_ARCHIVE
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment