Skip to content
Snippets Groups Projects
Commit d7b36925 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Updated the publication page to use the new ADS reference

parent 2f341dd5
No related branches found
No related tags found
No related merge requests found
from myads.query import ADSQueryWrapper
from operator import itemgetter, attrgetter
import yaml
import sys
import math
# Query papers citing the two SWIFT ADS entries
query = ADSQueryWrapper(sys.argv[1])
query_data = query.get("citations(2016pasc.conf....2S) or citations(2018ascl.soft05020S) or citations(2023arXiv230513380S)", fl="title,bibcode,first_author_norm,date,year,author_count,bibstem,abstract,volume,issue,page,citation_count", rows=1000)
query_data = query.get("citations(2016pasc.conf....2S) or citations(2018ascl.soft05020S) or citations(2024MNRAS.530.2378S)", fl="title,bibcode,first_author_norm,date,year,author_count,bibstem,abstract,volume,issue,page,citation_count", rows=1000)
paper_list = list(query_data.papers)
total_citations = 0
query_data = query.get("citations(2016pasc.conf....2S)", fl="bibcode", rows=1000)
citations_pasc = len(list(query_data.papers))
query_data_pasc = query.get("citations(2016pasc.conf....2S)", fl="bibcode", rows=1000)
citations_pasc = len(list(query_data_pasc.papers))
query_data = query.get("citations(2018ascl.soft05020S)", fl="bibcode", rows=1000)
citations_ascl = len(list(query_data.papers))
query_data_ascl = query.get("citations(2018ascl.soft05020S)", fl="bibcode", rows=1000)
citations_ascl = len(list(query_data_ascl.papers))
# Process the data to make the title a string and not an array of strings
for paper in paper_list:
if paper.bibcode == "2023arXiv230513380S":
if paper.bibcode == "2024MNRAS.530.2378S":
to_remove = paper
citations_release = paper.citation_count
......@@ -36,14 +37,25 @@ for paper in paper_list:
paper.abstract = paper.abstract.replace("<P />", "")
total_citations += paper.citation_count
# Remove self-contribution
paper_list.remove(to_remove)
# Compute h-index of citing papers
paper_list_copy = paper_list.copy()
paper_list_copy.sort(key=attrgetter('citation_count'),reverse=True)
h_index = 1
for paper in paper_list_copy:
if paper.citation_count >= h_index:
h_index += 1
h_index -= 1
# Create a dictionary of cards
my_list = dict({"num_papers": query_data.num_found - 1,
"total_citations": total_citations,
"citations_release": citations_release,
"citations_pasc": citations_pasc,
"citations_ascl": citations_ascl,
"h_index": h_index,
"cards": paper_list})
# Silence the yaml object naming
......
......@@ -14,16 +14,16 @@
</div>
<div class="card-text">
<h4><a href="https://ui.adsabs.harvard.edu/abs/2023arXiv230513380S/abstract">SWIFT: A modern highly-parallel gravity and smoothed particle hydrodynamics
<h4><a href="https://ui.adsabs.harvard.edu/abs/2024MNRAS.530.2378S/abstract">SWIFT: A modern highly-parallel gravity and smoothed particle hydrodynamics
solver for astrophysical and cosmological applications</a> </h4>
<p>&emsp; Schaller M. et al., <i>MNRAS</i>, 2024 &emsp;&emsp;(citations: {{ citations_release }})
<p>&emsp; Schaller M. et al., <i>MNRAS</i>, May 2024, Vol. 530, Issue 2, pp. 2378-2419 &emsp;&emsp;(citations: {{ citations_release }})
<h4><a href="https://ui.adsabs.harvard.edu/abs/2016pasc.conf....2S/abstract">SWIFT: SPH With Inter-dependent Fine-grained Tasking </a> </h4>
<p>&emsp; Schaller M. et al., <i>Astrophysics Source Code Library</i>, 2018, <a href="https://ascl.net/1805.020">record ascl:1805.020</a> &emsp;&emsp;(citations: {{ citations_ascl }})
<p>&emsp; Schaller M. et al., <i>Astrophysics Source Code Library</i>, 2018, ascl:<a href="https://ascl.net/1805.020">1805.020</a> &emsp;&emsp;(citations: {{ citations_ascl }})
<h4><a href="https://ui.adsabs.harvard.edu/abs/2016pasc.conf....2S/abstract">SWIFT: Using Task-Based Parallelism, Fully Asynchronous Communication, and Graph Partition-Based Domain
Decomposition for Strong Scaling on more than 100,000 Cores </a> </h4>
<p>&emsp; Schaller M. et al., <i>PASC</i>, 2016, vol. 1 &emsp;&emsp;(citations: {{ citations_pasc }})
<p>&emsp; Schaller M. et al., <i>PASC</i>, 2016, Vol. 1, Article Id. 2 &emsp;&emsp;(citations: {{ citations_pasc }})
</div>
......@@ -33,8 +33,10 @@
</div>
<div> The following {{ num_papers }} publications have used
SWIFT (directly or indirectly) to obtain their results. They
have jointly gathered {{ total_citations }} citations.</div>
SWIFT (directly or indirectly) to obtain their results.
<p>They have jointly gathered {{ total_citations }} citations and have
an h-index of {{ h_index }}.
</div>
{% set count = num_papers %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment