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
I just noticed that ttcal-0.2.0 errors out if you attempt to shave a near-field source using a source model flux where the minimum specified frequency does not go below the lowest frequency of the measurement set. Using a sources.json file that looks like your example in the TTCal docs,
[
{
"name": "Noisy Power Lines",
"sys": "WGS84",
"long": -118.31478,
"lat": 37.14540,
"el": 1226.709,
"rfi-frequencies": [3.0e7, 3.75e7, 4.5e7, 5.25e7, 6.0e7],
"rfi-I": [1.0, 2.0, 3.0, 4.0, 5.0]
}
]
will produce the following error when used to shave subband 0:
$ ttcal-0.2.0 shave --input 00-T1al.ms --sources sources.json --minuvw 10 --maxiter 30 --tolerance 1e-4
Running shave on 00-T1al.ms
ERROR: LoadError: BoundsError: attempt to access 5-element Array{TTCal.StokesVector,1}:
TTCal.StokesVector(1.0,0.0,0.0,0.0)
TTCal.StokesVector(2.0,0.0,0.0,0.0)
TTCal.StokesVector(3.0,0.0,0.0,0.0)
TTCal.StokesVector(4.0,0.0,0.0,0.0)
TTCal.StokesVector(5.0,0.0,0.0,0.0)
at index [0]
in genvis_onesource! at /opt/astro/mwe/ttcal-0.2.0/julia-packages/v0.4/TTCal/src/genvis.jl:142
in genvis at /opt/astro/mwe/ttcal-0.2.0/julia-packages/v0.4/TTCal/src/genvis.jl:25
in shave! at /opt/astro/mwe/ttcal-0.2.0/julia-packages/v0.4/TTCal/src/peel.jl:86
in run_shave at /opt/astro/mwe/ttcal-0.2.0/julia-packages/v0.4/TTCal/src/commandline.jl:267
in main at /opt/astro/mwe/ttcal-0.2.0/julia-packages/v0.4/TTCal/src/commandline.jl:199
in include at ./boot.jl:261
in include_from_node1 at ./loading.jl:320
in process_options at ./client.jl:280
in _start at ./client.jl:378
while loading /opt/astro/mwe/ttcal-0.2.0/julia-packages/v0.4/TTCal/src/ttcal.jl, in expression starting on line 19
If I change the first element of “rfi-frequencies” from 3.0e7 —> 2.0e7, it runs without a hitch. Also, this error does not happen for measurement sets where the top of the subband is higher than the highest frequency specified in the source model — i.e. running shave on subband 21 with the same sources.json above does not produce an error.
This isn’t impacting me (I can easily change my sources.json file!), but just wanted to give a heads up!
Marin
The text was updated successfully, but these errors were encountered:
searchsortedlast returns 0 when the value you are searching for is smaller than the first value. On the other hand it returns the length of the array when it is larger than the final value. The former is out of bounds, while the latter is not. To be consistent I should check if idx == 0 and just return the first element in that case.
I just noticed that ttcal-0.2.0 errors out if you attempt to shave a near-field source using a source model flux where the minimum specified frequency does not go below the lowest frequency of the measurement set. Using a sources.json file that looks like your example in the TTCal docs,
[
{
"name": "Noisy Power Lines",
"sys": "WGS84",
"long": -118.31478,
"lat": 37.14540,
"el": 1226.709,
"rfi-frequencies": [3.0e7, 3.75e7, 4.5e7, 5.25e7, 6.0e7],
"rfi-I": [1.0, 2.0, 3.0, 4.0, 5.0]
}
]
will produce the following error when used to shave subband 0:
$ ttcal-0.2.0 shave --input 00-T1al.ms --sources sources.json --minuvw 10 --maxiter 30 --tolerance 1e-4
Running
shave
on 00-T1al.msERROR: LoadError: BoundsError: attempt to access 5-element Array{TTCal.StokesVector,1}:
TTCal.StokesVector(1.0,0.0,0.0,0.0)
TTCal.StokesVector(2.0,0.0,0.0,0.0)
TTCal.StokesVector(3.0,0.0,0.0,0.0)
TTCal.StokesVector(4.0,0.0,0.0,0.0)
TTCal.StokesVector(5.0,0.0,0.0,0.0)
at index [0]
in genvis_onesource! at /opt/astro/mwe/ttcal-0.2.0/julia-packages/v0.4/TTCal/src/genvis.jl:142
in genvis at /opt/astro/mwe/ttcal-0.2.0/julia-packages/v0.4/TTCal/src/genvis.jl:25
in shave! at /opt/astro/mwe/ttcal-0.2.0/julia-packages/v0.4/TTCal/src/peel.jl:86
in run_shave at /opt/astro/mwe/ttcal-0.2.0/julia-packages/v0.4/TTCal/src/commandline.jl:267
in main at /opt/astro/mwe/ttcal-0.2.0/julia-packages/v0.4/TTCal/src/commandline.jl:199
in include at ./boot.jl:261
in include_from_node1 at ./loading.jl:320
in process_options at ./client.jl:280
in _start at ./client.jl:378
while loading /opt/astro/mwe/ttcal-0.2.0/julia-packages/v0.4/TTCal/src/ttcal.jl, in expression starting on line 19
If I change the first element of “rfi-frequencies” from 3.0e7 —> 2.0e7, it runs without a hitch. Also, this error does not happen for measurement sets where the top of the subband is higher than the highest frequency specified in the source model — i.e. running shave on subband 21 with the same sources.json above does not produce an error.
This isn’t impacting me (I can easily change my sources.json file!), but just wanted to give a heads up!
The text was updated successfully, but these errors were encountered: