twillis449 / ALBUS_ionosphere

software to determine ionosphere TEC and RM from GPS receiver data
Other
17 stars 8 forks source link

Add lunar ephem. Fixes #12 #13

Closed bennahugo closed 1 year ago

bennahugo commented 1 year ago

@twillis449 adds in a "special body" position specifier. Can be any body like the moon

bennahugo commented 1 year ago

Also updates docker to take into account your latest changes

bennahugo commented 1 year ago

@twillis449 Here is the report file for the UHF observation for the Moon

Observing  MeerKat_Moon_Jun_22
ALBUS data processing option: RI_G01
station position [[ 5109286.83908611  2006759.06551835 -3239067.78122689]]
Potential number of receivers for GPS fit  1
Final number of receivers for GPS fit  1
set ground station position to 5109286.83909 2006759.06552 -3239067.78123
reference time for rel_time=0: year,month,day,hr,min,sec  2021 6 22 17 26 43.0
Measurement set actual integration centroid start and end times  5131099602.7 5131113680.2
computing for special body Moon
starting observation direction  4.198292814792643 -0.34795464635695456
ending observation direction  4.243931987925535 -0.3602616644688374

ALBUS report column explanation (zero relative):
0 - sequence number (zero relative)
1 - separator colon
2 - value of 0 - valid data/calculation
    value of 1 - invalid data/calculation (usually, but not always, because elevation < 0 )
3 - relative time in seconds relative to reference time
4 - time step between sequence calculations (default is 300 sec)
5 - elevation in degrees
6 - azimuth in degrees
7 - TEC (in tec units) in the current azimuth/elevation direction
8 - Rotation Measure (radians/m^2) in the current azimuth/elevation direction
9 - correction factor to convert STEC to value at the zenith
10 - formal error in STEC

