Skip to content

Commit

Permalink
auto-download GGSM, extra python checks
Browse files Browse the repository at this point in the history
  • Loading branch information
d3v-null committed Sep 28, 2024
1 parent 96bf621 commit 1040e76
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
2 changes: 2 additions & 0 deletions demo/00_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ export outdir=${outdir:-${PWD}/demo/data/}
unset srclist
unset MWA_BEAM_FILE
export srclist=${srclist:-${outdir}/srclist_pumav3_EoR0LoBES_EoR1pietro_CenA-GP_2023-11-07.yaml}
# hint: here's another sky model you can try.
# export srclist=${srclist:-${outdir}/GGSM_updated.fits}
export MWA_BEAM_FILE=${MWA_BEAM_FILE:-${outdir}/mwa_full_embedded_element_pattern.h5}

# #### #
Expand Down
19 changes: 12 additions & 7 deletions demo/00_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,11 @@ fi
# ####### #
# DEMO: download srclist unless it exists
if [[ $srclist =~ srclist_puma && ! -f "$srclist" ]]; then
echo "downloading srclist ${srclist} from github"
echo "downloading srclist ${srclist} from JLBLine/srclists github"
curl -L -o $srclist "https://github.com/JLBLine/srclists/raw/master/${srclist##*/}"
elif [[ $srclist =~ GGSM && ! -f "$srclist" ]]; then
echo "downloading srclist ${srclist} from GLEAM-X/GLEAM-X-pipeline github"
curl -L -o $srclist "https://github.com/GLEAM-X/GLEAM-X-pipeline/raw/master/models/${srclist##*/}"
fi
# DEMO: verify srclist
hyperdrive srclist-verify $srclist
Expand Down Expand Up @@ -115,9 +118,9 @@ EoF
rm .wsclean_version

# DEMO: check python version
if ! python -c $'"assert __import__(\'sys\').version_info>=(3,8)"' >/dev/null; then
echo "warning: python version 3.8+ not found https://www.python.org/downloads/ "
if ! python -c $'"assert __import__(\'sys\').version_info>=(3,11)"' >/dev/null; then
python --version
echo "warning: python version 3.11+ not found https://www.python.org/downloads/ , some stuff will not work"
fi

# DEMO: check python packages
Expand All @@ -127,10 +130,12 @@ while IFS='|' read -r package details; do
echo details: $details
fi
done <<'EoF'
pyvo| https://pyvo.readthedocs.io/en/latest/#installation
mwalib| https://github.com/MWATelescope/mwalib/wiki/Installation%3A-Python-Users
ssins| https://github.com/mwilensky768/SSINS?tab=readme-ov-file#installation
mwa_qa| git clone https://github.com/d3v-null/mwa_qa.git ; pip install mwa_qa
pyvo| pip install pyvo # https://pyvo.readthedocs.io/en/latest/#installation
mwalib| pip install mwalib # https://mwatelescope.atlassian.net/wiki/spaces/MP/pages/348127236/mwalib
ssins| pip install git+https://github.com/mwilensky768/SSINS.git # https://github.com/mwilensky768/SSINS#installation
mwa_qa| pip install git+https://github.com/d3v-null/mwa_qa.git@dev
AegeanTools| pip install git+https://github.com/PaulHancock/Aegean.git
fits_warp| pip install psutil git+https://github.com/tjgalvin/fits_warp.git
EoF

# DEMO: is the MWA TAP server accessible?
Expand Down

0 comments on commit 1040e76

Please sign in to comment.