<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hi Kirill, </div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thanks for the digging here.</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I'm away for the next two weeks in Aus so a bit hard to follow up. </div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Some initial takeaways though - yes I suspect that rspr needs a patch. Hopefully Walter you have a chance to confirm the limits are incorrect and we can get that updated. I believe you should have access to the repo Kirill so you could make a pull request to
 make it as easy as possible for Walter.</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I think the executor changes probably need some discussion so let's hold off for now. Most of the executor issues described here are known and we've hoped to make improvements for a while though.</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
In the VLA case you can control whether the previous correction is kept if no good solution was found, and we may want similar on the VLBA. For example you might not want to keep the old correction if it was for a vastly different part in the sky as 0,0 might
 be better in that case.</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
We've also never settled on whether an average of say 3 measurements (if all were good) should be used (or a median). It does sound like there's a timing issue though.</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
It would be good to compare all this with the executor logs to confirm that the RefPoint messages match up. I've downloaded the full logs from day 314 which should cover TKNOV10S into /home/moya/tests/tknov10s.</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
See the azoffs and eloffs section in the scan chunks that look like this:</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
INFO: TKNOV10S 61354 08:55:00 <?xml version="1.0" encoding="UTF-8" standalone="yes"?><Observation configUrl="http://mccc:8081/configDoc?id=null" seq="12278" startTime="61354.37155092593" datasetId="TKNOV10S.61354.3670915625" subarrayId="TKNOV10S.FD.py"><name>JUPITER</name><ra>0.0</ra><dec>0.0</dec><ephemeris><referenceTime>61354.61758303241</referenceTime><ra_polynomial><coeff
 order="0">2.5749546846854465</coeff><coeff order="1">0.0016743312492941698</coeff><coeff order="2">-2.2411944044620213E-5</coeff><coeff order="3">-7.615463459842432E-8</coeff><coeff order="4">-2.4752040417297402E-9</coeff><coeff order="5">-2.421870703983587E-9</coeff><coeff
 order="6">2.9158218239899734E-8</coeff></ra_polynomial><dec_polynomial><coeff order="0">0.24204143299254433</coeff><coeff order="1">-5.116192414416076E-4</coeff><coeff order="2">7.6083325979414695E-6</coeff><coeff order="3">3.587966723728187E-8</coeff><coeff
 order="4">6.298801480397744E-10</coeff><coeff order="5">7.411799174406044E-10</coeff><coeff order="6">-8.917756133541847E-9</coeff></dec_polynomial><dist_polynomial><coeff order="0">5.35173582075703</coeff><coeff order="1">-0.01559688783707358</coeff><coeff
 order="2">-1.605975423046857E-5</coeff><coeff order="3">6.910222793976575E-7</coeff><coeff order="4">2.9400865741990863E-8</coeff><coeff order="5">2.2522476683661816E-8</coeff><coeff order="6">-2.71050612354884E-7</coeff></dist_polynomial><origin>JPL_Planetary_Ephemeris_DE421/LE421</origin></ephemeris><azoffs>-6.082039961255154</azoffs><eloffs>0.0</eloffs><startLST>0.2204125971911708</startLST><intent>ScanIntent="CALIBRATE_POINTING"</intent><state>1</state><scanNo>3</scanNo><subscanNo>2</subscanNo><correlator>none</correlator><sslo
 Sideband="1" IFid="D-0B-1" Receiver="1cm"><freq>22196.5</freq></sslo><sslo Sideband="1" IFid="B-0A-0" Receiver="1cm"><freq>22196.5</freq></sslo></Observation><br>
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
We aim to inform users (probably via memo) one we have settled enough issues to get back to a similar level of performance to pre executor usage, so for now please just keep a list of bugs documented so we can move them into memo format once we're ready. Don't
 want to give users too much hope too early ;)</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Jay</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Kirill Sokolovskii <ksokolov@nrao.edu><br>
