BASTA: The BAyesian STellar Algorithm

Overview

BASTA: BAyesian STellar Algorithm

Code style: black License: MIT Documentation Status arXiv

Current stable version: v1.0

Important note: BASTA is developed for Python 3.8, but Python 3.7 should work as well. Python 3.9 is currently not supported due to problems with h5py.

Before you begin

Please follow the repository here on GitHub to get notifications on new releases: Click "Watch" then "Custom" and tick "Releases.

Please have a look at our documentation.

There we have written a guide guide to installing BASTA.

On there, you will also find an introduction to running BASTA.

If you are curious on what BASTA can do, we have created several fitting examples and the exact code to run them available.

References and acknowledgments

There are two papers containing the rationale, main features, and capabilities of the code:

Please consider citing these references if you use BASTA in your work, and include the link to the code's repository https://github.com/BASTAcode/BASTA.

Due to its versatility, BASTA is used in a large variety of studies requiring robust determination of fundamental stellar properties. We have compiled a (non-exhaustive) list of papers using BASTA results that showcases these applications. If your paper using BASTA results is missing from the list please contact us.

Authors

The current core developing team are:

  • Víctor Aguirre Børsen-Koch
  • Jakob Lysgaard Rørsted
  • Mark Lykke Winther
  • Amalie Stokholm
  • Kuldeep Verma

Throughout the years, many people have contributed to the addition and development of various parts and modules of BASTA. We welcome further contributions from the community as well as issues reporting. Please look at the contribution section in the documentation for further details.

