Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
rajeshrinet committed Jul 11, 2023
1 parent 9fb75aa commit b9c6b80
Show file tree
Hide file tree
Showing 8 changed files with 56 additions and 138 deletions.
12 changes: 1 addition & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,16 +203,6 @@ Read more in the [examples](https://github.com/rajeshrinet/pyross/tree/master/ex
* **Age-structured impact of social distancing on the COVID-19 epidemic in India**. Rajesh Singh and R. Adhikari, [arXiv:2003.12055, 2020](https://arxiv.org/abs/2003.12055) | [ResearchGate](https://www.researchgate.net/publication/340209224_Age-structured_impact_of_social_distancing_on_the_COVID-19_epidemic_in_India_Updates_at_httpsgithubcomrajeshrinetpyrossa).


## News
* A partial list of news articles on PyRoss-based research: [Zee News](https://zeenews.india.com/india/3-week-coronavirus-covid-19-lockdown-not-enough-sustained-periods-of-shutdown-with-periodic-relaxation-will-work-research-2272313.html)
| [Varsity](https://www.varsity.co.uk/news/19284)
| [The Weekend Leader](http://www.theweekendleader.com/Headlines/54963/49-day-lockdown-necessary-to-stop-covid-19-resurgence-in-india-study.html) | [The Weather Channel](https://weather.com/en-IN/india/coronavirus/news/2020-03-29-india-needs-49-day-lockdown-prevent-resurgence-covid-19-study) | [The Tribune](https://www.tribuneindia.com/news/49-day-lockdown-necessary-to-stop-coronavirus-resurgence-in-india-study-62790) | [The Times of India](https://timesofindia.indiatimes.com/readersblog/viewofac/a-hard-headed-look-can-india-fight-covid-19-only-through-lock-down-for-how-long-11163/) | [The Telegraph](https://www.telegraphindia.com/india/coronavirus-outbreak-a-case-for-evidence-based-lockdowns-after-april-14/cid/1760155) | [The Northlines](http://www.thenorthlines.com/21-day-covid-19-lockdown-not-enough-sustained-shutdown-with-periodic-relaxation-will-work-research/) | [The New Indian Express](https://www.newindianexpress.com/nation/2020/mar/28/21-day-lockdown-not-enough-to-contain-coronavirus-outbreak-study-2122803.html) | [The Federal](https://thefederal.com/covid-19/data-impact-to-decide-extension-of-covid-19-lockdown-experts/) | [Swarajya](https://swarajyamag.com/insta/49-day-lockdown-required-to-prevent-return-of-covid-19-in-india-cambridge-university-study-suggests) | [Snoop Tales](https://snooptales.com/2020/03/30/coronavirus-lockdown-cambridge-model-predicts-what-india-needs-to-contain-covid-19-spread/) | [Scroll.in](https://scroll.in/article/958277/the-political-fix-will-covid-19-crisis-slow-down-modis-centralising-tendencies) | [Rediff.com](https://www.rediff.com/news/interview/coronavirus-in-india-india-may-need-a-49-day-lockdown/20200409.htm) | [The Quint](https://www.thequint.com/news/india/scientists-mathematical-modeling-warn-sustained-lockdowns-to-beat-covid-19) | [People's Reporter](https://www.peoplesreporter.in/science-technology/5801-minimum-49-days-lockdown-necessary-to-prevent-covid-19-says-cambridge-researcher.html) | [News Bundle](https://newsbunddle.com/%E0%A4%95%E0%A5%8B%E0%A4%B0%E0%A5%8B%E0%A4%A8%E0%A4%BE%E0%A4%B5%E0%A4%BE%E0%A4%AF%E0%A4%B0%E0%A4%B8-%E0%A4%B2%E0%A5%89%E0%A4%95%E0%A4%A1%E0%A4%BE%E0%A4%89%E0%A4%A8-%E0%A4%95%E0%A5%88%E0%A4%AE/) | [Newsgram](https://www.newsgram.com/49-day-national-lockdown-prevent-coronavirus-resurgence-india) | [Nature News](https://www.nature.com/articles/d41586-020-01058-5) | [Mathrubhumi](https://www.mathrubhumi.com/news/india/49-day-lockdown-necessary-to-stop-coronavirus-resurgence-in-india-study-1.4652600) | [liveMint](https://www.livemint.com/news/india/49-day-lockdown-necessary-to-stop-coronavirus-resurgence-in-india-study-11585473979844.html) | [India New England News](https://indianewengland.com/2020/03/49-day-lockdown-necessary-to-stop-covid-19-resurgence-in-india-study/) | [India Today](https://www.indiatoday.in/india/story/coronavirus-lockdown-india-cambridge-mathematical-model-extension-1661321-2020-03-30) | [Indian Express: Bangla](https://bengali.indianexpress.com/opinion/21-days-lock-down-not-enough-exponential-curve-research-206782/) | [Indian Blooms](https://indiablooms.com/health-details/H/5782/india-needs-49-day-lockdown-to-combat-covid-19-cambridge-study.html) | [Dainik Bhaskar](https://f87kg.app.goo.gl/epaper) | [CNN](https://edition.cnn.com/2020/04/28/india/india-coronavirus-outbreak-explained-intl-hnk/index.html) | [CCN](https://www.ccn.com/indias-total-coronavirus-lockdown-isnt-enough-and-its-faltering/) | [Business Standard](https://www.business-standard.com/article/current-affairs/49-day-lockdown-necessary-to-stop-coronavirus-resurgence-in-india-study-120032900487_1.html) | [Asiaville](https://www.asiavillenews.com/article/experts-on-whether-india-will-flatten-covid-19-curve-effectively-37658)

* Python Trending has tweeted about PyRoss <blockquote class="twitter-tweet"><p lang="en" dir="ltr">PyRoss - Mathematical modelling of infectious disease in Python. <a href="https://t.co/VBOmT5kaVT">https://t.co/VBOmT5kaVT</a> <a href="https://t.co/FRvEqWMlPL">https://t.co/FRvEqWMlPL</a></p>&mdash; Python Trending (@pythontrending) <a href="https://twitter.com/pythontrending/status/1244918005731033088?ref_src=twsrc%5Etfw">March 31, 2020</a></blockquote>

* Python Weekly has tweeted about PyRoss <blockquote class="twitter-tweet"><p lang="en" dir="ltr">PyRoss - Mathematical modelling of infectious disease in Python. <a href="https://t.co/MyTWTM1ItP">https://t.co/MyTWTM1ItP</a> <a href="https://twitter.com/hashtag/Python?src=hash&amp;ref_src=twsrc%5Etfw">#Python</a> <a href="https://twitter.com/hashtag/Coronavirus?src=hash&amp;ref_src=twsrc%5Etfw">#Coronavirus</a> <a href="https://twitter.com/hashtag/Covid19?src=hash&amp;ref_src=twsrc%5Etfw">#Covid19</a> <a href="https://t.co/gzPNpWf7mK">pic.twitter.com/gzPNpWf7mK</a></p>&mdash; Python Weekly (@PythonWeekly) <a href="https://twitter.com/PythonWeekly/status/1248324915788492807?ref_src=twsrc%5Etfw">April 9, 2020</a></blockquote>


## License
We believe that openness and sharing improves the practice of science and increases the reach of its benefits. This code is released under the [MIT license](http://opensource.org/licenses/MIT). Our choice is guided by the excellent article on [Licensing for the scientist-programmer](http://www.ploscompbiol.org/article/info%3Adoi%2F10.1371%2Fjournal.pcbi.1002598).


28 changes: 11 additions & 17 deletions examples/others/tsi/ex01.ipynb

Large diffs are not rendered by default.

77 changes: 26 additions & 51 deletions examples/others/tsi/ex02_control.ipynb

Large diffs are not rendered by default.

28 changes: 11 additions & 17 deletions examples/others/tsi/ex03_forecasting.ipynb

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions pyross/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import pyross.utils
import pyross.utils_python
import pyross.evidence
import pyross.tsi.deterministic
import pyross.tsi

## current version of PyRoss
__version__="2.2.0"
__version__="2.2.1"

25 changes: 2 additions & 23 deletions pyross/tsi/deterministic.pyx → pyross/tsi.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import numpy as np
cimport numpy as np
cimport cython
from libc.stdlib cimport malloc, free
import warnings
from scipy.special import legendre
import matplotlib.pyplot as plt
Expand All @@ -10,7 +7,7 @@

DTYPE = np.float64

cdef class CommonMethods:
class CommonMethods:
"""
Parent class used for all classes listed below.
It includes:
Expand All @@ -19,12 +16,6 @@
c) Method to set the contactMatrix array, CM
"""

cdef:
readonly int N, M, kI, kE, nClass
readonly float Ttsi, dtsi, beta_params, gI_params
readonly np.ndarray population, beta, gI, Ni, CM
readonly dict paramList, readData

def simulator(self, x0, contactMatrix, Tf, Nf, integrator='odeint',
Ti=0, maxNumSteps=100000, **kwargs):
"""
Expand Down Expand Up @@ -131,11 +122,6 @@ def dxdtEval(xt, t):



@cython.wraparound(False)
@cython.boundscheck(False)
@cython.cdivision(True)
@cython.nonecheck(False)
# cdef class SIR(CommonMethods):
class SIR:
"""
Parameters
Expand Down Expand Up @@ -359,7 +345,7 @@ def simulate(self, S0, I0, contactMatrix, Tf, Ti=0):

return data

cdef class Simulator:
class Simulator:
"""
Simulator for a deterministic time-since infection model
Expand All @@ -371,13 +357,6 @@ def simulate(self, S0, I0, contactMatrix, Tf, Ti=0):
"""


cdef:
readonly dict parameters
readonly str method
readonly str galerkinIntegrator
readonly list IC
readonly np.ndarray phi_alpha, p_alpha

def __init__(self, parameters, method='Predictor_Corrector', galerkinIntegrator='odeint'):
self.parameters = parameters
self.method = method
Expand Down
2 changes: 0 additions & 2 deletions pyross/tsi/__init__.py

This file was deleted.

18 changes: 3 additions & 15 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,6 @@
)


if 'darwin'==(sys.platform).lower():
extension2 = Extension('pyross/tsi/*', ['pyross/tsi/*.pyx'],
include_dirs=[numpy.get_include()],
extra_compile_args=['-mmacosx-version-min=10.9'],
extra_link_args=['-mmacosx-version-min=10.9'],
)
else:
extension2 = Extension('pyross/tsi/*', ['pyross/tsi/*.pyx'],
include_dirs=[numpy.get_include()],
)


with open("README.md", "r") as fh:
long_description = fh.read()

Expand Down Expand Up @@ -61,14 +49,14 @@
long_description=long_description,
long_description_content_type='text/markdown',
platforms='tested on Linux, macOS, and windows',
ext_modules=cythonize([extension1, extension2],
ext_modules=cythonize([extension1],
compiler_directives={'language_level': 3},
),
libraries=[],
install_requires=['cython','numpy','scipy','matplotlib',
'cma','sympy','nlopt','dill'],
packages=['pyross', 'pyross/tsi'],
package_data={'pyross': ['*.pxd'], 'pyross/tsi': ['*.pxd']},
packages=['pyross'],
package_data={'pyross': ['*.pxd']},
include_package_data=True,
setup_requires=['wheel'],
classifiers=[
Expand Down

0 comments on commit b9c6b80

Please sign in to comment.