Giter Club home page Giter Club logo

afm-spirals's Introduction

afm-spirals

Analytical flyby framework (AFM) for spirals DOI

This is an analytical framework based on multi-variate normal distribuiton from Gaia DR3 outputs. See Shuai et al. (2022) for the mathematical derivation and corresponding paper (ApJS accepted).

Step 0: Query the Gaia DR3 archive using ADQL

Query the neighboring stars that are located within 10 pc from a given star. See Step0_ADQL.txt for an example using the MWC 758 system. Export the querying results in a .csv file in folder ./data_gaia_query/.

Step 1: Compute the frequentist results using the Gaia DR3 values

Run python Step1_Frequentist.py SR21 at Step1_Frequentist.py for the SR21 system (no blank spaces because the code reads sys.argv parameters).

The code reads the .csv file exported from Step 0, then writes the frequentist results in a .csv file in folder ./data_fequentist/.

Step 2: Perform Bayesian calculation for closest approach time for selected flyby candidates

Run python Step2_Bayesian.py SR21 68 at Step2_Bayesian.py for the SR21 system (no blank spaces because the code reads sys.argv parameters), where 68 is the row index of for SR21B in the corresponding .csv file from Step 1.

The code reads the .csv file exported from Step 1, then write the Bayesian results using emcee on closest-approach time in an .h5 file in folder ./data_mcmc/.

Step 3: Perform Monte Carlo sampling for closest approach distance for selected flyby candidates

Run python Step3_MC_distance.py SR21 68 at Step3_MC_distance.py to sample the distribution for closest approach distance. The distance samples will be stored at ./data_mcmc/ in a .npy file, see distance_posterior_SR21.npy for the corresponding example for SR21 and SR21B.

Citation

@software{shuai22,
  author       = {Linling Shuai and
                  Bin Ren},
  title        = {slinling/afm-spirals: pre-release v0.1},
  month        = oct,
  year         = 2022,
  publisher    = {Zenodo, doi: \href{https://doi.org/10.5281/zenodo.7156158}{10.5281/zenodo.7156158}},
  version      = {pre-release},
  doi          = {10.5281/zenodo.7156158},
  url          = {https://doi.org/10.5281/zenodo.7156158}
}

afm-spirals's People

Contributors

slinling avatar seawander avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.