Comments
  • Update Asfgrid

    Update Asfgrid

    The Asfgrid of dnu corrections has been updated (https://iopscience.iop.org/article/10.3847/2515-5172/ac8b12) with more points and an extended range. It can be downloaded from here: http://www.physics.usyd.edu.au/k2gap/Asfgrid/ . This could be quite an upgrade for the BaSTI library to complement the Serenelli corrections.

    Update the code to use the new version -- REMEMBER that we patched the old version to work in BASTA. And that we added multiprocessing and therefore included some locks in the input to some routines.

    Note: This is actually more of an issue for the building routines! I have made this issue just to make sure that we check to compatibility when the grids are updated.

    grids 
    opened by jakobmoss 3
  • Rewrite _find_get to handle bools and added defaults for freqfit

    Rewrite _find_get to handle bools and added defaults for freqfit

    When during frequency fitting I discovered that it was required of me to specify threepoint=False in the freqparams xml tag. That makes no sense as (i) that is for ratio fitting and (ii) it should be False by default.

    I then discovered that _find_get could not handle the default value of threeport=False. This is a rewrite of that function.

    While I was at it, I added defaults for fcor (cubicBG14), correlations (False), and dnufrac (0.15). When fitting frequencies, you can simply just specify

    <freqparams>
        <freqpath value={path-to-frequencies}
    </freqparams>
    

    and add <freqs/> to fitparams and maybe set

    <freqplots>
        <True/>
    </freqplots>.
    
    opened by amaliestokholm 1
  • Epsilon-difference fitting and refactoring

    Epsilon-difference fitting and refactoring

    Implementation of epsilon-differences fitting (cf. our Plato-module). Major refactoring of the surface-independent fitting (i.e. ratios), especially the routines to do I/O and prepare the observations. Refactoring of plotting code (especially ratios) and added new plots.

    New plots:

    • Epsilon-differences diagnostic plots
    • Correlation map {freqs, ratios, epsdiff}
    • Plain echelle diagram
    • Single-panel ratio plots

    Other changes:

    • Ratios are interpolated to the observed frequencies
    opened by jakobmoss 0
  • Refactor `plot_seismic.echelle`

    Refactor `plot_seismic.echelle`

    This just refactors the code behind the echelle diagrams, which makes it more readable and less relient on the number of unique l values of the observations.

    It also makes small aesthetic changes such as changing $l$ to $\ell$ and adding the Frequency normalised by dnu axis to all plots and not just the duplicateechelle plots.

    opened by amaliestokholm 0
  • Requirements, json example, freqfit defaults

    Requirements, json example, freqfit defaults

    Update packages to newest versions (to make it installable on MacOS). Fix bug in json example. Fix bugs and add default values in frequency fitting (PR #17). Update plotting strings to match newest version of the Sharma/Stello (asfgrid) corrections.

    opened by jakobmoss 0
  • Update requirements and shipped grid

    Update requirements and shipped grid

    Two changes:

    • Bump requirements to newest versions and add bottleneck.
    • Switch to shipping the 16 Cyg A grid with new weights (based on Sobol volume). Reference examples updated to match; interpolation example still uses the old grid.
    opened by jakobmoss 0
  • 3-point ratios

    3-point ratios

    Add the option to use 3-point seperation ratios instead of the default 5-point. This is useful for reproducing older results or results from other groups.

    Additionally, the default of dnufit_in_ratios is changed to False (as it ought to have been always).

    opened by jakobmoss 0
  • Reddening coefficients for Gaia eDR3

    Reddening coefficients for Gaia eDR3

    Replaced the coefficients from DR2 with eDR3. The new coefficients follow the prescription of Casagrande and Vandenberg (2018). They are now the default Gaia coefficients

    opened by jakobmoss 0
  • Version 1.1.3

    Version 1.1.3

    Bring main to version 1.1.3.

    Calculation of bayesian weights when interpolating along a track is fixed -- before it used the base parameter, now it correctly uses seperation in age (or mass for isochrones). Details in #10 .

    opened by jakobmoss 0
  • Intpol bayweights along tracks fix

    Intpol bayweights along tracks fix

    The Bayesian weights along the tracks/isochrones "dage"/"dmass" were accidentially computed from the chosen base parameter in the interpolation, instead of the age/mass as they should. This update fixes that, by separately computing the "dage"/"dmass" for each track/isochrone after interpolation of all other quantities. This should also ensure they are always computed.

    opened by MLWinther 0
  • Version 1.1.2

    Version 1.1.2

    Bring main to version 1.1.2.

    Smoother KDE representations in the corner plots. Updated examples and documentation. Add published paper details.

    Full details in #7 .

    opened by jakobmoss 0
Releases(v1.2.0)
  • v1.2.0(Dec 16, 2022)

    New fitting mode and major refactoring.

    New features:

    • Epsilon-differences fitting (alternative surface-independent measure similar to ratios). Everything is derived only from the frequencies. Set e012 in fitparams (and activate correlations) and it runs. Includes new plots. The method will be described in the documentation in the next release and in more detail in an up-coming paper.

    Major changes:

    • Refactoring of all frequency-input handling, especially the treatment of ratios. Improves readability, reproducibility, and maintainability.
    • Refactoring of code to produce frequency-related plots. Common framework for clarity.
    • Ratios are interpolated to the observed frequencies (can be turned off).

    Minor changes:

    • Updated look of ratios plots (and now in single panel).
    • New echelle diagram with no pairing lines made by adding "echelle" to the plotting options. To get all of the different echelle diagrams in one go, add "allechelle". The examples are updated to use "allechelle".
    • New plot of the correlation matrix. Mainly for surface-independent fitting, where we always derive the full covariance matrix, but also works for frequencies if the input-covariances are provided.
    • New options for the frequency fitting (dnufit_in_ratios, interp_ratios).
    Source code(tar.gz)
    Source code(zip)
  • verma22(Nov 28, 2022)

    Version of BASTA used in Verma et al. (2022). This contains the new approach for fitting glitches and ratios together consistently (with a joint covariance matrix).

    This version is currently incompatible with the main version of BASTA and therefore released separately. The 'ratios and glitches together'-feature will be included in a main release later.

    Source code(tar.gz)
    Source code(zip)
  • v1.1.6(Nov 14, 2022)

    Minor bugfix/infrastructure release.

    Changes:

    • Update packages to newest versions.
    • Fix bug in json example.
    • Fix bugs and add default values in frequency fitting.
    • Update plotting strings to match newest version of the Sharma/Stello (asfgrid) corrections.
    Source code(tar.gz)
    Source code(zip)
  • v1.1.5(May 23, 2022)

    Will make the installation run out-of-the-box again (mitigates known issue with the version of Black). All requirements bumped.

    Additional changes:

    • Added Gaia eDR3 extinction values
    • The shipped 16 Cyg A grid contains the new weights
    • Added an option to use 3-point frequency ratios
    Source code(tar.gz)
    Source code(zip)
  • v1.1.4(Jan 12, 2022)

  • v1.1.3(Jan 4, 2022)

  • v1.1.2(Dec 21, 2021)

    Minor release.

    Smoother KDE representations in the corner plots.

    Fixes bugs in the examples (everything should now run out-of-the-box). Updated documentation to match examples.

    Full details in #7 and #9 .

    Source code(tar.gz)
    Source code(zip)
  • v1.1.1(Dec 1, 2021)

    Bugfix release!

    Fixes an issue causing dnu's to be incorrectly scaled to the solar value if only fitted and not in the output.

    Full details in #5 and #6 .

    Source code(tar.gz)
    Source code(zip)
  • v1.1(Nov 26, 2021)

    The main attraction is the support of Python 3.9 through support of h5py 3.x. Requirements are updated, so the virtual environment should be updated as well.

    New features:

    • Debugging plots for interpolation
    • Suppress summary from xml-generation (add --quiet)

    Main changes:

    • Handling of dnu in the input-xml (now always called 'dnu' and translated as file is read) -- please re-generate input-xml files
    • Prettier formatting of the printed output to console and log

    Important bugfixes:

    • Priors work for dnu's in solar units
    • Make 'light' install case work again
    • Interpolation fixes (only l=0 modes; distance included; trimming of box)

    Full details given in the associated pull request.

    Source code(tar.gz)
    Source code(zip)
  • v1.0(Sep 30, 2021)

  • v1.0-rc(Sep 30, 2021)

Owner
BASTA team
The Bayesian Stellar Algorithm (BASTA) development team
BASTA team
ArviZ is a Python package for exploratory analysis of Bayesian models

ArviZ (pronounced "AR-vees") is a Python package for exploratory analysis of Bayesian models. Includes functions for posterior analysis, data storage, model checking, comparison and diagnostics

ArviZ 1.3k Jan 5, 2023
Bayesian optimization in JAX

Bayesian optimization in JAX

Predictive Intelligence Lab 26 May 11, 2022
Combines Bayesian analyses from many datasets.

PosteriorStacker Combines Bayesian analyses from many datasets. Introduction Method Tutorial Output plot and files Introduction Fitting a model to a d

Johannes Buchner 19 Feb 13, 2022
Bonsai: Gradient Boosted Trees + Bayesian Optimization

Bonsai is a wrapper for the XGBoost and Catboost model training pipelines that leverages Bayesian optimization for computationally efficient hyperparameter tuning.

null 24 Oct 27, 2022
Case studies with Bayesian methods

Case studies with Bayesian methods

Baze Petrushev 8 Nov 26, 2022
Fourier-Bayesian estimation of stochastic volatility models

fourier-bayesian-sv-estimation Fourier-Bayesian estimation of stochastic volatility models Code used to run the numerical examples of "Bayesian Approa

null 15 Jun 20, 2022
Bayesian optimization based on Gaussian processes (BO-GP) for CFD simulations.

BO-GP Bayesian optimization based on Gaussian processes (BO-GP) for CFD simulations. The BO-GP codes are developed using GPy and GPyOpt. The optimizer

KTH Mechanics 8 Mar 31, 2022
Python implementation of the rulefit algorithm

RuleFit Implementation of a rule based prediction algorithm based on the rulefit algorithm from Friedman and Popescu (PDF) The algorithm can be used f

Christoph Molnar 326 Jan 2, 2023
This machine-learning algorithm takes in data from the last 60 days and tries to predict tomorrow's price of any crypto you ask it.

Crypto-Currency-Predictor This machine-learning algorithm takes in data from the last 60 days and tries to predict tomorrow's price of any crypto you

Hazim Arafa 6 Dec 4, 2022
This is an implementation of the proximal policy optimization algorithm for the C++ API of Pytorch

This is an implementation of the proximal policy optimization algorithm for the C++ API of Pytorch. It uses a simple TestEnvironment to test the algorithm

Martin Huber 59 Dec 9, 2022
using Machine Learning Algorithm to classification AppleStore application

AppleStore-classification-with-Machine-learning-Algo- using Machine Learning Algorithm to classification AppleStore application. the first step : 1: p

Mohammed Hussien 2 May 2, 2022
Module is created to build a spam filter using Python and the multinomial Naive Bayes algorithm.

Naive-Bayes Spam Classificator Module is created to build a spam filter using Python and the multinomial Naive Bayes algorithm. Main goal is to code a

Viktoria Maksymiuk 1 Jun 27, 2022
Send rockets to Mars with artificial intelligence(Genetic algorithm) in python.

Send Rockets To Mars With AI Send rockets to Mars with artificial intelligence(Genetic algorithm) in python. Tools Python 3 EasyDraw How to Play Insta

Mohammad Dori 3 Jul 15, 2022
Contains an implementation (sklearn API) of the algorithm proposed in "GENDIS: GEnetic DIscovery of Shapelets" and code to reproduce all experiments.

GENDIS GENetic DIscovery of Shapelets In the time series classification domain, shapelets are small subseries that are discriminative for a certain cl

IDLab Services 90 Oct 28, 2022
Implementation of K-Nearest Neighbors Algorithm Using PySpark

KNN With Spark Implementation of KNN using PySpark. The KNN was used on two separate datasets (https://archive.ics.uci.edu/ml/datasets/iris and https:

Zachary Petroff 4 Dec 30, 2022
Decision Tree Regression algorithm implemented on Python from scratch.

Decision_Tree_Regression I implemented the decision tree regression algorithm on Python. Unlike regular linear regression, this algorithm is used when

null 1 Dec 22, 2021
The project's goal is to show a real world application of image segmentation using k means algorithm

The project's goal is to show a real world application of image segmentation using k means algorithm

null 2 Jan 22, 2022
stellar-add-guest is a small tool to generate a new guest for Stellar Wireless (Enterprise mode) in OmniVista 2500 hosted on OmniSwitch with AOS Release 8

stellar-add-guest is a small tool to generate a new guest for Stellar Wireless (Enterprise mode) in OmniVista 2500 hosted on OmniSwitch with AOS Release 8.

BennyE 3 Jan 24, 2022
Genetic Algorithm, Particle Swarm Optimization, Simulated Annealing, Ant Colony Optimization Algorithm,Immune Algorithm, Artificial Fish Swarm Algorithm, Differential Evolution and TSP(Traveling salesman)

scikit-opt Swarm Intelligence in Python (Genetic Algorithm, Particle Swarm Optimization, Simulated Annealing, Ant Colony Algorithm, Immune Algorithm,A

郭飞 3.7k Jan 3, 2023
Genetic Algorithm, Particle Swarm Optimization, Simulated Annealing, Ant Colony Optimization Algorithm,Immune Algorithm, Artificial Fish Swarm Algorithm, Differential Evolution and TSP(Traveling salesman)

scikit-opt Swarm Intelligence in Python (Genetic Algorithm, Particle Swarm Optimization, Simulated Annealing, Ant Colony Algorithm, Immune Algorithm,A

郭飞 3.7k Jan 1, 2023