<b>Sent:</b> Tuesday, December 1, 2026 11:03 AM<br>
<b>To:</b> Walter Brisken <wbrisken@nrao.edu>; Jay Blanchard <jblancha@nrao.edu><br>
<b>Cc:</b> vlbatests@listmgr.nrao.edu <vlbatests@listmgr.nrao.edu><br>
<b>Subject:</b> VLBA reference pointing rejects most reference scans and applies zero corrections in those cases</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Dear Walter and Jay,<br>
<br>
It looks like VLBA reference pointing (on-the-fly determination of a pointing correction on a nearby bright calibrator and its application to the target source) does not work most of the time!
<br>
After a reference pointing scan the executor usually applies no correction at all, and occasionally one measured on an unrelated source in the previous pointing scan.<br>
<br>
Two things conspire:<br>
1. rspr rejects most valid cross fits, apparently due to a mix-up between the FWHM/2 and sigma in its limits on the fitted Gaussian width;<br>
2. the executor starts every registration from zero and fills it with the first solution that arrives afterwards (no solution arrives if the cross fits are rejected, and one may arrive from the previous pointing scan, on another source, before the new pointing
 scan has started).<br>
<br>
<br>
Here is a detailed explanation:<br>
<br>
1. The beam-width test in rspr rejects about half of the good fits on each axis. In src/findPeak.c (rspr 866a1f1):<br>
<br>
   4  double lowWidthLimit = 0.8;   /* flag solutions with widths smaller than this (times offset) */<br>
   5  double highWidthLimit = 1.25; /* flag solutions with widths greater than this (times offset) */<br>
 170  top(&diff[1], &azOff[1], pAzPeak, &sigAz, &ampAz);<br>
 171  if(sigAz > highWidthLimit*fabs(azOff[1]))<br>
 173      return "Az beam too wide";<br>
 175  if(sigAz < lowWidthLimit*fabs(azOff[1]))<br>
 177      return "Az beam too narrow";<br>
 179  *pWidAz = sigAz*2.3548200;<br>
<br>
(the same for El at lines 182-191). The tested quantity is the Gaussian sigma (FWHM = 2.355 * sigma, line 179), compared with the pattern step. The executor sets the step in src/main/py/vlbapoint.py:<br>
<br>
  50  hpbw = 22500/frequency    # arcminutes<br>
  52  print " beamwidth used is ", 2*hpbw, "minutes fwhp"<br>
<br>
There is an obvious naming confusion in the code, as HPBW is the FWHM, not half of the FWHM. A less confusing name for that variable would have been "step_size" or "half_beam", or something along these lines.<br>
The step is half the FWHM for an assumed FWHM of 2*22500/f arcmin (f is in MHz), and for such a beam sigma is 0.85 step, just above the 0.80 limit. The real beam is a few percent narrower (novmefit itself assumes 41200/f, novmefit.c:438). The widths novmefit
 measured for the 7mm crosses on compact sources in one of the recent pointing tests (tknov10s.fit) give a median sigma of 0.81 (Az) and 0.79 (El) step. 49 % (Az) and 57 % (El) of these fits have sigma below 0.8 step, and only 20 % pass on both axes. The 0.8-1.25
 window would suit FWHM/2 divided by the step (1.177 sigma/step), not sigma divided by the step.<br>
<br>
novmefit is built from the same cross.c and findPeak.c, but uses a wider window (novmefit.c):<br>
<br>
 739  setLowWidthLimit(0.5);<br>
 740  setHighWidthLimit(2.0);<br>
<br>
It replays the same switched-power log and writes one .fit line per on-line solution. rspr logs a cross fit every time it sees an antenna doing a cross, even when reference pointing was not requested. This allows a direct comparison of the rspr fits (from the
 logs) with the novmefit fits (from the .fit file) in a pointing test. For TKNOV10S, rspr accepted 214 of the 1154 solutions on line and novmefit accepted 867 solutions. Of the solutions rspr rejected as "Az beam too narrow" (559) and "El beam too narrow" (94),
 542 and 90 are good fits in tknov10s.fit.<br>
