Skip to content

Commit

Permalink
testing documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ashleychontos committed Nov 6, 2022
1 parent 499786e commit 4aaaf93
Show file tree
Hide file tree
Showing 6 changed files with 148 additions and 146 deletions.
70 changes: 35 additions & 35 deletions docs/library/about.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,60 +63,60 @@ Related Tools
Several tools have been developed to solve related scientific and data analysis problems. We have compiled
a list of software packages that perform similar or complementary analyses.

* `AMP`:
* ``AMP``:
- language:
- reference:
- documentation: no
- publicly available: no
- requires license: n/a

* `A2Z`: determining global parameters of the oscillations of solar-like stars
* ``A2Z``: determining global parameters of the oscillations of solar-like stars
- language: `?`
- reference: `yes<https://ui.adsabs.harvard.edu/abs/2010A%26A...511A..46M>`_
- reference: `yes <https://ui.adsabs.harvard.edu/abs/2010A%26A...511A..46M>`_
- documentation: no
- publicly available: no
- requires license: n/a

* `Background`: an extension of ``DIAMONDS`` that fits the background signal of solar-like oscillators
* ``Background``: an extension of ``DIAMONDS`` that fits the background signal of solar-like oscillators
- language: `c++11`
- reference: no
- documentation: no
- publicly available: `yes<https://github.com/EnricoCorsaro/Background>`_
- publicly available: `yes <https://github.com/EnricoCorsaro/Background>`_
- requires license: no

* `CAN`: on the detection of Lorentzian profiles in a power spectrum
* ``CAN``: on the detection of Lorentzian profiles in a power spectrum
- language: `?`
- reference: `yes<https://ui.adsabs.harvard.edu/abs/2009A%26A...506.1043G>`_
- reference: `yes <https://ui.adsabs.harvard.edu/abs/2009A%26A...506.1043G>`_
- documentation: no
- publicly available: no
- requires license: n/a

* `COR`: on detecting the large separation in the autocorrelation of stellar oscillation times series
* ``COR``: on detecting the large separation in the autocorrelation of stellar oscillation times series
- language: `?`
- reference: `yes<https://ui.adsabs.harvard.edu/abs/2009A%26A...508..877M>`_
- reference: `yes <https://ui.adsabs.harvard.edu/abs/2009A%26A...508..877M>`_
- documentation: no
- publicly available: no
- requires license: n/a

* `DIAMONDS`: high-DImensional And multi-MOdal NesteD Sampling
* ``DIAMONDS``: high-DImensional And multi-MOdal NesteD Sampling
- language: `c++11`
- reference: `yes<https://ui.adsabs.harvard.edu/abs/2014A%26A...571A..71C>`_
- documentation: `yes<https://diamonds.readthedocs.io/en/latest/>`_
- publicly available: `yes<https://github.com/EnricoCorsaro/DIAMONDS>`_
- reference: `yes <https://ui.adsabs.harvard.edu/abs/2014A%26A...571A..71C>`_
- documentation: `yes <https://diamonds.readthedocs.io/en/latest/>`_
- publicly available: `yes <https://github.com/EnricoCorsaro/DIAMONDS>`_
- requires license: n/a

* `DLB`:
* ``DLB``:
- language: `?`
- reference: no
- documentation: n/a
- publicly available: no
- requires license: n/a

* `FAMED`: Fast & AutoMated pEakbagging with Diamonds
* ``FAMED``: Fast & AutoMated pEakbagging with Diamonds
- language: `IDL` (currently being developed in `Python`)
- reference: `yes<https://ui.adsabs.harvard.edu/abs/2020A%26A...640A.130C>`_
- documentation: `yes<https://famed.readthedocs.io/en/latest/>`_
- publicly available: `yes<https://github.com/EnricoCorsaro/FAMED>`_
- reference: `yes <https://ui.adsabs.harvard.edu/abs/2020A%26A...640A.130C>`_
- documentation: `yes <https://famed.readthedocs.io/en/latest/>`_
- publicly available: `yes <https://github.com/EnricoCorsaro/FAMED>`_
- requires license: yes

