Exemplo n.º 1
0
#
"""
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)

# Done
Exemplo n.º 2
0
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

clean_number = int(os.getenv('CLEAN_NUMBER', -1))
cube_dir = join(cube_dir, '{0}'.format(clean_number))
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))

sorted(vis_dirs_cube)

do_cube(vis_dirs_cube[:clean_number], cube_dir, freq_min, freq_max, freq_step,
        freq_width)

# Done
Exemplo n.º 3
0
#
"""
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)

# Done
Exemplo n.º 4
0
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


clean_number = int(os.getenv('CLEAN_NUMBER', -1))
cube_dir = join(cube_dir, '{0}'.format(clean_number))
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))

sorted(vis_dirs_cube)

do_cube(vis_dirs_cube[:clean_number], cube_dir, freq_min, freq_max, freq_step, freq_width)

# Done