Skip to content

Commit

Permalink
minor wording
Browse files Browse the repository at this point in the history
  • Loading branch information
dtamayo committed Jan 24, 2025
1 parent c586998 commit 5e31344
Show file tree
Hide file tree
Showing 8 changed files with 150 additions and 113 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ipynb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ jobs:
python ipynb2py.py GridOfStabilityPredictions.ipynb
python ipynb2py.py QuickStart.ipynb
python ipynb2py.py GiantImpactPhase.ipynb
python ipynb2py.py HowToCite.ipynb
52 changes: 26 additions & 26 deletions jupyter_examples/ComparingToNbody.ipynb

Large diffs are not rendered by default.

62 changes: 31 additions & 31 deletions jupyter_examples/GiantImpactPhase.ipynb

Large diffs are not rendered by default.

23 changes: 15 additions & 8 deletions jupyter_examples/GridOfStabilityPredictions.ipynb

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions jupyter_examples/HowToCite.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,22 @@
"}\n",
"\n",
"@ARTICLE{giantimpact,\n",
"author = {{Lammers}, Caleb and {Cranmer}, Miles and {Hadden}, Sam and {Ho}, Shirley and {Murray}, Norman and {Tamayo}, Daniel},\n",
" title = \"{Accelerating Giant-impact Simulations with Machine Learning}\",\n",
" journal = {\u0007pj},\n",
" keywords = {Exoplanets, Extrasolar rocky planets, Planet formation, Planetary dynamics, 498, 511, 1241, 2173, Astrophysics - Earth and Planetary Astrophysics, Astrophysics - Instrumentation and Methods for Astrophysics, Computer Science - Machine Learning},\n",
" year = 2024,\n",
" month = nov,\n",
" volume = {975},\n",
" number = {2},\n",
" eid = {228},\n",
" pages = {228},\n",
" doi = {10.3847/1538-4357/ad7fe5},\n",
"archivePrefix = {arXiv},\n",
" eprint = {2408.08873},\n",
" primaryClass = {astro-ph.EP},\n",
" adsurl = {https://ui.adsabs.harvard.edu/abs/2024ApJ...975..228L},\n",
" adsnote = {Provided by the SAO/NASA Astrophysics Data System}i\n",
"}\n",
"\n"
]
Expand Down
68 changes: 34 additions & 34 deletions jupyter_examples/QuickStart.ipynb

Large diffs are not rendered by default.

25 changes: 11 additions & 14 deletions spock/featureclassifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,14 @@ def __init__(self, modelfile='models/featureclassifier.json'):
self.model.load_model(pwd + '/'+modelfile)

def predict_stable(self,sim, n_jobs = -1, Nbodytmax = 1e6):
'''runs spock classification on a list of simulations
'''Evaluates probability of stability for a list of simulations
Arguments:
sim: simulation or list of simulations
n_jobs: number of jobs you want to run with multi processing
Nbodytmax: the maximum number of orbits a integration
will run for, default and training number is
1e6, this parameter should only be changed for testing
if the user has experience with the spock system
Nbodytmax: Max number of orbits the short integration
will run for. Default used to train the model is
1e6. Be sure to test the performance if changing this value.
return: the probability that each system is stable
'''
Expand Down Expand Up @@ -88,10 +87,9 @@ def generate_features(self, sim, n_jobs = -1, Nbodytmax = 1e6):
Arguments:
sim: simulation or list of simulations
n_jobs: number of jobs to run with multi processing
Nbodytmax: the maximum number of orbits a integration
will run for, default and training number is
1e6, this parameter should only be changed for testing
if the user has experience with the spock system
Nbodytmax: Max number of orbits the short integration
will run for. Default used to train the model is
1e6. Be sure to test the performance if changing this value.
return: features for given system or list of systems
'''
Expand All @@ -103,15 +101,14 @@ def generate_features(self, sim, n_jobs = -1, Nbodytmax = 1e6):
return data

def simToData(self, sim, n_jobs, Nbodytmax = 1e6):
'''given a simulation(s), returns data required for spock classification
'''Given a simulation(s), returns data required for spock classification
Arguments:
sim: simulation or list of simulations
n_jobs: number of jobs you want to run with multi processing
Nbodytmax: the maximum number of orbits a integration
will run for, default and training number is
1e6, this parameter should only be changed for testing
if the user has experience with the spock system
Nbodytmax: Max number of orbits the short integration
will run for. Default used to train the model is
1e6. Be sure to test the performance if changing this value.
return: returns a list of the simulations features/short term stability
'''
Expand Down
16 changes: 16 additions & 0 deletions spock/giant_impact_phase_emulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,22 @@ def cite(self):
}
@ARTICLE{giantimpact,
author = {{Lammers}, Caleb and {Cranmer}, Miles and {Hadden}, Sam and {Ho}, Shirley and {Murray}, Norman and {Tamayo}, Daniel},
title = "{Accelerating Giant-impact Simulations with Machine Learning}",
journal = {\apj},
keywords = {Exoplanets, Extrasolar rocky planets, Planet formation, Planetary dynamics, 498, 511, 1241, 2173, Astrophysics - Earth and Planetary Astrophysics, Astrophysics - Instrumentation and Methods for Astrophysics, Computer Science - Machine Learning},
year = 2024,
month = nov,
volume = {975},
number = {2},
eid = {228},
pages = {228},
doi = {10.3847/1538-4357/ad7fe5},
archivePrefix = {arXiv},
eprint = {2408.08873},
primaryClass = {astro-ph.EP},
adsurl = {https://ui.adsabs.harvard.edu/abs/2024ApJ...975..228L},
adsnote = {Provided by the SAO/NASA Astrophysics Data System}i
}
"""
print(txt + "\n\n\n" + bib)
Expand Down

0 comments on commit 5e31344

Please sign in to comment.