processing_components/imaging/primary_beams.py
def create_vp(model, telescope='MID', pointingcentre=None, padding=4, use_local=True):
    """
    Make an image like model and fill it with an analytical model of the voltage pattern
    :param model: Template image
    :param telescope: 'VLA' or 'ASKAP'
    :return: Primary beam image
    """
    if telescope == 'MID_GAUSS':
        log.debug("create_vp: Using numeric tapered Gaussian model for MID voltage pattern")
        
        edge = numpy.power(10, -0.6)
        return create_vp_generic_numeric(model, pointingcentre=pointingcentre, diameter=15.0, blockage=0.0,
                                         edge=edge, padding=padding, use_local=use_local)
    elif telescope == 'MID':
        log.debug("create_vp: Using no taper analytic model for MID voltage pattern")
        return create_vp_generic(model, pointingcentre=pointingcentre, diameter=15.0, blockage=0.0, use_local=use_local)
    elif telescope == 'MID_GRASP':
        log.debug("create_vp: Using GRASP model for MID voltage pattern")
        real_vp = import_image_from_fits(arl_path('data/models/MID_GRASP_VP_real.fits'))
        imag_vp = import_image_from_fits(arl_path('data/models/MID_GRASP_VP_imag.fits'))
        real_vp.data = real_vp.data + 1j * imag_vp.data
        real_vp.data /= numpy.max(numpy.abs(real_vp.data))
        return real_vp
    elif telescope == 'MID_FEKO_B1':
        log.debug("create_vp: Using FEKO model for MID voltage pattern")
        real_vp = import_image_from_fits(arl_path('data/models/MID_FEKO_VP_B1_45_0765_real.fits'))
        imag_vp = import_image_from_fits(arl_path('data/models/MID_FEKO_VP_B1_45_0765_imag.fits'))
        real_vp.data = real_vp.data + 1j * imag_vp.data
        real_vp.data /= numpy.max(numpy.abs(real_vp.data))
        return real_vp
    elif telescope == 'MID_FEKO_B2':
        log.debug("create_vp: Using FEKO model for MID voltage pattern")
        real_vp = import_image_from_fits(arl_path('data/models/MID_FEKO_VP_B2_45_1360_real.fits'))
        imag_vp = import_image_from_fits(arl_path('data/models/MID_FEKO_VP_B2_45_1360_imag.fits'))
        real_vp.data = real_vp.data + 1j * imag_vp.data
        real_vp.data /= numpy.max(numpy.abs(real_vp.data))
        return real_vp
    elif telescope == 'MID_FEKO_Ku':
        log.debug("create_vp: Using FEKO model for MID voltage pattern")
        real_vp = import_image_from_fits(arl_path('data/models/MID_FEKO_VP_Ku_45_12179_real.fits'))
        imag_vp = import_image_from_fits(arl_path('data/models/MID_FEKO_VP_Ku_45_12179_imag.fits'))
        real_vp.data = real_vp.data + 1j * imag_vp.data
        real_vp.data /= numpy.max(numpy.abs(real_vp.data))
        return real_vp
    elif telescope == 'MEERKAT':
        return create_vp_generic(model, pointingcentre=pointingcentre, diameter=13.5, blockage=0.0, use_local=use_local)
    elif telescope[0:3] == 'LOW':
        return create_low_test_vp(model)
    elif telescope[0:3] == 'VLA':
        return create_vp_generic(model, pointingcentre=pointingcentre, diameter=25.0, blockage=1.8, use_local=use_local)
    elif telescope[0:5] == 'ASKAP':
        return create_vp_generic(model, pointingcentre=pointingcentre, diameter=12.0, blockage=1.0, use_local=use_local)
    else:
        raise NotImplementedError('Telescope %s has no voltage pattern model' % telescope)

    Make an image like model and fill it with an analytical model of the voltage pattern
    :param model: Template image
    :param telescope: 'VLA' or 'ASKAP'
    :return: Primary beam image
    
