Tuesday, December 22, 2020

When was the Jupiter-Saturn Conjunction?

 

  There's been a lot of talk about The Great Conjunction lately but little information on when it occurs. Given ephemeris data from JPL's Horizons on the positions of planets Jupiter and Saturn we can do a simple spreadsheet calculation to find the time. Horizons will output the data for the planet selected in text format and this can be copied and pasted into a spreadsheet. It's easiest to work with the both RA and Decl given in decimal degrees. When pasted into the spreadsheet the data appears in a number of lines. The value of each field, date, hour, RA and Decl, can be extracted from a line using the MID function. For small angles we can approximate the positions with x,y coordinates and determine the approximate angular displacements, Δr. To do a three point parabolic fit we need to determine the coefficients A, B and C, for the quadratic equation from which we can find the time of the conjunction.



The solution for the three coefficients, if the points are equally spaced in time, is fairly simple.



We just need to solve a linear matrix equation and use the coefficients to calculate Δr_min and t_min.



We can now assemble a simple table containing the required data and do the necessary calculations.





Supplemental (Dec 22): Since the coefficients of the matrix in the matrix equation are +/- 1, the solution is fairly straightforward.


Thursday, November 12, 2020

An Interpretation of the dI/dt Eqn

 

  One might wonder why dI/dt is proportional to I squared and not just I. It could be that the number of potentially infected individuals in Q around the infected individuals is proportional to I as well.



If the red circles in the figure above represent a number of infected individuals and the blue circles those around them then as each red circle grows the number of uninfected individuals remaining in the group or clique will decrease as the virus spreads. That might explain the devreasind exponential term. The negative constant term is likely to be a removal rate of infected individuals as in the SIR model. In the SIR model dI/dt equals rS-a. In the QI model rS is replaced by BI times the exponential term and -a by AI. A zero for (1/I)dI/dt may still be a good indicator of having reached a peak for I. The proportionality factor for I in Q might be thought of as a transfer or transport factor.


It seems unlikely that a removal rate is proportional to I squared so replacing the -a in the SIR model by just a constant A may work better conceptually. This might be the modified SIR model we were looking for.


Tuesday, November 10, 2020

Reading CA Covid-19 County Data & Preparing Plots

 

  Reading the CA Covid-19 case data files is initially challenging but is easier than one might think. One starts by collecting information on the number of county entries with the same name.



Next a Directory is created by sorting the data by county name.



To create a plot of the county data one can select a county from the Directory and plot the data from a copied section containing just the county data.




Supplemental (Nov 10): To select another county tap the county selected and the formula bar then tap on some other county in the Directory and the check icon to confirm the change.



Supplemental (Nov 10): For those not familiar with Excel spreadsheets the formula for cell S15 is  

  =MATCH(R15,M15:M74)-1.


Beginning of a Second Wave in SoCal?

 

  Theory can't always be trusted as can be seen in recent CA Covid-19 data.



The current data is starting to deviate from the fitted curve in what appears to be the beginning of a second wave of the coronavirus in Southern California. Here are county data plots for the area.















Is it going to be necessary to lock down Southern California to slow down the coronavirus there?


Sunday, November 8, 2020

Checking Out the QI Model

 

  There was a lot of interest in "curve flattening" but the fits don't appear to show much evidence of any. There does appear to be a little lowering near the peak but could it have been due to the testing labs being overwhelmed by the number of cases and confirmations being delayed?



The best fit of Q/I for λ helped give the best fit for the QI model although the initial values for K and I required for the numerical integration of the dI/dt formula were somewhat unexpected. The observed values of K were used in the calculations.







Again there appears to be lower values around the peak in the Q/I plot. The time is the number of days from 4/1/20 and the initial observed values for K are lower than those required by the model fit. One could ask if this is due a lack of test kits or maybe poor statistics for a lower number of cases?


The formula for Q seems to indicate that the infection rate is proportional to the number of daily new cases and a factor which includes a rate which decreases as the number of known cases increases as well as a negative term similar to the removal rate in the SIR model. The exponential term appears to be an indication of a saturation effect with the number of uninfected individuals around in infected individual decreasing over time.


Friday, November 6, 2020

A Possible Formula for Q

 

  If one calculates and plots Q/I one gets the following curve.



This looks somewhat like an exponential decay function and if we try to fit one we get the following. The value for λ was chosen by eye.





We will have to wait and see if this exponential factor gives a good long term fit. One can think of it as a saturation term that might explain why I peaks when it does. So our observations suggest,



Wednesday, November 4, 2020

