Tohban EOVSA Imaging Tutorial A-Z: Difference between revisions
Jump to navigation
Jump to search
| Line 106: | Line 106: | ||
<pre style="background-color: #FCEBD9"> | <pre style="background-color: #FCEBD9"> | ||
>> loadcasa5 | >> loadcasa5 | ||
>> | >> suncasa #This should load the software and you are ready for analysis | ||
</pre> | </pre> | ||
To load CASA 6: | To load CASA 6: | ||
Revision as of 15:12, 6 October 2021
Connection details to pipeline server
Step 1: Downloading raw data (IDB) on pipeline server
On CASA of the Pipeline machine,
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)
Connection details to Inti server
For Windows, on Mobaxterm,
- Connect to any afsconnect servers (for example, afsaccess3.njit.edu) using UCID ss2273 and your UCID password.
- ssh -X UCID@inti.hpcnet.campus.njit.edu
cd /inti/data/users/YOURDIRECTORY #YOURDIRECTORY folder was created by Sijie for having enough space with EOVSA data analysis
For Linux or Mac machine,
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 Inti.
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 >> 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
Step 4: Self-calibration on Inti server
https://github.com/binchensun/casa-eovsa/blob/master/slfcal_example.py