:py:mod:`survey_post` ===================== .. py:module:: survey_post Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: survey_post.arg_init survey_post.t_string survey_post.submit survey_post.launch survey_post.gen_selavy survey_post.census survey_post.get_census survey_post.check_seq survey_post.check_fits survey_post.check_lk survey_post.run_postpipe survey_post.main Attributes ~~~~~~~~~~ .. autoapisummary:: survey_post.NOFORMAT survey_post.debug survey_post.queue_max survey_post.queue_per_field survey_post.queue_extra survey_post.queue_sleep survey_post.explanation survey_post.copy_script survey_post.fcor_script survey_post.sel_in survey_post.sel_slurm survey_post.askap_version survey_post.scripts .. py:data:: NOFORMAT :value: '{noformat}\n' .. py:data:: debug :value: False .. py:data:: queue_max :value: 7000 .. py:data:: queue_per_field :value: 60 .. py:data:: queue_extra :value: 50 .. py:data:: queue_sleep :value: 200 .. py:data:: explanation :value: Multiline-String .. raw:: html
Show Value .. code-block:: python """ This is a post-processing pipeline for RACS -------------------------------------------------------------- """ .. raw:: html
.. py:data:: copy_script :value: Multiline-String .. raw:: html
Show Value .. code-block:: python """#!/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 """ .. raw:: html
.. py:data:: fcor_script :value: Multiline-String .. raw:: html
Show Value .. code-block:: python """#!/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 """ .. raw:: html
.. py:data:: sel_in :value: Multiline-String .. raw:: html
Show Value .. code-block:: python """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""" .. raw:: html
.. py:data:: sel_slurm :value: Multiline-String .. raw:: html
Show Value .. code-block:: python """#!/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 """ .. raw:: html
.. py:data:: askap_version .. py:data:: scripts .. py:function:: arg_init() .. py:function:: t_string(db_time) .. py:function:: submit(batch, dep) .. py:function:: launch(slurm_script, seq, pre_sh, scr_dir, args, dep='') :param slurm_script: Blank script to be completed before submission :param seq: A unique tag (could be sequence number) do distinguish different slurm scripts :param pre_sh: Script to be run by slurm file before main task :param scr_dir: Directiotry to write slurm scriptt :param args: Arguments for script :param dep: Dependence for sbatch - a jobid of earlier job. :return: .. py:function:: gen_selavy(survey, db_row, pre_sh, scr_dir) .. py:function:: census(survey, cal_sbid, sbid, verbose=False) .. py:function:: get_census(cal_sbid, sbid=-1, verbose=False) .. py:function:: check_seq(survey, csb, sbid, file_items, verbose=False) .. py:function:: check_fits(fits_file_name) .. py:function:: check_lk(survey, csb, sb=-1, verbose=False) .. py:function:: run_postpipe(survey, csb, sbid, field, flags) .. py:function:: main()