Make an image like model and fill it with an analytical model of the voltage pattern
Make an image like model and fill it with an analytical model of the voltage pattern
def create_vp(model, telescope='MID', pointingcentre=None, padding=4, use_local=True):
    if telescope == 'MID_GAUSS':
        log.debug("create_vp: Using numeric tapered Gaussian model for MID voltage pattern")
        edge = numpy.power(10, -0.6)
        return create_vp_generic_numeric(model, pointingcentre=pointingcentre, diameter=15.0, blockage=0.0,
                                         edge=edge, padding=padding, use_local=use_local)
    elif telescope == 'MID':
        log.debug("create_vp: Using no taper analytic model for MID voltage pattern")
        return create_vp_generic(model, pointingcentre=pointingcentre, diameter=15.0, blockage=0.0, use_local=use_local)
    elif telescope == 'MID_GRASP':
        log.debug("create_vp: Using GRASP model for MID voltage pattern")
        real_vp = import_image_from_fits(arl_path('data/models/MID_GRASP_VP_real.fits'))
        imag_vp = import_image_from_fits(arl_path('data/models/MID_GRASP_VP_imag.fits'))
        real_vp.data = real_vp.data + 1j * imag_vp.data
        real_vp.data /= numpy.max(numpy.abs(real_vp.data))
        return real_vp
    elif telescope == 'MID_FEKO_B1':
        log.debug("create_vp: Using FEKO model for MID voltage pattern")
        real_vp = import_image_from_fits(arl_path('data/models/MID_FEKO_VP_B1_45_0765_real.fits'))
        imag_vp = import_image_from_fits(arl_path('data/models/MID_FEKO_VP_B1_45_0765_imag.fits'))
        real_vp.data = real_vp.data + 1j * imag_vp.data
        real_vp.data /= numpy.max(numpy.abs(real_vp.data))
        return real_vp
    elif telescope == 'MID_FEKO_B2':
        log.debug("create_vp: Using FEKO model for MID voltage pattern")
        real_vp = import_image_from_fits(arl_path('data/models/MID_FEKO_VP_B2_45_1360_real.fits'))
        imag_vp = import_image_from_fits(arl_path('data/models/MID_FEKO_VP_B2_45_1360_imag.fits'))
        real_vp.data = real_vp.data + 1j * imag_vp.data
        real_vp.data /= numpy.max(numpy.abs(real_vp.data))
        return real_vp
    elif telescope == 'MID_FEKO_Ku':
        log.debug("create_vp: Using FEKO model for MID voltage pattern")
        real_vp = import_image_from_fits(arl_path('data/models/MID_FEKO_VP_Ku_45_12179_real.fits'))
        imag_vp = import_image_from_fits(arl_path('data/models/MID_FEKO_VP_Ku_45_12179_imag.fits'))
        real_vp.data = real_vp.data + 1j * imag_vp.data
        real_vp.data /= numpy.max(numpy.abs(real_vp.data))
        return real_vp
    elif telescope == 'MEERKAT':
        return create_vp_generic(model, pointingcentre=pointingcentre, diameter=13.5, blockage=0.0, use_local=use_local)
    elif telescope[0:3] == 'LOW':
        return create_low_test_vp(model)
    elif telescope[0:3] == 'VLA':
        return create_vp_generic(model, pointingcentre=pointingcentre, diameter=25.0, blockage=1.8, use_local=use_local)
    elif telescope[0:5] == 'ASKAP':
        return create_vp_generic(model, pointingcentre=pointingcentre, diameter=12.0, blockage=1.0, use_local=use_local)
    else:
        raise NotImplementedError('Telescope %s has no voltage pattern model' % telescope)
