Skip to content

Commit

Permalink
Adds more support for LWA-NA
Browse files Browse the repository at this point in the history
Added some constants and flag support for NA entries. Might have missed some stuff as there were a few places with LWA-SV specific conditions that didn't look as clear whether there needed to be a NA case also.
  • Loading branch information
ctaylor-physics authored Jan 24, 2024
1 parent 8697a02 commit e71371b
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions createConfigFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,18 @@
[-numpy.sin(LWASV_LON), numpy.cos(LWASV_LON), 0 ],
[ numpy.cos(LWASV_LAT)*numpy.cos(LWASV_LON), numpy.cos(LWASV_LAT)*numpy.sin(LWASV_LON), numpy.sin(LWASV_LAT)]])

## Derived from the center of array position
## taken from the North Arm Site survey on
## 3/16/2015 by van Gulick Surveying.
## To be replaced with astronomical calibration
## during ongoing station commissioning.

LWANA_ECEF = numpy.array((-1599959.5818680217,-5031398.357418212,3570335.8808517447))
LWANA_LAT = 34.24700067428984 * numpy.pi/180
LWANA_LON = -107.64040447014175 * numpy.pi/180
LWANA_ROT = numpy.array([[ numpy.sin(LWANA_LAT)*numpy.cos(LWANA_LON), numpy.sin(LWANA_LAT)*numpy.sin(LWANA_LON), -numpy.cos(LWANA_LAT)],
[-numpy.sin(LWANA_LON), numpy.cos(LWANA_LON), 0 ],
[ numpy.cos(LWANA_LAT)*numpy.cos(LWANA_LON), numpy.cos(LWANA_LAT)*numpy.sin(LWANA_LON), numpy.sin(LWANA_LAT)]])

This comment has been minimized.

Copy link
@jaycedowell

jaycedowell Jan 24, 2024

Member

Do we actually use all of these *_LAT, *_LON, and *_ROT variables?


## Correlator configuration regexs
CORR_CHANNELS = re.compile('corrchannels:(?P<channels>\d+)')
Expand Down Expand Up @@ -241,6 +253,9 @@ def main(args):
elif sitename == 'LWA-SV':
xyz = LWASV_ECEF
off = args.lwasv_offset
elif sitename == 'LWA-NA':
xyz = LWANA_ECEF
off = args.lwana_offset
else:
raise RuntimeError("Unknown LWA site '%s'" % site)

Expand Down Expand Up @@ -442,9 +457,9 @@ def main(args):
del corrConfig['inputs'][corrConfig['inputs'].index(cinp)]

# Sort the inputs based on the antenna name - this puts LWA1 first,
# LWA-SV second, and the VLA at the end in 'EA' antenna order, i.e.,
# LWA-SV second, LWA-NA third, and the VLA at the end in 'EA' antenna order, i.e.,
# EA01, EA02, etc.
corrConfig['inputs'].sort(key=lambda x: 0 if x['antenna'] == 'LWA1' else (1 if x['antenna'] == 'LWA-SV' else int(x['antenna'][2:], 10)))
corrConfig['inputs'].sort(key=lambda x: 0 if x['antenna'] == 'LWA1' else (1 if x['antenna'] == 'LWA-SV' else (1 if x['antenna'] == 'LWA-NA' else int(x['antenna'][2:], 10)))

This comment has been minimized.

Copy link
@jaycedowell

jaycedowell Jan 24, 2024

Member

Should this be 2 if x['antenna'] == 'LWA-NA'?


# VDIF/DRX warning check/report
if vdifRefFile is not None and isDRX and not drxFound:
Expand Down Expand Up @@ -652,6 +667,8 @@ def time_string(value):
help='LWA1 clock offset')
parser.add_argument('-s', '--lwasv-offset', type=time_string, default='0.0',
help='LWA-SV clock offset')
parser.add_argument('-a', '--lwana-offset', type=time_string, default='0.0',
help='LWA-NA clock offset')
parser.add_argument('-v', '--vla-offset', type=time_string, default='0.0',
help='VLA clock offset')
parser.add_argument('-m', '--minimum-scan-length', type=float, default=-numpy.inf,
Expand Down

0 comments on commit e71371b

Please sign in to comment.