Using Relative Changes to Determine Rates

 

  One can use the relative change in a quantity to determine a rate of change such as ΔI/I=Qdt. When one does this with the CA Covid-19 data and a calculation based on the fit polynomial one gets a fairly good agreement on  the results. X=K-K0 is the difference between the number of known cases and the value at which I=dK/dt peaks.



If we look at (K-K0)/I, the ratio of the cumulative number of known cases to it's daily rate of change, for the data we see that the average result is approximately one as expected. 




The ratio calculated using the fit polynomial shows an apparent change in slope near X=0 which appears to be due to an error in the fit.



The fit of the polynomial to the data isn't perfect and its errors can show up in the plots of calculated results. Also the fluctuations in the observed values of K can show up in plots of results. Time delays in detection of infected individuals may also produce errors in the fit so one has to consider what's real and what's illusory.


Sunday, November 1, 2020

Turning the Corner?

 

  Here's another comparison of S* and I=dK/dt from the CA Covid-19 fit which might be interpreted as "turning the corner" on the coronavirus. The plot is versus time and again the initial date is 4/1/20.




Is It Time for Some Error Analysis?

 

  It seems we've reached the point where it would be advantageous to look at possible errors. If one includes the number of deaths with the number of cases in K one gets similar results with the fit coefficients slightly altered.



The plot of I-S* shows segments that are approximately constant. Note that the peak is about 75 days after the initial date which is 4/1/20. There appears to be more fluctuation due to larger numbers about this time which show up in the plot. There's a drop in the difference after the peak and one can speculate on its cause. Is it due to social distancing? Or maybe there were more cases that were overlooked due to less testing early on? Or could there be something like a Doppler effect with a higher value as the number of cases increases and a lower number as they decrease? A fit error could also be a possible explanation for some of the difference. One could also speculate on how much observation error there is and whether or not the constant of integration, A, is zero or not with I being a possible measure of the number of susceptibles.


The parameter a is the rate at which the infectives become removed so there's a flow of cases through I that does not show up in the statistics and the lower value for S* may reflect this since not all of the I=dK/dt are infectious. This might account for some of the difference.


Saturday, October 31, 2020

Data Analysis of the CA Covid-19 Data

 

  If one wants a fit that is useful for predictions the fit function for dK/dt should tend to zero as K becomes large. Since polynomials tend to infinity as K goes to infinity we can try fitting dK/dt=1/P(K). An even power for P(K) will guarantee that the function will go to zero as K goes to ±∞. Fitting a fourth power in this manner gave the following results for a dt/dK fit.




Another advantage is that extrapolation of the data gives more realistic prediction results.



Finding a mathematical model for the data was challenging. To do so I tried modifying the SIR pandemic model to give something closer to the data. If one replaces rS-a with Q in the SIR formula for dI/dt one can derive a formula for Q in terms of the polynomial P(K).



This can be used to define a function S* which is related to S. 



Comparing S* with I for the given data shows A is small but not quite constant.



This is as far as I've been able to get so far in analyzing the given date. More data appears to be needed to determine the parameters r and a.


Supplemental (Nov 2): The coefficients given above are those for a polynomial of X=K-K0 with K0=356834.7 being the value of K for the peak of dK/dt for the fit. X was used to get a more symmetrical fit about the peak with a positive 4th power coefficient of X so dK/dt would approach zero as the magnitude of X grew large.


Supplemental (Nov2): I probably made a mistake using a SIR model formula to calculate Q which assumes the logistic function for dI/dt. It is probably more general and the mathematical model associated with the fit may be the best one.


Wednesday, October 21, 2020

A Higher Order Fit for the CA Covid-19 Data

 

  Fitting a fifth degree polynomial to the rate of change, dK/dt, gave an even better fit to the CA Covid-19 Data. The coefficients of the powers of K were,



The resulting fits were,




Unfortunately, the signs of the lower order terms did not permit an estimate of the SIR model parameters.


Supplemental (Oct 22): It's doubtful this fit would make a good predictor over the long term since it is subject to errors near the end.


A Fit for the CA Covid-19 Data

 

  I managed to get a fit for the CA coronavirus data presented in the last blog. The first step was fit a cubic polynomial of the known cases, K, to dK/dt.



Which gave the following results. 




This equation was then integrated numerically to construct an integral table for Δt as a function of K. The initial value of Δt was chosen to give the best fit for K.



This table was interpolated to determine the value of K for a given value of Δt. Then the value of Δt0 was chosen to minimize ΔK.




The values of N, r, a and ρ given with the coefficients of the polynomial for dK/dt are estimates of the parameters for the SIR pandemic model. The reduced value of N may be the result of imperfect mixing.