<br>
# I used the following commands for rspr and novmefit TKNOV10S comparison:<br>
ksokolov@hawkeye /tmp $ (mkdir -p /tmp/tknov10s_sp && cd /tmp/tknov10s_sp && /users/vlbsoft/software/miniconda3/bin/getSP.py -e tknov10s -d 2026-11-10)<br>
TKNOV10S<br>
2026-11-10 00:00:00<br>
314 2026<br>
Switched power files with TKNOV10S, decompressed into /tmp/tknov10s_sp:<br>
br_2026_314_08_48_55.switched_power<br>
br_2026_314_10_33_55.switched_power<br>
fd_2026_314_08_48_55.switched_power<br>
hn_2026_314_08_48_58.switched_power<br>
kp_2026_314_08_48_55.switched_power<br>
kp_2026_314_10_35_55.switched_power<br>
la_2026_314_08_48_58.switched_power<br>
mk_2026_314_08_48_55.switched_power<br>
nl_2026_314_08_48_58.switched_power<br>
ov_2026_314_08_48_58.switched_power<br>
pt_2026_314_08_48_55.switched_power<br>
ksokolov@hawkeye /tmp $ grep -h -E '^#P +solution' /tmp/tknov10s_sp/*.switched_power | sed -E 's/^#P +solution: .*/good/; s/^#P +solution failed: //' | sort | uniq -c | sort -rn<br>
    559 Az beam too narrow<br>
    214 good<br>
     94 El beam too narrow<br>
     84 Az scan baseline too steep<br>
     59 Az half power point negative<br>
     51 Az beam too wide<br>
     29 Az scan negative source<br>
     24 El half power point negative<br>
     16 El scan baseline too steep<br>
     10 El beam too wide<br>
      8 El scan negative source<br>
      6 Az off to El off baseline too steep<br>
ksokolov@hawkeye /tmp $ F=/home/lboarchive/pointing/nov26/test/tknov10s.fit<br>
ksokolov@hawkeye /tmp $ awk '$2 ~ /(cm|mm)$/ {n++; if (index($0, "\"")) f++} END {print n, "lines,", n-f, "fitted,", f, "failed"}' $F<br>
1154 lines, 867 fitted, 287 failed<br>
ksokolov@hawkeye /tmp $ grep -o '"[^"]*"' $F | grep "beam too" | sort | uniq -c<br>
      5 "Az beam too narrow"<br>
     33 "Az beam too wide"<br>
      3 "El beam too narrow"<br>
     16 "El beam too wide"<br>
ksokolov@hawkeye /tmp $ <br>
<br>
<br>
2. The executor starts every registration from zero and applies it whatever it holds. registerPointing (Subarray.java:807-813) creates a RefPointing with zero offsets (RefPointing.java:29-33) and registers it, replacing any registration still waiting for that
 antenna (RefPointingAgent.java:54-60). The listener fills it with the first solution received for that antenna (RefPointingAgent.java:118-147), and the following scans use it, filled or not. In a typical VLBI schedule with reference pointing this means:<br>
- If a pointing scan gives no solution, the following scans are observed with zero correction instead of the previous good one, with no warning.<br>
- With two pointing scans in a row, a good result of the first is discarded when the second registers.<br>
- The script runs one scan ahead (Subarray.java:1259-1272), and rspr fits a cross only when the next scan begins (point.c:826-853). With a single VLBI scan between two pointing scans, the last cross of the first pointing scan is fitted after the second one
 has registered, and fills it. The second pointing scan's own solution is then ignored. In BK277A at KP (2026-10-04), a correction measured on OJ287 was applied from 12:23 to 12:58 to 3mm scans on 3C84 and NRAO150, while the good solution of the 3C84 pointing
 scan was ignored.<br>
<br>
# Command to reproduce this:<br>
# The corrections the executor applied - the scan starting at this time was observed with this Az and El correction<br>
ksokolov@hawkeye /tmp $ for z in /home/vlba/metadata/data/archive/2026/10/04/mdx.kp.*.zip; do unzip -p "$z" '*RefPoint*' 2>/dev/null; done | grep -o 'timestamp="[^"]*"\|AzOffset" value="[^"]*"\|ElOffset" value="[^"]*"' | paste - - - | awk -F'"' '{h=($2-int($2))*24;
 if (h>=11.9 && h<13.2) printf "%02d:%02d:%02d  Az %+.3f  El %+.3f\n", int(h), int(h*60)%60, int(h*3600+0.5)%60, $5, $8}' | sort -u<br>
