survey_post

Module Contents

Functions

arg_init()

t_string(db_time)

submit(batch, dep)

launch(slurm_script, seq, pre_sh, scr_dir, args[, dep])

param slurm_script:

Blank script to be completed before submission

gen_selavy(survey, db_row, pre_sh, scr_dir)

census(survey, cal_sbid, sbid[, verbose])

get_census(cal_sbid[, sbid, verbose])

check_seq(survey, csb, sbid, file_items[, verbose])

check_fits(fits_file_name)

check_lk(survey, csb[, sb, verbose])

run_postpipe(survey, csb, sbid, field, flags)

main()

Attributes

NOFORMAT

debug

queue_max

queue_per_field

queue_extra

queue_sleep

explanation

copy_script

fcor_script

sel_in

sel_slurm

askap_version

scripts

survey_post.NOFORMAT = '{noformat}\n'[source]
survey_post.debug = False[source]
survey_post.queue_max = 7000[source]
survey_post.queue_per_field = 60[source]
survey_post.queue_extra = 50[source]
survey_post.queue_sleep = 200[source]
survey_post.explanation = Multiline-String[source]
Show Value
"""
This is a post-processing pipeline for RACS
--------------------------------------------------------------

"""
survey_post.copy_script = Multiline-String[source]
Show Value
"""#!/bin/bash
#SBATCH --export=NONE
#SBATCH --output=/group/askap/mcc381/logs/%j-copy.out
#SBATCH --error=/group/askap/mcc381/logs/%j-copy.err
#SBATCH --account=askap
#SBATCH --clusters=galaxy
#SBATCH --mail-user=david.mcconnell@csiro.au
#SBATCH --mail-type=FAIL
#SBATCH --nodes=1
#SBATCH --ntasks=1
#SBATCH --job-name=copy
#SBATCH --partition=workq
#SBATCH --time=00:05:00

source /home/mcc381/racs_init.sh

# Expects: pre-sh, csb, field
pre_sh="{0}"
csb="{1:d}"
field="{2}"

origin="/group/askap/chale/RACS/Common-Beam-Images/"
wildcard="*RACS_tes*cres.fits"
destdir=/askapbuffer/scott/mcc381/RACS/$csb/

$pre_sh
echo $origin$wildcard/$field to $destdir

cp --preserve=timestamps $origin$csb/$field/$wildcard $destdir$field

"""
survey_post.fcor_script = Multiline-String[source]
Show Value
"""#!/bin/bash -l
#SBATCH --cluster=galaxy
#SBATCH --partition=workq
#SBATCH --account=askap
#SBATCH --mail-user=david.mcconnell@csiro.au
#SBATCH --mail-type=FAIL
#SBATCH --time=00:28:00
#SBATCH --ntasks=1
#SBATCH --ntasks-per-node=1
#SBATCH --job-name=racsfluxcorrt
#SBATCH --export=NONE
#SBATCH --output=racs_flux_corr.out
source /home/mcc381/racs_init.sh

# Expects pre_sh, working_dir, file_name
pre_sh="{0}"
wd="{1}"
filename="{2}"

$pre_sh

cd $wd
echo $PWD

srun --export=ALL racs_flux_corr.py -c $RACS/fcorr.taylor.0.20200623_1441.fits -l $filename > $RACS/racs_flux_corr_${3}.out
"""
survey_post.sel_in = Multiline-String[source]
Show Value
"""Selavy.image                                    = {}
Selavy.sbid                                     = {}
Selavy.sourceIdBase                             = {}
Selavy.imageHistory                             = ["Produced with ASKAPsoft version {}"]
Selavy.imagetype                                = fits
#
# These parameters define the measurement of spectral indices
Selavy.spectralTermsFromTaylor                  = true
Selavy.findSpectralTerms                        = [true, false]
Selavy.spectralTermImages                       = [{}, ]
Selavy.nsubx                                    = 6
Selavy.nsuby                                    = 3
Selavy.overlapx                                 = 0
Selavy.overlapy                                 = 0
#
Selavy.resultsFile                              = {}
#
# Detection threshold
Selavy.snrCut                                   = 5
Selavy.flagGrowth                               = true
Selavy.growthThreshold                          = 3
#
Selavy.VariableThreshold                        = true
Selavy.VariableThreshold.boxSize                = 50
Selavy.VariableThreshold.imagetype              = fits
Selavy.Weights.weightsImage                     = {}
Selavy.Weights.weightsCutoff                    = 0.04
#
Selavy.Fitter.doFit                             = true
Selavy.Fitter.fitTypes                          = [full]
Selavy.Fitter.numGaussFromGuess                 = true
Selavy.Fitter.maxReducedChisq                   = 10.
Selavy.Fitter.imagetype                         = fits
Selavy.Fitter.writeComponentMap                 = false
#
Selavy.threshSpatial                            = 5
Selavy.flagAdjacent                             = true
#
Selavy.minPix                                   = 3
Selavy.minVoxels                                = 3
Selavy.minChannels                              = 1
Selavy.sortingParam                             = -pflux
#
# Precision of values
# Selavy.precFlux                                 = 5
# Selavy.precSize                                 = 4
# Selavy.precShape                                = 4
# Selavy.precPos                                  = 6
# Selavy.precSolidangle                           = 4
# Selavy.precSNR                                  = 4
# Not performing RM Synthesis for this case
Selavy.RMSynthesis                              = false"""
survey_post.sel_slurm = Multiline-String[source]
Show Value
"""#!/bin/bash -l
#SBATCH --time=02:00:00
#SBATCH --nodes=2
#SBATCH --job-name=selavy
#SBATCH --no-requeue
#SBATCH --export=NONE
#SBATCH --mail-user=david.mcconnell@csiro.au
#SBATCH --mail-type=FAIL
#SBATCH --account=askap
#SBATCH -M galaxy
#SBATCH -p workq

source /home/mcc381/racs_init.sh

module load casa

{0}
cd $RACS/scripts/tmp
srun --export=ALL --ntasks=19 --ntasks-per-node=10 selavy -c {1} > $RACS/selavy_${2}.out

"""
survey_post.askap_version[source]
survey_post.scripts[source]
survey_post.arg_init()[source]
survey_post.t_string(db_time)[source]
survey_post.submit(batch, dep)[source]
survey_post.launch(slurm_script, seq, pre_sh, scr_dir, args, dep='')[source]
Parameters:
  • slurm_script – Blank script to be completed before submission

  • seq – A unique tag (could be sequence number) do distinguish different slurm scripts

  • pre_sh – Script to be run by slurm file before main task

  • scr_dir – Directiotry to write slurm scriptt

  • args – Arguments for script

  • dep – Dependence for sbatch - a jobid of earlier job.

Returns:

survey_post.gen_selavy(survey, db_row, pre_sh, scr_dir)[source]
survey_post.census(survey, cal_sbid, sbid, verbose=False)[source]
survey_post.get_census(cal_sbid, sbid=-1, verbose=False)[source]
survey_post.check_seq(survey, csb, sbid, file_items, verbose=False)[source]
survey_post.check_fits(fits_file_name)[source]
survey_post.check_lk(survey, csb, sb=-1, verbose=False)[source]
survey_post.run_postpipe(survey, csb, sbid, field, flags)[source]
survey_post.main()[source]