* Flicker Flipper?:
Expand All @@ -126,51 +126,51 @@ a list of software packages that perform similar or complementary analyses.
- publicly available:
- requires license: n/a

* `KAB`: automated asteroseismic analysis of solar-type stars
* ``KAB``: automated asteroseismic analysis of solar-type stars
- language: `?`
- reference: `yes<https://ui.adsabs.harvard.edu/abs/2010arXiv1003.4167K>`_
- reference: `yes <https://ui.adsabs.harvard.edu/abs/2010arXiv1003.4167K>`_
- documentation: no
- publicly available: no
- requires license: n/a

* `lightkurve`: a friendly Python package for making discoveries with *Kepler* & TESS
* ``lightkurve``: a friendly Python package for making discoveries with *Kepler* & TESS
- language: `Python`
- reference: no
- documentation: `yes<https://docs.lightkurve.org>`_
- publicly available: `yes<https://github.com/lightkurve/lightkurve>`_
- documentation: `yes <https://docs.lightkurve.org>`_
- publicly available: `yes <https://github.com/lightkurve/lightkurve>`_
- requires license: no

* `OCT`: automated pipeline for extracting oscillation parameters of solar-like main-sequence stars
* ``OCT``: automated pipeline for extracting oscillation parameters of solar-like main-sequence stars
- language: `?`
- reference: `yes<https://ui.adsabs.harvard.edu/abs/2010MNRAS.402.2049H>`_
- reference: `yes <https://ui.adsabs.harvard.edu/abs/2010MNRAS.402.2049H>`_
- documentation: no
- publicly available: no
- requires license: n/a

* `ORK`: using the comb response function method to identify spacings
* ``ORK``: using the comb response function method to identify spacings
- language: `?`
- reference: `yes<https://ui.adsabs.harvard.edu/abs/2008ApJ...676.1248B>`_
- reference: `yes <https://ui.adsabs.harvard.edu/abs/2008ApJ...676.1248B>`_
- documentation: no
- publicly available: no
- requires license: n/a

* `QML`: a power-spectrum autocorrelation technique to detect global asteroseismic parameters
* ``QML``: a power-spectrum autocorrelation technique to detect global asteroseismic parameters
- language: `?`
- reference: `yes<https://ui.adsabs.harvard.edu/abs/2011arXiv1104.0631V>`_
- reference: `yes <https://ui.adsabs.harvard.edu/abs/2011arXiv1104.0631V>`_
- documentation: no
- publicly available: no
- requires license: n/a

* `PBjam`: a python package for automating asteroseismology of solar-like oscillators
* ``PBjam``: a python package for automating asteroseismology of solar-like oscillators
- language: `Python`
- reference: yes <https://ui.adsabs.harvard.edu/abs/2021AJ....161...62N>
- documentation: `yes<https://pbjam.readthedocs.io/en/latest/>`_
- publicly available: `yes<https://github.com/grd349/PBjam>`_
- reference: `yes <https://ui.adsabs.harvard.edu/abs/2021AJ....161...62N>`_
- documentation: `yes <https://pbjam.readthedocs.io/en/latest/>`_
- publicly available: `yes <https://github.com/grd349/PBjam>`_
- requires license: no

* `SYD`: automated extraction of oscillation parameters for *Kepler* observations of solar-type stars
* ``SYD``: automated extraction of oscillation parameters for *Kepler* observations of solar-type stars
- language: `IDL`
- reference: `yes<https://ui.adsabs.harvard.edu/abs/2009CoAst.160...74H>`_
- reference: `yes <https://ui.adsabs.harvard.edu/abs/2009CoAst.160...74H>`_
- documentation: no
- publicly available: no
- requires license: yes
Expand Down
2 changes: 1 addition & 1 deletion src/pysyd/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
__author__ = "Ashley Chontos<[email protected]>"
__license__ = "MIT"
__description__ = "Automated measurements of global asteroseismic parameters"
__version__ = '6.10.0'
__version__ = '6.10.1a'

__all__ = ['cli','models','pipeline','plots','target','utils']