def create_vp ( model , telescope = 'MID' , pointingcentre = None , padding = 4 , use_local = True ) : if telescope == 'MID_GAUSS' : log . debug ( "create_vp: Using numeric tapered Gaussian model for MID voltage pattern" ) edge = numpy . power ( 10 , - 0.6 ) return create_vp_generic_numeric ( model , pointingcentre = pointingcentre , diameter = 15.0 , blockage = 0.0 , edge = edge , padding = padding , use_local = use_local ) elif telescope == 'MID' : log . debug ( "create_vp: Using no taper analytic model for MID voltage pattern" ) return create_vp_generic ( model , pointingcentre = pointingcentre , diameter = 15.0 , blockage = 0.0 , use_local = use_local ) elif telescope == 'MID_GRASP' : log . debug ( "create_vp: Using GRASP model for MID voltage pattern" ) real_vp = import_image_from_fits ( arl_path ( 'data/models/MID_GRASP_VP_real.fits' ) ) imag_vp = import_image_from_fits ( arl_path ( 'data/models/MID_GRASP_VP_imag.fits' ) ) real_vp . data = real_vp . data + 1j * imag_vp . data real_vp . data /= numpy . max ( numpy . abs ( real_vp . data ) ) return real_vp elif telescope == 'MID_FEKO_B1' : log . debug ( "create_vp: Using FEKO model for MID voltage pattern" ) real_vp = import_image_from_fits ( arl_path ( 'data/models/MID_FEKO_VP_B1_45_0765_real.fits' ) ) imag_vp = import_image_from_fits ( arl_path ( 'data/models/MID_FEKO_VP_B1_45_0765_imag.fits' ) ) real_vp . data = real_vp . data + 1j * imag_vp . data real_vp . data /= numpy . max ( numpy . abs ( real_vp . data ) ) return real_vp elif telescope == 'MID_FEKO_B2' : log . debug ( "create_vp: Using FEKO model for MID voltage pattern" ) real_vp = import_image_from_fits ( arl_path ( 'data/models/MID_FEKO_VP_B2_45_1360_real.fits' ) ) imag_vp = import_image_from_fits ( arl_path ( 'data/models/MID_FEKO_VP_B2_45_1360_imag.fits' ) ) real_vp . data = real_vp . data + 1j * imag_vp . data real_vp . data /= numpy . max ( numpy . abs ( real_vp . data ) ) return real_vp elif telescope == 'MID_FEKO_Ku' : log . debug ( "create_vp: Using FEKO model for MID voltage pattern" ) real_vp = import_image_from_fits ( arl_path ( 'data/models/MID_FEKO_VP_Ku_45_12179_real.fits' ) ) imag_vp = import_image_from_fits ( arl_path ( 'data/models/MID_FEKO_VP_Ku_45_12179_imag.fits' ) ) real_vp . data = real_vp . data + 1j * imag_vp . data real_vp . data /= numpy . max ( numpy . abs ( real_vp . data ) ) return real_vp elif telescope == 'MEERKAT' : return create_vp_generic ( model , pointingcentre = pointingcentre , diameter = 13.5 , blockage = 0.0 , use_local = use_local ) elif telescope [ 0 : 3 ] == 'LOW' : return create_low_test_vp ( model ) elif telescope [ 0 : 3 ] == 'VLA' : return create_vp_generic ( model , pointingcentre = pointingcentre , diameter = 25.0 , blockage = 1.8 , use_local = use_local ) elif telescope [ 0 : 5 ] == 'ASKAP' : return create_vp_generic ( model , pointingcentre = pointingcentre , diameter = 12.0 , blockage = 1.0 , use_local = use_local ) else : raise NotImplementedError ( 'Telescope %s has no voltage pattern model' % telescope )
Make an image like model and fill it with an analytical model of the voltage pattern
Make an image like model and fill it with an analytical model of the voltage pattern
"""
    Make an image like model and fill it with an analytical model of the voltage pattern
    :param model: Template image
    :param telescope: 'VLA' or 'ASKAP'
    :return: Primary beam image
    """
Primary beam image
Primary beam image
model
None
telescope
'VLA' or 'ASKAP'
' VLA ' or ' ASKAP '
pointingcentre
padding
use_local