Skip to content

Instantly share code, notes, and snippets.

View SpheMakh's full-sized avatar

Sphesihle Makhathini SpheMakh

View GitHub Profile
@SpheMakh
SpheMakh / wsclean-idg_Dockerfile
Last active April 7, 2020 14:21
wsclean with IDG (CPU only)
FROM kernsuite/base:5
MAINTAINER <sphemakh@gmail.com>
RUN docker-apt-install cmake \
wget \
subversion \
build-essential \
cmake \
gfortran \
g++ \
libncurses5-dev \

Keybase proof

I hereby claim:

  • I am sphemakh on github.
  • I am sphemakh (https://keybase.io/sphemakh) on keybase.
  • I have a public key ASCiXP3o1Qr4AJ31UdIV2Y7i5mqVp5jfsFHiklu_tI34Wwo

To claim this, I am signing this object:

@SpheMakh
SpheMakh / stimela_singularity.md
Last active June 3, 2019 09:22
Stimela with singularity

You have to use singularity now. Do this:

create a folder in your home called "STIMELA_IMAGES"

mkdir $HOME/STIMELA_IMAGES

add an environment variable called "STIMELA_IMAGES_PATH" (add it at the bottom of your $HOME/.bashrc file

export STIMELA_IMAGES_PATH=$HOME/STIMELA_IMAGES
"data-ms" : ms,
"data-column" : "DATA",
"out-column" : "ROUND2_DATA",
"weight-column" : "WEIGHT",
"out-subtract-dirs" : "1:",
"sol-jones" : "G,DD",
"sol-min-bl" : 300,
"g-clip-high" : 1.5,
"g-clip-low" : 0.5,
"g-solvable" : True,
#format: name ra_d dec_d i spi freq0 emaj_s emin_s pa_d
A 0 -30 7 -0.7 750e6 0 0 0
B 0.05 -30.005 7 -0.6 750e6 2 2.5 45
C -0.05 -29.995 10 -0.67 750e6 4 4 75
E 0.006 -30.001 5 -0.87 750e6 3 5 60
F -0.06 -29.991 1 -0.68 750e6 0 0 0
# import stimela package
import stimela
# Recipe I/O configuration
INPUT = "input-ska1mid" # This folder must exist
OUTPUT = "output-ska1mid"
MSDIR = "msdir-ska1mid"
PREFIX = "ska1mid-example" # Prefix for output images
# MS name
@SpheMakh
SpheMakh / predict_skylens.py
Last active April 25, 2017 12:34
Predict visibilities from a FITS image
import stimela
INPUT = 'input'
OUTPUT = 'output'
MSDIR = 'msdir'
MODEL = 'skylens.fits'
MS = 'test_predict_with_custom_fits.ms'
PREFIX = MS[:-3]
calibrate_ifrs = all
critical_flag_threshold = 50
de_subset.source_subset = =dE
de_subset.subset_enabled = 1
do_output = CORR_RES
me.e_enable = 0
me.p_enable = 0
me.use_smearing = 0
ms_rfl.read_flagsets = -stefcal
ms_rfl.read_legacy_flags = 1
emss_polar_beams.beam_symmetry = None
emss_polar_beams.filename_pattern = beam_$(hv).pat
emss_polar_beams.freq_labels = 1440,1442,1445,1447
emss_polar_beams.hier_interpol = 1
emss_polar_beams.horizon_masking = 0
emss_polar_beams.interpol_coord = lm
emss_polar_beams.l_beam_offset = 0.0
emss_polar_beams.m_beam_offset = 0.0
emss_polar_beams.normalization_factor = 1
emss_polar_beams.pattern_labels = a,b,c,d,e,f
@SpheMakh
SpheMakh / Dockerfile
Created April 4, 2016 11:53
stimela-calibrator
FROM radioastro/meqtrees
MAINTAINER <sphemakh@gmail.com>
RUN mkdir -p /input /output # I/O directories
ADD src /code # source code that runs the given task
WORKDIR /code
CMD sh run.sh # execute task