seq  rel_time time_width El         Az         STEC           RM (rad/m2)   VTEC factor   STEC_error
0 : 0 -300.0 300.0 45.7734104635053 87.70143133443172 8.628062726379188 -0.31115912409489516 0.7457061983849371 0.6756032203667353
1 : 0 0.0 300.0 46.81020871748633 87.0584555057364 8.370571470653962 -0.30970736645825553 0.7566847390741178 0.5918336941101859
2 : 0 300.0 300.0 47.84640431408339 86.40132750762041 8.182265729899349 -0.3102946998031341 0.7674754545580602 0.583514055670266
3 : 0 600.0 300.0 48.881850731981366 85.72876397508203 8.028666378287317 -0.3117769602627608 0.778070902439187 0.5755826209381131
4 : 0 900.0 300.0 49.9163906314923 85.03936201372592 7.876422135729232 -0.3129261021857696 0.7884639204554132 0.5679679293098094
5 : 0 1200.0 300.0 50.94985431657884 84.33158411922123 7.711987972878472 -0.31319825674055224 0.7986476145365912 0.5607949382732674
6 : 0 1500.0 300.0 51.982057962782065 83.60374085556954 7.567818844401776 -0.3139108669067872 0.8086153481038555 0.5538504692205873
7 : 0 1800.0 300.0 53.012801601562 82.85397091158994 7.440628201186509 -0.3149805287982774 0.8183607327942688 0.5472436388069833
8 : 0 2100.0 300.0 54.04186674280526 82.08021813213776 7.307071681619387 -0.3154454391208158 0.8278776198379468 0.5410057737020979
9 : 0 2400.0 300.0 55.06901364539799 81.28020493802718 7.200967786603647 -0.31678047717577323 0.8371600926785355 0.5349911050438013
10 : 0 2700.0 300.0 56.09397808824245 80.45140155488853 7.285820638430886 -0.32637983760109796 0.8462024600621669 0.5954046605920125
11 : 0 3000.0 300.0 57.11646761958262 79.59099024109524 7.19947970301943 -0.3281889511532713 0.8549992501595725 0.5892549091380008
12 : 0 3300.0 300.0 58.13615711527934 78.6958236609363 6.279997753059955 -0.2911188928606269 0.8635452051258637 0.518725420897869
13 : 0 3600.0 300.0 59.15268353595484 77.76237630833363 6.2015506259108255 -0.2921581882032375 0.8718352762926433 0.5137290107994144
14 : 0 3900.0 300.0 60.16563969854431 76.786687757009 5.997498965579335 -0.2869602892877561 0.8798646198125456 0.5090569655170329
15 : 0 4200.0 300.0 61.17456690479328 75.76429609859957 5.902226037776409 -0.2866394345924145 0.8876285931151877 0.5048103195960651
16 : 0 4500.0 300.0 62.17894606058779 74.69016005896187 5.269709631771607 -0.25960739226213503 0.8951227512739321 0.450418593507368
17 : 0 4800.0 300.0 63.17818703829293 73.55856757205791 5.454568074482039 -0.2724265889559012 0.9023428438687539 0.4962768789291744
18 : 0 5100.0 300.0 64.17161595560721 72.36302836516872 3.460336003834763 -0.17511402234481346 0.9092848127879386 0.492405233665014
19 : 0 5400.0 300.0 65.15845963613042 71.09614838753564 3.3489144774683854 -0.17162513407543054 0.9159447892038515 0.4888485167986257
20 : 0 5700.0 300.0 66.13782694618352 69.74948267953668 3.258956621950246 -0.16904244503038388 0.9223190919166696 0.4854309929192154
21 : 0 6000.0 300.0 67.1086860257332 68.31336425995372 3.151103235829068 -0.16534517249601974 0.9284042253947525 0.48228396127999507
22 : 0 6300.0 300.0 68.06983651737984 66.7767065161957 3.0493680295988743 -0.16178067220482087 0.934196877792744 0.4792292033344064
23 : 0 6600.0 300.0 69.01987582286348 65.12677714010083 2.3004601468708246 -0.12333892760248967 0.9396939198638388 0.5359317573405653
24 : 0 6900.0 300.0 69.9571578339953 63.34894464322675 2.2211835488978053 -0.12028835615262218 0.9448924033907357 0.5329841746445393
25 : 0 7200.0 300.0 70.8797427558994 61.42640156411327 2.085326395420522 -0.11401340079440797 0.9497895601461255 0.5302253938596982
26 : 0 7500.0 300.0 71.7853362209005 59.339876108811154 2.755446441003148 -0.15202301257822062 0.9543828007714179 0.4690582618286781
27 : 0 7800.0 300.0 72.67121605327866 57.06735557960399 2.6741676893330997 -0.14881194669301534 0.9586697139490843 0.4669562442748214
28 : 0 8100.0 300.0 73.53414522615302 54.58386470553981 2.5969647123987514 -0.1456956549831606 0.9626480655160603 0.46502869341312
29 : 0 8400.0 300.0 74.3702706138233 51.861372139926345 1.6703121155224987 -0.0944304901218523 0.9663157978310545 0.4169589366990966
30 : 0 8700.0 300.0 75.17500904821489 48.868944081221045 1.5649148165367883 -0.08911379178333372 0.9696710290508516 0.415499726832606
31 : 0 9000.0 300.0 75.94292620405199 45.57332610750636 1.4489448557285374 -0.08307185712586068 0.9727120526367556 0.41421323812194033
32 : 0 9300.0 300.0 76.66762041333851 41.94021220113445 1.3369972798418372 -0.07714204782587647 0.9754373369014381 0.41304929796575945
33 : 1 9600.0 300.0 77.34163399409094 37.936535546985276 -999.0 -999.0 0.9778455244211316 -999.0
34 : 0 9900.0 300.0 77.9564295355779 33.53414307121812 1.1645418005321089 -0.06796326484005626 0.9799354318037446 0.411153581040143
35 : 0 10200.0 300.0 78.50248537896447 28.715112039659264 1.0516836034116221 -0.06168908842760922 0.981706049276513 0.41039519471579217
36 : 0 10500.0 300.0 78.96957780344698 23.478596932801302 0.9253385853061594 -0.05453145653651536 0.9831565403705145 0.4097940311458639
37 : 0 10800.0 300.0 79.34731319819961 17.848351009669052 0.8268102650936743 -0.04893236888595517 0.9842862416801792 0.4093196599368935
38 : 0 11100.0 300.0 79.62593379762275 11.879019670218076 0.7113459202059742 -0.04226078115247561 0.9850946626195299 0.40898358736828905
39 : 0 11400.0 300.0 79.79733354452189 5.658413714625607 0.6163310327741646 -0.03674182851037591 0.9855814852063914 0.40878013954203296
40 : 0 11700.0 300.0 79.85610268638294 -0.6968824056690648 0.5313439596191437 -0.03177149011312376 0.985746563873853 0.4087124370866531
41 : 0 12000.0 300.0 79.80033018517672 -7.0533238169994386 1.1431383233928405 -0.06853334642327938 0.9855899253366266 0.37164421666350356
42 : 0 12300.0 300.0 79.63190901351788 -13.277226786958648 0.2786456079761571 -0.01674263932856673 0.985111768435495 0.40896989608959644
43 : 0 12600.0 300.0 79.3562378524783 -19.25163317238126 0.24435172721882775 -0.014709024160601429 0.9843124639907266 0.4093021644283976
44 : 0 12900.0 300.0 78.98142307566926 -24.88822882023074 0.20362570402984528 -0.012275147923983374 0.983192554811061 0.4097691905688865
45 : 0 13200.0 300.0 78.51723471022038 -30.131853220282043 0.14646979670930088 -0.008838886170741975 0.981752755519323 0.4103699746209649
46 : 0 13500.0 300.0 77.97408818592714 -34.95831229209601 0.09671300740937983 -0.005840094621237834 0.9799939525779758 0.41110979617452276
47 : 0 13800.0 300.0 77.36223482509595 -39.36812510802529 0.07346771046548464 -0.004437595331006586 0.9779172042437869 0.411999963077201
48 : 0 14100.0 300.0 76.69122603346 -43.37900371597014 0.10394912669426283 -0.006277970033936312 0.9755237405885502 0.4588995714014481
49 : 0 14400.0 300.0 75.9696283633984 -47.018986894890936 0.04889162438198029 -0.0029512860822456634 0.9728149635413453 0.4601689078060461
process_ionosphere: total run time:    1.75 minutes

