Difference between revisions of "Tohban EOVSA Imaging Tutorial A-Z"

From EOVSA Wiki
Jump to: navigation, search
(Created page with "===== Step 1: Downloading raw data (IDB) on pipeline server===== On pipeline, CASA <pre style="background-color: #FCEBD9"> from astropy.time import Time import os trange = Ti...")
 
Line 77: Line 77:
 
=== Connection details to pipeline and inti servers ===
 
=== Connection details to pipeline and inti servers ===
 
=== Transferring details between servers ===
 
=== Transferring details between servers ===
 +
 +
=== Software details on the servers ===
 +
On Inti,
 +
when logging in for the first time, please add the following lines to your accounts .bashrc file.
 +
 +
>>vi .bashrc 
 +
Insert the text given below and save it.
 +
#### setting start ####
 +
if [ $HOSTNAME == "baozi.hpcnet.campus.njit.edu" ]; then
 +
    source /srg/.setenv_baozi
 +
fi
 +
if [ $HOSTNAME == "inti.hpcnet.campus.njit.edu" ]; then
 +
    source /inti/.setenv_inti
 +
fi
 +
if [ $HOSTNAME == "guko.resource.campus.njit.edu" ]; then
 +
    source /data/data/.setenv_guko
 +
fi
 +
#### setting end ####
 +
 +
Both CASA 5 and 6 are available on into.
 +
 +
Please enter the bash environment on inti, and load the desired casa environment with the alias below.
 +
To load CASA 5:
 +
Enter bash environment by giving >>bash
 +
 +
>> loadcasa5
 +
>> casa  or suncasa              #This should load the software and you are ready for analysis
 +
 +
To load CASA 6:
 +
Enter bash environment by giving >>bash
 +
 +
>>loadcasa6
 +
>>ipython                      #This should load the software and you are ready for analysis
 +
 +
Here, for example, to use clean, first start ipython as given above, then type in >>from casatasks import tclean

Revision as of 14:29, 16 July 2021

Step 1: Downloading raw data (IDB) on pipeline server

On pipeline, CASA

from astropy.time import Time
import os
trange = Time(['2017-08-21 20:15:00', '2017-08-21 20:25:00'])
#### (Optional) change output path, default current directory "./" #####
outpath = './msdata/'
if not os.path.exists(outpath):
    os.makedirs(outpath)
######################################################
msfiles = importeovsa(idbfiles=trange, ncpu=1[, visprefix=outpath])

OR

from suncasa.tasks import task_calibeovsa as calibeovsa
from suncasa.tasks import task_importeovsa as timporteovsa
from split_cli import split_cli as split
import dump_tsys as dt
from util import Time
import numpy as np
import os
from glob import glob
from eovsapy import util


trange = Time(['2020-06-07 21:35:00', '2020-06-07 21:55:00'])
idbdir = util.get_idbdir(trange[0])

info = dt.rd_fdb(trange[0])
sidx = np.where(
    np.logical_and(info['SOURCEID'] == 'Sun', info['PROJECTID'] == 'NormalObserving') & np.logical_and(
        info['ST_TS'].astype(np.float) >= trange[0].lv,
        info['ST_TS'].astype(np.float) <= trange[
            1].lv))
filelist = info['FILE'][sidx]

outpath = './msdata/'
if not os.path.exists(outpath):
    os.makedirs(outpath)
inpath = idbdir + '{}/'.format(trange[0].datetime.strftime("%Y%m%d"))
ncpu = 1

msfiles = timporteovsa.importeovsa(idbfiles=[inpath + ll for ll in filelist], ncpu=ncpu, timebin="0s", width=1,
                                   visprefix=outpath,
                                   nocreatms=False, doconcat=False,
                                   modelms="", doscaling=False, keep_nsclms=False, udb_corr=True)


Step 2: Concatenate all the 10 mins data

# This is to set the path/name for the concatenated files
concatvis = os.path.basename(msfiles[0])[:11] + '_concat.ms'
vis = calibeovsa(msfiles, doconcat=True, concatvis=concatvis[, msoutdir=outpath])


Step 3: Calibration

calibeovsa(vis='IDB20170821202020.ms', caltype=['refpha','phacal'], doimage=True)

Step 4: Self-calibration on inti server

https://github.com/binchensun/casa-eovsa/blob/master/slfcal_example.py

Step 5: Quick-look imaging

Step 6: Final imaging

Connection details to pipeline and inti servers

Transferring details between servers

Software details on the servers

On Inti, when logging in for the first time, please add the following lines to your accounts .bashrc file.

>>vi .bashrc Insert the text given below and save it.

        1. setting start ####

if [ $HOSTNAME == "baozi.hpcnet.campus.njit.edu" ]; then

   source /srg/.setenv_baozi

fi if [ $HOSTNAME == "inti.hpcnet.campus.njit.edu" ]; then

   source /inti/.setenv_inti

fi if [ $HOSTNAME == "guko.resource.campus.njit.edu" ]; then

   source /data/data/.setenv_guko

fi

        1. setting end ####

Both CASA 5 and 6 are available on into.

Please enter the bash environment on inti, and load the desired casa environment with the alias below. To load CASA 5: Enter bash environment by giving >>bash

>> loadcasa5 >> casa or suncasa #This should load the software and you are ready for analysis

To load CASA 6: Enter bash environment by giving >>bash

>>loadcasa6 >>ipython #This should load the software and you are ready for analysis

Here, for example, to use clean, first start ipython as given above, then type in >>from casatasks import tclean