blimpy/calib_utils/stokescal.py
def write_stokefils(str, str_I, Ifil=False, Qfil=False, Ufil=False, Vfil=False, Lfil=False, **kwargs):
    '''Writes up to 5 new filterbank files corresponding to each Stokes
    parameter (and total linear polarization L) for a given cross polarization .fil file'''

    I,Q,U,V,L=get_stokes(str, **kwargs)
    obs = Waterfall(str_I, max_load=150) #Load filterbank file to write stokes data to
    if Ifil:
        obs.data = I
        obs.write_to_fil(str[:-15]+'.I.fil')   #assuming file is named *.cross_pols.fil

    if Qfil:
        obs.data = Q
        obs.write_to_fil(str[:-15]+'.Q.fil')   #assuming file is named *.cross_pols.fil

    if Ufil:
        obs.data = U
        obs.write_to_fil(str[:-15]+'.U.fil')   #assuming file is named *.cross_pols.fil

    if Vfil:
        obs.data = V
        obs.write_to_fil(str[:-15]+'.V.fil')   #assuming file is named *.cross_pols.fil

    if Lfil:
        obs.data = L
        obs.write_to_fil(str[:-15]+'.L.fil')
def write_stokefils(str, str_I, Ifil=False, Qfil=False, Ufil=False, Vfil=False, Lfil=False, **kwargs):
    '''Writes up to 5 new filterbank files corresponding to each Stokes
    parameter (and total linear polarization L) for a given cross polarization .fil file'''

    I,Q,U,V,L=get_stokes(str, **kwargs)
    obs = Waterfall(str_I, max_load=150) #Load filterbank file to write stokes data to
    if Ifil:
        obs.data = I
        obs.write_to_fil(str[:-15]+'.I.fil')   #assuming file is named *.cross_pols.fil

    if Qfil:
        obs.data = Q
        obs.write_to_fil(str[:-15]+'.Q.fil')   #assuming file is named *.cross_pols.fil

    if Ufil:
        obs.data = U
        obs.write_to_fil(str[:-15]+'.U.fil')   #assuming file is named *.cross_pols.fil

    if Vfil:
        obs.data = V
        obs.write_to_fil(str[:-15]+'.V.fil')   #assuming file is named *.cross_pols.fil

    if Lfil:
        obs.data = L
        obs.write_to_fil(str[:-15]+'.L.fil')
def write_stokefils ( str , str_I , Ifil = False , Qfil = False , Ufil = False , Vfil = False , Lfil = False , * * kwargs ) : I , Q , U , V , L = get_stokes ( str , * * kwargs ) obs = Waterfall ( str_I , max_load = 150 ) #Load filterbank file to write stokes data to if Ifil : obs . data = I obs . write_to_fil ( str [ : - 15 ] + '.I.fil' ) #assuming file is named *.cross_pols.fil if Qfil : obs . data = Q obs . write_to_fil ( str [ : - 15 ] + '.Q.fil' ) #assuming file is named *.cross_pols.fil if Ufil : obs . data = U obs . write_to_fil ( str [ : - 15 ] + '.U.fil' ) #assuming file is named *.cross_pols.fil if Vfil : obs . data = V obs . write_to_fil ( str [ : - 15 ] + '.V.fil' ) #assuming file is named *.cross_pols.fil if Lfil : obs . data = L obs . write_to_fil ( str [ : - 15 ] + '.L.fil' )
Writes up to 5 new filterbank files corresponding to each Stokes
    parameter (and total linear polarization L) for a given cross polarization .fil file
Writes up to 5 new filterbank files corresponding to each Stokes parameter ( and total linear polarization L ) for a given cross polarization . fil file