The RM values seem a bit out of whack. Here is what I fit for on the limb of the moon image

Hour angle RM Unix time Time UTC
-45.74968852 -0.148 1624382956 6/22/2021 17:29:16
-44.549379 -0.163 1624383256 6/22/2021 17:34:16
-43.35308179 -0.144 1624383555 6/22/2021 17:39:15
-42.15679585 -0.115 1624383854 6/22/2021 17:44:14
-40.95652027 -0.106 1624384154 6/22/2021 17:49:14
-39.76025687 -0.07 1624384453 6/22/2021 17:54:13
-38.56000391 -0.07 1624384753 6/22/2021 17:59:13
-37.36376304 -0.079 1624385052 6/22/2021 18:04:12
-36.1675334 -0.097 1624385351 6/22/2021 18:09:11
-34.96731428 -0.098 1624385651 6/22/2021 18:14:11
-33.77110714 -0.13 1624385950 6/22/2021 18:19:10
-32.5749112 -0.12 1624386249 6/22/2021 18:24:09
-31.37472588 -0.089 1624386549 6/22/2021 18:29:09
-30.17855239 -0.079 1624386848 6/22/2021 18:34:08
-28.9823901 -0.087 1624387147 6/22/2021 18:39:07
-27.78223851 -0.073 1624387447 6/22/2021 18:44:07
-26.58609863 -0.065 1624387746 6/22/2021 18:49:06
-25.38996992 -0.126 1624388045 6/22/2021 18:54:05
-24.189852 -0.064 1624388345 6/22/2021 18:59:05
-22.99374567 -0.077 1624388644 6/22/2021 19:04:04
-21.79765049 -0.049 1624388943 6/22/2021 19:09:03
-20.59756619 -0.035 1624389243 6/22/2021 19:14:03
-19.40149335 -0.027 1624389542 6/22/2021 19:19:02
-18.20543162 -0.025 1624389841 6/22/2021 19:24:01
-17.00538089 -0.022 1624390141 6/22/2021 19:29:01
-15.80934145 -0.069 1624390440 6/22/2021 19:34:00
-14.60931307 -0.074 1624390740 6/22/2021 19:39:00
-13.41329589 -0.027 1624391039 6/22/2021 19:43:59
-12.21728982 -0.029 1624391338 6/22/2021 19:48:58
-11.01729489 0.01 1624391638 6/22/2021 19:53:58
-9.821311034 0.037 1624391937 6/22/2021 19:58:57
-8.625338254 -0.026 1624392236 6/22/2021 20:03:56
-7.425376701 -0.012 1624392536 6/22/2021 20:08:56
-6.229426101 -0.075 1624392835 6/22/2021 20:13:55
-5.033486559 -0.102 1624393134 6/22/2021 20:18:54
-3.833558318 0.026 1624393434 6/22/2021 20:23:54
-2.637640912 -0.218 1624393733 6/22/2021 20:28:53
-1.441734527 -0.221 1624394032 6/22/2021 20:33:52
-0.2418395424 -0.205 1624394332 6/22/2021 20:38:52
0.9540447566 -0.201 1624394631 6/22/2021 20:43:51
2.149918032 -0.216 1624394930 6/22/2021 20:48:50
3.34977984 -0.165 1624395230 6/22/2021 20:53:50
4.545631081 -0.119 1624395529 6/22/2021 20:58:49
5.741471344 -0.111 1624395828 6/22/2021 21:03:48
6.941300023 -0.208 1624396128 6/22/2021 21:08:48
8.137118292 -0.267 1624396427 6/22/2021 21:13:47
9.33692493 -0.262 1624396727 6/22/2021 21:18:47
twillis449 commented 1 year ago

