GithubHelp home page GithubHelp logo

distribute's Issues

Why is tp2vis written as a script?

As currently written, tp2vis can't be imported by other modules and can't be used as a library, since instead of importing, users are expected to execfile it. Is there a python3/casa6-compatible, importable version available? It looks like the fix is as simple as including appropriate imports (e.g., from taskinit import iatool, etc) at the top of the file.

def wtstat needs ms.selectinit(reset=True) inside loop over more than 1 spectral window

In def wtstat, I believe that there needs to be a line ms.selectinit(reset=True) inside the loop over several spectral windows. Otherwise, anytime I have a dataset with several spectral windows, I get an error
2018-09-03 13:04:31 WARN ms::selectinit selectinit failed for datadescid 1

# Define stat outputs
# -------------------
def wtstat(mslist,comment=''):
    print "%-4s%18s %4s %4s %4s %8s %8s %12s %12s %12s %12s" \
        % (comment,'name','spw#','npnt','npol','nvis',\
               'fwidth','min','max','mean','std')

    for ims in mslist:

        ms.open(ims,nomodify=True)          # open MS
        **ms.selectinit(reset=True)           # all spws**
        spwinfo= ms.getspectralwindowinfo() # get spw info
        spwlist= spwinfo.keys()             # list of SPWs

        for ispw in spwlist:                # get SPW info and WEIGHT
            **ms.selectinit(reset=True)           # all spws**
            spwid     = spwinfo[ispw]['SpectralWindowId']
            numchan   = spwinfo[ispw]['NumChan']
            chan1freq = spwinfo[ispw]['Chan1Freq'] / 1.0e9 # GHz
            chanwidth = spwinfo[ispw]['ChanWidth'] / 1.0e9 # GHz

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.