コード例 #1
0
ファイル: loop_clean.py プロジェクト: ICRAR/chiles_pipeline
#    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
#    MA 02111-1307  USA
#
"""
Taken from makecube.py extracting the loop over clean

This module should run together with the casapy: e.g. casapy --nologger -c loop_clean.py
"""
import fnmatch
import os
from os.path import join, exists

from makecube_defines import check_dir, cube_dir, vis_dirs, run_id, do_cube, freq_min, freq_max, freq_step, freq_width


check_dir(cube_dir)

print '''
vis_dirs = {0}
run_id   = {1}'''.format(vis_dirs, run_id)

vis_dirs_cube = []
for root, dir_names, filenames in os.walk(vis_dirs):
    for match in fnmatch.filter(dir_names, 'vis_*'):
        full_dir_name = join(root, match)
        # Make sure it contains data
        if exists(join(full_dir_name, 'table.dat')):
            vis_dirs_cube.append('{0}'.format(full_dir_name))

do_cube(vis_dirs_cube, cube_dir, freq_min, freq_max, freq_step, freq_width)
コード例 #2
0
ファイル: loop_cvel.py プロジェクト: ICRAR/aws-chiles02
#    License along with this library; if not, write to the Free Software
#    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
#    MA 02111-1307  USA
#
"""
Taken from makecube.py extracting the loop over cvel

This module should run together with the casapy: e.g. casapy --nologger -c loop_cvel.py
"""
import os

from makecube_defines import check_dir, get_my_obs, vis_bk_dirs, vis_dirs, obs_dir, do_cvel, freq_max, freq_min, freq_step, freq_width, spec_window, INPUT_VIS_SUFFIX


# loop through selected obs and cvel. Uses obId to only do subset of possible
check_dir(vis_dirs)
check_dir(vis_bk_dirs)

obs_list = get_my_obs(obs_dir)
# dump_all()

for obs in obs_list:
    infile_dir = os.path.join(obs_dir, obs)

    infile = None
    for ff in os.listdir(infile_dir):
        if ff.endswith(INPUT_VIS_SUFFIX):
            infile = '{0}/{1}'.format(infile_dir, ff)
    if not infile:
        print 'No measurementSet file found under {0}'.format(infile_dir)
        continue
コード例 #3
0
#    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
#    MA 02111-1307  USA
#
"""
Taken from makecube.py extracting the loop over clean

This module should run together with the casapy: e.g. casapy --nologger -c loop_clean.py
"""
import fnmatch
import os
from os.path import join, exists

from makecube_defines import check_dir, cube_dir, vis_dirs, run_id, do_cube, freq_min, freq_max, freq_step, freq_width


check_dir(cube_dir)

print '''
vis_dirs = {0}
run_id   = {1}'''.format(vis_dirs, run_id)

vis_dirs_cube = []
for root, dir_names, filenames in os.walk('/mnt'):
    for match in fnmatch.filter(dir_names, '*.ms'):
        full_dir_name = join(root, match)
        # Make sure it contains data
        if exists(join(full_dir_name, 'table.dat')):
            vis_dirs_cube.append('{0}'.format(full_dir_name))

do_cube(vis_dirs_cube, cube_dir, freq_min, freq_max, freq_step, freq_width)
コード例 #4
0
ファイル: loop_cvel.py プロジェクト: astrowork/aws-chiles02
#    You should have received a copy of the GNU Lesser General Public
#    License along with this library; if not, write to the Free Software
#    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
#    MA 02111-1307  USA
#
"""
Taken from makecube.py extracting the loop over cvel

This module should run together with the casapy: e.g. casapy --nologger -c loop_cvel.py
"""
import os

from makecube_defines import check_dir, get_my_obs, vis_bk_dirs, vis_dirs, obs_dir, do_cvel, freq_max, freq_min, freq_step, freq_width, spec_window, INPUT_VIS_SUFFIX

# loop through selected obs and cvel. Uses obId to only do subset of possible
check_dir(vis_dirs)
check_dir(vis_bk_dirs)

obs_list = get_my_obs(obs_dir)
# dump_all()

for obs in obs_list:
    infile_dir = os.path.join(obs_dir, obs)

    infile = None
    for ff in os.listdir(infile_dir):
        if ff.endswith(INPUT_VIS_SUFFIX):
            infile = '{0}/{1}'.format(infile_dir, ff)
    if not infile:
        print 'No measurementSet file found under {0}'.format(infile_dir)
        continue