I LightCone Calculator Improvements

  • Thread starter Thread starter Jorrie
  • Start date Start date
  • Tags Tags
    Calculator
Click For Summary
LightCone8 has been updated to address several glitches and now features a dedicated core team for ongoing improvements. Key suggestions include adding options for displaying or downloading results in CSV or JSON formats and incorporating the latest Planck data releases. The discussion emphasizes prioritizing the use of matter density parameters over the derived cosmological constant, with a focus on ensuring accurate calculations of density parameters. The need for user input on various density parameters is highlighted, as well as the importance of maintaining precision in cosmological models. Overall, the updates aim to enhance user experience and improve the accuracy of the LightCone calculator.
  • #61
Cool! - it looks like we've got ourselves a workable calculator. :smile:
I have just pushed a small update that shows ##\Omega_M## and ##\Omega_R## on the conversion side, as discussed before.
 
Space news on Phys.org
  • #62
Discrepancy between LightCone8 and LightCone7:

When comparing the outputs of LightCone8 and LightCone7, I noticed a discrepancy in calculated event horizon:

1660213893799.png


I think the value calculated with LightCone8 is questionable.

@Jorrie, @pbuk
 
  • #63
JimJCW said:
I think the value calculated with LightCone8 is questionable
It seems to be exactly the same as R, I'll have a look tonight (UK).
 
  • #64
JimJCW said:
Discrepancy between LightCone8 and LightCone7:

When comparing the outputs of LightCone8 and LightCone7, I noticed a discrepancy in calculated event horizon:
Interesting, I had started with the code from the last version of LightCone7 http://jorrie.epizy.com/lightcone7/2022-05-14/LightCone7.html and it gives exactly the same incorrect results. But when I use an older version of LightCone7 e.g. http://jorrie.epizy.com/Lightcone7-2021-03-12/LightCone_Ho7.html I get the expected results.

I have now added the correct calculation in the back end development branch, I will push this to the live site over the weekend along with the new UI.
 
  • #65
pbuk said:
Interesting, I had started with the code from the last version of LightCone7 http://jorrie.epizy.com/lightcone7/2022-05-14/LightCone7.html and it gives exactly the same incorrect results. But when I use an older version of LightCone7 e.g. http://jorrie.epizy.com/Lightcone7-2021-03-12/LightCone_Ho7.html I get the expected results.
No idea how that happened, accept that lots of experimentation happened around that time.
Anyway, thanks for the excellent work done by JimJCW and yourself.
 
Last edited:
  • #66
Jorrie said:
No idea how that happened, accept that lots of experimentation happened around that time.
@pbuk It happens in line 47 of your new calculate.js, where the mapping for Dhor is incorrect. Note Y (legacy) is the same as R later.
44 Y: entry.r,
---
47 Dhor: entry.r,
 
  • #67
Jorrie said:
@pbuk It happens in line 47 of your new calculate.js, where the mapping for Dhor is incorrect. Note Y (legacy) is the same as R later.
44 Y: entry.r,
---
47 Dhor: entry.r,

Yes, I picked this up from line 267 of the 2022-05-14 version of LightCone7
JavaScript:
          if (Dhor < Y)
              Dhor = Y ;
I removed the test because Dhor was never being set above 0 anywhere else in the code so was always being set to Y (r). This was because the line
JavaScript:
          Dhor =  a * (Dte-Dc);
which was there in LightCone7 2021-03-12 disappeared in the later version.
 
  • #68
Yes, correct. Is it something that you can fix on the calculate side, or must I fix it outside of calculate?
 
  • #69
pbuk said:
Interesting, I had started with the code from the last version of LightCone7 http://jorrie.epizy.com/lightcone7/2022-05-14/LightCone7.html and it gives exactly the same incorrect results. But when I use an older version of LightCone7 e.g. http://jorrie.epizy.com/Lightcone7-2021-03-12/LightCone_Ho7.html I get the expected results.

Let’s call
A: http://jorrie.epizy.com/Lightcone7-2021-03-12/LightCone_Ho7.html
B: http://jorrie.epizy.com/lightcone7/2022-05-14/LightCone7.html
and use PLANCK Data (2015) for the present discussion.

Result from A:

1660648897696.png


Result from B:

1660648942045.png

Note that Ro and Dhor overlap with each other.Comparing the Calculation.js files of A and B, I noticed that some statements in A are not in B: near Line 180 and Line 245. If we put the missing statements back to B:

pa = a_ic * sf;
////////////////*************Add the following missing line
a = a_ic + (pa / 2);
////////////////*************Found the problem
qa = Math.sqrt((Om / a) + Ok + (Or / (a * a)) + (Ol * a * a));
Dthen = 0;
}
////////////////*************Add the following missing lines
else
{
Dnow = Math.abs(Dtc-Dc);
Dthen = a * Dnow;
}
Dhor = a * (Dte-Dc);

////////////////*************
Dpar = a * Dc;

the modified B gives the following result:

1660649168858.png


@Jorrie
 
  • #70
Jorrie said:
Yes, correct. Is it something that you can fix on the calculate side, or must I fix it outside of calculate?
Fixed now. I've also tidied up the html (there were some extra empty <td>s and unmatched </tr>s) and bumped the version to 8.3 for the added CSV functionality.

I've pulled all these changes into the 'main' branch and changed the source for the live site back to 'main' from 'develop' for good practice.
 
Last edited:
  • #71
Maybe cache problem, but although it shows version 8.3, the changes for correcting Dhor have not pulled through. Strange.
Outputs updated: 2022-08-16 15:36:10
1660657236450.png

Copyright © 2009-2022 jorrie.epizy.com | AGPL license | LightCone v8.3.0 | CosmicExpansion v1.1.1
 
  • #72
Jorrie said:
Maybe cache problem
Oops, no it was me (updated the calculations, forgot to update the UI). Fixed now.
 
  • #74
Since we now have a seemingly well behaved Lightcone8, e.g.
1660665805519.png

I decided to stress test it a little. By simply turning the knob labeled OmegaL down well below the stated minimum, namely to 0.0001, and expanding the range of the graph by trial and error, I've got this amazing result (from both a programatical and perhaps a cosmological POV):

1660665547648.png

1660665462778.png

If true, it shows the amazing performance of @pbuk's new calculation module and also the fact that even a relatively tiny OmegaL still points to the fact that the Hubble radius R0 and the cosmological horizon approach each other well beyond 2 trillion years.

Perhaps @JimJCW (our master tester) can advise us how far we can relax the input ranges before we run into gross inaccuracies.
 
  • #75
Jorrie said:
If true, it shows the amazing performance of @pbuk's new calculation module

Perhaps @JimJCW (our master tester) can advise us how far we can relax the input ranges before we run into gross inaccuracies.
😊 actually I'm pretty confident in the integration now: the functions become very smooth as ## t \to \infty ## and the integration uses the transformation $$ f'(x) = \frac{f \left (a + \frac{1}{1-t} \right )}{(1-t)^2} \implies \int_a^\infty f(x) dx = \int_0^1 f'(x) dx $$ to deal with the improper integral.
 
  • #76
Jorrie said:
. . . how far we can relax the input ranges before we run into gross inaccuracies.

In LightCone7:

1660734354006.png


In LightCone8.3:

1660734732416.png


Note that in LightCone8.3, the range specification, ‘>0.001 to 1.00’, does not work. The specification in LightCone7, ‘>0 to 1.00’, seems to be more suitable.

In ICRAR, ΩΛ,0 can be set to 0 or a small value such as 0.000000001:

1660734836873.png


@pbuk
 
  • #77
JimJCW said:
Note that in LightCone8.3, the range specification, ‘>0.001 to 1.00’, does not work. The specification in LightCone7, ‘>0 to 1.00’, seems to be more suitable.
The test is simply that it is greater than 0 so the text should probably be changed, yes. Setting it to 0 seems to prevent the integration converging (probably because the Physics says it doesn't but I can't think exactly why at the moment).
 
  • #78
pbuk said:
The test is simply that it is greater than 0 so the text should probably be changed, yes. Setting it to 0 seems to prevent the integration converging (probably because the Physics says it doesn't but I can't think exactly why at the moment).
Yes ##\Omega_\Lambda>0 ## is correct for the programming as it stands. I will change the input text.
When ##\Omega_\Lambda= 0##, there does not exist a cosmological event horizon - this is probably why the integration does not converge in that case.
 
  • #79
While on the topic of stretching the input boundaries (ranges), a few others can possibly also be changed to allow for more broad comparison with other cosmo-calculators. I'm thinking of zupper up to a million and zlower to >-1, e.g.,

1660804956712.png


Any others?

Edit: possibly with a warning that a very high zupper may cause slow processing on laptops, tablets etc.
 
  • Like
Likes pbuk
  • #80
I don't think high z is a problem anyway, we already integrate to infinity to get ## t_0 ##.
 
  • #81
pbuk said:
I don't think high z is a problem anyway, we already integrate to infinity to get ## t_0 ##.
For some reason I find a severe slowdown when starting z at 1E6, possibly because of the table that takes longer for larger ranges.
 
  • #82
Jorrie said:
For some reason I find a severe slowdown when starting z at 1E6, possibly because of the table that takes longer for larger ranges.
Perhaps the excessive slowdown for more severe ranges could be effected by the internet speed. As a test, I opened up the z range from -0.9999 to 1 000 000 and got between 10 and 15 seconds delay before the result table was presented. On my end I'm on a 50 Mbps fiber, but there are some intercontinental delays as well.

If I understand it correctly, your integration routine does not run locally, but on some remote server? If so, a large number of requests need to go to it, I guess.

For what it's worth, if it would be workable, it gave the following range in cosmic time:

1660920678678.png

That's from less than one year, way out to 173 Gyr...
 
  • #83
Jorrie said:
If I understand it correctly, your integration routine does not run locally, but on some remote server? If so, a large number of requests need to go to it, I guess.
No, it's all running in the local machine. I think the problem may be seeking too high a precision at extreme redshifts.
 
  • #84
Jorrie said:
For some reason I find a severe slowdown when starting z at 1E6, possibly because of the table that takes longer for larger ranges.

Where or how can I try the calculator?
 
  • #86
Jorrie said:
For some reason I find a severe slowdown when starting z at 1E6, possibly because of the table that takes longer for larger ranges.

The value z = 1000000 is unusual (I don't know why); it takes more than 10 sec to get my calculation result. For other values, such as z = 99999.99999, it takes only a fraction of a sec. You could change the range to,

> zlower to 99999​
 
  • #87
JimJCW said:
The value z = 1000000 is unusual (I don't know why); it takes more than 10 sec to get my calculation result. For other values, such as z = 99999.99999, it takes only a fraction of a sec.
I don't find z = 1000000 (1 million) to be special. It seems the calc time goes up exponentially with large z. Up to z = 300000 it seems to stay within 1 second execution time. This gives around 8 years after T = 0.

There is of course a different route that can be followed for times shortly after inflation, when radiation dominated overwhelmingly, i.e.,
$$H =H_0 (z+1)^2 \sqrt{\Omega_r}$$
(Edit2: sorry I had this upside down originally, as well as wrong in a silly way)

Not sure if it is worth the effort in coding though...
 
Last edited:
  • #88
Jorrie said:
I don't find z = 1000000 (1 million) to be special. It seems the calc time goes up exponentially with large z. Up to z = 300000 it seems to stay within 1 second execution time. This gives around 8 years after T = 0.

You are right; I mistakenly thought '99999' = '1000000 - 1'.
 
  • #89
Jorrie said:
http://jorrie.epizy.com/docs/index.html

I'm still struggling to get a working link out of my fork for direct use on github
I have marked it v8.3.x
A recap on links:

The stable version (currently 8.3.0, incorporating CSV download, ## D_{hor} ## correction and the other changes we have discussed) is at https://light-cone-calc.github.io/.

@Jorrie your fork is at https://burtjordaan.github.io/light-cone-calc.github.io/, this serves whatever is in the docs folder of the main branch, which currently appears to be v.8.1.2 (although I think it is actually a bit modified from the "original" 8.1.2). But this code seems to be a bit behind what we are now working on (I think this was in the develop[ branch but that seems to have disappeared).
 
  • #90
Calculator computation time:

The computation time of LightCone8 is discussed in Post #79-83, #86-88. For example, when the value of z is increased from 1 to 1000000, the computation time is increased from a fraction of a sec to 10 sec or so.

To get some ideas about this question, I did some experiments with the ICRAR calculator using PLANCK(2018+BAO) data and various values of z. The calculation times are all of the order of 1 sec. An example is given below:

1661081396520.png


@Jorrie, @pbuk
 

Similar threads

  • · Replies 61 ·
3
Replies
61
Views
5K
  • · Replies 18 ·
Replies
18
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 0 ·
Replies
0
Views
3K
  • · Replies 0 ·
Replies
0
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 15 ·
Replies
15
Views
5K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K