11:58:58  Az -0.048  El +0.036<br>
12:11:15  Az +0.047  El +0.021<br>
12:23:32  Az -0.106  El +0.102<br>
12:30:26  Az -0.106  El +0.102<br>
12:37:20  Az -0.106  El +0.102<br>
12:44:14  Az -0.106  El +0.102<br>
12:51:07  Az -0.106  El +0.102<br>
13:06:34  Az +0.028  El +0.054<br>
# The scans and rspr's fits, in the order they were logged.<br>
ksokolov@hawkeye /tmp $ xzcat /home/vlba/metadata/switchedpower/kp/2026/kp_2026_277_00_00_00.switched_power.xz | grep -a -E '^#P +(solution|setObservation)' | awk '/setObservation/ {t=$3; show=(t>=61317.495 && t<61317.55); if (show && $8==0) {h=(t-61317)*24;
 printf "%02d:%02d:%02d scan starts on %s\n", int(h), int(h*60)%60, int(h*3600+0.5)%60, $4}; next} show {print "         " $0}'<br>
11:58:58 scan starts on 3C84<br>
12:06:21 scan starts on OJ287<br>
         #P  solution: mjd=61317.5061502 pol=R eo= 0.02' ew= 1.11' ao= 0.05' aw= 1.21' amp=0.026956  freq=43147.75<br>
         #P  solution failed: El beam too narrow<br>
12:11:15 scan starts on OJ287<br>
         #P  solution failed: El beam too wide<br>
         #P  solution: mjd=61317.5073929 pol=L eo= 0.10' ew= 1.23' ao=-0.11' aw= 1.00' amp=0.040436  freq=43147.75<br>
12:18:09 scan starts on 3C84<br>
         #P  solution: mjd=61317.5151751 pol=R eo=-0.01' ew= 1.02' ao= 0.01' aw= 1.01' amp=0.378656  freq=43147.75<br>
         #P  solution: mjd=61317.5151751 pol=L eo= 0.04' ew= 1.05' ao=-0.01' aw= 1.03' amp=0.401692  freq=43147.75<br>
12:23:32 scan starts on 3C84<br>
12:30:26 scan starts on 3C84<br>
12:37:20 scan starts on 3C84<br>
12:44:14 scan starts on 3C84<br>
12:51:07 scan starts on NRAO150<br>
12:58:25 scan starts on OJ287<br>
         #P  solution: mjd=61317.5452807 pol=R eo= 0.04' ew= 1.00' ao= 0.04' aw= 1.00' amp=0.034794  freq=43147.75<br>
         #P  solution: mjd=61317.5452807 pol=L eo= 0.07' ew= 1.02' ao= 0.02' aw= 1.04' amp=0.031891  freq=43147.75<br>
13:06:34 scan starts on OJ287<br>
ksokolov@hawkeye /tmp $<br>
<br>
# What this means:<br>
1. 11:58:58, VLBI scan on 3C84. Applied Az −0.048, El +0.036, from an earlier pointing scan (not shown).<br>
2. 12:06:21, pointing scan on OJ287 (7mm), two crosses.<br>
   - Cross 1 was fitted at 12:10:04, when cross 2 began. RCP was accepted (Az +0.05, El +0.02); LCP was rejected as "El beam too narrow". rspr sent (+0.05, +0.02).<br>
   - Cross 2 ended together with the scan, so rspr could not fit it yet.<br>
3. 12:11:15, VLBI scan on OJ287. Applied Az +0.047, El +0.021: the cross 1 result. So far it works as intended.<br>
   - Only now does rspr fit cross 2; its two solution lines sit below this scan start. RCP was rejected ("El beam too wide"); LCP was accepted (Az −0.11, El +0.10). rspr sent (−0.11, +0.10). By then the executor had already registered for the next pointing
 scan, so this solution filled that registration.<br>