Expand Down
59 changes: 22 additions & 37 deletions src/pysyd/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@


def check(args):
"""
"""Check target
This is intended to be a way to check a target before running it by plotting the
times series data and/or power spectrum. This works in the most basic way but has
Expand All @@ -28,9 +28,9 @@ def check(args):
the command line arguments
.. important::
has not been extensively tested
has not been extensively tested - also it is exactly the same as "load" so think
through if this is actually needed and decided which is easier to understand
"""
star = load(args)
plots.check_data(star)
Expand All @@ -48,10 +48,9 @@ def fun(args):


def load(args):
"""
"""Load target
Module to load in all relevant information and dictionaries
required to run the pipeline
Load in a given target to check data or figures
.. note::
this does *not* load in a target or target data, this is purely
Expand All @@ -61,20 +60,6 @@ def load(args):
Parameters
args : argparse.Namespace
the command line arguments
star : object, optional
pretty sure this is only used from jupyter notebook
verbose : bool, optional
again, this is only used if not using command line
command : str, optional
which of the 5 ``pysyd.pipeline`` modes to execute from the notebook
Returns
single : target.Target
current data available for the provided target
Deprecated
single : target.Target
current data available for the provided target
"""
if args.data:
Expand All @@ -91,13 +76,12 @@ def load(args):
params.add_targets(stars=args.stars)
# Load target data
star = Target(args.stars[0], params)
return star


def parallel(args):
"""
"""Parallel execution
Run ``pySYD`` in parallel for a large number of stars
Run ``pySYD`` concurrently for a large number of stars
Parameters
args : argparse.Namespace
Expand All @@ -113,23 +97,23 @@ def parallel(args):
params = utils.Parameters(args=args)
if args.stars is None:
try:
args.stars = params.load_starlist()
args.stars = params._load_starlist()
except utils.InputError as error:
print(error.msg)
return
# Add target stars
params.add_targets(stars=args.stars)
# Creates the separate, asyncrhonous (nthread) processes
pool = mp.Pool(args.n_threads)
result_objects = [pool.apply_async(pipe, args=(group, params)) for group in params.params['groups']]
result_objects = [pool.apply_async(_pipe, args=(group, params)) for group in params.params['groups']]
results = [r.get() for r in result_objects]
pool.close()
pool.join() # postpones execution of the next line until all processes finish
# Concatenates output into two files
utils.scrape_output(params)
utils._scrape_output(params)


def pipe(group, params, progress=False):
def _pipe(group, params, progress=False):
"""
This function is called by both :mod:`pysyd.pipeline.run` and :mod:`pysyd.pipeline.parallel`
Expand All @@ -150,7 +134,7 @@ def pipe(group, params, progress=False):


def plot(args):
"""
"""Make plots
Module to load in all relevant information and dictionaries
required to run the pipeline
Expand Down Expand Up @@ -178,40 +162,41 @@ def plot(args):


def run(args):
"""
"""Run pySYD
Main function to initiate the pySYD pipeline (consecutively, not
in parallel)
Main function to initiate the pySYD pipeline for one or many stars (the latter is run
consecutively *not* concurrently)
Parameters
args : argparse.Namespace
the command line arguments
Methods
pipe
:mod:`pysyd.utils.Parameters`
:mod:`pysyd.pipeline.pipe`
:mod:`pysyd.utils._scrape_output`
.. seealso:: :mod:`pysyd.pipeline.parallel`
"""
# Load default pySYD parameters
params = utils.Parameters(args=args)
if args.stars is None:
try:
args.stars = params.load_starlist()
args.stars = params._load_starlist()
except utils.InputError as error:
print(error.msg)
return
# Update with CL options
params.add_targets(stars=args.stars)
# Run single batch of stars
pipe(args.stars, params)
_pipe(args.stars, params)
# Concatenates output into two files
utils.scrape_output(params)
utils._scrape_output(params)


def setup(args):
"""
"""Quick software setup
Running this after installation will create the appropriate directories in the current working
directory as well as download example data and files to test your pySYD installation
Expand Down
Loading

0 comments on commit 4aaaf93

Please sign in to comment.