Giter Club home page Giter Club logo

uldm_x_sparc's Introduction

ULDM_x_SPARC

This is a code to constrain the ultralight dark matter (ULDM) using the SPARC data set. The running modes contain {smart grid, even grid} x {soliton + NFW, soliton + Burkert, soliton only}. For soliton + NFW/Burkert, to speed up the marginalization of nuisance parameters, I recommend using emcee to propose a smart grid as it is defaulted now.

Results

soliton mass contained in each disk galaxy ULDM total density fraction

First plot is the constraint on soliton mass contained in each disk galaxy (normalized by the amount predicted by simulations,) second interpreted constraint on ULDM total density. See the publication for details.

Usage

Simple use case of a run with smart-grid can be invoked by

python run.py -N <length_of_chain> -o <path_to_output> -L <location_of_dataset> -i <path_to_input> -w <number_of_walkers>

for example:

python run.py -N 30000 -o ./chains/run_18_ma_24 -L ./data/ -i input/sample.param -w 100

where sample.param is the param card to be specified separately, with the range of the scan as well as galaxies of your choice.

After the run finishes, the chains can be either parsed by

python analyze.py -i <path_to_chain>

or by using the 1_demo_parse_smart_grid.ipynb.

The m slice run can also be automated with run_mslicing.py:

python run_mslicing.py -N <length_of_chain> -o <path_to_output> -L <location_of_dataset> -i <path_to_input> -w <number_of_walkers> -m 'logm_min logm_max number_of_slicing' -G 'galA galB ...'

for example:

python run_mslicing.py -N 30000 -o ./chains/run_000_NFW -L ./data -i input/sample_mslicing_2.param -w 100 -m '-25 -19 30' -G 'NGC0100 NGC2403'

will automatically run soliton+NFW model over NGC0100 and NGC2403 with 30 fixed m ranging from 1e-25 eV to 1e-19 eV. The h5 chains will be saved under ./chains/ folder.

For a scan of Soliton+anything with evenly spaced grid, see 2_demo_even_grid_scan.ipynb. For discussions on gravitational dynamical relaxation time scales, see 3_demo_dynamical_relaxation_time.ipynb.

License

This code is under MIT license.

BibTeX entry

If you use this code or find it in any way useful for your research, please cite Bar, Blum, and Sun (2021). The BibTeX entry is:

@article{Bar:2021kti,
    author = "Bar, Nitsan and Blum, Kfir and Sun, Chen",
    title = "{Galactic rotation curves vs. ultralight dark matter II}",
    eprint = "2111.03070",
    archivePrefix = "arXiv",
    primaryClass = "hep-ph",
    month = "11",
    year = "2021"
}

uldm_x_sparc's People

Contributors

chensun-phys avatar

Watchers

 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.