taskGNU Astronomy Utilities - Tasks: task #14691, cosmiccal: handle stdin and act as...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

task #14691: cosmiccal: handle stdin and act as a filter to stdout

Submitter:  Boud Roukema <boud>
Submitted:  Tue 03 Oct 2017 03:15:44 PM UTC
   
 
Should Start On:  Tue 03 Oct 2017 12:00:00 AM UTC Should be Finished on:  Thu 03 Oct 2019 12:00:00 AM UTC
Category:  CosmicCalculator Priority:  5 - Normal
Item Group:  New feature Status:  None
Privacy:  Public Assigned to:  boud
Percent Complete:  0% Open/Closed:  Open
Effort:  0.00

Wed 24 Jan 2024 10:30:19 PM UTC, comment #2: 

Ignore my comment "For a further speedup, see https://savannah.gnu.org/bugs/index.php?65195 for the flat case." The analytical speedup for the flat FLRW cases with non-zero Lambda (such as LCDM) is for a(t) or t(a) (Eq (12), [3]; free-software version in [4][5]), not for the radial comoving distance.

Second correction: "- at 1 microsecond/redshift. With ..." should have read ". At 1 microsecond/redshift, with..."

(LSST/Rubin will give us billions of galaxies with multi-band photometry fast, but I'm not going to try now to convert that to time per photo-redshift. :))

[3]  Sahni, Varun ; Starobinsky, Alexei, 2000, IJMPD, 9, 373 https://ui.adsabs.harvard.edu/abs/2000IJMPD...9..373S https://arxiv.org/abs/astro-ph/9904398

[4] https://codeberg.org/boud/inhomog/src/branch/master/lib/FLRW_background.c

[5] https://codeberg.org/boud/inhomog/src/branch/master/lib/test_scale_factor.c

Boud Roukema <boud>
Group Member
Wed 24 Jan 2024 09:07:42 PM UTC, comment #1: 

Commit 7fc6dc81 on branch cosmo_benchmark [1] shows the slowdown induced by requiring the input parameter to be a command line option rather than be read from stdin. LSST/Rubin [2] will give us billions of galaxies with photo-z's - at 1 microsecond/redshift. With 1 cpu, a billion redshifts will take 1000 seconds to convert to comoving radial distances with 'cosmdist' 0.3.12, or 50 million seconds (about a year and a half) with 'cosmiccal'.

For a further speedup, see https://savannah.gnu.org/bugs/index.php?65195 for the flat case.


tests$ ./cosmiccal/benchmark.sh

astcosmiccal, N_big1=1000:
real    0m18.769s
user    0m14.561s
sys     0m6.386s

cosmdist, N_big1=1000:
real    0m0.128s
user    0m0.129s
sys     0m0.000s

cosmdist, N_big2=1000000:
real    0m0.945s
user    0m0.932s
sys     0m0.034s

cosmdist, N_big3=10000000:
real    0m8.272s
user    0m8.244s
sys     0m0.232s


Caveats for this back-of-the-envelope benchmarking:

  • I didn't continue 'cosmiccal' to the full extent of proportionality to N, but I think it's close enough;
  • the results from 1M to 10M for 'cosmdist' seem close enough to proportionality to N for a back-of-the-envelope estimate.


[1] https://codeberg.org/boud/gnuastro/commit/7fc6dc81bb30c573d0d4b08320c3dd9d4c54eac2

[2] https://community.lsst.org

Boud Roukema <boud>
Group Member
Tue 03 Oct 2017 03:15:44 PM UTC, original submission:  

It would be good if cosmiccal can read a list of redshifts
or times from standard input stdin and output the (single)
chosen parameter (or possibly: multiple space-separated parameters) to standard output stdout. A simple way to do
this is to read from stdin until EOF as in cosmdist:

https://bitbucket.org/broukema/cosmdist/src/deeeef1a681257a5ef42412eaec0928e61425b68/cosmdist.c?at=master&fileviewer=file-view-default

Ways to modify cosmiccal include:

  • if neither redshift or time are entered, then read and filter stdin
  • add a single minus "-" option as a parameter to override default input redshift or time


More ambitious methods include communicating directly between
the processes before and after the pipe.

Boud Roukema <boud>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by boud (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-10-18 boud Should be Finished on2017-10-03 2019-10-03

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code