Amazing you got this to work :) You might try plotting STEC as a function of time and then you can see the relative error - might be quite large.

I'm also not sure what you gain by tracking the actual 'Moon' position as that's for the centre of the Moon. How are you adjusting for the actual offset of the limb? Also I would think you would be OK just tracking 3C286 as you will then directly see behavioural changes as 3C286 gets occulted by the Moon. In 1962 Hazard & co determined the position of 3C273 and they even had an ephemeris that was off by something like 2 minutes of time!

bennahugo commented 1 year ago

hmm let me plot stec.. I'm assuming that the moon roughly has about the same RM throughout (it is small relative to the offset to 3C286). As you can see the RM fitted by offset vectors from the assumed orthogonal linear vectors is nice and smooth throughout from our observation (I wrote a utility fitting for RM + constant feed offset), so is 3C286 when I apply an average RM from these measurements (assuming we can transfer). They overlap quite well with VLA Venus and Moon and MeerKAT Moon observations at L-band. These RM that I fitted for was confirmed by AIPS-based processing so I need to look a bit further into this tomorrow.

My idea is that we qualify ALBUS on a source that is well known like the Moon, Venus or Mars. All the 3C sources are not very well known at L-band - we are finding an EVPA and RM intrinsic to 3C286 that is well below the accepted values.

bennahugo commented 1 year ago

sorry @twillis449 I'm being stupid - I'm misreading STEC for RM in the output - miscounting the columns here. The RM really well matches the moon. Even the signs are correct

Edit: I will make some overlay plots in the morning when my eyesight is better :)

bennahugo commented 1 year ago

Btw I will do some further tests tomorrow - I have some L-band data as well

twillis449 commented 1 year ago

Well, of course 3C286 is very well known at L band - somewhere I have a plot of 3C286 as observed with the DRAO telescope back in ~ 2013 which shows how before and after ALBUS corrections worked. Ah -found it. Here's a picture using MeqTrees visualization that shows before and after calculations of Q as a function of time

3C286_comparison

bennahugo commented 1 year ago

Impressive that they are so nice and flat. Makes me quite hopeful - I'm busy recalibrating a long L-band track now, the short L-band track have RMs on the moon with similar magnitude (very small ~~ +0.1) but opposite in sign what ALBUS gives me, however this is just 10 minutes so not necessarily a nice comparison

Re 3C286 - I differ there a bit the EVPA is turning out to be several degrees lower than what is currently accepted literature (values at L and S band in PB 2013 date back to the 80s and 90s so not necessarily a good point of reference, so kind of the point of the work). That said a long track should be flat like you show -- I have that nice long raster track in August that I will compare against as well - we had huge ionospheric RM for the near horizon scans on that.