dirac-institute / sorcha

An open-source community LSST Solar System Simulator
Other
18 stars 17 forks source link

Adding in a cite functionality to print to command line the relevant papers/acknowledgements to reference for sorcha #490

Closed mschwamb closed 1 year ago

mschwamb commented 1 year ago

I am not sure if this would be easy to do for sorcha, but given we have the config file maybe this is straight forward. Maybe it's not. The rebound integrator has this .cite() capability that based on the simulation tells you how and what papers to cite.

import rebound sim = rebound.Simulation() sim.add(m=1.0) sim.add(m=1.0e-3, a=1.0) sim.integrate(1000.) sim.status()

---------------------------------
REBOUND version:        3.26.1
REBOUND built on:       Jul 21 2023 14:18:56
Number of particles:    2
Selected integrator:    ias15
Simulation time:        1.0000000000000000e+03
Current timestep:       0.175751
---------------------------------
<rebound.particle.Particle object at 0x10ec45140, m=1.0 x=0.0009018668853449115 y=0.9985061071382842 z=0.0 vx=0.0009947645590436187 vy=0.0009023177061107369 vz=0.0>
<rebound.particle.Particle object at 0x10ec45d40, m=0.001 x=0.09813311465491341 y=1.993767924177987 z=0.0 vx=-0.9947645590436202 vy=0.09818216895173253 vz=0.0>
---------------------------------

sim.cite() Simulations in this paper made use of the REBOUND N-body code \citep{rebound}. The simulations were integrated using IAS15, a 15th order Gauss-Radau integrator \citep{reboundias15}.

@ARTICLE{rebound, author = {{Rein}, H. and {Liu}, S. -F.}, title = "{REBOUND: an open-source multi-purpose N-body code for collisional dynamics}", journal = {\aap}, keywords = {methods: numerical, planets and satellites: rings, protoplanetary disks, Astrophysics - Earth and Planetary Astrophysics, Astrophysics - Instrumentation and Methods for Astrophysics, Mathematics - Dynamical Systems, Physics - Computational Physics}, year = 2012, month = jan, volume = {537}, eid = {A128}, pages = {A128}, doi = {10.1051/0004-6361/201118085}, archivePrefix = {arXiv}, eprint = {1110.4876}, primaryClass = {astro-ph.EP}, adsurl = {https://ui.adsabs.harvard.edu/abs/2012A&A...537A.128R}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } @ARTICLE{reboundias15, author = {{Rein}, Hanno and {Spiegel}, David S.}, title = "{IAS15: a fast, adaptive, high-order integrator for gravitational dynamics, accurate to machine precision over a billion orbits}", journal = {\mnras}, keywords = {gravitation, methods: numerical, planets and satellites: dynamical evolution and stability, Astrophysics - Earth and Planetary Astrophysics, Astrophysics - Instrumentation and Methods for Astrophysics, Astrophysics - Solar and Stellar Astrophysics, Mathematics - Numerical Analysis}, year = 2015, month = jan, volume = {446}, number = {2}, pages = {1424-1437}, doi = {10.1093/mnras/stu2164}, archivePrefix = {arXiv}, eprint = {1409.4779}, primaryClass = {astro-ph.EP}, adsurl = {https://ui.adsabs.harvard.edu/abs/2015MNRAS.446.1424R}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} }

maxwest-uw commented 1 year ago

we actually talked about this problem at the beginning of the LINCC project! an idea we were playing with was creating a python dunder/builtin method that would spit out a list of citations and acknowledgements! something like sorcha.__acknowledge__() or sorcha.__ack__(). in my mind this would be something that has larger adoption in the python community as well... awesome to know that other packages are working on this!

mschwamb commented 1 year ago

Cool. So sounds like we definitely want this, but it's icing on the cake for the incubator.

mschwamb commented 1 year ago

Renamed this ticket so this functionality can be added in later

mschwamb commented 1 year ago

So I spent the afternoon and evening grabbing all the relevant bibtex for the papers and acknowledgement lines. I've put them in a python script that prints out to the screen. I'm not sure how best to implement this into sorcha, but I think it would be pretty straight forward to take what I have and put into the appropriate function/.py file. Here's a link to the python script.