4. 12:18:09, pointing scan on 3C84 (7mm). One cross was fitted: RCP (Az +0.01, El −0.01) and LCP (Az −0.01, El +0.04) both accepted, mean (0.00, +0.02). There were three crosses: for the first rspr logged "Harvest failed" (its first position was almost entirely
 flagged while the antenna was slewing and changing receiver), and the third was cut off by the end of the scan. The executor ignored this solution, because the registration was already filled.<br>
5. 12:23:32, 12:30:26, 12:37:20, 12:44:14 on 3C84 and 12:51:07 on NRAO150: five 3mm VLBI scans. All were observed with Az −0.106, El +0.102. That is the OJ287 cross 2 value, not the 3C84 value (0.00, +0.02) measured a minute before the first of them.<br>
6. 12:58:25, pointing scan on OJ287. RCP (Az +0.04, El +0.04) and LCP (Az +0.02, El +0.07), mean (+0.03, +0.055).<br>
7. 13:06:34, VLBI scan on OJ287. Applied Az +0.028, El +0.054: the result of the 12:58:25 pointing scan, as intended.<br>
<br>
The applied offsets are in the executor's RefPoint monitor messages (VlbaAntennaPhysical.java:92-93, RefPointing.java:127-207), one per scan start while reference pointing is in use. They are archived in /home/vlba/metadata/data/archive/<yyyy>/<mm>/<dd>/mdx.<st>.*.zip.
 In the three VLBA projects (BK277A, BH263A, BK277B) and the six experiments of the September GMVA session (C262A-C, MN006A-B, MY008) that used reference pointing in September-November 2026, 5413 of the 6849 records (79 %) show a zero offset.<br>
<br>
# Specifically in BK277A it is 241 of 335 scans (72 %):<br>
ksokolov@hawkeye /tmp $ for z in /home/vlba/metadata/data/archive/2026/10/04/mdx.*.zip; do unzip -p "$z" '*RefPoint*' 2>/dev/null; done | grep -o 'AzOffset" value="[^"]*"/><monitor name="ElOffset" value="[^"]*"' | awk -F'"' '{n++; if ($3+0 == 0 && $7+0 == 0)
 z++} END {print n, "records,", z, "zero"}'<br>
335 records, 241 zero<br>
ksokolov@hawkeye /tmp $<br>
<br>
<br>
Possible fixes:<br>
- rspr: use novmefit's 0.5-2.0 window, or test FWHM/2 (1.177 sigma) rather than sigma against 0.8-1.25 times the step.<br>
- executor:<br>
  - Start a new registration from the last correction obtained for that antenna instead of zero. A pointing scan that gives no solution then leaves the previous correction in place, and a good result is kept when two pointing scans follow each other.<br>
  - Accept a solution only if its cross lies within the pointing scan the registration was made for. rspr sends the cross time (point.c:1265); at the least, reject crosses that ended before the registration.<br>
  - Log when a pointing scan delivers no solution.<br>
<br>
<br>
What would be the best way to proceed?<br>
- Walter, I think you are in the best position to deploy a fix to rspr.<br>
- Should I prepare a patch to the executor and file it in a JIRA ticket?<br>
- Once the updated code is deployed, we can test the rspr fix in the next pointing test by comparing rspr's logged solutions with novmefit's .fit output, and the executor fix in the next observation with reference pointing by comparing the applied offsets with
 rspr's solutions.<br>
- Should we inform the users? Something like: "We discovered that, due to a bug in the antenna control software, the pointing offsets derived from reference pointing scans have not been applied consistently. As a result, the antenna pointing may have been degraded,
 with possible amplitude jumps between pointing scans." Or should we not, since the problem has been there for years (the 0.8-1.25 limits have been in rspr since April 2021) and nothing has actually changed, except that we can now fix it?<br>
<br>
<br>
Best wishes,<br>
Kirill<br>
</div>
</span></font></div>
</body>
</html>