You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The bls param, under telescope params, is supposed to be parsable as a list of tuples of baseline antenna pairs according to healvis.simulator.setup_uvdata. The current implementation checks to see if bls is a single string of the format '(ant1, ant2)' which is fine if you only want a single baseline in your sim (starting on line 444). This doesn't work if bls is a list of tuples which gets read in as a list of strings via yaml.safe_load. Additionally, I don't know if this is desirable behavior, but because of the chosen antenna ordering, i.e. ant1 < ant2 in constructing _bls which is a reference list containing all possible baseline antenna pairs subject to this criterion, if you pass bls : (3, 2) that baseline will not be included in the dataset since _bls will only contain the antenna pair (2, 3).
I made a new branch for these fixes with the intention of submitting a pull request and then realized I don't have permissions to push to rasg-affiliates. But the code fix is simple and the following should work:
_bls = [(a1, a2) for a1 in anums for a2 in anums if a1 <= a2] # line 443 in healvis.simulator.setup_uvdata
if bls is not None:
if isinstance(bls, (str, np.str)):
bls = ast.literal_eval(bls)
elif isinstance(bls[0], (str, np.str)): # check if bls is a list of strings
bls = [ast.literal_eval(bl) for bl in bls] # convert each str to tuple
bls = [bl for bl in _bls if bl in bls or bl[::-1] in bls] # checks if either (ant1, ant2) or (ant2, ant1) is in _bls
else:
bls = _bls
The text was updated successfully, but these errors were encountered:
The
bls
param, undertelescope
params, is supposed to be parsable as a list of tuples of baseline antenna pairs according tohealvis.simulator.setup_uvdata
. The current implementation checks to see ifbls
is a single string of the format'(ant1, ant2)'
which is fine if you only want a single baseline in your sim (starting on line 444). This doesn't work ifbls
is a list of tuples which gets read in as a list of strings viayaml.safe_load
. Additionally, I don't know if this is desirable behavior, but because of the chosen antenna ordering, i.e.ant1 < ant2
in constructing_bls
which is a reference list containing all possible baseline antenna pairs subject to this criterion, if you passbls : (3, 2)
that baseline will not be included in the dataset since_bls
will only contain the antenna pair(2, 3)
.I made a new branch for these fixes with the intention of submitting a pull request and then realized I don't have permissions to push to rasg-affiliates. But the code fix is simple and the following should work:
The text was updated successfully, but these errors were encountered: