Giter Club home page Giter Club logo

sma2casa's People

Contributors

kenyoung avatar

Watchers

 avatar  avatar  avatar

Forkers

hollythomas

sma2casa's Issues

sma2casa.py not handling SWARM only setups

In the for-loop beginning at 764 in sma2casa.py (for band in bandList:) the following section is not adapted to handle SWARM only setups.

               if band < 49:
                    if sb == 0:
                        lowestFSky = spSmallDict[band][2] - spSmallDict[band][1]*0.5 - 52.0e6
                    else:
                        lowestFSky = spSmallDict[band][2] + spSmallDict[band][1]*0.5 - 52.0e6
                elif band in sWARMForwardChunks:
                    if sb == 0:
                        lowestFSky = spSmallDict[band][2] - spSmallDict[band][1]*0.5 + spSmallDict[band][1]*spSmallDict[band][0]*0.5
                    else:
                        lowestFSky = spSmallDict[band][2] + spSmallDict[band][1]*0.5 - spSmallDict[band][1]*spSmallDict[band][0]*0.5
                else:
                    if sb == 0:
                        lowestFSky = spSmallDict[band][2] - spSmallDict[band][1]*0.5 - spSmallDict[band][1]*spSmallDict[band][0]*0.5
                    else:
                        lowestFSky = spSmallDict[band][2] + spSmallDict[band][1]*0.5 + spSmallDict[band][1]*spSmallDict[band][0]*0.5

  1. The reason for this is the normally ASIC setups have 48 chunks, and before when adding SWARM you would have 48+4+1=53 chunks. So the check if band < 49: then wrongly assumes that a SWARM only (band=5) is a ASIC (band=48) only setup.

  2. I also think it calculates the lowestFSky wrong, the way it is done now the spSmallDict[band][1] can be negative and it will calculate the wrong frequency (running plotms on the finished converted MS and plotting the frequency coverage differs from what IDL MIR gives). I suspect changing it from

<                     if sb == 0:
<                         lowestFSky = spSmallDict[band][2] - spSmallDict[band][1]*0.5 - spSmallDict[band][1]*spSmallDict[band][0]*0.5
<                     else:
<                         lowestFSky = spSmallDict[band][2] + spSmallDict[band][1]*0.5 + spSmallDict[band][1]*spSmallDict[band][0]*0.5

to instead say

>                     if sb == 0: # Lower Sideband
>                         lowestFSky = spSmallDict[band][2] - abs(spSmallDict[band][1])*0.5 *(1+spSmallDict[band][0])
>                     else: # Upper Sideband
>                         lowestFSky = spSmallDict[band][2] - abs(spSmallDict[band][1])*0.5 *(1 + spSmallDict[band][0])

(this also means that the first check in the if statements need to be if band < 49 and len(bandList)>5:) and also the section below the referenced one,

            if (band == 0) and ((49 in bandList) or (50 in bandList) or (51 in bandList) or (52 in bandList)):
                header['correlat'] = 'SMA-Hybrid'
            elif band < 49:
                header['correlat'] = 'SMA-Legacy'
            else:
                header['correlat'] = 'SMA-SWARM'

needs to be (first elif-statement) elif band < 49 and len(bandList)>5: for the same reason.

I am still testing this. As can be seen it seems then that the equation is exactly the same and the upper/lower sideband check can be omitted. Needs to be checked.

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.