vilhelmp / sma2casa Goto Github PK
View Code? Open in Web Editor NEWThis project forked from smithsonian/sma2casa
Code to convert SMA data files into FITS-IDI files suitable for importing to CASA
This project forked from smithsonian/sma2casa
Code to convert SMA data files into FITS-IDI files suitable for importing to CASA
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
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.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.