Python virtual env
Depending on the python version you have, some notes on setting up a python virtual environment
dedicated to getting data out of the archive
python3.x -m venv venv3.x
e.g.
python3.6 -m venv venv3.6
python3.7 -m venv venv3.7
python3.7 -m venv venv3.7
source venv3.7/bin/activate
pip install -U pip setuptools wheel
deactivate
source venv3.7/bin/activate
pip install katdal
pip install python-casacore
pip cache purge
deactivate
deactivate
Get data from archive
It is suggested since we want to map the wideband results onto the narrow band data without too much effort, to ensure that we do the MS conversion of both datasets consistently
Using screen/tmux session, e.g.
tmux new -s 3c39
or
tmux ls
tmux a -t 3c39
source venv3.7/bin/activate
mvftoms.py -f --flags cam <katdaltoken>
mvftoms.py -a -f --flags cam -C <chan,range> <katdaltoken>
chmod -w <msfile>.ms/
ln -s data/<msfile>.ms
deactivate
Install caracal
source venv3.7/bin/activate
# old branch has error in setjy models
pip install --no-cache-dir git+https://github.com/caracal-pipeline/caracal.git@add_polcal
# install newest master to correct the setjy model error
pip install --no-cache-dir git+https://github.com/caracal-pipeline/caracal.git
caracal -h
pip cache purge
deactivate
deactivate
Construct the caracal pipeline config file (<whatever>.yml
)
Example configuration files in configs
folder
source venv3.7/bin/activate
Run pipeline
ln -s <scratch_data> ms-orig
caracal -c <config_file>.yml
# sw : start-worker
# ew : end-worker
caracal -c <config_file>.yml -sw general -ew transform__calibrators
To quickly clean up the temporary output products generated by caracal
make clean
To remove all output, as well as
make clobber
deactivate
Caracal pipeline produce diagnostic plots in a Jupyter notebook format and fits images. The easiest way to view these plots is using radiopadre
Installing radiopadre on a remote system to view caracal output on server See full description in Gdoc Radiopadre and Radiovangelize
On linux
source venv3.7/bin/activate
On mac
pyenv local 3.7.10
pip install git+https://github.com/ratt-ru/radiopadre-client.git@b1.2.pre2
On server
run-radiopadre -V --auto-init .
On remote/local system
run-radiopadre -V com14.science.kat.ac.za: --auto-init
This should install the server side software as well as spin up the first notebook and carta instances and open browser tabs if a browser is available.
you can see the system is listening on the relevant ports
ss -tpl
when you exit the session, the ports allocated will be released, but as usual this will take a little time. check which ports are still located with
ss -a
ss -a | grep TIME-
The number of ports should decrease as the resources are released
ss -a | grep TIME- | wc -l
On server
run-radiopadre -V .
On remote/local system
run-radiopadre -V com14.science.kat.ac.za:
If you have radiopadre running on the server side, but want to view it on a local system, use port forwarding
ssh -XY -L 5050:localhost:1024 -L 5051:localhost:1027 -L 5052:localhost:1028 com14
http://localhost:5050/tree?#notebooks
http://localhost:5052/?socketUrl=ws://localhost:5051
pip uninstall radiopadre-client
pip uninstall radiopadre
-fin-