Skip to content

Commit e80e7e8

Browse files
committed
Merge branch 'main' into docs
2 parents 1b50f92 + 3e98eef commit e80e7e8

15 files changed

+460
-194
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,6 @@ profiling.md
2626
/docs/build
2727
/docs/doctrees
2828
example_data/
29+
build/
30+
scripts/epochs.txt
31+
scripts/mean.txt

README.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,14 @@ once this is complete, run the viewer in the main Nextflow directory via:
107107
This will run the viewer using the images within the default ``results`` directory. If your directory is different to the default, you can add either the relative or absolute path as an optional argument:
108108

109109
```
110-
./run_robbie_viewer.sh path_to_dir
110+
./run_robbie_viewer.sh -p path_to_dir
111+
```
112+
113+
When plotting large images, it is recommended to also specify an RA and DEC position, as well as a size in coordinate units, to cutout a portion of the image for plotting.
114+
For example, if we want to plot an image with centre position of RA 335°, DEC -15° and size of 5°:
115+
116+
```
117+
./run_robbie_viewer.sh path_to_dir 335 -15 5
111118
```
112119

113120
## Credit

docker/Dockerfile

+1
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,5 @@ RUN pip install -r requirements.txt && \
2020
python setup.py install && \
2121
rm -rf /tmp/build
2222

23+
# set env
2324
ENV HOME=/tmp

docker/build_docker_arm.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ cd ..
33
version=$(robbie_version.sh)
44

55
# build the container and update tag
6-
docker buildx build . --platform linux/amd64 -f docker/Dockerfile -t "paulhancock/robbie-next:${version}" && \
6+
docker buildx build . --platform linux/amd64 --no-cache -f docker/Dockerfile -t "paulhancock/robbie-next:${version}" && \
77
docker tag paulhancock/robbie-next:${version} paulhancock/robbie-next:latest
88
cd -

docs/source/visualisation.md

+25-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
(visualisation)=
22
## Visualisation
33

4+
### Running locally with Docker
45
To start the Docker container containing the Bokeh server, run the following script in the main Nextflow directory:
56

67
``` bash
@@ -10,9 +11,32 @@ To start the Docker container containing the Bokeh server, run the following scr
1011
This will run the viewer using the images output from Robbie within the default ``results`` directory. If your output directory is different to the default, you can add either the relative or absolute path as an optional argument:
1112

1213
``` bash
13-
./run_robbie_viewer.sh path_to_dir
14+
./run_robbie_viewer.sh -p path_to_dir
1415
```
1516

17+
When plotting large images, it is recommended to also specify an RA and DEC position, as well as a size in coordinate units, to cutout a portion of the image for plotting. For example, if we want to plot an image with centre position of RA 335°, DEC -15° and size of 5°:
18+
19+
``` bash
20+
./run_robbie_viewer.sh -p path_to_dir -c 335,-15,5
21+
```
22+
23+
### Running on a cluster with Singularity
24+
25+
The Robbie Viewer is available on Pawsey as a part of the SHPC (Singularity Recipe HPC). To install it, we will load the SHPC module, install the viewer as a module and then load it:
26+
27+
``` bash
28+
module load shpc/0.0.53
29+
shpc install cjproud/robbie_viewer
30+
module load cjproud/robbie_viewer/latest/module
31+
```
32+
33+
Now, the viewer will be available on our path and we can run it as normal:
34+
35+
``` bash
36+
./run_robbie_viewer.sh -p path_to_dir -c RA,DEC,PAD
37+
```
38+
39+
1640
### Visualising transients
1741

1842
Visualising different transient candidates can be done in multiple ways. For example, the transient candidate can be selected using the table, sky plot or variables plot as shown below:

nextflow.config

+5-1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ timeline.enabled = true
4242
report.enabled = true
4343
dag.enabled = true
4444

45+
// get hostname
46+
host = "$HOSTNAME".split('-')[0]
4547

4648
profiles {
4749
local {
@@ -102,12 +104,14 @@ profiles {
102104
}
103105
}
104106
}
105-
if ( "\$HOSTNAME".startsWith("garrawarla") ) {
107+
108+
if ( host == "garrawarla") ) {
106109
// Set up container
107110
process.module = 'singularity/3.7.4'
108111
singularity {
109112
enabled = true
110113
envWhitelist = 'SINGULARITY_BINDPATH, SINGULARITYENV_LD_LIBRARY_PATH'
114+
runOptions = '--bind $HOME:/$HOME'
111115
}
112116
params.containerDir = '/pawsey/mwa/singularity'
113117

robbie.nf

+3-2
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ process download_gleam_catalogue {
177177
try:
178178
cat.write(data_load.REF_CAT, format='fits')
179179
os.symlink(data_load.REF_CAT, "GLEAM_ref_cat.fits")
180-
except PermissionError:
180+
except OSError:
181181
# No permission so dump it here
182182
cat.write("GLEAM_ref_cat.fits", format='fits')
183183
"""
@@ -553,7 +553,7 @@ process reproject_images {
553553
"""
554554
echo ${task.process} on \${HOSTNAME}
555555
mkdir reprojected_images
556-
ls *Epoch* > temp_epochs.txt
556+
ls *.fits | grep -v "mean_image" > temp_epochs.txt
557557
ls *mean_image.* > temp_mean.txt
558558
reprojection.py --epochs temp_epochs.txt --mean temp_mean.txt --reproj_dir reprojected_images
559559
"""
@@ -588,6 +588,7 @@ workflow {
588588
image_ch = fits_warp.out
589589
image_bkg_rms = fits_warp.out.concat(bane_raw.out.map{ it -> [it[0], [it[1..2]]]}).groupTuple().map{ it -> [ it[0], it[1][0], it[1][1][0][1]]}
590590
}
591+
591592
make_mean_image( image_ch.map{ it -> it[1] }.collect() )
592593
make_sky_coverage( image_ch.map{ it -> it[1] }.collect() )
593594
bane_mean_image( make_mean_image.out[0] )

robbie_viewer_server/Dockerfile

-2
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,3 @@ RUN pip install -r requirements.txt
1515

1616
# EXPOSE PORTS
1717
EXPOSE 5006
18-
19-
CMD bokeh serve . --args /data

robbie_viewer_server/build_docker.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#! /usr/bin/env bash
22

33
# build the container and add a target
4-
docker build . -f ./Dockerfile -t "paulhancock/robbie-viewer:latest"
4+
docker build . -f ./Dockerfile -t "paulhancock/robbie-viewer:latest"
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#! /usr/bin/env bash
22

33
# build the container and add a target
4-
docker buildx build . --platform linux/amd64 -f ./Dockerfile -t "paulhancock/robbie-viewer:latest"
4+
docker buildx build . --platform linux/amd64 -f ./Dockerfile -t "paulhancock/robbie-viewer:latest"

0 commit comments

Comments
 (0)